summaryrefslogtreecommitdiffstats
path: root/lib/socket.h
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-09-04 11:06:51 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-09-04 11:06:51 +0200
commitf9c799a00e705b1420b214628c2bb2a30bf491d9 (patch)
tree23386935f0128d31acab5f86da41774cac0a4de5 /lib/socket.h
parentd2ceaf4ec82837239a35ace00399ce3aa845849e (diff)
downloadbird-f9c799a00e705b1420b214628c2bb2a30bf491d9.tar
bird-f9c799a00e705b1420b214628c2bb2a30bf491d9.zip
Temporary OSPFv3 development commit (changing multicast support).
Diffstat (limited to 'lib/socket.h')
-rw-r--r--lib/socket.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/socket.h b/lib/socket.h
index f192260..0ab7d95 100644
--- a/lib/socket.h
+++ b/lib/socket.h
@@ -50,7 +50,15 @@ int sk_send_to(sock *, unsigned len, ip_addr to, unsigned port); /* sk_send to g
void sk_reallocate(sock *); /* Free and allocate tbuf & rbuf */
void sk_dump_all(void);
int sk_set_ttl(sock *s, int ttl); /* Set TTL for given socket */
-int sk_set_md5_auth(sock *s, ip_addr a, char *passwd); /* Add or remove security associations for given passive socket */
+
+/* Add or remove security associations for given passive socket */
+int sk_set_md5_auth(sock *s, ip_addr a, char *passwd);
+
+/* Prepare UDP or IP socket to multicasting. s->iface and s->ttl must be set */
+int sk_setup_multicast(sock *s);
+int sk_join_group(sock *s, ip_addr maddr);
+int sk_leave_group(sock *s, ip_addr maddr);
+
static inline int
sk_send_buffer_empty(sock *sk)
@@ -72,9 +80,7 @@ sk_send_buffer_empty(sock *sk)
#define SK_TCP_ACTIVE 1 /* ? ? * * - ? - */
#define SK_TCP 2
#define SK_UDP 3 /* ? ? - - - ? ? */
-#define SK_UDP_MC 4 /* ? ? * * * * - */
#define SK_IP 5 /* ? - - * - ? ? */
-#define SK_IP_MC 6 /* ? - * * * * - */
#define SK_MAGIC 7 /* Internal use by sysdep code */
#define SK_UNIX_PASSIVE 8
#define SK_UNIX 9