Logo Search packages:      
Sourcecode: libnetfilter-queue version File versions  Download package

int nfq_get_timestamp ( struct nfq_data nfad,
struct timeval *  tv 
)

nfq_get_timestamp - get the packet timestamp

Parameters:
nfadNetlink packet data handle passed to callback function
tvstructure to fill with timestamp info

Retrieves the received timestamp when the given queued packet.

Returns:
0 on success, non-zero on failure.

Definition at line 793 of file libnetfilter_queue.c.

{
      struct nfqnl_msg_packet_timestamp *qpt;
      qpt = nfnl_get_pointer_to_data(nfad->data, NFQA_TIMESTAMP,
                              struct nfqnl_msg_packet_timestamp);
      if (!qpt)
            return -1;

      tv->tv_sec = __be64_to_cpu(qpt->sec);
      tv->tv_usec = __be64_to_cpu(qpt->usec);

      return 0;
}

Generated by  Doxygen 1.6.0   Back to index