1 .\" Copyright (c) 1995 Michael Chastain (mec@shell.portal.com), 15 April 1995.
3 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\" Modified Tue Oct 22 22:11:53 1996 by Eric S. Raymond <esr@thyrsus.com>
6 .TH SOCKETCALL 2 2022-09-09 "Linux man-pages (unreleased)"
8 socketcall \- socket system calls
11 .RI ( libc ", " \-lc )
14 .BR "#include <linux/net.h>" " /* Definition of " SYS_* " constants */"
15 .BR "#include <sys/syscall.h>" " /* Definition of " SYS_socketcall " */"
16 .B #include <unistd.h>
18 .BI "int syscall(SYS_socketcall, int " call ", unsigned long *" args );
22 glibc provides no wrapper for
24 necessitating the use of
28 is a common kernel entry point for the socket system calls.
30 determines which socket function to invoke.
32 points to a block containing the actual arguments,
33 which are passed through to the appropriate call.
35 User programs should call the appropriate functions by their usual names.
36 Only standard library implementors and kernel hackers need to know about
145 This call is specific to Linux, and should not be used in programs
146 intended to be portable.
148 On some architectures\(emfor example, x86-64 and ARM\(emthere is no
154 and so on really are implemented as separate system calls.
158 was historically the only entry point for the sockets API.
159 However, starting in Linux 4.3,
160 .\" commit 9dea5dc921b5f4045a18c63eb92e84dc274d17eb
161 direct system calls are provided on x86-32 for the sockets API.
162 This facilitates the creation of
164 filters that filter sockets system calls
165 (for new user-space binaries that are compiled
166 to use the new entry points)
167 and also provides a (very) small performance improvement.