@@ -2981,6 +2981,12 @@ s = raw(IPv6()/ICMPv6NIQueryName(data="n.d.org"))
29812981p = IPv6(s)
29822982ICMPv6NIQueryName in p and p[ICMPv6NIQueryName].data == b"n.d.org"
29832983
2984+ = ICMPv6NIQueryName - dissection
2985+ s = b'\x8b\x00z^\x00\x02\x00\x00\x00\x03g\x90\xc7\xa3\xdd[\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'
2986+ p = ICMPv6NIQueryName(s)
2987+ p.show()
2988+ assert ICMPv6NIQueryName in p and p.data == "ff02::1"
2989+
29842990
29852991############
29862992############
@@ -3049,6 +3055,20 @@ type(a) is tuple and len(a) == 2 and a[0] == 2 and a[1] == '169.254.253.252'
30493055= ICMPv6NIQueryIPv4 - IPv4 address
30503056ICMPv6NIQueryIPv4(data="169.254.253.252").data == '169.254.253.252'
30513057
3058+ = ICMPv6NIQueryIPv4 - dissection
3059+ s = b'\x8b\x01\x00\x00\x00\x04\x00\x00\xc2\xb9\xc2\x96\xc3\xa1.H\x07freebsd\x00\x00'
3060+ p = ICMPv6NIQueryIPv4(s)
3061+ p.show()
3062+ assert ICMPv6NIQueryIPv4 in p and p.data == b"freebsd"
3063+
3064+ = ICMPv6NIQueryIPv4 - hashret()
3065+ ~ not_pypy random_weird_py3
3066+ random.seed(0x2807)
3067+ p = IPv6()/ICMPv6NIQueryIPv4(data="freebsd")
3068+ h_py2 = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00:\xe10S7\x9d\x91\x84\xc9'
3069+ h_py3 = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00:\xa8\x19uE\x01\xcf\xe3\x04'
3070+ assert p.hashret() in [h_py2, h_py3]
3071+
30523072
30533073############
30543074############
@@ -3278,6 +3298,13 @@ type(a) is tuple and len(a) == 2 and a[0] == 2 and type(a[1]) is list and len(a[
32783298= ICMPv6NIReplyName - [ttl, single-label, single-label, fqdn]
32793299ICMPv6NIReplyName(data=[42, "abricot", "poire", "n.d.tld"]).data == [42, b"abricot", b"poire", b"n.d.tld"]
32803300
3301+ = ICMPv6NIReplyName - dissection
3302+
3303+ s = b'\x8c\x00\xd1\x0f\x00\x02\x00\x00\x00\x00\xd9$\x94\x8d\xc6%\x00\x00\x00\x00\x07freebsd\x00\x00'
3304+ p = ICMPv6NIReplyName(s)
3305+ p.show()
3306+ assert ICMPv6NIReplyName in p and p.data == [0, b'freebsd']
3307+
32813308
32823309############
32833310############
0 commit comments