scapy.contrib.isotp.isotp_native_socket

class scapy.contrib.isotp.isotp_native_socket.ISOTPNativeSocket(iface: str | ~scapy.supersocket.SuperSocket | None = None, tx_id: int = 0, rx_id: int = 0, ext_address: int | None = None, rx_ext_address: int | None = None, bs: int = 0, stmin: int = 0, padding: bool = False, listen_only: bool = False, frame_txtime: int = 0, fd: bool = False, basecls: ~typing.Type[~scapy.packet.Packet] = <class 'scapy.contrib.isotp.isotp_packet.ISOTP'>)[源代码]

基类:SuperSocket

ISOTPSocket using the can-isotp kernel module

参数:
  • iface -- a CANSocket instance or an interface name

  • tx_id -- the CAN identifier of the sent CAN frames

  • rx_id -- the CAN identifier of the received CAN frames

  • ext_address -- the extended address of the sent ISOTP frames

  • rx_ext_address -- the extended address of the received ISOTP frames

  • bs -- block size sent in Flow Control ISOTP frames

  • stmin -- minimum desired separation time sent in Flow Control ISOTP frames

  • padding -- If True, pads sending packets with 0x00 which not count to the payload. Does not affect receiving packets.

  • listen_only -- Does not send Flow Control frames if a First Frame is received

  • frame_txtime -- Separation time between two CAN frames during send

  • basecls -- base class of the packets emitted by this socket

auxdata_available: bool = True
can_isotp_fc_options_fmt = '@3B'
can_isotp_ll_options_fmt = '@3B'
can_isotp_options_fmt = '@2I4B'
desc = 'read/write packets at a given CAN interface using CAN_ISOTP socket '
ins: socket
outs: socket | None
recv(x: int = 65535) Packet | None[源代码]
recv_raw(x: int = 65535) Tuple[Type[Packet] | None, bytes | None, float | None][源代码]

Receives a packet, then returns a tuple containing (cls, pkt_data, time)

sockaddr_can_fmt = '@H3I'
class scapy.contrib.isotp.isotp_native_socket.addr_info[源代码]

基类:Union

tp

Structure/Union member

class scapy.contrib.isotp.isotp_native_socket.ifreq[源代码]

基类:Structure

ifr_ifindex

Structure/Union member

ifr_name

Structure/Union member

class scapy.contrib.isotp.isotp_native_socket.sockaddr_can[源代码]

基类:Structure

can_addr

Structure/Union member

can_family

Structure/Union member

can_ifindex

Structure/Union member

class scapy.contrib.isotp.isotp_native_socket.tp[源代码]

基类:Structure

rx_id

Structure/Union member

tx_id

Structure/Union member