Date: Thu, 29 Jun 2006 08:26:24 GMT From: Clément Lecigne <clem1@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 100273 for review Message-ID: <200606290826.k5T8QOLw024662@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100273 Change 100273 by clem1@clem1_ipv6vulns on 2006/06/29 08:26:23 pcs ipv6 packet manipulation improvements and bug fix. Affected files ... .. //depot/projects/soc2006/clem1_ipv6vulns/pcs/pcs/packets/ipv6.py#4 edit Differences ... ==== //depot/projects/soc2006/clem1_ipv6vulns/pcs/pcs/packets/ipv6.py#4 (text+ko) ==== @@ -41,9 +41,12 @@ from socket import AF_INET6, inet_ntop # extension header next header field. +IPV6_HOPOPTS = 0 +IPV6_RTHDR = 43 IPV6_FRAG = 44 -IPV6_HOPOPTS = 49 -IPV6_RTHDR = 43 +IPV6_ESP = 50 +IPV6_AH = 51 +IPV6_NONE = 59 IPV6_DSTOPTS = 60 class ipv6(pcs.Packet): @@ -74,7 +77,7 @@ value = inet_ntop(AF_INET6, self.__dict__[field.name]) retval += "%s %s\n" % (field.name, value) else: - retval += "%s %s\n" % (field.name, self.__dict__[field.name]) + retval += "%s %d\n" % (field.name, self.__dict__[field.name]) return retval def getipv6(self, iface): @@ -131,6 +134,7 @@ def option(self, len = 0): """add option header to the hop-by-hop extension header""" + # XXX: pad0 option has not this header. global op op += 1 otype = pcs.Field("otype" + str(op), 8) @@ -157,10 +161,11 @@ len = pcs.Field("length", 8) type = pcs.Field("type", 8) pcs.Packet.__init__(self, - [next, len, type, segments_left], bytes) + [next, len, type], bytes) def option(self, len = 0): """add option header to the destination extension header""" + # XXX: pad0 option has not this header. global op op += 1 otype = pcs.Field("otype" + str(op), 8) @@ -186,4 +191,3 @@ identification = pcs.Field("identification", 32) pcs.Packet.__init__(self, [next, reserved, offset, res, m, identification], bytes) -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606290826.k5T8QOLw024662>