summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorJeremy Sowden <jeremy@azazel.net>2021-08-28 20:38:24 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2021-08-30 02:14:33 +0200
commita263e922a4ac2fe52fbf01946ab0117b44bc7358 (patch)
tree3102962f82e0508fe63a3d5b0375ad6d3ed482e1 /utils
parent65ce3309ab5fc84797491fc4643211cc1871d254 (diff)
libipulog: fill in missing packet fields.
Retrieval of time-stamp, input- and output-device fields had not been implemented in `ipulog_get_packet`. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'utils')
-rw-r--r--utils/ulog_test.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/ulog_test.c b/utils/ulog_test.c
index f3adec2..20f6163 100644
--- a/utils/ulog_test.c
+++ b/utils/ulog_test.c
@@ -27,6 +27,13 @@ void handle_packet(ulog_packet_msg_t *pkt)
pkt->hook, pkt->mark, pkt->data_len);
if (strlen(pkt->prefix))
printf("Prefix=%s ", pkt->prefix);
+ if (strlen(pkt->indev_name))
+ printf("Input device=%s ", pkt->indev_name);
+ if (strlen(pkt->outdev_name))
+ printf("Output device=%s ", pkt->outdev_name);
+ if (pkt->timestamp_sec || pkt->timestamp_usec)
+ printf("Timestamp=%ld.%06lds ",
+ pkt->timestamp_sec, pkt->timestamp_usec);
if (pkt->mac_len)
{