summaryrefslogtreecommitdiff
path: root/print-atalk.c
diff options
context:
space:
mode:
Diffstat (limited to 'print-atalk.c')
-rw-r--r--print-atalk.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/print-atalk.c b/print-atalk.c
index df94bf6b..e415f9a7 100644
--- a/print-atalk.c
+++ b/print-atalk.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.76 2002-11-09 17:19:24 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.77 2002-12-11 07:13:57 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -61,7 +61,7 @@ struct aarp {
u_int8_t psaddr[4];
u_int8_t hdaddr[6];
u_int8_t pdaddr[4];
-} __attribute__((packed));
+};
static char tstr[] = "[|atalk]";
@@ -202,9 +202,10 @@ aarp_print(register const u_char *bp, u_int length)
printf("aarp ");
ap = (const struct aarp *)bp;
- if (ntohs(ap->htype) == 1 && ntohs(ap->ptype) == ETHERTYPE_ATALK &&
+ if (EXTRACT_16BITS(&ap->htype) == 1 &&
+ EXTRACT_16BITS(&ap->ptype) == ETHERTYPE_ATALK &&
ap->halen == 6 && ap->palen == 4 )
- switch (ntohs(ap->op)) {
+ switch (EXTRACT_16BITS(&ap->op)) {
case 1: /* request */
(void)printf("who-has %s tell %s",
@@ -222,8 +223,8 @@ aarp_print(register const u_char *bp, u_int length)
return;
}
(void)printf("len %u op %u htype %u ptype %#x halen %u palen %u",
- length, ntohs(ap->op), ntohs(ap->htype), ntohs(ap->ptype),
- ap->halen, ap->palen);
+ length, EXTRACT_16BITS(&ap->op), EXTRACT_16BITS(&ap->htype),
+ EXTRACT_16BITS(&ap->ptype), ap->halen, ap->palen);
}
/*