Question

I am interested in sending Jumbo Frames, I have two issues:

1) I cannot seem to know, before actually trying (and getting an error), whether I can or not send Jumbo Frames. It appears it is only possible when a certain type of network adapters are present (i.e. Gigabit Network Card).

Is there a way to know the maximum allowed packet I can send via pcap without actually needing to send and fail?

2) I cannot find any documentation on how pcap handles such large packets - it seems that it works well up to 1536 (+-) from that point, even with the right equipment (i.e Gigabit card), traffic is shaky, and errors show relevant to pcap_sendpacket() function, and it failing to send the data (the error is a generic cannot send packet error, nothing related to big packet, or similar).

Has anyone tried to send such big packets using Pcap?

(My environment - if it matters, is Windows, but the code is cross-platform and I expect the same "issues" on Linux)

Was it helpful?

Solution

Is there a way to know the maximum allowed packet I can send via pcap without actually needing to send and fail?

Not from pcap. It might, at least on some platforms, be possible to determine the interface MTU, which might indicate whether jumbo frames are supported (if the MTU is 1500, no; if the MTU is bigger than 1500, yes, with the limit being the MTU + 14 bytes for the MAC header). The way that would be done is platform-dependent, so it might be useful to provide a "get maximum packet size" call in pcap; it doesn't have one currently, however.

I cannot find any documentation on how pcap handles such large packets

pcap handles those packets by handing them to the OS :-) What happens after that is a function of the OS's code.

(My environment - if it matters, is Windows, but the code is cross-platform and I expect the same "issues" on Linux)

Your code may be cross-platform, but libpcap/WinPcap's code, whilst it provides a cross-platform API, is most definitely not cross-platform; it is implemented very differently on different platforms, so you may or may not see the same issues on various OSes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top