@@ -2953,6 +2953,12 @@ s = raw(IPv6()/ICMPv6NIQueryName(data="n.d.org"))
29532953p = IPv6(s)
29542954ICMPv6NIQueryName in p and p[ICMPv6NIQueryName].data == b"n.d.org"
29552955
2956+ = ICMPv6NIQueryName - dissection
2957+ 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'
2958+ p = ICMPv6NIQueryName(s)
2959+ p.show()
2960+ assert ICMPv6NIQueryName in p and p.data == "ff02::1"
2961+
29562962
29572963############
29582964############
@@ -3021,6 +3027,20 @@ type(a) is tuple and len(a) == 2 and a[0] == 2 and a[1] == '169.254.253.252'
30213027= ICMPv6NIQueryIPv4 - IPv4 address
30223028ICMPv6NIQueryIPv4(data="169.254.253.252").data == '169.254.253.252'
30233029
3030+ = ICMPv6NIQueryIPv4 - dissection
3031+ s = b'\x8b\x01\x00\x00\x00\x04\x00\x00\xc2\xb9\xc2\x96\xc3\xa1.H\x07freebsd\x00\x00'
3032+ p = ICMPv6NIQueryIPv4(s)
3033+ p.show()
3034+ assert ICMPv6NIQueryIPv4 in p and p.data == b"freebsd"
3035+
3036+ = ICMPv6NIQueryIPv4 - hashret()
3037+ ~ not_pypy random_weird_py3
3038+ random.seed(0x2807)
3039+ p = IPv6()/ICMPv6NIQueryIPv4(data="freebsd")
3040+ h_py2 = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00:\xe10S7\x9d\x91\x84\xc9'
3041+ 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'
3042+ assert p.hashret() in [h_py2, h_py3]
3043+
30243044
30253045############
30263046############
@@ -3250,6 +3270,13 @@ type(a) is tuple and len(a) == 2 and a[0] == 2 and type(a[1]) is list and len(a[
32503270= ICMPv6NIReplyName - [ttl, single-label, single-label, fqdn]
32513271ICMPv6NIReplyName(data=[42, "abricot", "poire", "n.d.tld"]).data == [42, b"abricot", b"poire", b"n.d.tld"]
32523272
3273+ = ICMPv6NIReplyName - dissection
3274+
3275+ s = b'\x8c\x00\xd1\x0f\x00\x02\x00\x00\x00\x00\xd9$\x94\x8d\xc6%\x00\x00\x00\x00\x07freebsd\x00\x00'
3276+ p = ICMPv6NIReplyName(s)
3277+ p.show()
3278+ assert ICMPv6NIReplyName in p and p.data == [0, b'freebsd']
3279+
32533280
32543281############
32553282############
0 commit comments