scapy.contrib.ethercat
EtherCat automation protocol
- author:
Thomas Tannhaeuser, hecke@naberius.de
- description:
This module provides Scapy layers for the EtherCat protocol.
- normative references:
IEC 61158-3-12 - data link service and topology description
IEC 61158-4-12 - protocol specification
Currently only read/write services as defined in IEC 61158-4-12, sec. 5.4 are supported.
- TODO:
Mailbox service (sec. 5.5)
Network variable service (sec. 5.6)
- NOTES:
EtherCat frame type defaults to TYPE-12-PDU (0x01) using xxx bytes of padding
padding for minimum frame size is added automatically
- class scapy.contrib.ethercat.EtherCat(_pkt, /, *, length=0, _reserved=0, type=0)[source]
Bases:
PacketCommon EtherCat header layer
- ETHERCAT_HEADER_LEN = 2
- ETHERCAT_TYPE12_DLPDU_TYPES = {1: <class 'scapy.contrib.ethercat.EtherCatAPRD'>, 2: <class 'scapy.contrib.ethercat.EtherCatAPWR'>, 3: <class 'scapy.contrib.ethercat.EtherCatAPRW'>, 4: <class 'scapy.contrib.ethercat.EtherCatFPRD'>, 5: <class 'scapy.contrib.ethercat.EtherCatFPWR'>, 6: <class 'scapy.contrib.ethercat.EtherCatFPRW'>, 7: <class 'scapy.contrib.ethercat.EtherCatBRD'>, 8: <class 'scapy.contrib.ethercat.EtherCatBWR'>, 9: <class 'scapy.contrib.ethercat.EtherCatBRW'>, 10: <class 'scapy.contrib.ethercat.EtherCatLRD'>, 11: <class 'scapy.contrib.ethercat.EtherCatLWR'>, 12: <class 'scapy.contrib.ethercat.EtherCatLRW'>, 13: <class 'scapy.contrib.ethercat.EtherCatARMW'>, 14: <class 'scapy.contrib.ethercat.EtherCatFRMW'>}
- ETHER_FRAME_MIN_LEN = 64
- ETHER_FSC_LEN = 4
- ETHER_HEADER_LEN = 14
- FRAME_TYPES = {1: 'TYPE-12-PDU', 4: 'NETWORK-VARIABLES', 5: 'MAILBOX'}
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCat'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<LEBitField (EtherCat).length>, <LEBitField (EtherCat)._reserved>, <LEBitField (EtherCat).type>]
- payload_guess: List[Tuple[Dict[str, Any], Type[Packet]]] = [({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatAPRD'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatFPRD'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatBRD'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatLRD'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatAPWR'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatFPWR'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatBWR'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatLWR'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatAPRW'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatFPRW'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatBRW'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatLRW'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatARMW'>), ({'type': 1}, <class 'scapy.contrib.ethercat.EtherCatFRMW'>)]
- post_build(pkt, pay)[source]
need to set the length of the whole PDU manually to avoid any bit fiddling use a dummy class to build the layer content
also add padding if frame is < 64 bytes
- Note: padding only handles Ether/n*Dot1Q/EtherCat
(no special mumbo jumbo)
- Parameters:
pkt – raw string containing the current layer
pay – raw string containing the payload
- Returns:
<new current layer> + payload
- class scapy.contrib.ethercat.EtherCatAPRD(_pkt, /, *, _cmd=1, idx=0, adp=0, ado=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDUAPRD - Auto Increment Physical Read (IEC 61158-5-12, sec. 5.4.1.2 tab. 14 / p. 32)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatAPRD'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatAPRD)._cmd>, <ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- class scapy.contrib.ethercat.EtherCatAPRW(_pkt, /, *, _cmd=3, idx=0, adp=0, ado=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDUAPRW - Auto Increment Physical Read Write (IEC 61158-5-12, sec. 5.4.3.1 tab. 22 / p. 41)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatAPRW'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatAPRW)._cmd>, <ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- class scapy.contrib.ethercat.EtherCatAPWR(_pkt, /, *, _cmd=2, idx=0, adp=0, ado=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDUAPWR - Auto Increment Physical Write (IEC 61158-5-12, sec. 5.4.2.2 tab. 18 / p. 37)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatAPWR'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatAPWR)._cmd>, <ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- class scapy.contrib.ethercat.EtherCatARMW(_pkt, /, *, _cmd=13, idx=0, adp=0, ado=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDUARMW - Auto increment physical read multiple write (IEC 61158-5-12, sec. 5.4.3.5 tab. 26 / p. 46)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatARMW'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatARMW)._cmd>, <ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- class scapy.contrib.ethercat.EtherCatBRD(_pkt, /, *, _cmd=7, idx=0, adp=0, ado=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDUBRD - Broadcast read (IEC 61158-5-12, sec. 5.4.1.4 tab. 16 / p. 34)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatBRD'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatBRD)._cmd>, <ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- class scapy.contrib.ethercat.EtherCatBRW(_pkt, /, *, _cmd=9, idx=0, adp=0, ado=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDUBRW - Broadcast read write (IEC 61158-5-12, sec. 5.4.3.3 tab. 24 / p. 39)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatBRW'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatBRW)._cmd>, <ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- class scapy.contrib.ethercat.EtherCatBWR(_pkt, /, *, _cmd=8, idx=0, adp=0, ado=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDUBWR - Broadcast read (IEC 61158-5-12, sec. 5.4.2.4 tab. 20 / p. 39)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatBWR'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatBWR)._cmd>, <ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- class scapy.contrib.ethercat.EtherCatFPRD(_pkt, /, *, _cmd=4, idx=0, adp=0, ado=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDUFPRD - Configured address physical read (IEC 61158-5-12, sec. 5.4.1.3 tab. 15 / p. 33)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatFPRD'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatFPRD)._cmd>, <ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- class scapy.contrib.ethercat.EtherCatFPRW(_pkt, /, *, _cmd=6, idx=0, adp=0, ado=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDUFPRW - Configured address physical read write (IEC 61158-5-12, sec. 5.4.3.2 tab. 23 / p. 43)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatFPRW'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatFPRW)._cmd>, <ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- class scapy.contrib.ethercat.EtherCatFPWR(_pkt, /, *, _cmd=5, idx=0, adp=0, ado=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDUFPWR - Configured address physical write (IEC 61158-5-12, sec. 5.4.2.3 tab. 19 / p. 38)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatFPWR'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatFPWR)._cmd>, <ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- class scapy.contrib.ethercat.EtherCatFRMW(_pkt, /, *, _cmd=14, idx=0, adp=0, ado=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDUFRMW - Configured address physical read multiple write (IEC 61158-5-12, sec. 5.4.3.6 tab. 27 / p. 47)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatFRMW'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatFRMW)._cmd>, <ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- class scapy.contrib.ethercat.EtherCatLRD(_pkt, /, *, _cmd=10, idx=0, adr=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDULRD - Logical read (IEC 61158-5-12, sec. 5.4.1.5 tab. 17 / p. 36)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatLRD'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatLRD)._cmd>, <ByteField (EtherCatLRD,EtherCatLWR,EtherCatLRW).idx>, <LEIntField (EtherCatLRD,EtherCatLWR,EtherCatLRW).adr>, <LEBitFieldLenField (EtherCatLRD,EtherCatLWR,EtherCatLRW).len>, <LEBitField (EtherCatLRD,EtherCatLWR,EtherCatLRW)._reserved>, <LEBitEnumField (EtherCatLRD,EtherCatLWR,EtherCatLRW).c>, <LEBitEnumField (EtherCatLRD,EtherCatLWR,EtherCatLRW).next>, <LEShortField (EtherCatLRD,EtherCatLWR,EtherCatLRW).irq>, <FieldListField (EtherCatLRD,EtherCatLWR,EtherCatLRW).data>, <LEShortField (EtherCatLRD,EtherCatLWR,EtherCatLRW).wkc>]
- class scapy.contrib.ethercat.EtherCatLRW(_pkt, /, *, _cmd=12, idx=0, adr=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDULRW - Logical read write (IEC 61158-5-12, sec. 5.4.3.4 tab. 25 / p. 45)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatLRW'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatLRW)._cmd>, <ByteField (EtherCatLRD,EtherCatLWR,EtherCatLRW).idx>, <LEIntField (EtherCatLRD,EtherCatLWR,EtherCatLRW).adr>, <LEBitFieldLenField (EtherCatLRD,EtherCatLWR,EtherCatLRW).len>, <LEBitField (EtherCatLRD,EtherCatLWR,EtherCatLRW)._reserved>, <LEBitEnumField (EtherCatLRD,EtherCatLWR,EtherCatLRW).c>, <LEBitEnumField (EtherCatLRD,EtherCatLWR,EtherCatLRW).next>, <LEShortField (EtherCatLRD,EtherCatLWR,EtherCatLRW).irq>, <FieldListField (EtherCatLRD,EtherCatLWR,EtherCatLRW).data>, <LEShortField (EtherCatLRD,EtherCatLWR,EtherCatLRW).wkc>]
- class scapy.contrib.ethercat.EtherCatLWR(_pkt, /, *, _cmd=11, idx=0, adr=0, len=None, _reserved=0, c=0, next=None, irq=0, data=[], wkc=0)[source]
Bases:
EtherCatType12DLPDULWR - Logical write (IEC 61158-5-12, sec. 5.4.2.5 tab. 21 / p. 40)
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatLWR'>, <class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (EtherCatLWR)._cmd>, <ByteField (EtherCatLRD,EtherCatLWR,EtherCatLRW).idx>, <LEIntField (EtherCatLRD,EtherCatLWR,EtherCatLRW).adr>, <LEBitFieldLenField (EtherCatLRD,EtherCatLWR,EtherCatLRW).len>, <LEBitField (EtherCatLRD,EtherCatLWR,EtherCatLRW)._reserved>, <LEBitEnumField (EtherCatLRD,EtherCatLWR,EtherCatLRW).c>, <LEBitEnumField (EtherCatLRD,EtherCatLWR,EtherCatLRW).next>, <LEShortField (EtherCatLRD,EtherCatLWR,EtherCatLRW).irq>, <FieldListField (EtherCatLRD,EtherCatLWR,EtherCatLRW).data>, <LEShortField (EtherCatLRD,EtherCatLWR,EtherCatLRW).wkc>]
- class scapy.contrib.ethercat.EtherCatType12DLPDU(_pkt, /)[source]
Bases:
PacketType12 message base class
- BROADCAST_ADDRESSING_DESC = [<ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- LOGICAL_ADDRESSING_DESC = [<ByteField (EtherCatLRD,EtherCatLWR,EtherCatLRW).idx>, <LEIntField (EtherCatLRD,EtherCatLWR,EtherCatLRW).adr>, <LEBitFieldLenField (EtherCatLRD,EtherCatLWR,EtherCatLRW).len>, <LEBitField (EtherCatLRD,EtherCatLWR,EtherCatLRW)._reserved>, <LEBitEnumField (EtherCatLRD,EtherCatLWR,EtherCatLRW).c>, <LEBitEnumField (EtherCatLRD,EtherCatLWR,EtherCatLRW).next>, <LEShortField (EtherCatLRD,EtherCatLWR,EtherCatLRW).irq>, <FieldListField (EtherCatLRD,EtherCatLWR,EtherCatLRW).data>, <LEShortField (EtherCatLRD,EtherCatLWR,EtherCatLRW).wkc>]
- PHYSICAL_ADDRESSING_DESC = [<ByteField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).idx>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).adp>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).ado>, <LEBitFieldLenField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).len>, <LEBitField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW)._reserved>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).c>, <LEBitEnumField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).next>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).irq>, <FieldListField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).data>, <LEShortField (EtherCatAPRD,EtherCatFPRD,EtherCatBRD,EtherCatAPWR,EtherCatFPWR,EtherCatBWR,EtherCatAPRW,EtherCatFPRW,EtherCatBRW,EtherCatARMW,EtherCatFRMW).wkc>]
- aliastypes = [<class 'scapy.contrib.ethercat.EtherCatType12DLPDU'>, <class 'scapy.packet.Packet'>]
- class scapy.contrib.ethercat.LEBitEnumField(name, default, size, enum)[source]
Bases:
LEBitField,_EnumField- i2s
- i2s_cb
- s2i
- s2i_cb
- class scapy.contrib.ethercat.LEBitField(name: str, default: I | None, size: int, tot_size: int = 0, end_tot_size: int = 0)[source]
Bases:
BitFielda little endian version of the BitField
- addfield(pkt, s, val)[source]
- Parameters:
pkt – packet instance the raw string s and field belongs to
s – raw string representing the frame
val – value
- Returns:
final raw string, tuple (s, bitsdone, data) if in between bit field # noqa: E501
as we don’t know the final size of the full bitfield we need to accumulate the data. # noqa: E501 if we reach a field that ends at a octet boundary, we build the whole string # noqa: E501
- getfield(pkt, s)[source]
extract data from raw str
collect all instances belonging to the bit field set. if we reach a field that ends at a octet boundary, dissect the whole bit field at once # noqa: E501
- Parameters:
pkt – packet instance the field belongs to
s – raw string representing the frame -or- tuple containing raw str, number of bits and array of fields # noqa: E501
- Returns:
tuple containing raw str, number of bits and array of fields -or- remaining raw str and value of this # noqa: E501
- class scapy.contrib.ethercat.LEBitFieldLenField(name, default, size, length_of=None, count_of=None, adjust=<function LEBitFieldLenField.<lambda>>)[source]
Bases:
LEBitField- adjust
- count_of
- length_of
- exception scapy.contrib.ethercat.LEBitFieldSequenceException[source]
Bases:
Scapy_Exceptionthrown by EtherCat structure tests