From 4f22c9818554087d8f5ab51b8666a7a48d1f4329 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Tue, 3 Aug 1999 19:36:51 +0000 Subject: Support for IPv6 sockets. How nice one doesn't have to ifdef around ten years of API evolution :-) --- sysdep/unix/unix.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sysdep/unix/unix.h') diff --git a/sysdep/unix/unix.h b/sysdep/unix/unix.h index 2d26074..4cced09 100644 --- a/sysdep/unix/unix.h +++ b/sysdep/unix/unix.h @@ -21,10 +21,18 @@ volatile int async_config_flag; volatile int async_dump_flag; volatile int async_shutdown_flag; +#ifdef IPV6 +#define BIRD_PF PF_INET6 +typedef struct sockaddr_in6 sockaddr; +#else +#define BIRD_PF PF_INET +typedef struct sockaddr_in sockaddr; +#endif + void io_init(void); void io_loop(void); -void fill_in_sockaddr(struct sockaddr_in *sa, ip_addr a, unsigned port); -void get_sockaddr(struct sockaddr_in *sa, ip_addr *a, unsigned *port); +void fill_in_sockaddr(sockaddr *sa, ip_addr a, unsigned port); +void get_sockaddr(sockaddr *sa, ip_addr *a, unsigned *port); /* krt.c bits */ -- cgit v1.2.3