Deleted Added
full compact
net_help.c (276605) net_help.c (276699)
1/*
2 * util/net_help.c - implementation of the network helper code
3 *
4 * Copyright (c) 2007, NLnet Labs. All rights reserved.
5 *
6 * This software is open source.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 142 unchanged lines hidden (view full) ---

151 void* sinaddr = &((struct sockaddr_in*)addr)->sin_addr;
152 if(verbosity < v)
153 return;
154 switch(af) {
155 case AF_INET: family="ip4"; break;
156 case AF_INET6: family="ip6";
157 sinaddr = &((struct sockaddr_in6*)addr)->sin6_addr;
158 break;
1/*
2 * util/net_help.c - implementation of the network helper code
3 *
4 * Copyright (c) 2007, NLnet Labs. All rights reserved.
5 *
6 * This software is open source.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 142 unchanged lines hidden (view full) ---

151 void* sinaddr = &((struct sockaddr_in*)addr)->sin_addr;
152 if(verbosity < v)
153 return;
154 switch(af) {
155 case AF_INET: family="ip4"; break;
156 case AF_INET6: family="ip6";
157 sinaddr = &((struct sockaddr_in6*)addr)->sin6_addr;
158 break;
159 case AF_UNIX: family="unix"; break;
159 case AF_LOCAL: family="local"; break;
160 default: break;
161 }
162 if(inet_ntop(af, sinaddr, dest, (socklen_t)sizeof(dest)) == 0) {
163 (void)strlcpy(dest, "(inet_ntop error)", sizeof(dest));
164 }
165 dest[sizeof(dest)-1] = 0;
166 port = ntohs(((struct sockaddr_in*)addr)->sin_port);
167 if(verbosity >= 4)

--- 140 unchanged lines hidden (view full) ---

308 void* sinaddr = &((struct sockaddr_in*)addr)->sin_addr;
309 if(verbosity < v)
310 return;
311 switch(af) {
312 case AF_INET: family=""; break;
313 case AF_INET6: family="";
314 sinaddr = &((struct sockaddr_in6*)addr)->sin6_addr;
315 break;
160 default: break;
161 }
162 if(inet_ntop(af, sinaddr, dest, (socklen_t)sizeof(dest)) == 0) {
163 (void)strlcpy(dest, "(inet_ntop error)", sizeof(dest));
164 }
165 dest[sizeof(dest)-1] = 0;
166 port = ntohs(((struct sockaddr_in*)addr)->sin_port);
167 if(verbosity >= 4)

--- 140 unchanged lines hidden (view full) ---

308 void* sinaddr = &((struct sockaddr_in*)addr)->sin_addr;
309 if(verbosity < v)
310 return;
311 switch(af) {
312 case AF_INET: family=""; break;
313 case AF_INET6: family="";
314 sinaddr = &((struct sockaddr_in6*)addr)->sin6_addr;
315 break;
316 case AF_UNIX: family="unix_family "; break;
316 case AF_LOCAL: family="local "; break;
317 default: break;
318 }
319 if(inet_ntop(af, sinaddr, dest, (socklen_t)sizeof(dest)) == 0) {
320 (void)strlcpy(dest, "(inet_ntop error)", sizeof(dest));
321 }
322 dest[sizeof(dest)-1] = 0;
323 port = ntohs(((struct sockaddr_in*)addr)->sin_port);
324 dname_str(zone, namebuf);

--- 490 unchanged lines hidden ---
317 default: break;
318 }
319 if(inet_ntop(af, sinaddr, dest, (socklen_t)sizeof(dest)) == 0) {
320 (void)strlcpy(dest, "(inet_ntop error)", sizeof(dest));
321 }
322 dest[sizeof(dest)-1] = 0;
323 port = ntohs(((struct sockaddr_in*)addr)->sin_port);
324 dname_str(zone, namebuf);

--- 490 unchanged lines hidden ---