about summary refs log tree commit diff
path: root/inet
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-08-06 04:56:04 +0000
committerUlrich Drepper <drepper@redhat.com>2004-08-06 04:56:04 +0000
commit489aa29d623782c2c4045065ef1a22a07af921af (patch)
tree2cd3f3b4e67e0e9fb1b7d2797dc6f58fcbcac851 /inet
parenta3c7fcf0f1249fd79b7f72ef49c99b198c4ea219 (diff)
downloadglibc-489aa29d623782c2c4045065ef1a22a07af921af.tar.gz
glibc-489aa29d623782c2c4045065ef1a22a07af921af.tar.xz
glibc-489aa29d623782c2c4045065ef1a22a07af921af.zip
Update.
	* inet/netinet/in.h: Define struct ip_msfilter, IP_MSFILTER_SIZE,
	struct group_filter, and GROUP_FILTER_SIZE.
	* include/sys/socket.h: Declare __getsockopt.
	* sysdeps/unix/sysv/linux/setipv4sourcefilter.c: New file.
	* sysdeps/unix/sysv/linux/getipv4sourcefilter.c: New file.
	* sysdeps/unix/sysv/linux/setsourcefilter.c: New file.
	* sysdeps/unix/sysv/linux/getsourcefilter.c: New file.
Diffstat (limited to 'inet')
-rw-r--r--inet/netinet/in.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/inet/netinet/in.h b/inet/netinet/in.h
index bdf4e5dc2c..0922dc789b 100644
--- a/inet/netinet/in.h
+++ b/inet/netinet/in.h
@@ -296,6 +296,51 @@ struct group_source_req
   };
 
 
+/* Full-state filter operations.  */
+struct ip_msfilter
+  {
+    /* IP multicast address of group.  */
+    struct in_addr imsf_multiaddr;
+
+    /* Local IP address of interface.  */
+    struct in_addr imsf_interface;
+
+    /* Filter mode.  */
+    uint32_t imsf_fmode;
+
+    /* Number of source addresses.  */
+    uint32_t imsf_numsrc;
+    /* Source addresses.  */
+    struct in_addr imsf_slist[1];
+  };
+
+#define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \
+				  - sizeof (struct in_addr)		      \
+				  + (numsrc) * sizeof (struct in_addr))
+
+struct group_filter
+  {
+    /* Interface index.  */
+    uint32_t gf_interface;
+
+    /* Group address.  */
+    struct sockaddr_storage gf_group;
+
+    /* Filter mode.  */
+    uint32_t gf_fmode;
+
+    /* Number of source addresses.  */
+    uint32_t gf_numsrc;
+    /* Source addresses.  */
+    struct sockaddr_storage gf_slist[1];
+};
+
+#define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \
+				   - sizeof (struct sockaddr_storage)	      \
+				   + ((numsrc)				      \
+				      * sizeof (struct sockaddr_storage)))
+
+
 /* Get system-specific definitions.  */
 #include <bits/in.h>