"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "testprogs/findalldevstest.c" between
libpcap-1.10.0.tar.gz and libpcap-1.10.1.tar.gz

About: libpcap is a packet filter library used by tools like tcpdump.

findalldevstest.c  (libpcap-1.10.0):findalldevstest.c  (libpcap-1.10.1)
skipping to change at line 324 skipping to change at line 324
} }
} }
printf("\n"); printf("\n");
return status; return status;
} }
/* From tcptraceroute */ /* From tcptraceroute */
#define IPTOSBUFFERS 12 #define IPTOSBUFFERS 12
static char *iptos(bpf_u_int32 in) static char *iptos(bpf_u_int32 in)
{ {
static char output[IPTOSBUFFERS][3*4+3+1]; static char output[IPTOSBUFFERS][sizeof("255.255.255.255")];
static short which; static short which;
u_char *p; u_char *p;
p = (u_char *)∈ p = (u_char *)∈
which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1); which = (which + 1 == IPTOSBUFFERS ? 0 : which + 1);
sprintf(output[which], "%d.%d.%d.%d", p[0], p[1], p[2], p[3]); snprintf(output[which], sizeof(output[which]), "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
return output[which]; return output[which];
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)