scapy.base_classes

Generators and packet meta classes.

class scapy.base_classes.BasePacket[source]

Bases: scapy.base_classes.Gen[scapy.packet.Packet]

class scapy.base_classes.BasePacketList[source]

Bases: scapy.base_classes.Gen[scapy.base_classes._T]

class scapy.base_classes.Field_metaclass(name: str, bases: Tuple[type, ...], dct: Dict[str, Any])[source]

Bases: scapy.compat._Generic_metaclass

class scapy.base_classes.Gen[source]

Bases: Generic[scapy.base_classes._T]

class scapy.base_classes.Net(net: str, stop: Optional[str] = None)[source]

Bases: scapy.base_classes.Gen[str]

Network object from an IP address or hostname and mask

choice() str[source]
family: int = 2
static int2ip(val: int) str[source]
classmethod ip2int(addr: str) int[source]
max_mask: int = 32
name: str = 'Net'
classmethod name2addr(name: str) str[source]
class scapy.base_classes.OID(oid: str)[source]

Bases: scapy.base_classes.Gen[str]

name = 'OID'
scapy.base_classes.PacketList_metaclass[source]

alias of scapy.base_classes.Field_metaclass

class scapy.base_classes.Packet_metaclass(name: str, bases: Tuple[type, ...], dct: Dict[str, Any])[source]

Bases: scapy.compat._Generic_metaclass

class scapy.base_classes.SetGen(values: Any, _iterpacket: int = 1)[source]

Bases: scapy.base_classes.Gen[scapy.base_classes._T]