在java中制作自定义ipv6数据包
我正在 java 中开发移动 ipv6,并且想要制作自定义 ipv6 数据包。
如何编写类来制作 ipv6 数据包并自己放置有效负载?
以下是同类课程的例子:
CustomIPv6 ipv6 = new CustomIPv6();
ipv6.setSource("::1");
ipv6.setDestination("::1");
ipv6.setPayload(MyArrayOfByte); //The byte array which I made it myself. -> the mobile ipv6 extention
ipv6.setUpperLayerType(CustomIPv6.MobilityHeader);
ipv6.sendPacket();
byte[] recv = ipv6.ReceivPacket();
//Now is the time for process the received packet and send some kind of ack.
先谢谢各位朋友了。
I'm working on mobile ipv6 in java and want to make custom ipv6 packets.
how do I write class to make ipv6 packets and I put the payload myself?
Following is the example of the similar class:
CustomIPv6 ipv6 = new CustomIPv6();
ipv6.setSource("::1");
ipv6.setDestination("::1");
ipv6.setPayload(MyArrayOfByte); //The byte array which I made it myself. -> the mobile ipv6 extention
ipv6.setUpperLayerType(CustomIPv6.MobilityHeader);
ipv6.sendPacket();
byte[] recv = ipv6.ReceivPacket();
//Now is the time for process the received packet and send some kind of ack.
Thanks all friends in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 http://jnetpcap.com/ 执行此操作,但需要安装 libpcap 或 winpcap。此功能对于网络黑客攻击非常有用,这可能就是它没有得到更好支持的原因。 ;)
You can do this with http://jnetpcap.com/ however it requires libpcap or winpcap be installed. This facility is useful for network hacking which could be why it is not better supported. ;)