]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/socketcall.2
mmap.2: Don't mark MAP_ANON as deprecated
[thirdparty/man-pages.git] / man2 / socketcall.2
CommitLineData
fea681da
MK
1.\" Copyright (c) 1995 Michael Chastain (mec@shell.portal.com), 15 April 1995.
2.\"
1dd72f9c 3.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
fea681da
MK
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.
8.\"
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.
13.\"
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.
18.\"
19.\" You should have received a copy of the GNU General Public
c715f741
MK
20.\" License along with this manual; if not, see
21.\" <http://www.gnu.org/licenses/>.
6a8d8745 22.\" %%%LICENSE_END
fea681da
MK
23.\"
24.\" Modified Tue Oct 22 22:11:53 1996 by Eric S. Raymond <esr@thyrsus.com>
4b8c67d9 25.TH SOCKETCALL 2 2017-09-15 "Linux" "Linux Programmer's Manual"
fea681da
MK
26.SH NAME
27socketcall \- socket system calls
28.SH SYNOPSIS
f576fff5 29.B #include <linux/net.h>
68e4db0a 30.PP
cc40d64d 31.BI "int socketcall(int " call ", unsigned long *" args );
fea681da 32.SH DESCRIPTION
e511ffb6 33.BR socketcall ()
fea681da
MK
34is a common kernel entry point for the socket system calls.
35.I call
36determines which socket function to invoke.
37.I args
38points to a block containing the actual arguments,
39which are passed through to the appropriate call.
40.PP
41User programs should call the appropriate functions by their usual names.
42Only standard library implementors and kernel hackers need to know about
e511ffb6 43.BR socketcall ().
f576fff5
MF
44.PP
45.TS
46tab(:);
47l l.
48\fIcall\fR:Man page
49T{
50.B SYS_SOCKET
51T}:T{
52.BR socket (2)
53T}
54T{
55.B SYS_BIND
56T}:T{
57.BR bind (2)
58T}
59T{
60.B SYS_CONNECT
61T}:T{
62.BR connect (2)
63T}
64T{
65.B SYS_LISTEN
66T}:T{
67.BR listen (2)
68T}
69T{
70.B SYS_ACCEPT
71T}:T{
72.BR accept (2)
73T}
74T{
75.B SYS_GETSOCKNAME
76T}:T{
77.BR getsockname (2)
78T}
79T{
80.B SYS_GETPEERNAME
81T}:T{
82.BR getpeername (2)
83T}
84T{
85.B SYS_SOCKETPAIR
86T}:T{
87.BR socketpair (2)
88T}
89T{
90.B SYS_SEND
91T}:T{
92.BR send (2)
93T}
94T{
95.B SYS_RECV
96T}:T{
97.BR recv (2)
98T}
99T{
100.B SYS_SENDTO
101T}:T{
102.BR sendto (2)
103T}
104T{
105.B SYS_RECVFROM
106T}:T{
107.BR recvfrom (2)
108T}
109T{
110.B SYS_SHUTDOWN
111T}:T{
112.BR shutdown (2)
113T}
114T{
115.B SYS_SETSOCKOPT
116T}:T{
117.BR setsockopt (2)
118T}
119T{
120.B SYS_GETSOCKOPT
121T}:T{
122.BR getsockopt (2)
123T}
124T{
125.B SYS_SENDMSG
126T}:T{
127.BR sendmsg (2)
128T}
129T{
130.B SYS_RECVMSG
131T}:T{
132.BR recvmsg (2)
133T}
134T{
135.B SYS_ACCEPT4
136T}:T{
137.BR accept4 (2)
138T}
139T{
140.B SYS_RECVMMSG
141T}:T{
142.BR recvmmsg (2)
143T}
144T{
145.B SYS_SENDMMSG
146T}:T{
147.BR sendmmsg (2)
148T}
149.TE
47297adb 150.SH CONFORMING TO
fea681da
MK
151This call is specific to Linux, and should not be used in programs
152intended to be portable.
bf25f45c 153.SH NOTES
cd1df3b8 154On a some architectures\(emfor example, x86-64 and ARM\(emthere is no
bf25f45c
MK
155.BR socketcall ()
156system call; instead
157.BR socket (2),
158.BR accept (2),
159.BR bind (2),
160and so on really are implemented as separate system calls.
efeece04 161.PP
b08d144c
MK
162On x86-32,
163.BR socketcall ()
164was historically the only entry point for the sockets API.
165However, starting in Linux 4.3,
166.\" commit 9dea5dc921b5f4045a18c63eb92e84dc274d17eb
167direct system calls are provided on x86-32 for the sockets API.
168This facilitates the creation of
169.BR seccomp (2)
170filters that filter sockets system calls
171(for new user-space binaries that are compiled
172to use the new entry points)
173and also provides a (very) small performance improvement.
47297adb 174.SH SEE ALSO
fea681da
MK
175.BR accept (2),
176.BR bind (2),
177.BR connect (2),
178.BR getpeername (2),
179.BR getsockname (2),
180.BR getsockopt (2),
181.BR listen (2),
182.BR recv (2),
183.BR recvfrom (2),
ed2a6c73 184.BR recvmsg (2),
fea681da 185.BR send (2),
ed2a6c73 186.BR sendmsg (2),
f0c34053 187.BR sendto (2),
fea681da
MK
188.BR setsockopt (2),
189.BR shutdown (2),
190.BR socket (2),
191.BR socketpair (2)