xref: /netbsd-src/lib/libc/net/sctp_opt_info.3 (revision c9911a308e544f9996ca8c1b3d55033e1670fc78)
1.\"	$NetBSD: sctp_opt_info.3,v 1.2 2018/08/13 06:00:21 wiz Exp $
2.\"
3.\" Copyright (c) 1983, 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors
15.\"    may be used to endorse or promote products derived from this software
16.\"    without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.\"     From: @(#)send.2	8.2 (Berkeley) 2/21/94
31.\"
32.Dd August 1, 2018
33.Dt SCTP_OPT_INFO 3
34.Os
35.Sh NAME
36.Nm sctp_opt_info
37.Nd get SCTP socket information
38.Sh LIBRARY
39.Lb libc
40.Sh SYNOPSIS
41.In sys/types.h
42.In sys/socket.h
43.In netinet/sctp.h
44.Ft int
45.Fn sctp_opt_info "int sd" "sctp_assoc_t id" "int opt" "void *arg" "socklen_t *size"
46.Sh DESCRIPTION
47The
48.Fn sctp_opt_info
49call provides a multi-os compatible method for getting
50specific
51.Fn getsockopt
52data where an association identification needs to be passed
53into the operating system.
54For those
55who wish to write portable code amongst multiple operating systems
56this call should be used for the following SCTP
57socket options.
58.Pp
59.Dv SCTP_RTOINFO
60.Pp
61.Dv SCTP_ASSOCINFO
62.Pp
63.Dv SCTP_PRIMARY_ADDR
64.Pp
65.Dv SCTP_PEER_ADDR_PARAMS
66.Pp
67.Dv SCTP_DEFAULT_SEND_PARAM
68.Pp
69.Dv SCTP_MAX_SEG
70.Pp
71.Dv SCTP_AUTH_ACTIVE_KEY
72.Pp
73.Dv SCTP_DELAYED_SACK
74.Pp
75.Dv SCTP_MAX_BURST
76.Pp
77.Dv SCTP_CONTEXT
78.Pp
79.Dv SCTP_EVENT
80.Pp
81.Dv SCTP_DEFAULT_SNDINFO
82.Pp
83.Dv SCTP_DEFAULT_PRINFO
84.Pp
85.Dv SCTP_STATUS
86.Pp
87.Dv SCTP_GET_PEER_ADDR_INFO
88.Pp
89.Dv SCTP_PEER_AUTH_CHUNKS
90.Pp
91.Dv SCTP_LOCAL_AUTH_CHUNKS
92.Sh RETURN VALUES
93The call returns 0 on success and \-1 upon error.
94.Sh ERRORS
95The
96.Fn sctp_opt_info
97function can return the following errors:
98.Bl -tag -width Er
99.It Bq Er EBADF
100The argument
101.Fa s
102is not a valid descriptor.
103.It Bq Er EINVAL
104The argument
105.Fa arg
106value was invalid.
107.It Bq Er ENOTSOCK
108The argument
109.Fa s
110is not a socket.
111.It Bq Er EOPNOTSUPP
112The argument
113.Fa opt
114was not one of the above listed SCTP socket
115options.
116.El
117.Sh SEE ALSO
118.Xr getsockopt 2 ,
119.Xr getsockopt2 2 ,
120.Xr sctp 4
121.Rs
122.%R RFC
123.%N 6458
124.%T "Sockets API Extensions for the Stream Control Transmission Protocol (SCTP)"
125.%D December 2011
126.Re
127.Sh HISTORY
128This function first appeared in
129.Nx 9.0 .
130