Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Archana Karthik
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Archana Karthik
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic