summaryrefslogtreecommitdiff
path: root/print-802_15_4.c
diff options
context:
space:
mode:
authorDenis Ovsienko <infrastation@yandex.ru>2014-03-15 14:19:49 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2014-03-15 14:19:49 +0400
commit1fe6e66ecec3fb7a7cc729038012cbb264542331 (patch)
tree994f5218d7609bedbd50f207d1b15e43f661be50 /print-802_15_4.c
parent85a2dd977cad3e21b475abbedeb795989207b8db (diff)
downloadtcpdump-1fe6e66ecec3fb7a7cc729038012cbb264542331.tar.gz
make use of NETDISSECT_REWORKED
Update the already converted decoders to define the macro and to include interface.h instead of netdissect.h. Fix incurred compile errors.
Diffstat (limited to 'print-802_15_4.c')
-rw-r--r--print-802_15_4.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/print-802_15_4.c b/print-802_15_4.c
index cf5f637a..ee66832f 100644
--- a/print-802_15_4.c
+++ b/print-802_15_4.c
@@ -20,15 +20,13 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <tcpdump-stdinc.h>
-#include <stdio.h>
-#include <string.h>
-
#include "interface.h"
#include "addrtoname.h"
@@ -111,7 +109,7 @@ ieee802_15_4_if_print(struct netdissect_options *ndo,
caplen -= 3;
ND_PRINT((ndo,"IEEE 802.15.4 %s packet ", ftypes[fc & 0x7]));
- if (vflag)
+ if (ndo->ndo_vflag)
ND_PRINT((ndo,"seq %02x ", seq));
if (hdrlen == -1) {
ND_PRINT((ndo,"malformed! "));
@@ -119,7 +117,7 @@ ieee802_15_4_if_print(struct netdissect_options *ndo,
}
- if (!vflag) {
+ if (!ndo->ndo_vflag) {
p+= hdrlen;
caplen -= hdrlen;
} else {
@@ -175,7 +173,7 @@ ieee802_15_4_if_print(struct netdissect_options *ndo,
caplen -= hdrlen;
}
- if (!suppress_default_print)
+ if (!ndo->ndo_suppress_default_print)
(ndo->ndo_default_print)(ndo, p, caplen);
return 0;