summaryrefslogtreecommitdiff
path: root/print-cnfp.c
diff options
context:
space:
mode:
authorguy <guy>2005-04-20 20:53:18 +0000
committerguy <guy>2005-04-20 20:53:18 +0000
commit42aed6c5c1482f6607fe089f9c5c44887e31ab44 (patch)
treea4aee56941945977f2c351d7d4ef21eca6bd37c7 /print-cnfp.c
parent2fd4391eb963a9797b03c901847bc1374b21e84b (diff)
downloadtcpdump-42aed6c5c1482f6607fe089f9c5c44887e31ab44.tar.gz
Get rid of an unused variable.
#if out some other unused stuff, and note how it *should* be used.
Diffstat (limited to 'print-cnfp.c')
-rw-r--r--print-cnfp.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/print-cnfp.c b/print-cnfp.c
index 79552e00..86d71282 100644
--- a/print-cnfp.c
+++ b/print-cnfp.c
@@ -34,7 +34,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-cnfp.c,v 1.16 2003-11-16 09:36:16 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-cnfp.c,v 1.17 2005-04-20 20:53:18 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -79,16 +79,16 @@ struct nfrec {
};
void
-cnfp_print(const u_char *cp, const u_char *bp)
+cnfp_print(const u_char *cp, const u_char *bp _U_)
{
register const struct nfhdr *nh;
register const struct nfrec *nr;
- register const struct ip *ip;
struct protoent *pent;
int nrecs, ver;
+#if 0
time_t t;
+#endif
- ip = (const struct ip *)bp;
nh = (const struct nfhdr *)cp;
if ((const u_char *)(nh + 1) > snapend)
@@ -96,8 +96,14 @@ cnfp_print(const u_char *cp, const u_char *bp)
nrecs = EXTRACT_32BITS(&nh->ver_cnt) & 0xffff;
ver = (EXTRACT_32BITS(&nh->ver_cnt) & 0xffff0000) >> 16;
+#if 0
+ /*
+ * This is seconds since the UN*X epoch, and is followed by
+ * nanoseconds. XXX - format it, rather than just dumping the
+ * raw seconds-since-the-Epoch.
+ */
t = EXTRACT_32BITS(&nh->utc_sec);
-/* (p = ctime(&t))[24] = '\0'; */
+#endif
printf("NetFlow v%x, %u.%03u uptime, %u.%09u, ", ver,
EXTRACT_32BITS(&nh->msys_uptime)/1000,