diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-02-11 10:23:35 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-02-11 10:23:35 +0100 |
commit | 353729f513aa6a1f9e7f66083a0f9d2117fe2be5 (patch) | |
tree | 2ce53e3f1b1eb40b852de490db8a65eb681fadfd /lib/socket.h | |
parent | 75f8861898d53f43cb23dbba9c776bce223c18c8 (diff) | |
download | bird-353729f513aa6a1f9e7f66083a0f9d2117fe2be5.tar bird-353729f513aa6a1f9e7f66083a0f9d2117fe2be5.zip |
Temporary OSPF commit - socket changes.
Diffstat (limited to 'lib/socket.h')
-rw-r--r-- | lib/socket.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/socket.h b/lib/socket.h index d3fd745..a21075e 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -34,8 +34,11 @@ typedef struct birdsock { void (*err_hook)(struct birdsock *, int); /* errno or zero if EOF */ - ip_addr faddr; /* For packet protocols: source of current packet */ - unsigned fport; + /* Information about received datagrams (UDP, RAW), valid in rx_hook */ + ip_addr faddr, laddr; /* src (From) and dst (Local) address of the datagram */ + unsigned fport; /* src port of the datagram */ + unsigned lifindex; /* local interface that received the datagram */ + /* laddr and lifindex are valid only if SKF_LADDR_RX flag is set to request it */ int fd; /* System-dependent data */ node n; @@ -73,7 +76,9 @@ sk_send_buffer_empty(sock *sk) /* Socket flags */ -#define SKF_V6ONLY 1 /* Use IPV6_V6ONLY socket option */ +#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 */ /* |