send ipv6 jumbograms in c (linux) : How to change packet headers

微笑、不失礼 提交于 2019-12-12 23:20:59

问题


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 :

  1. set payload length to 0
  2. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!