just to make a commit i removed some newlines... ;) testing the github mail service. it should send mail to linspector-commits@lists.linspector.org on every commit now.
This commit is contained in:
parent
caaf1cb87c
commit
209be5f76c
1 changed files with 1 additions and 4 deletions
|
|
@ -8,7 +8,6 @@ import struct
|
|||
|
||||
|
||||
class Packet(object):
|
||||
|
||||
"""Creates ICMPv4 and v6 packets.
|
||||
|
||||
header
|
||||
|
|
@ -101,7 +100,6 @@ class Packet(object):
|
|||
self.type = None
|
||||
self.code = None
|
||||
|
||||
|
||||
def __repr__(self):
|
||||
return "<ICMPv%s packet: type = %s, code = %s, data length = %s>" % \
|
||||
(self.version, self.type, self.code, len(self.data))
|
||||
|
|
@ -182,6 +180,7 @@ class PingResponse(object):
|
|||
return "%d bytes from %s: id=%s, seq=%u, rtt=%.3f ms" % \
|
||||
(self.bufferLength, self.address, self.ident, self.seq, self.rtt)
|
||||
|
||||
|
||||
class PingService(Service):
|
||||
def __init__(self, **kwargs):
|
||||
super(PingService, self).__init__(**kwargs)
|
||||
|
|
@ -205,7 +204,6 @@ class PingService(Service):
|
|||
|
||||
base_packet = Packet((8, 0))
|
||||
|
||||
|
||||
seqNum = 0
|
||||
## create ping packet
|
||||
pdata = struct.pack("!HHd", processId, seqNum, time.time())
|
||||
|
|
@ -246,6 +244,5 @@ class PingService(Service):
|
|||
task._execute()
|
||||
|
||||
|
||||
|
||||
def create(kwargs):
|
||||
return PingService(**kwargs)
|
||||
Loading…
Add table
Add a link
Reference in a new issue