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