summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/accept.S3
-rw-r--r--sysdeps/unix/sysv/linux/alpha/syscalls.list16
-rw-r--r--sysdeps/unix/sysv/linux/arm/socket.S12
-rw-r--r--sysdeps/unix/sysv/linux/connect.S3
-rw-r--r--sysdeps/unix/sysv/linux/i386/socket.S12
-rw-r--r--sysdeps/unix/sysv/linux/m68k/socket.S12
-rw-r--r--sysdeps/unix/sysv/linux/mips/syscalls.list16
-rw-r--r--sysdeps/unix/sysv/linux/net/if.h18
-rw-r--r--sysdeps/unix/sysv/linux/netinet/ip_fw.h23
-rw-r--r--sysdeps/unix/sysv/linux/recv.S3
-rw-r--r--sysdeps/unix/sysv/linux/recvfrom.S3
-rw-r--r--sysdeps/unix/sysv/linux/recvmsg.S3
-rw-r--r--sysdeps/unix/sysv/linux/send.S3
-rw-r--r--sysdeps/unix/sysv/linux/sendmsg.S3
-rw-r--r--sysdeps/unix/sysv/linux/sendto.S3
-rw-r--r--sysdeps/unix/sysv/linux/siglist.c4
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/socket.S12
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list16
18 files changed, 113 insertions, 52 deletions
diff --git a/sysdeps/unix/sysv/linux/accept.S b/sysdeps/unix/sysv/linux/accept.S
index b713a6e267..196634d46a 100644
--- a/sysdeps/unix/sysv/linux/accept.S
+++ b/sysdeps/unix/sysv/linux/accept.S
@@ -1,4 +1,5 @@
#define socket accept
+#define __socket __libc_accept
#define NARGS 3
#include <socket.S>
-strong_alias (__accept, __libc_accept)
+weak_alias (__libc_accept, __accept)
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 9406892124..17c55f0991 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -36,20 +36,20 @@ sys_mknod xmknod mknod 3 __syscall_mknod
# override select.S in parent directory:
select - select 5 __select select
-accept - accept 3 __accept accept
+accept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
-connect - connect 3 __connect connect
+connect - connect 3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
-recv - recv 4 __recv recv
-recvfrom - recvfrom 6 __recvfrom recvfrom
-recvmsg - recvmsg 3 __recvmsg recvmsg
+recv - recv 4 __libc_recv __recv recv
+recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
ptrace - ptrace 4 __ptrace ptrace
-send - send 4 __send send
-sendmsg - sendmsg 3 __sendmsg sendmsg
-sendto - sendto 6 __sendto sendto
+send - send 4 __libc_send __send send
+sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
+sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socketpair - socketpair 4 __socketpair socketpair
diff --git a/sysdeps/unix/sysv/linux/arm/socket.S b/sysdeps/unix/sysv/linux/arm/socket.S
index 4d877e51d5..1940061dda 100644
--- a/sysdeps/unix/sysv/linux/arm/socket.S
+++ b/sysdeps/unix/sysv/linux/arm/socket.S
@@ -31,8 +31,12 @@
The .S files for the other calls just #define socket and #include this. */
-.globl P(__,socket)
-ENTRY (P(__,socket))
+#ifndef __socket
+#define __socket P(__,socket)
+#endif
+
+.globl __socket
+ENTRY (__socket)
/* Do the system call trap. */
swi SYS_ify(socketcall)
@@ -44,6 +48,6 @@ ENTRY (P(__,socket))
/* Successful; return the syscall's value. */
RETINSTR(mov,pc,r14)
-PSEUDO_END (P(__,socket))
+PSEUDO_END (__socket)
-weak_alias (P(__,socket), socket)
+weak_alias (__socket, socket)
diff --git a/sysdeps/unix/sysv/linux/connect.S b/sysdeps/unix/sysv/linux/connect.S
index 2840c58174..d1dd69a217 100644
--- a/sysdeps/unix/sysv/linux/connect.S
+++ b/sysdeps/unix/sysv/linux/connect.S
@@ -1,4 +1,5 @@
#define socket connect
+#define __socket __libc_connect
#define NARGS 3
#include <socket.S>
-strong_alias (__connect, __libc_connect)
+weak_alias (__libc_connect, __connect)
diff --git a/sysdeps/unix/sysv/linux/i386/socket.S b/sysdeps/unix/sysv/linux/i386/socket.S
index 7c539e17d2..f649470122 100644
--- a/sysdeps/unix/sysv/linux/i386/socket.S
+++ b/sysdeps/unix/sysv/linux/i386/socket.S
@@ -31,8 +31,12 @@
The .S files for the other calls just #define socket and #include this. */
-.globl P(__,socket)
-ENTRY (P(__,socket))
+#ifndef __socket
+#define __socket P(__,socket)
+#endif
+
+.globl __socket
+ENTRY (__socket)
/* Save registers. */
movl %ebx, %edx
@@ -56,6 +60,6 @@ ENTRY (P(__,socket))
/* Successful; return the syscall's value. */
ret
-PSEUDO_END (P(__,socket))
+PSEUDO_END (__socket)
-weak_alias (P(__,socket), socket)
+weak_alias (__socket, socket)
diff --git a/sysdeps/unix/sysv/linux/m68k/socket.S b/sysdeps/unix/sysv/linux/m68k/socket.S
index 51aaa4b6f9..81e5a213dd 100644
--- a/sysdeps/unix/sysv/linux/m68k/socket.S
+++ b/sysdeps/unix/sysv/linux/m68k/socket.S
@@ -31,8 +31,12 @@
The .S files for the other calls just #define socket and #include this. */
-.globl P(__,socket)
-ENTRY (P(__,socket))
+#ifndef __socket
+#define __socket P(__,socket)
+#endif
+
+.globl __socket
+ENTRY (__socket)
/* Save registers. */
move.l %d2, %a0
@@ -56,6 +60,6 @@ ENTRY (P(__,socket))
/* Successful; return the syscall's value. */
rts
-PSEUDO_END (P(__,socket))
+PSEUDO_END (__socket)
-weak_alias (P(__,socket), socket)
+weak_alias (__socket, socket)
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index 6dd9cd81c5..1c9c095ed3 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -16,19 +16,19 @@ sigsuspend - sigsuspend 1 __sigsuspend sigsuspend
# Socket functions; Linux/MIPS doesn't use the socketcall(2) wrapper;
# it's provided for compatibility, though.
#
-accept - accept 3 __accept accept
+ccept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
-connect - connect 3 __connect connect
+connect - connect 3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
-recv - recv 4 __recv recv
-recvfrom - recvfrom 6 __recvfrom recvfrom
-recvmsg - recvmsg 3 __recvmsg recvmsg
-send - send 4 __send send
-sendmsg - sendmsg 3 __sendmsg sendmsg
-sendto - sendto 6 __sendto sendto
+recv - recv 4 __libc_recv __recv recv
+recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
+send - send 4 __libc_send __send send
+sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
+sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socket - socket 3 __socket socket
diff --git a/sysdeps/unix/sysv/linux/net/if.h b/sysdeps/unix/sysv/linux/net/if.h
index 468fed23e6..dd33af0337 100644
--- a/sysdeps/unix/sysv/linux/net/if.h
+++ b/sysdeps/unix/sysv/linux/net/if.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,24 +28,40 @@
enum
{
IFF_UP = 0x1, /* Interface is up. */
+#define IFF_UP IFF_UP
IFF_BROADCAST = 0x2, /* Broadcast address valid. */
+#define IFF_BROADCAST IFF_BROADCAST
IFF_DEBUG = 0x4, /* Turn on debugging. */
+#define IFF_DEBUG IFF_DEBUG
IFF_LOOPBACK = 0x8, /* Is a loopback net. */
+#define IFF_LOOPBACK IFF_LOOPBACK
IFF_POINTOPOINT = 0x10, /* Interface is point-to-point link. */
+#define IFF_POINTOPOINT IFF_POINTOPOINT
IFF_NOTRAILERS = 0x20, /* Avoid use of trailers. */
+#define IFF_NOTRAILERS IFF_NOTRAILERS
IFF_RUNNING = 0x40, /* Resources allocated. */
+#define IFF_RUNNING IFF_RUNNING
IFF_NOARP = 0x80, /* No address resolution protocol. */
+#define IFF_NOARP IFF_NOARP
IFF_PROMISC = 0x100, /* Receive all packets. */
+#define IFF_PROMISC IFF_PROMISC
+
/* Not supported */
IFF_ALLMULTI = 0x200, /* Receive all multicast packets. */
+#define IFF_ALLMULTI IFF_ALLMULTI
IFF_MASTER = 0x400, /* Master of a load balancer. */
+#define IFF_MASTER IFF_MASTER
IFF_SLAVE = 0x800, /* Slave of a load balancer. */
+#define IFF_SLAVE IFF_SLAVE
IFF_MULTICAST = 0x1000, /* Supports multicast. */
+#define IFF_MULTICAST IFF_MULTICAST
IFF_PORTSEL = 0x2000, /* Can set media type. */
+#define IFF_PORTSEL IFF_PORTSEL
IFF_AUTOMEDIA = 0x4000 /* Auto media select active. */
+#define IFF_AUTOMEDIA IFF_AUTOMEDIA
};
/* The ifaddr structure contains information about one address of an
diff --git a/sysdeps/unix/sysv/linux/netinet/ip_fw.h b/sysdeps/unix/sysv/linux/netinet/ip_fw.h
index 322467b5ff..2139c37ba7 100644
--- a/sysdeps/unix/sysv/linux/netinet/ip_fw.h
+++ b/sysdeps/unix/sysv/linux/netinet/ip_fw.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -125,6 +125,7 @@ struct ip_fw {
#define IP_FW_OUT 2
#define IP_FW_ACCT 3
#define IP_FW_CHAINS 4 /* total number of ip_fw chains */
+#define IP_FW_MASQ 5
#define IP_FW_INSERT (IP_FW_BASE_CTL)
#define IP_FW_APPEND (IP_FW_BASE_CTL+1)
@@ -165,6 +166,11 @@ struct ip_fw {
#define IP_ACCT_FLUSH (IP_FW_FLUSH | (IP_FW_ACCT << IP_FW_SHIFT))
#define IP_ACCT_ZERO (IP_FW_ZERO | (IP_FW_ACCT << IP_FW_SHIFT))
+#define IP_FW_MASQ_INSERT (IP_FW_INSERT | (IP_FW_MASQ << IP_FW_SHIFT))
+#define IP_FW_MASQ_ADD (IP_FW_APPEND | (IP_FW_MASQ << IP_FW_SHIFT))
+#define IP_FW_MASQ_DEL (IP_FW_DELETE | (IP_FW_MASQ << IP_FW_SHIFT))
+#define IP_FW_MASQ_FLUSH (IP_FW_FLUSH | (IP_FW_MASQ << IP_FW_SHIFT))
+
struct ip_fwpkt
{
struct iphdr fwp_iph; /* IP header */
@@ -177,6 +183,21 @@ struct ip_fwpkt
char fwp_vianame[IFNAMSIZ]; /* interface name */
};
+#define IP_FW_MASQCTL_MAX 256
+#define IP_MASQ_MOD_NMAX 32
+
+struct ip_fw_masqctl
+{
+ int mctl_action;
+ union {
+ struct {
+ char name[IP_MASQ_MOD_NMAX];
+ char data[1];
+ } mod;
+ } u;
+};
+
+
/*
* timeouts for ip masquerading
*/
diff --git a/sysdeps/unix/sysv/linux/recv.S b/sysdeps/unix/sysv/linux/recv.S
index d895080f9a..cb9eb91b8c 100644
--- a/sysdeps/unix/sysv/linux/recv.S
+++ b/sysdeps/unix/sysv/linux/recv.S
@@ -1,4 +1,5 @@
#define socket recv
+#define __socket __libc_recv
#define NARGS 4
#include <socket.S>
-strong_alias (__recv, __libc_recv)
+weak_alias (__libc_recv, __recv)
diff --git a/sysdeps/unix/sysv/linux/recvfrom.S b/sysdeps/unix/sysv/linux/recvfrom.S
index a2c94a71bc..93a3110d0a 100644
--- a/sysdeps/unix/sysv/linux/recvfrom.S
+++ b/sysdeps/unix/sysv/linux/recvfrom.S
@@ -1,4 +1,5 @@
#define socket recvfrom
+#define __socket __libc_recvfrom
#define NARGS 6
#include <socket.S>
-strong_alias (__recvfrom, __libc_recvfrom)
+weak_alias (__libc_recvfrom, __recvfrom)
diff --git a/sysdeps/unix/sysv/linux/recvmsg.S b/sysdeps/unix/sysv/linux/recvmsg.S
index e5d8cdd16a..98be36be5b 100644
--- a/sysdeps/unix/sysv/linux/recvmsg.S
+++ b/sysdeps/unix/sysv/linux/recvmsg.S
@@ -1,4 +1,5 @@
#define socket recvmsg
+#define __socket __libc_recvmsg
#define NARGS 3
#include <socket.S>
-strong_alias (__recvmsg, __libc_recvmsg)
+weak_alias (__libc_recvmsg, __recvmsg)
diff --git a/sysdeps/unix/sysv/linux/send.S b/sysdeps/unix/sysv/linux/send.S
index 5191265f62..3f5e00ce9e 100644
--- a/sysdeps/unix/sysv/linux/send.S
+++ b/sysdeps/unix/sysv/linux/send.S
@@ -1,4 +1,5 @@
#define socket send
+#define __socket __libc_send
#define NARGS 4
#include <socket.S>
-strong_alias (__send, __libc_send)
+weak_alias (__libc_send, __send)
diff --git a/sysdeps/unix/sysv/linux/sendmsg.S b/sysdeps/unix/sysv/linux/sendmsg.S
index 6f511af1c7..c01d9b68e7 100644
--- a/sysdeps/unix/sysv/linux/sendmsg.S
+++ b/sysdeps/unix/sysv/linux/sendmsg.S
@@ -1,4 +1,5 @@
#define socket sendmsg
+#define __socket __libc_sendmsg
#define NARGS 3
#include <socket.S>
-strong_alias (__sendmsg, __libc_sendmsg)
+weak_alias (__libc_sendmsg, __sendmsg)
diff --git a/sysdeps/unix/sysv/linux/sendto.S b/sysdeps/unix/sysv/linux/sendto.S
index b34a609a93..8717b2bac1 100644
--- a/sysdeps/unix/sysv/linux/sendto.S
+++ b/sysdeps/unix/sysv/linux/sendto.S
@@ -1,4 +1,5 @@
#define socket sendto
+#define __socket __libc_sendto
#define NARGS 6
#include <socket.S>
-strong_alias (__sendto, __libc_sendto)
+weak_alias (__libc_sendto, __sendto)
diff --git a/sysdeps/unix/sysv/linux/siglist.c b/sysdeps/unix/sysv/linux/siglist.c
index 6bb8562899..43b229fc95 100644
--- a/sysdeps/unix/sysv/linux/siglist.c
+++ b/sysdeps/unix/sysv/linux/siglist.c
@@ -1,14 +1,14 @@
#include <stddef.h>
#include <signal.h>
-const char * const __new_sys_siglist[NSIG] =
+const char * const __new_sys_siglist[NSIG + 1] =
{
#define init_sig(sig, abbrev, desc) [sig] desc,
#include "siglist.h"
#undef init_sig
};
-const char * const __new_sys_sigabbrev[NSIG] =
+const char * const __new_sys_sigabbrev[NSIG + 1] =
{
#define init_sig(sig, abbrev, desc) [sig] abbrev,
#include "siglist.h"
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/socket.S b/sysdeps/unix/sysv/linux/sparc/sparc32/socket.S
index 4c65ac7f3c..8d6fd77c10 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/socket.S
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/socket.S
@@ -39,8 +39,12 @@
The .S files for the other calls just #define socket and #include this. */
-.globl P(__,socket)
-ENTRY (P(__,socket))
+#ifndef __socket
+#define __socket P(__,socket)
+#endif
+
+.globl __socket
+ENTRY (__socket)
/* Drop up to 6 arguments (recvfrom) into the memory allocated by
the caller for varargs, since that's really what we have. */
@@ -71,6 +75,6 @@ ENTRY (P(__,socket))
1: SYSCALL_ERROR_HANDLER
-END (P(__,socket))
+END (__socket)
-weak_alias (P(__,socket), socket)
+weak_alias (__socket, socket)
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
index ca142da29c..3f62a7cd53 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
@@ -14,19 +14,19 @@ mmap - mmap 6 __mmap mmap __mmap64 mmap64
# Override select.S in parent directory:
select - select 5 __select select
-accept - accept 3 __accept accept
+accept - accept 3 __libc_accept __accept accept
bind - bind 3 __bind bind
-connect - connect 3 __connect connect
+connect - connect 3 __libc_connect __connect connect
getpeername - getpeername 3 __getpeername getpeername
getsockname - getsockname 3 __getsockname getsockname
getsockopt - getsockopt 5 __getsockopt getsockopt
listen - listen 2 __listen listen
-recv - recv 4 __recv recv
-recvfrom - recvfrom 6 __recvfrom recvfrom
-recvmsg - recvmsg 3 __recvmsg recvmsg
-send - send 4 __send send
-sendmsg - sendmsg 3 __sendmsg sendmsg
-sendto - sendto 6 __sendto sendto
+recv - recv 4 __libc_recv __recv recv
+recvfrom - recvfrom 6 __libc_recvfrom __recvfrom recvfrom
+recvmsg - recvmsg 3 __libc_recvmsg __recvmsg recvmsg
+send - send 4 __libc_send __send send
+sendmsg - sendmsg 3 __libc_sendmsg __sendmsg sendmsg
+sendto - sendto 6 __libc_sendto __sendto sendto
setsockopt - setsockopt 5 __setsockopt setsockopt
shutdown - shutdown 2 __shutdown shutdown
socketpair - socketpair 4 __socketpair socketpair