summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2016-01-07 12:02:54 +0100
committerJan Moskyto Matejka <mq@ucw.cz>2016-01-11 09:29:51 +0100
commit6ffa8f53931e2ae8becf8ec6ef09db88737a6a06 (patch)
treec4a2a01133834c41f058d24947964184ca779bcc /lib
parent5b218c3d9bf9357aed0acf535bdfc6684cc5cda4 (diff)
Hidden AF_INET* inside sysdep/
Diffstat (limited to 'lib')
-rw-r--r--lib/socket.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/socket.h b/lib/socket.h
index d7c78e72..1b03098d 100644
--- a/lib/socket.h
+++ b/lib/socket.h
@@ -43,7 +43,7 @@ typedef struct birdsock {
uint lifindex; /* local interface that received the datagram */
/* laddr and lifindex are valid only if SKF_LADDR_RX flag is set to request it */
- int af; /* Address family (AF_INET, AF_INET6 or 0 for non-IP) of fd */
+ int fam; /* Address family (SK_FAM_* or 0 for non-IP) of fd */
int fd; /* System-dependent data */
int index; /* Index in poll buffer */
int rcv_ttl; /* TTL of last received datagram */
@@ -115,6 +115,12 @@ extern int sk_priority_control; /* Suggested priority for control traffic, shou
#define SK_UNIX_PASSIVE 8
#define SK_UNIX 9
+/* Socket families */
+
+#define SK_FAM_NONE 0
+#define SK_FAM_IPV4 4
+#define SK_FAM_IPV6 6
+
/*
* For SK_UDP or SK_IP sockets setting DA/DP allows to use sk_send(),
* otherwise sk_send_to() must be used.