Solved

Java method for modifying udp checksum

Posted on 2004-10-20
8
1,081 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 250 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 250 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

737 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