pcap_dump(self,
packet,
ts_sec=None,
ts_usec=None,
orig_len=None)
| source code
|
Appends a new packet to the libpcap file. Optionally specify ts_sec
and tv_usec for timestamp information, otherwise the current time is
used. Specify orig_len if your snaplen is smaller than the entire packet
contents.
- Parameters:
ts_sec (Integer) - Timestamp, number of seconds since Unix epoch. Default is the
current timestamp.
ts_usec (Integer) - Timestamp microseconds. Defaults to current timestamp.
orig_len (Integer) - Length of the original packet, used if the packet you are writing
is smaller than the original packet. Defaults to the specified
packet's length.
packet (String) - Packet contents
- Returns: None
|