Debian Codegraph @

upstream/debian-unstable/man2/IP_FREEBIND.2const

raw
1 .\" Copyright, the authors of the Linux man-pages project
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .TH IP_FREEBIND 2const 2025-11-25 "Linux man-pages 6.18"
6 .SH NAME
7 IP_FREEBIND
8 \-
9 bind to a nonlocal or nonexistent IP address
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .BR "#include <netinet/in.h>" " /* Definition of " IP* " constants */"
16 .B #include <sys/socket.h>
17 .P
18 .BI int\~setsockopt(int\~ sockfd ,\~IPPROTO_IP,\~IP_FREEBIND,
19 .BI " const\~int\~*" enable ,\~sizeof(int));
20 .fi
21 .SH DESCRIPTION
22 If enabled,
23 this boolean option allows binding to an IP address
24 that is nonlocal or does not (yet) exist.
25 .P
26 This permits listening on a socket,
27 without requiring
28 the underlying network interface
29 or the specified dynamic IP address
30 to be up at the time
31 that the application is trying to bind to it.
32 .P
33 This option is the per-socket equivalent of the
34 .I /proc/sys/net/ipv4/ip_nonlocal_bind
35 interface.
36 .SH ERRORS
37 See
38 .BR IPPROTO_IP (2const).
39 See
40 .BR setsockopt (2).
41 See
42 .BR ip (7).
43 .SH STANDARDS
44 Linux.
45 .SH HISTORY
46 Linux 2.4.
47 .\" Precisely: since Linux 2.4.0-test10
48 .SH SEE ALSO
49 .BR IPPROTO_IP (2const),
50 .BR setsockopt (2),
51 .BR proc_sys_net_ipv4 (5),
52 .BR ip (7)