sctp_opt_data.c revision 6be61d4ea129a94bdfe33533b2bc265d4447f05c
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A#include "sctp_impl.h"
2N/A#include "sctp_asconf.h"
2N/A#include "sctp_addr.h"
2N/A sizeof (sctp_data_hdr_t);
2N/A return (EAFNOSUPPORT);
2N/A return (EAFNOSUPPORT);
2N/A sizeof (struct sctp_setadaptation), 0 },
2N/A sizeof (struct sctp_assocparams), 0 },
2N/A sizeof (struct sctp_sndrcvinfo), 0 },
sizeof (struct sctp_event_subscribe), 0 },
sizeof (struct sctp_paddrinfo), 0 },
sizeof (struct sctp_initmsg), 0 },
sizeof (struct sctp_paddrparams), 0 },
sizeof (struct sctp_setpeerprim), 0 },
sizeof (sctp_assoc_stats_t), 0 },
sizeof (struct sctp_rtoinfo), 0 },
sizeof (struct sctp_setprim), 0 },
sizeof (struct sctp_status), 0 },
sizeof (struct sctp_uc_swap), 0 },
int retval = 0;
return (EINVAL);
if (retval != 0) {
if (retval < 0) {
return (retval);
switch (level) {
case IPPROTO_SCTP:
switch (name) {
case SCTP_RTOINFO:
case SCTP_ASSOCINFO:
case SCTP_INITMSG:
case SCTP_NODELAY:
case SCTP_AUTOCLOSE:
case SCTP_ADAPTATION_LAYER:
case SCTP_PEER_ADDR_PARAMS:
case SCTP_DEFAULT_SEND_PARAM:
case SCTP_EVENTS: {
case SCTP_STATUS:
case SCTP_GET_PEER_ADDR_INFO:
case SCTP_GET_NLADDRS:
case SCTP_GET_LADDRS: {
int addr_cnt;
int addr_size;
if (retval == 0)
case SCTP_GET_NPADDRS: {
case SCTP_GET_PADDRS: {
int addr_cnt;
int addr_size;
if (retval == 0)
case SCTP_PRSCTP:
case SCTP_GET_ASSOC_STATS: {
case SCTP_MAXSEG:
case SCTP_DISABLE_FRAGMENTS:
return (retval);
case IPPROTO_IP:
switch (name) {
case IP_OPTIONS:
case T_IP_OPTIONS: {
int opt_len;
return (EINVAL);
retval = 0;
return (EINVAL);
if (retval != 0) {
if (retval < 0) {
goto done;
switch (level) {
case SOL_SOCKET:
switch (name) {
case SO_SNDBUF:
goto done;
if (*i1 < 0) {
goto done;
goto done;
case SO_RCVBUF:
goto done;
if (*i1 != 0) {
goto done;
case SO_ALLZONES:
goto done;
case SO_MAC_EXEMPT:
goto done;
case IPPROTO_SCTP:
switch (name) {
case SCTP_RTOINFO:
case SCTP_ASSOCINFO:
case SCTP_INITMSG:
case SCTP_NODELAY:
case SCTP_AUTOCLOSE:
case SCTP_PRIMARY_ADDR:
case SCTP_ADAPTATION_LAYER: {
case SCTP_PEER_ADDR_PARAMS:
case SCTP_DEFAULT_SEND_PARAM:
case SCTP_EVENTS: {
case SCTP_ADD_ADDR:
case SCTP_REM_ADDR:
B_TRUE);
case SCTP_UC_SWAP: {
case SCTP_PRSCTP:
case SCTP_MAXSEG:
case SCTP_DISABLE_FRAGMENTS:
goto done;
case IPPROTO_IP:
goto done;
switch (name) {
case IP_SEC_OPT:
goto done;
case IPPROTO_IPV6:
goto done;
switch (name) {
case IPV6_RECVPKTINFO:
case IPV6_RECVTCLASS:
case IPV6_RECVHOPLIMIT:
case IPV6_SEC_OPT:
goto done;
case IPV6_V6ONLY:
goto done;
if (retval != 0)
goto done;
if (retval != 0)
goto done;
done:
return (retval);
int err = 0;
case AF_INET:
if (err != 0) {
*addrlen = 0;
case AF_INET6:
if (err != 0) {
*addrlen = 0;
return (err);
int err = 0;
case AF_INET:
if (err != 0) {
*addrlen = 0;
case AF_INET6:
if (err != 0) {
*addrlen = 0;
return (err);
int family;
int max;
int cnt;
return (ENOTCONN);
switch (family) {
case AF_INET:
case AF_INET6:
IXAF_SCOPEID_SET)) {
switch (family) {
case AF_INET:
case AF_INET6: