I am working on a security project, and unable to get the function of the
following method which is in discovery.py
def __init__ (self, send_cycle_time, ttl = 120):
please help me in understanding this method
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)
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
So this is the constructor for LLDPSender. The docstring explains what the
two parameters are. ttl probably isn't that important. send_cycle_time
has to do with how fast discovery is sending packets.
You don't usually construct LLDPSenders yourself, though. Normally, the
discovery component