8.2. Transmitter classes¶
- class pingparsing.PingTransmitter[source]¶
Transmitter class to send ICMP packets by using the OS built-in
pingcommand.- count: Optional[int] = None¶
Number of sending ICMP packets. This attribute ignored if the value is
None.
- interface: Optional[str] = None¶
Interface name or zone-id. The attribute required when
destinationis IPv6 link-local scope address.
- timestamp: bool = False¶
[Only for Linux environment] If
True, add timestamp for each ping result. Defaults toFalse.
- auto_codepage: bool = True¶
[Only for Windows environment] Automatically change code page if
True. Defaults toTrue.
- property deadline: Optional[Time]¶
Timeout before ping exits. You can specify either a number or a string (e.g.
"1sec"). If only a number is specified and a unit not found, the unit will be considered as seconds.Unit
Available specifiers (str)
days
d/day/dayshours
h/hour/hoursminutes
m/min/mins/minute/minutesseconds
s/sec/secs/second/secondsmilliseconds
ms/msec/msecs/millisecond/millisecondsmicroseconds
us/usec/usecs/microsecond/microsecondsIf both
deadlineandcountareNone,deadlineis automatically set to the default value (3 seconds). Defaults toNone.- Returns
deadline
- Return type
humanreadable.Time
- property destination_host: str¶
Alias to
destination
- ping() PingResult[source]¶
Sending ICMP packets.
- Returns
pingcommand execution result.- Return type
- Raises
ValueError – If parameters not valid.
- property timeout: Optional[Time]¶
Time to wait for a response per packet. You can specify either a number or a string (e.g.
"1sec"). If only a number is specified and a unit not found, the unit will be considered as seconds.Unit
Available specifiers (str)
days
d/day/dayshours
h/hour/hoursminutes
m/min/mins/minute/minutesseconds
s/sec/secs/second/secondsmilliseconds
ms/msec/msecs/millisecond/millisecondsmicroseconds
us/usec/usecs/microsecond/microsecondsUse system default timeout if the value is
None. Defaults toNone. If the system does not support timeout in milliseconds, round up as seconds.- Returns
timeout
- Return type
humanreadable.Time