or download this
sub process_packet {
my($user_data, $header, $packet) = @_;
...
# * "caplen" - the actual captured length of the packet
# * "tv_sec" - seconds value of the packet timestamp.
# * "tv_usec" - microseconds value of the packet timestamp.