"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pcap-rpcap.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.

pcap-rpcap.c  (libpcap-1.10.0):pcap-rpcap.c  (libpcap-1.10.1)
skipping to change at line 1006 skipping to change at line 1006
struct activehosts *temp; /* temp var needed to sca n the host list chain */ struct activehosts *temp; /* temp var needed to sca n the host list chain */
struct addrinfo hints, *addrinfo, *ai_next; /* temp var needed to tra nslate between hostname to its address */ struct addrinfo hints, *addrinfo, *ai_next; /* temp var needed to tra nslate between hostname to its address */
int retval; int retval;
/* retrieve the network address corresponding to 'host' */ /* retrieve the network address corresponding to 'host' */
addrinfo = NULL; addrinfo = NULL;
memset(&hints, 0, sizeof(struct addrinfo)); memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = PF_UNSPEC; hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM; hints.ai_socktype = SOCK_STREAM;
retval = getaddrinfo(host, "0", &hints, &addrinfo); retval = sock_initaddress(host, "0", &hints, &addrinfo, errbuf,
PCAP_ERRBUF_SIZE);
if (retval != 0) if (retval != 0)
{ {
snprintf(errbuf, PCAP_ERRBUF_SIZE, "getaddrinfo() %s",
gai_strerror(retval));
*error = 1; *error = 1;
return NULL; return NULL;
} }
temp = activeHosts; temp = activeHosts;
while (temp) while (temp)
{ {
ai_next = addrinfo; ai_next = addrinfo;
while (ai_next) while (ai_next)
skipping to change at line 2994 skipping to change at line 2993
temp = activeHosts; temp = activeHosts;
prev = NULL; prev = NULL;
/* retrieve the network address corresponding to 'host' */ /* retrieve the network address corresponding to 'host' */
addrinfo = NULL; addrinfo = NULL;
memset(&hints, 0, sizeof(struct addrinfo)); memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = PF_UNSPEC; hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM; hints.ai_socktype = SOCK_STREAM;
retval = getaddrinfo(host, "0", &hints, &addrinfo); retval = sock_initaddress(host, "0", &hints, &addrinfo, errbuf,
PCAP_ERRBUF_SIZE);
if (retval != 0) if (retval != 0)
{ {
snprintf(errbuf, PCAP_ERRBUF_SIZE, "getaddrinfo() %s", gai_strerr or(retval));
return -1; return -1;
} }
while (temp) while (temp)
{ {
ai_next = addrinfo; ai_next = addrinfo;
while (ai_next) while (ai_next)
{ {
if (sock_cmpaddr(&temp->host, (struct sockaddr_storage *) ai_next->ai_addr) == 0) if (sock_cmpaddr(&temp->host, (struct sockaddr_storage *) ai_next->ai_addr) == 0)
{ {
 End of changes. 4 change blocks. 
5 lines changed or deleted 4 lines changed or added

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