diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | inet/Makefile | 4 | ||||
-rw-r--r-- | inet/Versions | 4 | ||||
-rw-r--r-- | inet/netinet/in.h | 40 | ||||
-rw-r--r-- | sysdeps/generic/getipv4sourcefilter.c | 32 | ||||
-rw-r--r-- | sysdeps/generic/getsourcefilter.c | 33 | ||||
-rw-r--r-- | sysdeps/generic/setipv4sourcefilter.c | 32 | ||||
-rw-r--r-- | sysdeps/generic/setsourcefilter.c | 33 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S | 4 |
9 files changed, 185 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog index e8a914ca78..e0b4230a84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2004-07-25 Ulrich Drepper <drepper@redhat.com> + + * inet/Versions [libc, GLIBC_2.3.4]: Add getipv4sourcefilter, + getsourcefilter, setipv4sourcefilter, and setsourcefilter. + * inet/Makefile (routines): Likewise. + * inet/netinet/in.h: Add prototypes for getipv4sourcefilter, + getsourcefilter, setipv4sourcefilter, and setsourcefilter. + * sysdeps/generic/getipv4sourcefilter.c: New file. + * sysdeps/generic/setipv4sourcefilter.c: New file. + * sysdeps/generic/getsourcefilter.c: New file. + * sysdeps/generic/setsourcefilter.c: New file. + 2004-07-17 Steven Munroe <sjmunroe@us.ibm.com> * sysdeps/powerpc/powerpc64/memcpy.S: Improve instruction scheduling diff --git a/inet/Makefile b/inet/Makefile index 7367d9cf01..0fdf9e33e4 100644 --- a/inet/Makefile +++ b/inet/Makefile @@ -45,7 +45,9 @@ routines := htonl htons \ rcmd rexec ruserpass \ getnetgrent_r getnetgrent \ getaliasent_r getaliasent getaliasname getaliasname_r \ - in6_addr getnameinfo if_index ifaddrs inet6_option + in6_addr getnameinfo if_index ifaddrs inet6_option \ + getipv4sourcefilter setipv4sourcefilter \ + getsourcefilter setsourcefilter aux := check_pf ifreq diff --git a/inet/Versions b/inet/Versions index 67bd0ed5b0..2b7ec901ff 100644 --- a/inet/Versions +++ b/inet/Versions @@ -74,6 +74,10 @@ libc { inet6_option_space; inet6_option_init; inet6_option_append; inet6_option_alloc; inet6_option_next; inet6_option_find; } + GLIBC_2.3.4 { + getipv4sourcefilter; setipv4sourcefilter; + getsourcefilter; setsourcefilter; + } GLIBC_PRIVATE { # functions used in other libraries __internal_endnetgrent; __internal_getnetgrent_r; diff --git a/inet/netinet/in.h b/inet/netinet/in.h index 6aee842530..bdf4e5dc2c 100644 --- a/inet/netinet/in.h +++ b/inet/netinet/in.h @@ -417,18 +417,46 @@ struct in6_pktinfo #ifdef __USE_GNU /* Hop-by-Hop and Destination Options Processing. */ -extern int inet6_option_space (int __nbytes); +extern int inet6_option_space (int __nbytes) __THROW; extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp, - int __type); + int __type) __THROW; extern int inet6_option_append (struct cmsghdr *__cmsg, __const uint8_t *__typep, int __multx, - int __plusy); + int __plusy) __THROW; extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen, - int __multx, int __plusy); + int __multx, int __plusy) __THROW; extern int inet6_option_next (__const struct cmsghdr *__cmsg, - uint8_t **__tptrp); + uint8_t **__tptrp) __THROW; extern int inet6_option_find (__const struct cmsghdr *__cmsg, - uint8_t **__tptrp, int __type); + uint8_t **__tptrp, int __type) __THROW; + + +/* Multicast source filter support. */ + +/* Get IPv4 source filter. */ +extern int getipv4sourcefilter (int __s, struct in_addr __interface, + struct in_addr __group, uint32_t *__fmode, + uint32_t *__numsrc, struct in_addr *__slist) + __THROW; + +/* Set IPv4 source filter. */ +extern int setipv4sourcefilter (int __s, struct in_addr __interface, + struct in_addr __group, uint32_t __fmode, + uint32_t __numsrc, struct in_addr *__slist) + __THROW; + + +/* Get source filter. */ +extern int getsourcefilter (int __s, uint32_t __interface, + struct sockaddr *__group, socklen_t __grouplen, + uint32_t *__fmode, uint32_t *__numsrc, + struct sockaddr_storage *__slist) __THROW; + +/* Set source filter. */ +extern int setsourcefilter (int __s, uint32_t __interface, + struct sockaddr *__group, socklen_t __grouplen, + uint32_t __fmode, uint32_t __numsrc, + struct sockaddr_storage *__slist) __THROW; #endif /* use GNU */ __END_DECLS diff --git a/sysdeps/generic/getipv4sourcefilter.c b/sysdeps/generic/getipv4sourcefilter.c new file mode 100644 index 0000000000..e95697778a --- /dev/null +++ b/sysdeps/generic/getipv4sourcefilter.c @@ -0,0 +1,32 @@ +/* Get source filter. Stub version. + Copyright (C) 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2004. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <errno.h> +#include <netinet/in.h> + + +int +getipv4sourcefilter (int s, struct in_addr interface, struct in_addr group, + uint32_t *fmode, uint32_t *numsrc, struct in_addr *slist) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (getipv4sourcefilter) diff --git a/sysdeps/generic/getsourcefilter.c b/sysdeps/generic/getsourcefilter.c new file mode 100644 index 0000000000..9f4f543b89 --- /dev/null +++ b/sysdeps/generic/getsourcefilter.c @@ -0,0 +1,33 @@ +/* Get source filter. Stub version. + Copyright (C) 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2004. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <errno.h> +#include <netinet/in.h> + + +int +getsourcefilter (int s, uint32_t interface, struct sockaddr *group, + socklen_t grouplen, uint32_t *fmode, uint32_t *numsrc, + struct sockaddr_storage *slist) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (getsourcefilter) diff --git a/sysdeps/generic/setipv4sourcefilter.c b/sysdeps/generic/setipv4sourcefilter.c new file mode 100644 index 0000000000..18562a7499 --- /dev/null +++ b/sysdeps/generic/setipv4sourcefilter.c @@ -0,0 +1,32 @@ +/* Set source filter. Stub version. + Copyright (C) 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2004. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <errno.h> +#include <netinet/in.h> + + +int +setipv4sourcefilter (int s, struct in_addr interface, struct in_addr group, + uint32_t fmode, uint32_t numsrc, struct in_addr *slist) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (setipv4sourcefilter) diff --git a/sysdeps/generic/setsourcefilter.c b/sysdeps/generic/setsourcefilter.c new file mode 100644 index 0000000000..285a0980e1 --- /dev/null +++ b/sysdeps/generic/setsourcefilter.c @@ -0,0 +1,33 @@ +/* Set source filter. Stub version. + Copyright (C) 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@redhat.com>, 2004. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <errno.h> +#include <netinet/in.h> + + +int +setsourcefilter (int s, uint32_t interface, struct sockaddr *group, + socklen_t grouplen, uint32_t fmode, uint32_t numsrc, + struct sockaddr_storage *slist) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (setsourcefilter) diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S index 464155aefb..2d4fa9910e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S @@ -397,7 +397,7 @@ compat_symbol (libc, __novec_setcontext, setcontext, GLIBC_2_3_3) #endif -#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_3_3) +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_3) #define _ERRNO_H 1 #include <bits/errno.h> @@ -409,6 +409,6 @@ ENTRY (__setcontext_stub) END (__setcontext_stub) .previous -compat_symbol (libc, __setcontext_stub, setcontext, GLIBC_2_1) +compat_symbol (libc, __setcontext_stub, setcontext, GLIBC_2_0) #endif |