Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Java method for modifying udp checksum

Posted on 2004-10-20
8
Medium Priority
?
1,084 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 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

916 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