]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - lib/libc/net/sctp_opt_info.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.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 .\" $FreeBSD$
30 .\"
31 .Dd June 18, 2011
32 .Dt SCTP_OPT_INFO 3
33 .Os
34 .Sh NAME
35 .Nm sctp_opt_info
36 .Nd get SCTP socket information
37 .Sh LIBRARY
38 .Lb libc
39 .Sh SYNOPSIS
40 .In sys/types.h
41 .In sys/socket.h
42 .In netinet/sctp.h
43 .Ft int
44 .Fn sctp_opt_info "int sd" "sctp_assoc_t id" "int opt" "void *arg" "socklen_t *size"
45 .Sh DESCRIPTION
46 The
47 .Fn sctp_opt_info
48 call provides a multi-os compatible method for getting
49 specific
50 .Fn getsockopt
51 data where an association identification needs to be passed
52 into the operating system.
53 For
54 .Fx
55 a direct
56 .Fn getsockopt
57 may be used, since
58 .Fx
59 has the ability to pass information
60 into the operating system on a
61 .Fn getsockopt
62 call.
63 Other operating systems may not have this ability.
64 For those
65 who wish to write portable code amongst multiple operating systems
66 this call should be used for the following SCTP
67 socket options.
68 .Pp
69 .Dv SCTP_RTOINFO
70 .Pp
71 .Dv SCTP_ASSOCINFO
72 .Pp
73 .Dv SCTP_PRIMARY_ADDR
74 .Pp
75 .Dv SCTP_PEER_ADDR_PARAMS
76 .Pp
77 .Dv SCTP_DEFAULT_SEND_PARAM
78 .Pp
79 .Dv SCTP_MAX_SEG
80 .Pp
81 .Dv SCTP_AUTH_ACTIVE_KEY
82 .Pp
83 .Dv SCTP_DELAYED_SACK
84 .Pp
85 .Dv SCTP_MAX_BURST
86 .Pp
87 .Dv SCTP_CONTEXT
88 .Pp
89 .Dv SCTP_EVENT
90 .Pp
91 .Dv SCTP_DEFAULT_SNDINFO
92 .Pp
93 .Dv SCTP_DEFAULT_PRINFO
94 .Pp
95 .Dv SCTP_STATUS
96 .Pp
97 .Dv SCTP_GET_PEER_ADDR_INFO
98 .Pp
99 .Dv SCTP_PEER_AUTH_CHUNKS
100 .Pp
101 .Dv SCTP_LOCAL_AUTH_CHUNKS
102 .Sh RETURN VALUES
103 The call returns 0 on success and -1 upon error.
104 .Sh ERRORS
105 The
106 .Fn sctp_opt_info
107 function can return the following errors:
108 .Bl -tag -width Er
109 .It Bq Er EINVAL
110 The argument
111 .Fa arg
112 value was invalid.
113 .It Bq Er EOPNOTSUPP
114 The argument
115 .Fa opt
116 was not one of the above listed SCTP socket
117 options.
118 .It Bq Er EBADF
119 The argument
120 .Fa s
121 is not a valid descriptor.
122 .It Bq Er ENOTSOCK
123 The argument
124 .Fa s
125 is not a socket.
126 .El
127 .Sh SEE ALSO
128 .Xr getsockopt 2 ,
129 .Xr sctp 4
130 .Sh BUGS
131 Because the structure used for
132 .Fa arg
133 of the
134 .Dv SCTP_MAX_BURST
135 socket option has changed in FreeBSD 9.0 and higher,
136 using
137 .Dv SCTP_MAX_BURST
138 as
139 .Fa opt
140 is only supported in FreeBSD 9.0 and higher.