partly applied patch #8357: fix compiler warnings in tcpdump.c
This commit is contained in:
parent
96e27bf4f7
commit
43253483a8
|
@ -61,14 +61,16 @@ void
|
||||||
tcpdump(struct pbuf *p)
|
tcpdump(struct pbuf *p)
|
||||||
{
|
{
|
||||||
struct ip_hdr *iphdr;
|
struct ip_hdr *iphdr;
|
||||||
struct tcp_hdr *tcphdr;
|
|
||||||
#if LWIP_UDP
|
#if LWIP_UDP
|
||||||
struct udp_hdr *udphdr;
|
struct udp_hdr *udphdr;
|
||||||
#endif
|
#endif
|
||||||
|
#if LWIP_TCP
|
||||||
|
struct tcp_hdr *tcphdr;
|
||||||
char flags[5];
|
char flags[5];
|
||||||
int i;
|
int i;
|
||||||
int len;
|
int len;
|
||||||
int offset;
|
int offset
|
||||||
|
#endif;
|
||||||
|
|
||||||
if (file == NULL) {
|
if (file == NULL) {
|
||||||
return;
|
return;
|
||||||
|
@ -163,8 +165,8 @@ tcpdump(struct pbuf *p)
|
||||||
(int)(ntohl(iphdr->src.addr) >> 16) & 0xff,
|
(int)(ntohl(iphdr->src.addr) >> 16) & 0xff,
|
||||||
(int)(ntohl(iphdr->src.addr) >> 8) & 0xff,
|
(int)(ntohl(iphdr->src.addr) >> 8) & 0xff,
|
||||||
(int)(ntohl(iphdr->src.addr) >> 0) & 0xff,
|
(int)(ntohl(iphdr->src.addr) >> 0) & 0xff,
|
||||||
ntohs(udphdr->src),
|
|
||||||
(int)(ntohl(iphdr->dest.addr) >> 24) & 0xff,
|
(int)(ntohl(iphdr->dest.addr) >> 24) & 0xff,
|
||||||
|
ntohs(udphdr->src),
|
||||||
(int)(ntohl(iphdr->dest.addr) >> 16) & 0xff,
|
(int)(ntohl(iphdr->dest.addr) >> 16) & 0xff,
|
||||||
(int)(ntohl(iphdr->dest.addr) >> 8) & 0xff,
|
(int)(ntohl(iphdr->dest.addr) >> 8) & 0xff,
|
||||||
(int)(ntohl(iphdr->dest.addr) >> 0) & 0xff,
|
(int)(ntohl(iphdr->dest.addr) >> 0) & 0xff,
|
||||||
|
|
Loading…
Reference in New Issue