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