summaryrefslogtreecommitdiff
path: root/sys/netinet/in.h
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2007-09-18 18:56:03 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2007-09-18 18:56:03 +0000
commitd8c8aedc05fb2cb0525780a91a06a0470ead8d28 (patch)
tree8ad63d183073defcec00688b5f81884f308a2174 /sys/netinet/in.h
parent73ab101f302f601f84bacdb4b550ba93e28812c1 (diff)
allow 4095 instead of 20 multicast group memberships per socket (you need
one entry for each multicast group and interface combination). this allows you to run OSPF with more than 10 interfaces. adapted from freebsd; ok claudio, henning, mpf
Diffstat (limited to 'sys/netinet/in.h')
-rw-r--r--sys/netinet/in.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index bbbd2f42888..5cfdf0e66c2 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in.h,v 1.73 2006/10/11 09:34:51 henning Exp $ */
+/* $OpenBSD: in.h,v 1.74 2007/09/18 18:56:02 markus Exp $ */
/* $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ */
/*
@@ -290,7 +290,13 @@ struct ip_opts {
*/
#define IP_DEFAULT_MULTICAST_TTL 1 /* normally limit m'casts to 1 hop */
#define IP_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */
-#define IP_MAX_MEMBERSHIPS 20 /* per socket; must fit in one mbuf */
+/*
+ * The imo_membership vector for each socket starts at IP_MIN_MEMBERSHIPS
+ * and is dynamically allocated at run-time, bounded by IP_MAX_MEMBERSHIPS,
+ * and is reallocated when needed, sized according to a power-of-two increment.
+ */
+#define IP_MIN_MEMBERSHIPS 15
+#define IP_MAX_MEMBERSHIPS 4095
/*
* Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP.