Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Java method for modifying udp checksum

Posted on 2004-10-20
8
Medium Priority
?
1,083 Views
Last Modified: 2008-01-16
Hi
I would like to know if there is a java method that enables the modification of the udp checksum field in the udp header? IF so then what method izzit?
0
Comment
Question by:blaze_wk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 750 total points
ID: 12356077
You may need a raw socket library in Java (using JNI). Not sure if one exists though ...
0
 
LVL 35

Accepted Solution

by:
TimYates earned 750 total points
ID: 12356129
I think this is as close as it gets:

http://jpcap.sourceforge.net/

But I may be wrong...  Basically, as CEHJ says, this cannot be done with java...  

You will need to write some C code to do this, and call it from java...

I *believe* that from java 1.5, they are looking at adding more "raw" socket support for java, but don't expect too much too soon ;-)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12356183
Here's a JNI example which allows ICMP (Ping) requests.

It includes ll the c code and java required for doing a "Ping", so you should be able to alter it to create your UDP packets...

Hope it helps:

http://www.teamlinux.org.uk/saxm/projects/icmp/
0
Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

 
LVL 86

Expert Comment

by:CEHJ
ID: 12356388
A related problem is that Windows itself has not supported raw sockets until XP (much to the chagrin of the likes of Ian Gibson http://grc.com , who sees it as yet another tool to create Windoze malware)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12356493
You could get an updated winsock.dll that did them in previous versions of Windows (you had to be administrator to make them)...yeah XP (I think) got rid of this limitation and added them natively, but SP2 took them back out again...  *sigh*

http://www.interact-sw.co.uk/iangblog/2004/08/12/norawsockets

0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12356567
LOL - sorry - *Steve* Gibson yes!. Ian Gibson is an hispanophile and author of the book "The English Vice" ;-)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12356747
8-)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12356758
:-)
0

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question