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