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.
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. 😉