diff options
author | selias <samelias@cisco.com> | 2016-08-18 11:08:17 +0200 |
---|---|---|
committer | Jan Gelety <jgelety@cisco.com> | 2016-08-25 23:26:15 +0000 |
commit | 32b486ea63b5af17a4a2c4450954f4897fc3fd72 (patch) | |
tree | b23b53331bff1ae2c246e18f9cbd4626271036c1 /resources/libraries/python/IPFIXUtil.py | |
parent | f591e5d8bd72f5f60d3c26222b14b512366fedc3 (diff) |
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 <samelias@cisco.com>
Diffstat (limited to 'resources/libraries/python/IPFIXUtil.py')
-rw-r--r-- | resources/libraries/python/IPFIXUtil.py | 4 |
1 files changed, 4 insertions, 0 deletions
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): |