有没有人在 java 中创建了 IPv6 IP 标头(40 字节)?我创建了 IPv4 标头。
/**
* Creates IP header for given SIP packet
* Length of IP header is 20 octets. Below information shall be stored in each octet:
* Octet-0 - 0x45 (Version and length)
* Octet-1 - 0x00 (Type of service)
* Octet-2 - Upper byte of length of IP header and data
* Octet-3 - Lower byte of length of IP header and data
* Octet-4 - 0x00 (Upper byte of identification)
* Octet-5 - 0x00 (Lower byte of identification)
* Octet-6 - 0x00 (Flag)
* Octet-7 - 0x00 (Fragment Offset)
* Octet-8 - 0x80 (Time to live)
* Octet-9 - 0x11 (Protocol UDP)
* Octet-10 - Upper byte of checksum
* Octet-11 - Lower byte of checksum
* Octet-12 - Source IP address
* Octet-13 - Source IP address
* Octet-14 - Source IP address
* Octet-15 - Source IP address
* Octet-16 - Destination IP address
* Octet-17 - Destination IP address
* Octet-18 - Destination IP address
* Octet-19 - Destination IP address
*/