summaryrefslogtreecommitdiff
path: root/print-cip.c
diff options
context:
space:
mode:
authorfenner <fenner>2001-09-17 21:57:50 +0000
committerfenner <fenner>2001-09-17 21:57:50 +0000
commitc672f002763b3a4fc30ca229e57f50d3b2e6d766 (patch)
treeee681c42232037a77b9f4413202971bfd41bf0d9 /print-cip.c
parentd5c621ba52626b1cc9778850bf7997cc227d230d (diff)
downloadtcpdump-c672f002763b3a4fc30ca229e57f50d3b2e6d766.tar.gz
Eliminate some unused parameters.
Use const more. Use EXTRACT_* macros more. Use TCHECK* more. Use tok2str() to replace some home-grown workalikes. smb: - Get rid of private types, use tcpdump-defined types - Rename fdata and fdata1 to smb_fdata and smb_fdata1 to avoid conflict with IRIX library function.
Diffstat (limited to 'print-cip.c')
-rw-r--r--print-cip.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/print-cip.c b/print-cip.c
index 45ece55f..55cd8418 100644
--- a/print-cip.c
+++ b/print-cip.c
@@ -22,7 +22,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.14 2001-07-05 18:54:15 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.15 2001-09-17 21:57:58 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -69,7 +69,7 @@ cip_print(register const u_char *bp, int length)
} else {
for (i = 0;i < RFC1483LLC_LEN - 2; i++)
(void)printf("%2.2x ",bp[i]);
- etherproto_string(((u_short*)bp)[3]);
+ etherproto_string(((const u_short *)bp)[3]);
}
} else {
if (qflag)
@@ -90,11 +90,11 @@ cip_print(register const u_char *bp, int length)
void
cip_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
{
- int caplen = h->caplen;
- int length = h->len;
+ u_int caplen = h->caplen;
+ u_int length = h->len;
u_short ether_type;
u_short extracted_ethertype;
- u_short *bp;
+ const u_short *bp;
++infodelay;
ts_print(&h->ts);
@@ -118,12 +118,12 @@ cip_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p)
if (memcmp(rfcllc, p, sizeof(rfcllc))==0) {
length -= RFC1483LLC_LEN;
caplen -= RFC1483LLC_LEN;
- bp = (u_short *)p;
+ bp = (const u_short *)p;
p += RFC1483LLC_LEN;
ether_type = ntohs(bp[3]);
} else {
ether_type = ETHERTYPE_IP;
- bp = (u_short *)p;
+ bp = (const u_short *)p;
}
/*