Solved

Java method for modifying udp checksum

Posted on 2004-10-20
8
1,079 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
Independent Software Vendors: 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!

 
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

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…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

735 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