scapy.base_classes

Generators and packet meta classes.

class scapy.base_classes.BasePacket(*args, **kwds)[source]

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

class scapy.base_classes.BasePacketList(*args, **kwds)[source]

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

class scapy.base_classes.Field_metaclass(name, bases, dct)[source]

Bases: scapy.compat._Generic_metaclass

class scapy.base_classes.Gen(*args, **kwds)[source]

Bases: Generic[scapy.base_classes._T]

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

Bases: scapy.base_classes.Gen[str]

Network object from an IP address or hostname and mask

choice()[source]
family = 2
static int2ip(val)[source]
classmethod ip2int(addr)[source]
max_mask = 32
name = 'Net'
classmethod name2addr(name)[source]
class scapy.base_classes.OID(oid)[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, bases, dct)[source]

Bases: scapy.compat._Generic_metaclass

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

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