This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes Jpcap Library sendPacket drops packet when DF flag is set to true Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Jpcap Library sendPacket drops packet when DF flag is set to true" Watch "Jpcap Library sendPacket drops packet when DF flag is set to true" New topic
Author

Jpcap Library sendPacket drops packet when DF flag is set to true

Archana Karthik
Greenhorn

Joined: Dec 06, 2011
Posts: 3
I would like implement Path MTU discovery using jpcap library(netresearch.ics.uci.edu). When I set the dont fragment bit, and increase the packet length, the packet gets dropped(It isn't sent)

Is there someway I could detect fragmentation needed?

icmp.setIPv4Parameter(0,false,false,false,0,false,true,false,0,0,30,IPPacket.IPPROTO_ICMP,thisIP,pingIpaddr);
System.arraycopy(packet, 0, icmp.data,0,3000);
....

sender.sendPacket(icmp);
System.out.println("Sent");
ICMPPacket p=(ICMPPacket) captor.getPacket();
.....

The message "Sent" is never printed. The program stops after sender.sendPacket(icmp). Not sure how to debug or go about this problem. Any pointers on this one?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19538
    
  16

Please BeForthrightWhenCrossPostingToOtherSites: http://stackoverflow.com/questions/10287496/sendpacket-api-in-jpcap-library-is-dropping-packets-if-i-set-dfdo-not-fragment


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Archana Karthik
Greenhorn

Joined: Dec 06, 2011
Posts: 3
Thanks. I will make note of it.

I had posted it in here as well because I wanted to maximize the chances of getting a quick reply. http://stackoverflow.com/questions/10287496/sendpacket-api-in-jpcap-library-is-dropping-packets-if-i-set-dfdo-not-fragment
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jpcap Library sendPacket drops packet when DF flag is set to true
 
Similar Threads
JDK 5 has included Jpcap ?
Traceroute using Jpcap problem
"packet length" or "captured length" in "Jpcap" library !?
Adding text to a text area
Someone please help me with the traceroute using jpcap