1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
* 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.
This commit is contained in:
Ulrich Drepper
2004-08-06 04:56:04 +00:00
parent a3c7fcf0f1
commit 489aa29d62
7 changed files with 332 additions and 0 deletions

View File

@ -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>