From 32b486ea63b5af17a4a2c4450954f4897fc3fd72 Mon Sep 17 00:00:00 2001 From: selias Date: Thu, 18 Aug 2016 11:08:17 +0200 Subject: CSIT-251 IPv6 IPFIX - baseline tests - add support for IPv6 fields to IPFIX data class - add IPv6 IPFIX test suite Change-Id: I8a0197c9e7dd91303feea11111c158698252a1eb Signed-off-by: selias --- resources/libraries/python/IPFIXUtil.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'resources/libraries') diff --git a/resources/libraries/python/IPFIXUtil.py b/resources/libraries/python/IPFIXUtil.py index f3247a8982..750c4d66ee 100644 --- a/resources/libraries/python/IPFIXUtil.py +++ b/resources/libraries/python/IPFIXUtil.py @@ -23,6 +23,7 @@ with IPFIX packets. from scapy.all import Packet, bind_layers from scapy.fields import * from scapy.layers.inet import UDP +from scapy.layers.inet6 import IP6Field from scapy.contrib.ppi_geotag import UTCTimeField @@ -37,11 +38,14 @@ class IPFIXHandler(object): 8: IPField("IPv4_src", ""), 11: ShortField("dst_port", 0), 12: IPField("IPv4_dst", ""), + 27: IP6Field("IPv6_src", "::"), + 28: IP6Field("IPv6_dst", "::"), 86: LongField("packetTotalCount", 0), 180: ShortField("udp_src_port", 0), 181: ShortField("udp_dst_port", 0), 182: ShortField("tcp_src_port", 0), 183: ShortField("tcp_dst_port", 0), + 193: ByteField("Next_header", 0x00) } def __init__(self): -- cgit 1.2.3-korg