Thank you for the clarification.
On Mon, 8 Jul 2019 at 01:04, Murphy McCauley
wrote:
> The constructor arguments are basically the same for all classes in the
> packet library.
>
> raw is used if you are parsing a raw packet that's held in a bytes/str
> object.
> prev is mostly used internally
The constructor arguments are basically the same for all classes in the
packet library.
raw is used if you are parsing a raw packet that's held in a bytes/str
object.
prev is mostly used internally to build chains of packet headers. That is,
since most packet headers are preceded by other packet
The following is code from lldp.py, I am unable to get use of parameters
used in methods, please help me.
def __init__ (self, raw=None, prev=None, **kw):
packet_base.__init__(self)
self.prev = prev
self.next = None
self.tlvs = []
if raw is not None:
self.parse(raw)