diff options
author | Alexander Zubkov <green@qrator.net> | 2022-01-08 18:31:56 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2022-01-08 19:02:31 +0100 |
commit | 87a02489f3880689a4e2ad72b0b981649dad2154 (patch) | |
tree | b5e486015ab7907bf165ae20851290258e72114d /lib/socket.h | |
parent | bcb25084d31fdb90fcf1666f10e73fe0f863afc0 (diff) |
IO: Support nonlocal bind in socket interface
Add option to socket interface for nonlocal binding, i.e. binding to an
IP address that is not present on interfaces. This behaviour is enabled
when SKF_FREEBIND socket flag is set. For Linux systems, it is
implemented by IP_FREEBIND socket flag.
Minor changes done by commiter.
Diffstat (limited to 'lib/socket.h')
-rw-r--r-- | lib/socket.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/socket.h b/lib/socket.h index 96fedeeb..0b6ac589 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -123,6 +123,7 @@ extern int sk_priority_control; /* Suggested priority for control traffic, shou #define SKF_TTL_RX 0x08 /* Report TTL / Hop Limit for RX packets */ #define SKF_BIND 0x10 /* Bind datagram socket to given source address */ #define SKF_HIGH_PORT 0x20 /* Choose port from high range if possible */ +#define SKF_FREEBIND 0x40 /* Allow socket to bind to a nonlocal address */ #define SKF_THREAD 0x100 /* Socked used in thread, Do not add to main loop */ #define SKF_TRUNCATED 0x200 /* Received packet was truncated, set by IO layer */ |