sub process_packet { my($user_data, $header, $packet) = @_; print "time: $header->{tv_sec}\n"; } # The header information is a reference to a hash containing the following fields. # # * "len" - the total length of the 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.