summaryrefslogtreecommitdiffstats
path: root/sysdep/unix/unix.h
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-08-03 21:36:51 +0200
committerMartin Mares <mj@ucw.cz>1999-08-03 21:36:51 +0200
commit4f22c9818554087d8f5ab51b8666a7a48d1f4329 (patch)
tree6a953b961c445f19d7898797e4195b9b8511a2a2 /sysdep/unix/unix.h
parentdce267832a0468ed5e596f0b0733b926af7ead3a (diff)
downloadbird-4f22c9818554087d8f5ab51b8666a7a48d1f4329.tar
bird-4f22c9818554087d8f5ab51b8666a7a48d1f4329.zip
Support for IPv6 sockets. How nice one doesn't have to ifdef around
ten years of API evolution :-)
Diffstat (limited to 'sysdep/unix/unix.h')
-rw-r--r--sysdep/unix/unix.h12
1 files changed, 10 insertions, 2 deletions
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 */