1 .\" Copyright (c) 1995 Michael Chastain (mec@shell.portal.com), 15 April 1995.
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 .\" GNU General Public License for more details.
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
24 .\" Modified Tue Oct 22 22:11:53 1996 by Eric S. Raymond <esr@thyrsus.com>
25 .TH SOCKETCALL 2 2021-03-22 "Linux" "Linux Programmer's Manual"
27 socketcall \- socket system calls
30 .BR "#include <linux/net.h>" " /* Definition of " SYS_* " constants */"
31 .BR "#include <sys/syscall.h>" " /* Definition of " SYS_socketcall " */"
32 .B #include <unistd.h>
34 .BI "int syscall(SYS_socketcall, int " call ", unsigned long *" args );
38 glibc provides no wrapper for
40 necessitating the use of
44 is a common kernel entry point for the socket system calls.
46 determines which socket function to invoke.
48 points to a block containing the actual arguments,
49 which are passed through to the appropriate call.
51 User programs should call the appropriate functions by their usual names.
52 Only standard library implementors and kernel hackers need to know about
161 This call is specific to Linux, and should not be used in programs
162 intended to be portable.
164 On some architectures\(emfor example, x86-64 and ARM\(emthere is no
170 and so on really are implemented as separate system calls.
174 was historically the only entry point for the sockets API.
175 However, starting in Linux 4.3,
176 .\" commit 9dea5dc921b5f4045a18c63eb92e84dc274d17eb
177 direct system calls are provided on x86-32 for the sockets API.
178 This facilitates the creation of
180 filters that filter sockets system calls
181 (for new user-space binaries that are compiled
182 to use the new entry points)
183 and also provides a (very) small performance improvement.