问题
I am sorry if the question is too naive, but I am confused. I want to send IPv6 jumbograms
(to be able to multicast packets of size > 64 KB). I have been able to multicast normal IPv6 UDP packets successfully.
For sending jumbograms, from RFC 2675
, I get that I have to make the following changes :
- set payload length to 0
- set next header to hop-by-hop
But, I don't get how to implement these in c socket programming
(which function calls to make etc.). Do I have to create a custom header or are there functions like sendto
available to send jumbograms?
回答1:
You could use raw sockets if you are making your own headers. For more information, type man -s7 raw
or look here. Note you will effectively need to implement your own IP stack that way.
However, my understanding is that linux itself supports IPv6 jumbograms natively so you don't need to bother. Try ifconfig lo mtu 100000
and do some tests over the loopback device to check.
I suspect the issue might be that your network adaptor and everything on the path (end to end) needs to support the jumbograms too.
来源:https://stackoverflow.com/questions/32685846/send-ipv6-jumbograms-in-c-linux-how-to-change-packet-headers