#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.74 2002-09-05 21:25:37 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.75 2002-10-18 04:40:02 itojun Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
ddpskt_string(dp->dstSkt));
bp += ddpSize;
length -= ddpSize;
-#ifdef LBL_ALIGN
- if ((long)bp & 3) {
- static u_char *abuf = NULL;
-
- if (abuf == NULL) {
- abuf = (u_char *)malloc(snaplen);
- if (abuf == NULL)
- error("atalk_print: malloc");
- }
- memcpy((char *)abuf, (char *)bp, min(length, snaplen));
- snapend += abuf - (u_char *)bp;
- packetp = abuf;
- bp = abuf;
- }
-#endif
ddp_print(bp, length, dp->type, snet, dp->srcNode, dp->srcSkt);
}
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.115 2002-10-04 08:30:18 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.116 2002-10-18 04:40:03 itojun Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
struct protoent *proto;
ip = (const struct ip *)bp;
-#ifdef LBL_ALIGN
- /*
- * If the IP header is not aligned, copy into abuf.
- */
- if ((long)ip & 3) {
- static u_char *abuf = NULL;
- static int didwarn = 0;
-
- if (abuf == NULL) {
- abuf = (u_char *)malloc(snaplen);
- if (abuf == NULL)
- error("ip_print: malloc");
- }
- memcpy((char *)abuf, (char *)ip, min(length, snaplen));
- snapend += abuf - (u_char *)ip;
- packetp = abuf;
- ip = (struct ip *)abuf;
- /* We really want libpcap to give us aligned packets */
- if (!didwarn) {
- warning("compensating for unaligned libpcap packets");
- ++didwarn;
- }
- }
-#endif
if ((u_char *)(ip + 1) > snapend) {
printf("[|ip]");
return;
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.26 2002-09-05 21:25:42 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.27 2002-10-18 04:40:03 itojun Exp $";
#endif
#ifdef HAVE_CONFIG_H
ip6 = (const struct ip6_hdr *)bp;
-#ifdef LBL_ALIGN
- /*
- * The IP6 header is not 16-byte aligned, so copy into abuf.
- */
- if ((u_long)ip6 & 15) {
- static u_char *abuf;
-
- if (abuf == NULL) {
- abuf = malloc(snaplen);
- if (abuf == NULL)
- error("ip6_print: malloc");
- }
- memcpy(abuf, ip6, min(length, snaplen));
- snapend += abuf - (u_char *)ip6;
- packetp = abuf;
- ip6 = (struct ip6_hdr *)abuf;
- bp = abuf;
- }
-#endif
TCHECK(*ip6);
if (length < sizeof (struct ip6_hdr)) {
(void)printf("truncated-ip6 %d", length);