Debian Codegraph @

upstream/debian-unstable/man3/sockaddr_in.3type

raw
1 .\" Copyright, the authors of the Linux man-pages project
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .TH sockaddr_in 3type 2025-11-25 "Linux man-pages 6.18"
6 .SH NAME
7 sockaddr_in,
8 in_addr, in_addr_t, in_port_t
9 \-
10 IPv4 socket address
11 .SH LIBRARY
12 Standard C library
13 .RI ( libc )
14 .SH SYNOPSIS
15 .EX
16 .B #include <netinet/in.h>
17 .P
18 .B struct sockaddr_in {
19 .BR " sa_family_t sin_family;" " /* " AF_INET " */"
20 .BR " in_port_t sin_port;" " /* Port number */"
21 .BR " struct in_addr sin_addr;" " /* IPv4 address */"
22 .B };
23 .P
24 .B struct in_addr {
25 .B " in_addr_t s_addr;"
26 .B };
27 .P
28 .B typedef uint32_t in_addr_t;
29 .B typedef uint16_t in_port_t;
30 .EE
31 .SH DESCRIPTION
32 .TP
33 .I sockaddr_in
34 Describes an IPv4 Internet domain socket address.
35 .IP
36 .I .sin_port
37 and
38 .I .sin_addr
39 are stored in network byte order.
40 .SH STANDARDS
41 POSIX.1-2024.
42 .SH HISTORY
43 POSIX.1-2001.
44 .SH SEE ALSO
45 .BR sockaddr (3type),
46 .BR sockaddr_in6 (3type)