0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

Missed some files in r520 commit.

This commit is contained in:
Valery Yatsko 2008-04-05 21:20:48 +04:00
parent 0f6e881c65
commit 9ea3ea1085
5 changed files with 14 additions and 14 deletions

View file

@ -31,7 +31,7 @@ enum
{
HM_HOST,
HM_IPV4
#ifdef IPV6
#ifdef RB_IPV6
, HM_IPV6
#endif
};
@ -64,7 +64,7 @@ struct ConfItem *find_dline(struct sockaddr *, int);
void report_Klines(struct Client *);
void report_auth(struct Client *);
#ifdef IPV6
#ifdef RB_IPV6
int match_ipv6(struct sockaddr *, struct sockaddr *, int);
#endif
int match_ipv4(struct sockaddr *, struct sockaddr *, int);

View file

@ -84,7 +84,7 @@ Info MyInformation[] = {
"Maximum Queue Length of Pending Connections"},
#endif /* SOMAXCONN */
#ifdef IPV6
#ifdef RB_IPV6
{"IPV6", "ON", 0, "IPv6 Support"},
#else
{"IPV6", "OFF", 0, "IPv6 Support"},

View file

@ -271,11 +271,11 @@ struct server_info
char *network_desc;
int hub;
struct sockaddr_in ip;
#ifdef IPV6
#ifdef RB_IPV6
struct sockaddr_in6 ip6;
#endif
int specific_ipv4_vhost;
#ifdef IPV6
#ifdef RB_IPV6
int specific_ipv6_vhost;
#endif

View file

@ -154,7 +154,7 @@ mo_dline(struct Client *client_p, struct Client *source_p,
const char *creason;
int t = AF_INET, ty, b;
ty = parse_netmask(dlhost, (struct sockaddr *)&daddr, &b);
#ifdef IPV6
#ifdef RB_IPV6
if(ty == HM_IPV6)
t = AF_INET6;
else

View file

@ -46,7 +46,7 @@
#define INADDR_NONE ((unsigned int) 0xffffffff)
#endif
#if defined(NO_IN6ADDR_ANY) && defined(IPV6)
#if defined(NO_IN6ADDR_ANY) && defined(RB_IPV6)
static const struct in6_addr in6addr_any =
{ { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } };
#endif
@ -112,7 +112,7 @@ get_listener_name(const listener_t *listener)
if(listener == NULL)
return NULL;
#ifdef IPV6
#ifdef RB_IPV6
if(listener->addr.ss_family == AF_INET6)
port = ntohs(((const struct sockaddr_in6 *)&listener->addr)->sin6_port);
else
@ -138,7 +138,7 @@ show_ports(struct Client *source_p)
{
sendto_one_numeric(source_p, RPL_STATSPLINE,
form_str(RPL_STATSPLINE), 'P',
#ifdef IPV6
#ifdef RB_IPV6
ntohs(listener->addr.ss_family == AF_INET ? ((struct sockaddr_in *)&listener->addr)->sin_port :
((struct sockaddr_in6 *)&listener->addr)->sin6_port),
#else
@ -175,7 +175,7 @@ inetport(listener_t *listener)
F = rb_socket(GET_SS_FAMILY(&listener->addr), SOCK_STREAM, 0, "Listener socket");
#ifdef IPV6
#ifdef RB_IPV6
if(listener->addr.ss_family == AF_INET6)
{
struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)&listener->addr;
@ -270,7 +270,7 @@ find_listener(struct rb_sockaddr_storage *addr)
}
break;
}
#ifdef IPV6
#ifdef RB_IPV6
case AF_INET6:
{
struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)addr;
@ -323,7 +323,7 @@ add_listener(int port, const char *vhost_ip, int family)
if(inetpton(family, vhost_ip, &((struct sockaddr_in *)&vaddr)->sin_addr) <= 0)
return;
}
#ifdef IPV6
#ifdef RB_IPV6
else
{
if(inetpton(family, vhost_ip, &((struct sockaddr_in6 *)&vaddr)->sin6_addr) <= 0)
@ -338,7 +338,7 @@ add_listener(int port, const char *vhost_ip, int family)
case AF_INET:
((struct sockaddr_in *)&vaddr)->sin_addr.s_addr = INADDR_ANY;
break;
#ifdef IPV6
#ifdef RB_IPV6
case AF_INET6:
memcpy(&((struct sockaddr_in6 *)&vaddr)->sin6_addr, &in6addr_any, sizeof(struct in6_addr));
break;
@ -353,7 +353,7 @@ add_listener(int port, const char *vhost_ip, int family)
SET_SS_LEN(&vaddr, sizeof(struct sockaddr_in));
((struct sockaddr_in *)&vaddr)->sin_port = htons(port);
break;
#ifdef IPV6
#ifdef RB_IPV6
case AF_INET6:
SET_SS_LEN(&vaddr, sizeof(struct sockaddr_in6));
((struct sockaddr_in6 *)&vaddr)->sin6_port = htons(port);