NAME
info
SYNOPSIS
captime,truncated=info(hdr)
DESCRIPTION
get packet capture time and truncated status
funtion accepts libpcap header structure as input
funtion return two values:
captime is a formated time in the form of hh:mm:ss
trunctated is a boolean value: TRUE if truncated or FALSE if not
import pcap
import py_net_libsp = pcap.pcapObject ()
p.open_offline (file_to_open)
pkt,hdr = p.next ()
captime,truncated = py_net_libs.info (hdr)
HOME