Solved

Java method for modifying udp checksum

Posted on 2004-10-20
8
1,074 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
  • 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
factorial example challenge 10 62
Eclipse Neon and jdk 1.8.0 11 72
Java / Linux and Regular Expressions 11 48
mockito example issue 8 38
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
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 …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

747 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now