All of lore.kernel.org
 help / color / mirror / Atom feed
* libipq and timestamp
@ 2003-08-18 13:36 Eric Leblond
  2003-08-19  0:37 ` "Ian Jones"
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Leblond @ 2003-08-18 13:36 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 240 bytes --]

Hi,

I did not manage to get the timestamp of a packet in the message given
by libipq. It is just 0.
Is there something to do to have it fill in ?

Thanks in advance,
-- 
Eric Leblond <eric@regit.org>
GnuFw : http://www.gnufw.org

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libipq and timestamp
  2003-08-18 13:36 libipq and timestamp Eric Leblond
@ 2003-08-19  0:37 ` "Ian Jones"
  0 siblings, 0 replies; 2+ messages in thread
From: "Ian Jones" @ 2003-08-19  0:37 UTC (permalink / raw)
  To: Eric Leblond; +Cc: netfilter-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Eric Leblond <eric@regit.org> writes:

> I did not manage to get the timestamp of a packet in the message given
> by libipq. It is just 0.
> Is there something to do to have it fill in ?

If the packet is locally generated then the timestamp is not filled
in for you. Here is a snippet that may help:

 /* locally generated?, no timestamp */
  if (!m->timestamp_sec)
    {
      memset (&tz, 0, sizeof (tz));
      gettimeofday (&tv, &tz);
      ph.ts.tv_sec = tv.tv_sec;
      ph.ts.tv_usec = tv.tv_usec;
    }
  else
    {
      ph.ts.tv_sec = m->timestamp_sec;
      ph.ts.tv_usec = m->timestamp_usec;
    }

-----BEGIN PGP SIGNATURE-----
Comment: Keeping the world safe for geeks.

iD8DBQE/QXFbwBVKl/Nci0oRAt91AJwMLTu43iFjrtAyAj4fGG2nvYK2pwCg7RgH
ym7QrHv/NkFEa3Q/semyoS4=
=fwjd
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-19  0:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-18 13:36 libipq and timestamp Eric Leblond
2003-08-19  0:37 ` "Ian Jones"

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.