search for: net_addr

Displaying 3 results from an estimated 3 matches for "net_addr".

Did you mean: inet_addr
2007 Jan 08
2
Re: [nut-commits] svn commit r714 - in trunk: . server
...ess.c, line 60-61: return (IN6_IS_ADDR_V4MAPPED(ip6) && ((((const u_int32_t *)ip6)[3] & (u_int32_t)prefix) == net->s_addr)); Comparing this with line 38: return((((struct sockaddr_in*)ip_addr)->sin_addr.s_addr & htonl(prefix)) == ((struct sockaddr_in*)net_addr)->sin_addr.s_addr); I wonder if it shouldn't be htonl(prefix) in line 61, or perhaps ntohl(net->s_addr) in line 61. I don't understand these data structures well, and presumably the patch came from someone who tested it on a little-endian machine, but it seems to me from inet(3) that...
2007 Jan 06
3
Re: [nut-commits] svn commit r708 - in trunk: . clients server
...gt; - struct access_t *access_head = NULL; > +struct acl_t *acl_head = NULL; > +struct access_t *access_head = NULL; > + > +/* > + * Stolen from privoxy code :] > + */ > +int mask_cmp (const struct sockaddr_storage* ip_addr, unsigned int prefix, const struct sockaddr_storage* net_addr) { > + switch (ip_addr->ss_family) { > + case AF_INET: > + return((((struct sockaddr_in*)ip_addr)->sin_addr.s_addr & htonl(prefix)) == ((struct sockaddr_in*)net_addr)->sin_addr.s_addr); > + break; > + case AF_INET6: > + if (AF_INET6 == net_addr->ss_family) { &gt...
2007 Jan 06
1
Re: [nut-commits] svn commit r710 - in trunk: . clients server
...cess_head = NULL; > + struct acl_t *acl_head = NULL; > + struct access_t *access_head = NULL; > > +#ifdef HAVE_IPV6 > /* > * Stolen from privoxy code :] > */ > -int mask_cmp (const struct sockaddr_storage* ip_addr, unsigned int prefix, const struct sockaddr_storage* net_addr) { > +static int mask_cmp (const struct sockaddr_storage* ip_addr, unsigned int prefix, const struct sockaddr_storage* net_addr) { > switch (ip_addr->ss_family) { > case AF_INET: > return((((struct sockaddr_in*)ip_addr)->sin_addr.s_addr & htonl(prefix)) == ((struct sock...