summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-07-13 16:20:21 +0200
committerHarald Welte <laforge@gnumonks.org>2017-07-13 16:53:41 +0200
commitbc43a62f4128348b52af50ae75c84ba772c17e29 (patch)
treeecd59db08d6a3d70d3417dc51290a5ccfececf1b /include
parentc47bbda78ce62d3390343b39d3bdfd0d6c9609df (diff)
socket: Allow disabling multicast loop on socket creation
This introduces a new flag OSMO_SOCK_F_NO_MCAST_LOOP, which can be used to disable the looping back of multicast packets transmitted throug this socket to other local sockets on the machine. As this looping-back is active by default, a single option to deviate from the default is deemed sufficient. Change-Id: I24a5b1ebc3f84d2d5d4734e54df50efaea26490b
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/core/socket.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h
index 6db436ae..695e1d7e 100644
--- a/include/osmocom/core/socket.h
+++ b/include/osmocom/core/socket.h
@@ -20,6 +20,8 @@ struct osmo_fd;
#define OSMO_SOCK_F_BIND (1 << 1)
/*! switch socket to non-blocking mode */
#define OSMO_SOCK_F_NONBLOCK (1 << 2)
+/*! disable multiast loop (IP_MULTICAST_LOOP) */
+#define OSMO_SOCK_F_NO_MCAST_LOOP (1 << 3)
int osmo_sock_init(uint16_t family, uint16_t type, uint8_t proto,
const char *host, uint16_t port, unsigned int flags);