views:

116

answers:

2

use of TOS, identifier, flag fields for IP address using java code for deterministic packet marking

A: 

You can't do this in Java. You can set the TrafficClass on a Socket or DatagramSocket. That's it.

EJP
A: 

Highly untested answer: use reflection to create java.net. PlainSocketImpl instances and see what you can do with it. Reflection is because this class is not public...

Other option: use JNI to call a C/C++ wrapper library of your making that will set the flags as you wish.

mlaverd
That suggestion doesn't help in the slightest. There is nothing in the public or private API that will help here. Indeed there is nothing for several layers further down short of using JPcap, which has its own limitations.
EJP