Debian Codegraph @

upstream/debian-unstable/man2/IP_RECVORIGDSTADDR.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_RECVORIGDSTADDR 2const 2025-11-25 "Linux man-pages 6.18"
6 .SH NAME
7 IP_RECVORIGDSTADDR
8 \-
9 receive IP_ORIGDSTADDR control message
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_RECVORIGDSTADDR,
19 .BI " const\~int\~*" enable ,\~sizeof(int));
20 .fi
21 .SH DESCRIPTION
22 This boolean option enables the
23 .B IP_ORIGDSTADDR
24 ancillary message in
25 .BR recvmsg (2),
26 in which the kernel returns the original destination address
27 of the datagram being received.
28 .P
29 The ancillary message contains a
30 .BR sockaddr_in (2type)
31 structure.
32 .P
33 Not supported for
34 .B SOCK_STREAM
35 sockets.
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.6.29.
47 .\" commit e8b2dfe9b4501ed0047459b2756ba26e5a940a69
48 .SH SEE ALSO
49 .BR IPPROTO_IP (2const),
50 .BR setsockopt (2),
51 .BR ip (7)