summaryrefslogtreecommitdiff
path: root/lib/socket.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/socket.h')
-rw-r--r--lib/socket.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/socket.h b/lib/socket.h
index 0ee43b52..780d596b 100644
--- a/lib/socket.h
+++ b/lib/socket.h
@@ -20,7 +20,8 @@ typedef struct birdsock {
void *data; /* User data */
ip_addr saddr, daddr; /* IPA_NONE = unspecified */
unsigned sport, dport; /* 0 = unspecified (for IP: protocol type) */
- int tos; /* TOS and priority, -1 = default */
+ int tos; /* TOS / traffic class, -1 = default */
+ int priority; /* Local socket priority, -1 = default */
int ttl; /* Time To Live, -1 = default */
u32 flags;
struct iface *iface; /* Interface; specify this for broad/multicast sockets */
@@ -43,6 +44,7 @@ typedef struct birdsock {
/* laddr and lifindex are valid only if SKF_LADDR_RX flag is set to request it */
int fd; /* System-dependent data */
+ int index; /* Index in poll buffer */
node n;
void *rbuf_alloc, *tbuf_alloc;
char *password; /* Password for MD5 authentication */
@@ -81,13 +83,16 @@ sk_send_buffer_empty(sock *sk)
return sk->tbuf == sk->tpos;
}
+extern int sk_priority_control; /* Suggested priority for control traffic, should be sysdep define */
/* Socket flags */
#define SKF_V6ONLY 1 /* Use IPV6_V6ONLY socket option */
#define SKF_LADDR_RX 2 /* Report local address for RX packets */
#define SKF_LADDR_TX 4 /* Allow to specify local address for TX packets */
+#define SKF_TTL_RX 8 /* Report TTL / Hop Limit for RX packets */
+#define SKF_THREAD 0x100 /* Socked used in thread, Do not add to main loop */
/*
* Socket types SA SP DA DP IF TTL SendTo (?=may, -=must not, *=must)