Sending packets

class PacketSender(iface=None, uint32_t recv_timeout=DEFAULT_TIMEOUT, uint32_t usec=0)

Bases: object

Sends packets through a network interface.

Parameters:
  • iface (NetworkInterface) -- The default interface to use to send the packets
  • recv_timeout (uint32_t) -- The timeout used when receiving responses
  • usec (uint32_t) -- timeout microseconds
class SocketType

Bases: enum.IntEnum

Socket type flags

Attributes: ETHER_SOCKET, IP_TCP_SOCKET, IP_UDP_SOCKET, IP_RAW_SOCKET, ARP_SOCKET, ICMP_SOCKET, IPV6_SOCKET, SOCKETS_END

PacketSender.default_interface

default interface (read-write, NetworkInterface)