Exemplo n.º 1
0
class MetaPacket:
    def __init__(self, proto=None):
        self.root = Packet(proto, strict=False)

    def insert(self, proto, layer):
        # Only append for the moment
        if layer == -1:
            self.root.include(proto.root.protos[0])
            return True

        return False

    def get_raw(self):
        return get_packet_raw(self)

    def complete(self):
        return False

    def get_protocol_str(self):
        assert self.root.protos, "No procols in Packet"
        return get_proto_name(self.root.protos[0])

    def summary(self):
        # We need to ask for a method here
        return "%s packet" % self.get_protocol_str()

    def get_time(self):
        # We need to ask for a method here
        return "N/A"

    def get_dest(self):
        # We need to ask for a method here
        return "N/A"

    def get_source(self):
        # We need to ask for a method here
        return "N/A"

    def get_protocols(self):
        return self.root.protos
Exemplo n.º 2
0
class MetaPacket:
    def __init__(self, proto=None):
        self.root = Packet(proto, strict=False)

    def insert(self, proto, layer):
        # Only append for the moment
        if layer == -1:
            self.root.include(proto.root.protos[0])
            return True

        return False

    def get_raw(self):
        return get_packet_raw(self)

    def complete(self):
        return False

    def get_protocol_str(self):
        assert self.root.protos, "No procols in Packet"
        return get_proto_name(self.root.protos[0])

    def summary(self):
        # We need to ask for a method here
        return "%s packet" % self.get_protocol_str()

    def get_time(self):
        # We need to ask for a method here
        return "N/A"

    def get_dest(self):
        # We need to ask for a method here
        return "N/A"

    def get_source(self):
        # We need to ask for a method here
        return "N/A"

    def get_protocols(self):
        return self.root.protos
Exemplo n.º 3
0
 def __init__(self, proto=None):
     self.root = Packet(proto, strict=False)
Exemplo n.º 4
0
 def __init__(self, proto=None):
     self.root = Packet(proto, strict=False)