scapy.contrib.gxrp

GARP - Generic Attribute Register Protocol

author:

Sergey Matsievskiy, matsievskiysv@gmail.com

description:

This module provides Scapy layers for the GARP protocol and its two applications: GARP VLAN Registration Protocol (GVRP) and GARP Multicast Registration Protocol (GMRP)

normative references:
  • IEEE 802.1D 2004 - Media Access Control (MAC) Bridges

  • IEEE 802.1Q 1998 - Virtual Bridged Local Area Networks

class scapy.contrib.gxrp.GARP(_pkt, /, *, proto_id=1, msgs=[], end_mark=0)[source]

Bases: Packet

GARP packet

aliastypes = [<class 'scapy.contrib.gxrp.GARP'>, <class 'scapy.packet.Packet'>]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ShortField (GARP).proto_id>, <PacketListField (GARP).msgs>, <ByteField (GARP).end_mark>]
class scapy.contrib.gxrp.GARP_ATTRIBUTE(_pkt, /, *, len=None, event=0)[source]

Bases: Packet

GARP attribute container

aliastypes = [<class 'scapy.contrib.gxrp.GARP_ATTRIBUTE'>, <class 'scapy.packet.Packet'>]
do_dissect(s)[source]
extract_padding(s)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<LenField (GARP_ATTRIBUTE).len>, <EnumField (GARP_ATTRIBUTE).event>]
guess_payload_class(payload)[source]
class scapy.contrib.gxrp.GARP_MESSAGE(_pkt, /, *, type=1, attrs=[], end_mark=0)[source]

Bases: Packet

GARP message container

aliastypes = [<class 'scapy.contrib.gxrp.GARP_MESSAGE'>, <class 'scapy.packet.Packet'>]
extract_padding(s)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (GARP_MESSAGE).type>, <PacketListField (GARP_MESSAGE).attrs>, <ByteField (GARP_MESSAGE).end_mark>]
class scapy.contrib.gxrp.GMRP_GROUP(_pkt, /, *, addr=None)[source]

Bases: Packet

GMRP Group

aliastypes = [<class 'scapy.contrib.gxrp.GMRP_GROUP'>, <class 'scapy.packet.Packet'>]
extract_padding(s)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<MACField (GMRP_GROUP).addr>]
class scapy.contrib.gxrp.GMRP_SERVICE(_pkt, /, *, event=0)[source]

Bases: Packet

GMRP Service

aliastypes = [<class 'scapy.contrib.gxrp.GMRP_SERVICE'>, <class 'scapy.packet.Packet'>]
extract_padding(s)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<EnumField (GMRP_SERVICE).event>]
class scapy.contrib.gxrp.GVRP[source]

Bases: Packet

aliastypes = [<class 'scapy.contrib.gxrp.GVRP'>, <class 'scapy.packet.Packet'>]
extract_padding(s)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ShortField (GVRP).vlan>]
class scapy.contrib.gxrp.LLC_GARP(_pkt, /, *, dsap=0, ssap=0, ctrl=0)[source]

Bases: LLC

Dummy class for layer binding

aliastypes = [<class 'scapy.contrib.gxrp.LLC_GARP'>, <class 'scapy.layers.l2.LLC'>, <class 'scapy.packet.Packet'>]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<XByteField (LLC,LLC_GARP).dsap>, <XByteField (LLC,LLC_GARP).ssap>, <ByteField (LLC,LLC_GARP).ctrl>]
payload_guess: List[Tuple[Dict[str, Any], Type[Packet]]] = [({}, <class 'scapy.contrib.gxrp.GARP'>)]
scapy.contrib.gxrp.parse_next_attr(pkt, lst, cur, remain)[source]
scapy.contrib.gxrp.parse_next_msg(pkt, lst, cur, remain)[source]