scapy.layers.netflow¶
Cisco NetFlow protocol v1, v5, v9 and v10 (IPFix)
HowTo dissect NetflowV9/10 (IPFix) packets
# From a pcap / list of packets
Using sniff and sessions:
>>> sniff(offline=open("my_great_pcap.pcap", "rb"), session=NetflowSession)
Using the netflowv9_defragment/ipfix_defragment commands:
get a list of packets containing NetflowV9/10 packets
call netflowv9_defragment(plist) to defragment the list
(ipfix_defragment is an alias for netflowv9_defragment)
# Live / on-the-flow / other: use NetflowSession:
>>> sniff(session=NetflowSession, prn=[...])
-
scapy.layers.netflow.GetNetflowRecordV9(flowset, templateID=None)¶ Get a NetflowRecordV9/10 for a specific NetflowFlowsetV9/10.
Have a look at the online doc for examples.
-
class
scapy.layers.netflow.N9SecondsIntField(name, default, *args, **kargs)¶ Bases:
scapy.fields.SecondsIntField,scapy.layers.netflow._AdjustableNetflowFieldDefines dateTimeSeconds (without EPOCH: just seconds)
-
class
scapy.layers.netflow.N9UTCTimeField(name, default, *args, **kargs)¶ Bases:
scapy.fields.UTCTimeField,scapy.layers.netflow._AdjustableNetflowFieldDefines dateTimeSeconds (EPOCH)
-
class
scapy.layers.netflow.NetflowDataflowsetV9(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
classmethod
dispatch_hook(_pkt=None, *args, **kargs)¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TEMPLATEID | LENGTH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RECORDS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowDataflowsetV9NetflowDataflowsetV9 fields¶ templateID
255length
Nonerecords
[]
-
payload_guess¶ Possible sublayers:
NetflowDataflowsetV9
-
-
class
scapy.layers.netflow.NetflowFlowsetV9(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FLOWSETID | LENGTH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TEMPLATES | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowFlowsetV9NetflowFlowsetV9 fields¶ flowSetID
0length
Nonetemplates
[]
-
payload_guess¶ Possible sublayers:
NetflowDataflowsetV9
-
-
class
scapy.layers.netflow.NetflowHeader(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VERSION | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowHeaderNetflowHeader fields¶ version
1
-
payload_guess¶ Possible sublayers:
NetflowHeaderV10,NetflowHeaderV1,NetflowHeaderV5,NetflowHeaderV9
-
-
class
scapy.layers.netflow.NetflowHeaderV1(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | COUNT | SYSUPTIME | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | UNIXSECS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | UNIXNANOSECONDS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowHeaderV1NetflowHeaderV1 fields¶ count
NonesysUptime
0unixSecs
0unixNanoSeconds
0
-
payload_guess¶ Possible sublayers:
NetflowRecordV1
-
post_build(pkt, pay)¶
-
-
class
scapy.layers.netflow.NetflowHeaderV10(*args, **kargs)¶ Bases:
scapy.packet.PacketIPFix (Netflow V10) Header
-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LENGTH | EXPORTTIME | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | FLOWSEQUENCE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | OBSERVATIONDOMAINID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowHeaderV10NetflowHeaderV10 fields¶ length
NoneExportTime
0flowSequence
0ObservationDomainID
0
-
payload_guess¶ Possible sublayers:
NetflowDataflowsetV9
-
post_build(pkt, pay)¶
-
-
class
scapy.layers.netflow.NetflowHeaderV5(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | COUNT | SYSUPTIME | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | UNIXSECS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | UNIXNANOSECONDS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | FLOWSEQUENCE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ENGINETYPE | ENGINEID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SAMPLINGINTERVAL | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowHeaderV5NetflowHeaderV5 fields¶ count
NonesysUptime
0unixSecs
0unixNanoSeconds
0flowSequence
0engineType
0engineID
0samplingInterval
0
-
payload_guess¶ Possible sublayers:
NetflowRecordV5
-
post_build(pkt, pay)¶
-
-
class
scapy.layers.netflow.NetflowHeaderV9(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | COUNT | SYSUPTIME | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | UNIXSECS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | PACKAGESEQUENCE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | SOURCEID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowHeaderV9NetflowHeaderV9 fields¶ count
NonesysUptime
0unixSecs
NonepackageSequence
0SourceID
0
-
payload_guess¶ Possible sublayers:
NetflowDataflowsetV9
-
post_build(pkt, pay)¶
-
-
class
scapy.layers.netflow.NetflowOptionsFlowset10(*args, **kargs)¶ Bases:
scapy.layers.netflow.NetflowOptionsFlowsetV9Netflow V10 (IPFix) Options Template FlowSet
-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FLOWSETID | LENGTH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TEMPLATEID | FIELD COUNT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SCOPE FIELD COUNT | SCOPES | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | OPTIONS | PAD | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowOptionsFlowset10NetflowOptionsFlowset10 fields¶ flowSetID
3length
NonetemplateID
255field_count
Nonescope_field_count
Nonescopes
[]options
[]pad
None
-
post_build(pkt, pay)¶
-
-
class
scapy.layers.netflow.NetflowOptionsFlowsetOptionV9(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
default_payload_class(p)¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |E| OPTIONFIELDTYPE | OPTIONFIELDLENGTH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ENTERPRISENUMBER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowOptionsFlowsetOptionV9NetflowOptionsFlowsetOptionV9 fields¶ enterpriseBit
BitField(1 bit)0optionFieldType
BitEnumField(15 bits)NoneoptionFieldlength
0enterpriseNumber
ShortField(Cond)0
-
-
class
scapy.layers.netflow.NetflowOptionsFlowsetScopeV9(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
default_payload_class(p)¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SCOPEFIELDTYPE | SCOPEFIELDLENGTH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowOptionsFlowsetScopeV9NetflowOptionsFlowsetScopeV9 fields¶ scopeFieldType
NonescopeFieldlength
0
-
-
class
scapy.layers.netflow.NetflowOptionsFlowsetV9(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
default_payload_class(p)¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FLOWSETID | LENGTH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TEMPLATEID | OPTION SCOPE LENGTH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | OPTION FIELD LENGTH | SCOPES | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | OPTIONS | PAD | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowOptionsFlowsetV9NetflowOptionsFlowsetV9 fields¶ flowSetID
1length
NonetemplateID
255option_scope_length
Noneoption_field_length
Nonescopes
[]options
[]pad
None
-
payload_guess¶ Possible sublayers:
NetflowDataflowsetV9
-
post_build(pkt, pay)¶
-
-
class
scapy.layers.netflow.NetflowOptionsRecordOptionV9(*args, **kargs)¶ Bases:
scapy.layers.netflow.NetflowRecordV9-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FIELDVALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowOptionsRecordOptionV9NetflowOptionsRecordOptionV9 fields¶ fieldValue
b''
-
-
class
scapy.layers.netflow.NetflowOptionsRecordScopeV9(*args, **kargs)¶ Bases:
scapy.layers.netflow.NetflowRecordV9-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FIELDVALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowOptionsRecordScopeV9NetflowOptionsRecordScopeV9 fields¶ fieldValue
b''
-
-
class
scapy.layers.netflow.NetflowRecordV1(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPSRC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IPDST | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NEXTHOP | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | INPUTIFINDEX | OUTPUIFINDEX | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DPKTS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DBYTES | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | STARTTIME | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ENDTIME | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SRCPORT | DSTPORT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PADDING | PROTO | TOS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PADDING1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PADDING2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowRecordV1NetflowRecordV1 fields¶ ipsrc
'0.0.0.0'ipdst
'0.0.0.0'nexthop
'0.0.0.0'inputIfIndex
0outpuIfIndex
0dpkts
0dbytes
0starttime
0endtime
0srcport
0dstport
0padding
0proto
0tos
0padding1
0padding2
0
-
payload_guess¶ Possible sublayers:
NetflowRecordV1
-
-
class
scapy.layers.netflow.NetflowRecordV5(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SRC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DST | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NEXTHOP | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | INPUT | OUTPUT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DPKTS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DOCTETS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FIRST | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LAST | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SRCPORT | DSTPORT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PAD1 | TCPFLAGS | PROT | TOS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SRC AS | DST AS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SRC MASK | DST MASK | PAD2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowRecordV5NetflowRecordV5 fields¶ src
'127.0.0.1'dst
'127.0.0.1'nexthop
'0.0.0.0'input
0output
0dpkts
1dOctets
60first
0last
0srcport
0dstport
0pad1
0tcpFlags
FlagsField(8 bits)<Flag 2 (S)>prot
6tos
0src_as
0dst_as
0src_mask
0dst_mask
0pad2
0
-
payload_guess¶ Possible sublayers:
NetflowRecordV5
-
-
class
scapy.layers.netflow.NetflowRecordV9(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
default_payload_class(p)¶
-
-
class
scapy.layers.netflow.NetflowSession(*args, **kwargs)¶ Bases:
scapy.sessions.IPSessionSession used to defragment NetflowV9/10 packets on the flow. See help(scapy.layers.netflow) for more infos.
-
on_packet_received(pkt)¶
-
-
class
scapy.layers.netflow.NetflowTemplateFieldV9(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
default_payload_class(p)¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |E| FIELDTYPE | FIELDLENGTH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ENTERPRISENUMBER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowTemplateFieldV9NetflowTemplateFieldV9 fields¶ enterpriseBit
BitField(1 bit)0fieldType
BitEnumField(15 bits)NonefieldLength
0enterpriseNumber
IntField(Cond)0
-
-
class
scapy.layers.netflow.NetflowTemplateV9(*args, **kargs)¶ Bases:
scapy.packet.Packet-
aliastypes¶
-
default_payload_class(p)¶
-
fields_desc¶ Display RFC-like schema
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TEMPLATEID | FIELDCOUNT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TEMPLATE FIELDS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NetflowTemplateV9NetflowTemplateV9 fields¶ templateID
255fieldCount
Nonetemplate_fields
[]
-
-
class
scapy.layers.netflow.ShortOrInt(name, default)¶ Bases:
scapy.fields.IntField-
getfield(pkt, x)¶
-
-
scapy.layers.netflow.ipfix_defragment(*args, **kwargs)¶ Alias for netflowv9_defragment
-
scapy.layers.netflow.netflowv9_defragment(plist, verb=1)¶ Process all NetflowV9/10 Packets to match IDs of the DataFlowsets with the Headers
- params:
plist: the list of mixed NetflowV9/10 packets.
verb: verbose print (0/1)