scapy.contrib.openflow module

class scapy.contrib.openflow.OFPAT

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.openflow.OFPAT'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
class scapy.contrib.openflow.OFPATEnqueue

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATEnqueue'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATEnqueue).type>, <Field (OFPATEnqueue).len>, <Field (OFPATEnqueue).port>, <Field (OFPATEnqueue).pad>, <Field (OFPATEnqueue).queue_id>]
class scapy.contrib.openflow.OFPATOutput

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATOutput'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATOutput).type>, <Field (OFPATOutput).len>, <Field (OFPATOutput).port>, <Field (OFPATOutput).max_len>]
class scapy.contrib.openflow.OFPATSetDlDst

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATSetDlDst'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATSetDlDst).type>, <Field (OFPATSetDlDst).len>, <Field (OFPATSetDlDst).dl_addr>, <Field (OFPATSetDlDst).pad>]
class scapy.contrib.openflow.OFPATSetDlSrc

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATSetDlSrc'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATSetDlSrc).type>, <Field (OFPATSetDlSrc).len>, <Field (OFPATSetDlSrc).dl_addr>, <Field (OFPATSetDlSrc).pad>]
class scapy.contrib.openflow.OFPATSetNwDst

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATSetNwDst'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATSetNwDst).type>, <Field (OFPATSetNwDst).len>, <Field (OFPATSetNwDst).nw_addr>]
class scapy.contrib.openflow.OFPATSetNwSrc

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATSetNwSrc'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATSetNwSrc).type>, <Field (OFPATSetNwSrc).len>, <Field (OFPATSetNwSrc).nw_addr>]
class scapy.contrib.openflow.OFPATSetNwToS

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATSetNwToS'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATSetNwToS).type>, <Field (OFPATSetNwToS).len>, <Field (OFPATSetNwToS).nw_tos>, <Field (OFPATSetNwToS).pad>]
class scapy.contrib.openflow.OFPATSetTpDst

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATSetTpDst'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATSetTpDst).type>, <Field (OFPATSetTpDst).len>, <Field (OFPATSetTpDst).tp_port>, <Field (OFPATSetTpDst).pad>]
class scapy.contrib.openflow.OFPATSetTpSrc

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATSetTpSrc'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATSetTpSrc).type>, <Field (OFPATSetTpSrc).len>, <Field (OFPATSetTpSrc).tp_port>, <Field (OFPATSetTpSrc).pad>]
class scapy.contrib.openflow.OFPATSetVLANPCP

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATSetVLANPCP'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATSetVLANPCP).type>, <Field (OFPATSetVLANPCP).len>, <Field (OFPATSetVLANPCP).vlan_pcp>, <Field (OFPATSetVLANPCP).pad>]
class scapy.contrib.openflow.OFPATSetVLANVID

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATSetVLANVID'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATSetVLANVID).type>, <Field (OFPATSetVLANVID).len>, <Field (OFPATSetVLANVID).vlan_vid>, <Field (OFPATSetVLANVID).pad>]
class scapy.contrib.openflow.OFPATStripVLAN

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATStripVLAN'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATStripVLAN).type>, <Field (OFPATStripVLAN).len>, <Field (OFPATStripVLAN).pad>]
class scapy.contrib.openflow.OFPATVendor

Bases: scapy.contrib.openflow.OpenFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPATVendor'>, <class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPATVendor).type>, <Field (OFPATVendor).len>, <Field (OFPATVendor).vendor>]
class scapy.contrib.openflow.OFPETBadAction

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPETBadAction'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPETBadAction).version>, <Field (OFPETBadAction).type>, <Field (OFPETBadAction).len>, <Field (OFPETBadAction).xid>, <Field (OFPETBadAction).errtype>, <Field (OFPETBadAction).errcode>, <Field (OFPETBadAction).data>]
class scapy.contrib.openflow.OFPETBadRequest

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPETBadRequest'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPETBadRequest).version>, <Field (OFPETBadRequest).type>, <Field (OFPETBadRequest).len>, <Field (OFPETBadRequest).xid>, <Field (OFPETBadRequest).errtype>, <Field (OFPETBadRequest).errcode>, <Field (OFPETBadRequest).data>]
class scapy.contrib.openflow.OFPETFlowModFailed

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPETFlowModFailed'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPETFlowModFailed).version>, <Field (OFPETFlowModFailed).type>, <Field (OFPETFlowModFailed).len>, <Field (OFPETFlowModFailed).xid>, <Field (OFPETFlowModFailed).errtype>, <Field (OFPETFlowModFailed).errcode>, <Field (OFPETFlowModFailed).data>]
class scapy.contrib.openflow.OFPETHelloFailed

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPETHelloFailed'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPETHelloFailed).version>, <Field (OFPETHelloFailed).type>, <Field (OFPETHelloFailed).len>, <Field (OFPETHelloFailed).xid>, <Field (OFPETHelloFailed).errtype>, <Field (OFPETHelloFailed).errcode>, <Field (OFPETHelloFailed).data>]
class scapy.contrib.openflow.OFPETPortModFailed

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPETPortModFailed'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPETPortModFailed).version>, <Field (OFPETPortModFailed).type>, <Field (OFPETPortModFailed).len>, <Field (OFPETPortModFailed).xid>, <Field (OFPETPortModFailed).errtype>, <Field (OFPETPortModFailed).errcode>, <Field (OFPETPortModFailed).data>]
class scapy.contrib.openflow.OFPETQueueOpFailed

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPETQueueOpFailed'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPETQueueOpFailed).version>, <Field (OFPETQueueOpFailed).type>, <Field (OFPETQueueOpFailed).len>, <Field (OFPETQueueOpFailed).xid>, <Field (OFPETQueueOpFailed).errtype>, <Field (OFPETQueueOpFailed).errcode>, <Field (OFPETQueueOpFailed).data>]
class scapy.contrib.openflow.OFPFlowStats

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.openflow.OFPFlowStats'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OFPFlowStats).length>, <Field (OFPFlowStats).table_id>, <Field (OFPFlowStats).pad1>, <Field (OFPFlowStats).match>, <Field (OFPFlowStats).duration_sec>, <Field (OFPFlowStats).duration_nsec>, <Field (OFPFlowStats).priority>, <Field (OFPFlowStats).idle_timeout>, <Field (OFPFlowStats).hard_timeout>, <Field (OFPFlowStats).pad2>, <Field (OFPFlowStats).cookie>, <Field (OFPFlowStats).packet_count>, <Field (OFPFlowStats).byte_count>, <Field (OFPFlowStats).actions>]
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.openflow.OFPMatch

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.openflow.OFPMatch'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OFPMatch).wildcards1>, <Field (OFPMatch).nw_dst_mask>, <Field (OFPMatch).nw_src_mask>, <Field (OFPMatch).wildcards2>, <Field (OFPMatch).in_port>, <Field (OFPMatch).dl_src>, <Field (OFPMatch).dl_dst>, <Field (OFPMatch).dl_vlan>, <Field (OFPMatch).dl_vlan_pcp>, <Field (OFPMatch).pad1>, <Field (OFPMatch).dl_type>, <Field (OFPMatch).nw_tos>, <Field (OFPMatch).nw_proto>, <Field (OFPMatch).pad2>, <Field (OFPMatch).nw_src>, <Field (OFPMatch).nw_dst>, <Field (OFPMatch).tp_src>, <Field (OFPMatch).tp_dst>]
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.openflow.OFPPacketQueue

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.openflow.OFPPacketQueue'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OFPPacketQueue).queue_id>, <Field (OFPPacketQueue).len>, <Field (OFPPacketQueue).pad>, <Field (OFPPacketQueue).properties>]
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.openflow.OFPPhyPort

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.openflow.OFPPhyPort'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OFPPhyPort).port_no>, <Field (OFPPhyPort).hw_addr>, <Field (OFPPhyPort).port_name>, <Field (OFPPhyPort).config>, <Field (OFPPhyPort).stp_state>, <Field (OFPPhyPort).state>, <Field (OFPPhyPort).curr>, <Field (OFPPhyPort).advertised>, <Field (OFPPhyPort).supported>, <Field (OFPPhyPort).peer>]
class scapy.contrib.openflow.OFPPortStats

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.openflow.OFPPortStats'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OFPPortStats).port_no>, <Field (OFPPortStats).pad>, <Field (OFPPortStats).rx_packets>, <Field (OFPPortStats).tx_packets>, <Field (OFPPortStats).rx_bytes>, <Field (OFPPortStats).tx_bytes>, <Field (OFPPortStats).rx_dropped>, <Field (OFPPortStats).tx_dropped>, <Field (OFPPortStats).rx_errors>, <Field (OFPPortStats).tx_errors>, <Field (OFPPortStats).rx_frame_err>, <Field (OFPPortStats).rx_over_err>, <Field (OFPPortStats).rx_crc_err>, <Field (OFPPortStats).collisions>]
class scapy.contrib.openflow.OFPQT

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.openflow.OFPQT'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
class scapy.contrib.openflow.OFPQTMinRate

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPQTMinRate'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPQTMinRate).type>, <Field (OFPQTMinRate).len>, <Field (OFPQTMinRate).pad>, <Field (OFPQTMinRate).rate>, <Field (OFPQTMinRate).pad2>]
class scapy.contrib.openflow.OFPQTNone

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPQTNone'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPQTNone).type>, <Field (OFPQTNone).len>, <Field (OFPQTNone).pad>]
class scapy.contrib.openflow.OFPTBarrierReply

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTBarrierReply'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTBarrierReply).version>, <Field (OFPTBarrierReply).type>, <Field (OFPTBarrierReply).len>, <Field (OFPTBarrierReply).xid>]
class scapy.contrib.openflow.OFPTBarrierRequest

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTBarrierRequest'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTBarrierRequest).version>, <Field (OFPTBarrierRequest).type>, <Field (OFPTBarrierRequest).len>, <Field (OFPTBarrierRequest).xid>]
class scapy.contrib.openflow.OFPTEchoReply

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTEchoReply'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTEchoReply).version>, <Field (OFPTEchoReply).type>, <Field (OFPTEchoReply).len>, <Field (OFPTEchoReply).xid>]
class scapy.contrib.openflow.OFPTEchoRequest

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTEchoRequest'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTEchoRequest).version>, <Field (OFPTEchoRequest).type>, <Field (OFPTEchoRequest).len>, <Field (OFPTEchoRequest).xid>]
class scapy.contrib.openflow.OFPTFeaturesReply

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTFeaturesReply'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTFeaturesReply).version>, <Field (OFPTFeaturesReply).type>, <Field (OFPTFeaturesReply).len>, <Field (OFPTFeaturesReply).xid>, <Field (OFPTFeaturesReply).datapath_id>, <Field (OFPTFeaturesReply).n_buffers>, <Field (OFPTFeaturesReply).n_tables>, <Field (OFPTFeaturesReply).pad>, <Field (OFPTFeaturesReply).capabilities>, <Field (OFPTFeaturesReply).actions>, <Field (OFPTFeaturesReply).ports>]
class scapy.contrib.openflow.OFPTFeaturesRequest

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTFeaturesRequest'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTFeaturesRequest).version>, <Field (OFPTFeaturesRequest).type>, <Field (OFPTFeaturesRequest).len>, <Field (OFPTFeaturesRequest).xid>]
class scapy.contrib.openflow.OFPTFlowMod

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTFlowMod'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTFlowMod).version>, <Field (OFPTFlowMod).type>, <Field (OFPTFlowMod).len>, <Field (OFPTFlowMod).xid>, <Field (OFPTFlowMod).match>, <Field (OFPTFlowMod).cookie>, <Field (OFPTFlowMod).cmd>, <Field (OFPTFlowMod).idle_timeout>, <Field (OFPTFlowMod).hard_timeout>, <Field (OFPTFlowMod).priority>, <Field (OFPTFlowMod).buffer_id>, <Field (OFPTFlowMod).out_port>, <Field (OFPTFlowMod).flags>, <Field (OFPTFlowMod).actions>]
class scapy.contrib.openflow.OFPTFlowRemoved

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTFlowRemoved'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTFlowRemoved).version>, <Field (OFPTFlowRemoved).type>, <Field (OFPTFlowRemoved).len>, <Field (OFPTFlowRemoved).xid>, <Field (OFPTFlowRemoved).match>, <Field (OFPTFlowRemoved).cookie>, <Field (OFPTFlowRemoved).priority>, <Field (OFPTFlowRemoved).reason>, <Field (OFPTFlowRemoved).pad1>, <Field (OFPTFlowRemoved).duration_sec>, <Field (OFPTFlowRemoved).duration_nsec>, <Field (OFPTFlowRemoved).idle_timeout>, <Field (OFPTFlowRemoved).pad2>, <Field (OFPTFlowRemoved).packet_count>, <Field (OFPTFlowRemoved).byte_count>]
class scapy.contrib.openflow.OFPTGetConfigReply

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTGetConfigReply'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTGetConfigReply).version>, <Field (OFPTGetConfigReply).type>, <Field (OFPTGetConfigReply).len>, <Field (OFPTGetConfigReply).xid>, <Field (OFPTGetConfigReply).flags>, <Field (OFPTGetConfigReply).miss_send_len>]
class scapy.contrib.openflow.OFPTGetConfigRequest

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTGetConfigRequest'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTGetConfigRequest).version>, <Field (OFPTGetConfigRequest).type>, <Field (OFPTGetConfigRequest).len>, <Field (OFPTGetConfigRequest).xid>]
class scapy.contrib.openflow.OFPTHello

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTHello'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTHello).version>, <Field (OFPTHello).type>, <Field (OFPTHello).len>, <Field (OFPTHello).xid>]
class scapy.contrib.openflow.OFPTPacketIn

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTPacketIn'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTPacketIn).version>, <Field (OFPTPacketIn).type>, <Field (OFPTPacketIn).len>, <Field (OFPTPacketIn).xid>, <Field (OFPTPacketIn).buffer_id>, <Field (OFPTPacketIn).total_len>, <Field (OFPTPacketIn).in_port>, <Field (OFPTPacketIn).reason>, <Field (OFPTPacketIn).pad>, <Field (OFPTPacketIn).data>]
class scapy.contrib.openflow.OFPTPacketOut

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTPacketOut'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTPacketOut).version>, <Field (OFPTPacketOut).type>, <Field (OFPTPacketOut).len>, <Field (OFPTPacketOut).xid>, <Field (OFPTPacketOut).buffer_id>, <Field (OFPTPacketOut).in_port>, <Field (OFPTPacketOut).actions_len>, <Field (OFPTPacketOut).actions>, <Field (OFPTPacketOut).data>]
class scapy.contrib.openflow.OFPTPortMod

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTPortMod'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTPortMod).version>, <Field (OFPTPortMod).type>, <Field (OFPTPortMod).len>, <Field (OFPTPortMod).xid>, <Field (OFPTPortMod).port_no>, <Field (OFPTPortMod).hw_addr>, <Field (OFPTPortMod).config>, <Field (OFPTPortMod).mask>, <Field (OFPTPortMod).advertise>, <Field (OFPTPortMod).pad>]
class scapy.contrib.openflow.OFPTPortStatus

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTPortStatus'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTPortStatus).version>, <Field (OFPTPortStatus).type>, <Field (OFPTPortStatus).len>, <Field (OFPTPortStatus).xid>, <Field (OFPTPortStatus).reason>, <Field (OFPTPortStatus).pad>, <Field (OFPTPortStatus).desc>]
class scapy.contrib.openflow.OFPTQueueGetConfigReply

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTQueueGetConfigReply'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTQueueGetConfigReply).version>, <Field (OFPTQueueGetConfigReply).type>, <Field (OFPTQueueGetConfigReply).len>, <Field (OFPTQueueGetConfigReply).xid>, <Field (OFPTQueueGetConfigReply).port>, <Field (OFPTQueueGetConfigReply).pad>, <Field (OFPTQueueGetConfigReply).queues>]
class scapy.contrib.openflow.OFPTQueueGetConfigRequest

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTQueueGetConfigRequest'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTQueueGetConfigRequest).version>, <Field (OFPTQueueGetConfigRequest).type>, <Field (OFPTQueueGetConfigRequest).len>, <Field (OFPTQueueGetConfigRequest).xid>, <Field (OFPTQueueGetConfigRequest).port>, <Field (OFPTQueueGetConfigRequest).pad>]
class scapy.contrib.openflow.OFPTSetConfig

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTSetConfig'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTSetConfig).version>, <Field (OFPTSetConfig).type>, <Field (OFPTSetConfig).len>, <Field (OFPTSetConfig).xid>, <Field (OFPTSetConfig).flags>, <Field (OFPTSetConfig).miss_send_len>]
class scapy.contrib.openflow.OFPTStatsReplyAggregate

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsReplyAggregate'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsReplyAggregate).version>, <Field (OFPTStatsReplyAggregate).type>, <Field (OFPTStatsReplyAggregate).len>, <Field (OFPTStatsReplyAggregate).xid>, <Field (OFPTStatsReplyAggregate).stats_type>, <Field (OFPTStatsReplyAggregate).flags>, <Field (OFPTStatsReplyAggregate).packet_count>, <Field (OFPTStatsReplyAggregate).byte_count>, <Field (OFPTStatsReplyAggregate).flow_count>, <Field (OFPTStatsReplyAggregate).pad>]
class scapy.contrib.openflow.OFPTStatsReplyDesc

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsReplyDesc'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsReplyDesc).version>, <Field (OFPTStatsReplyDesc).type>, <Field (OFPTStatsReplyDesc).len>, <Field (OFPTStatsReplyDesc).xid>, <Field (OFPTStatsReplyDesc).stats_type>, <Field (OFPTStatsReplyDesc).flags>, <Field (OFPTStatsReplyDesc).mfr_desc>, <Field (OFPTStatsReplyDesc).hw_desc>, <Field (OFPTStatsReplyDesc).sw_desc>, <Field (OFPTStatsReplyDesc).serial_num>, <Field (OFPTStatsReplyDesc).dp_desc>]
class scapy.contrib.openflow.OFPTStatsReplyFlow

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsReplyFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsReplyFlow).version>, <Field (OFPTStatsReplyFlow).type>, <Field (OFPTStatsReplyFlow).len>, <Field (OFPTStatsReplyFlow).xid>, <Field (OFPTStatsReplyFlow).stats_type>, <Field (OFPTStatsReplyFlow).flags>, <Field (OFPTStatsReplyFlow).flow_stats>]
class scapy.contrib.openflow.OFPTStatsReplyPort

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsReplyPort'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsReplyPort).version>, <Field (OFPTStatsReplyPort).type>, <Field (OFPTStatsReplyPort).len>, <Field (OFPTStatsReplyPort).xid>, <Field (OFPTStatsReplyPort).stats_type>, <Field (OFPTStatsReplyPort).flags>, <Field (OFPTStatsReplyPort).port_stats>]
class scapy.contrib.openflow.OFPTStatsReplyQueue

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsReplyQueue'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsReplyQueue).version>, <Field (OFPTStatsReplyQueue).type>, <Field (OFPTStatsReplyQueue).len>, <Field (OFPTStatsReplyQueue).xid>, <Field (OFPTStatsReplyQueue).stats_type>, <Field (OFPTStatsReplyQueue).flags>, <Field (OFPTStatsReplyQueue).port_no>, <Field (OFPTStatsReplyQueue).pad>, <Field (OFPTStatsReplyQueue).queue_id>, <Field (OFPTStatsReplyQueue).tx_bytes>, <Field (OFPTStatsReplyQueue).tx_packets>, <Field (OFPTStatsReplyQueue).tx_errors>]
class scapy.contrib.openflow.OFPTStatsReplyTable

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsReplyTable'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsReplyTable).version>, <Field (OFPTStatsReplyTable).type>, <Field (OFPTStatsReplyTable).len>, <Field (OFPTStatsReplyTable).xid>, <Field (OFPTStatsReplyTable).stats_type>, <Field (OFPTStatsReplyTable).flags>, <Field (OFPTStatsReplyTable).table_stats>]
class scapy.contrib.openflow.OFPTStatsReplyVendor

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsReplyVendor'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsReplyVendor).version>, <Field (OFPTStatsReplyVendor).type>, <Field (OFPTStatsReplyVendor).len>, <Field (OFPTStatsReplyVendor).xid>, <Field (OFPTStatsReplyVendor).stats_type>, <Field (OFPTStatsReplyVendor).flags>, <Field (OFPTStatsReplyVendor).vendor>]
class scapy.contrib.openflow.OFPTStatsRequestAggregate

Bases: scapy.contrib.openflow.OFPTStatsRequestFlow

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsRequestAggregate'>, <class 'scapy.contrib.openflow.OFPTStatsRequestFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).version>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).type>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).len>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).xid>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).stats_type>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).flags>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).match>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).table_id>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).pad>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).out_port>]
class scapy.contrib.openflow.OFPTStatsRequestDesc

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsRequestDesc'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsRequestDesc).version>, <Field (OFPTStatsRequestDesc).type>, <Field (OFPTStatsRequestDesc).len>, <Field (OFPTStatsRequestDesc).xid>, <Field (OFPTStatsRequestDesc).stats_type>, <Field (OFPTStatsRequestDesc).flags>]
class scapy.contrib.openflow.OFPTStatsRequestFlow

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsRequestFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).version>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).type>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).len>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).xid>, <Field (OFPTStatsRequestFlow).stats_type>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).flags>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).match>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).table_id>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).pad>, <Field (OFPTStatsRequestFlow,OFPTStatsRequestAggregate).out_port>]
class scapy.contrib.openflow.OFPTStatsRequestPort

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsRequestPort'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsRequestPort).version>, <Field (OFPTStatsRequestPort).type>, <Field (OFPTStatsRequestPort).len>, <Field (OFPTStatsRequestPort).xid>, <Field (OFPTStatsRequestPort).stats_type>, <Field (OFPTStatsRequestPort).flags>, <Field (OFPTStatsRequestPort).port_no>, <Field (OFPTStatsRequestPort).pad>]
class scapy.contrib.openflow.OFPTStatsRequestQueue

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsRequestQueue'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsRequestQueue).version>, <Field (OFPTStatsRequestQueue).type>, <Field (OFPTStatsRequestQueue).len>, <Field (OFPTStatsRequestQueue).xid>, <Field (OFPTStatsRequestQueue).stats_type>, <Field (OFPTStatsRequestQueue).flags>, <Field (OFPTStatsRequestQueue).port_no>, <Field (OFPTStatsRequestQueue).pad>, <Field (OFPTStatsRequestQueue).queue_id>]
class scapy.contrib.openflow.OFPTStatsRequestTable

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsRequestTable'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsRequestTable).version>, <Field (OFPTStatsRequestTable).type>, <Field (OFPTStatsRequestTable).len>, <Field (OFPTStatsRequestTable).xid>, <Field (OFPTStatsRequestTable).stats_type>, <Field (OFPTStatsRequestTable).flags>]
class scapy.contrib.openflow.OFPTStatsRequestVendor

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTStatsRequestVendor'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTStatsRequestVendor).version>, <Field (OFPTStatsRequestVendor).type>, <Field (OFPTStatsRequestVendor).len>, <Field (OFPTStatsRequestVendor).xid>, <Field (OFPTStatsRequestVendor).stats_type>, <Field (OFPTStatsRequestVendor).flags>, <Field (OFPTStatsRequestVendor).vendor>]
class scapy.contrib.openflow.OFPTVendor

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OFPTVendor'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (OFPTVendor).version>, <Field (OFPTVendor).type>, <Field (OFPTVendor).len>, <Field (OFPTVendor).xid>, <Field (OFPTVendor).vendor>]
class scapy.contrib.openflow.OFPTableStats

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.openflow.OFPTableStats'>, <class 'scapy.packet.Packet'>]
extract_padding(s)

DEV: to be overloaded to extract current layer’s padding.

Parameters:s (str) – the current layer
Returns:a couple of strings (actual layer, padding)
fields_desc = [<Field (OFPTableStats).table_id>, <Field (OFPTableStats).pad>, <Field (OFPTableStats).name>, <Field (OFPTableStats).wildcards1>, <Field (OFPTableStats).nw_dst_mask>, <Field (OFPTableStats).nw_src_mask>, <Field (OFPTableStats).wildcards2>, <Field (OFPTableStats).max_entries>, <Field (OFPTableStats).active_count>, <Field (OFPTableStats).lookup_count>, <Field (OFPTableStats).matched_count>]
class scapy.contrib.openflow.OFPacketField(name, default, cls, remain=0)

Bases: scapy.fields.PacketField

getfield(pkt, s)

Extract an internal value from a string

Extract from the raw packet s the field value belonging to layer pkt.

Returns a two-element list, first the raw packet string after having removed the extracted field, second the extracted field itself in internal representation.

class scapy.contrib.openflow.OpenFlow

Bases: scapy.contrib.openflow._ofp_header

aliastypes = [<class 'scapy.contrib.openflow.OpenFlow'>, <class 'scapy.contrib.openflow._ofp_header'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)