socksctp.c revision 2caf0dcd2abc26b477e317999994020212790d38
4031N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4031N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4031N/A#include "socksctp.h"
sosctp_init(void)
int error;
if (error != 0) {
return (error);
static struct vnode *
int kmflags)
return (NULL);
return (vp);
struct sonode *
int error;
int soflags;
return (NULL);
return (NULL);
return (NULL);
return (so);
int error = 0;
return (EINVAL);
return (EOPNOTSUPP);
if (error != 0) {
return (error);
int flags)
int error = 0;
goto done;
goto done;
if (error == 0) {
done:
return (error);
int error = 0;
goto done;
if (backlog < 0) {
backlog = 0;
goto done;
if (error == 0) {
done:
return (error);
int error;
goto done;
goto done;
SS_CANTSENDMORE)) {
goto done;
goto done;
if (error == 0) {
switch (error) {
case EINPROGRESS:
case EALREADY:
case EINTR:
case EHOSTUNREACH:
done:
return (error);
int error;
goto done;
&ssa);
if (error != 0) {
done:
return (error);
void *opt;
SS_CANTRCVMORE))) {
return (ENOTCONN);
return (EOPNOTSUPP);
return (ENOTCONN);
return (EOPNOTSUPP);
if (error) {
return (error);
if (len > 0) {
} else if (len > 0) {
if (error != 0) {
return (error);
#ifdef DEBUG
#ifdef DEBUG
#ifdef DEBUG
goto done;
goto again;
done:
if (readcnt > 0 &&
if (consumed) {
return (error);
int error;
while (count > 0) {
return (EAGAIN);
return (error);
if (error != 0) {
return (error);
int error;
return (EOPNOTSUPP);
return (EINVAL);
return (EINVAL);
return (EINVAL);
return (error);
optlen = 0;
return (EPIPE);
return (error);
return (EAGAIN);
return (EINTR);
return (EMSGSIZE);
goto error_nofree;
if (error) {
goto error_nofree;
error = 0;
goto error_nofree;
goto error_ret;
if (error == 0)
return (EPIPE);
return (error);
int aid = 0;
int error;
return (EINVAL);
optlen = 0;
if (aid == 0) {
goto done;
if (error) {
goto done;
error = 0;
goto done;
goto refrele;
return (EPIPE);
goto refrele;
goto refrele;
goto refrele;
goto refrele;
goto lock_rele;
goto lock_rele;
if (error != 0) {
return (EPIPE);
done:
return (error);
int error;
return (EOPNOTSUPP);
return (error);
int error;
error = 0;
return (error);
int error = 0;
short wakesig = 0;
return (EOPNOTSUPP);
goto done;
switch (how) {
case SHUT_RD:
case SHUT_WR:
case SHUT_RDWR:
goto done;
done:
error = 0;
return (error);
int error = 0;
switch (option_name) {
case SO_TYPE:
case SO_ERROR:
case SO_DEBUG:
case SO_ACCEPTCONN:
case SO_REUSEADDR:
case SO_KEEPALIVE:
case SO_DONTROUTE:
case SO_BROADCAST:
case SO_USELOOPBACK:
case SO_OOBINLINE:
case SO_SNDBUF:
case SO_RCVBUF:
case SO_SNDLOWAT:
case SO_RCVLOWAT:
case SO_DGRAM_ERRIND:
goto done;
case SO_LINGER:
goto done;
switch (option_name) {
case SO_TYPE:
goto copyout;
case SO_ERROR:
goto copyout;
case SO_ACCEPTCONN:
SO_ACCEPTCONN : 0;
goto copyout;
case SO_DEBUG:
case SO_REUSEADDR:
case SO_KEEPALIVE:
case SO_DONTROUTE:
case SO_BROADCAST:
case SO_USELOOPBACK:
case SO_OOBINLINE:
case SO_DGRAM_ERRIND:
goto copyout;
case SO_LINGER:
case SO_SNDBUF:
goto copyout;
case SO_RCVBUF:
goto copyout;
case SO_SNDLOWAT:
goto copyout;
case SO_RCVLOWAT:
goto copyout;
goto done;
if (error != 0) {
goto free;
error = 0;
goto copyout;
free:
done:
return (error);
return (EINVAL);
return (error);
if (optlen == 0) {
return (error);
id = 0;
switch (option_name) {
case SCTP_RTOINFO:
case SCTP_ASSOCINFO:
case SCTP_PRIMARY_ADDR:
case SCTP_PEER_ADDR_PARAMS:
goto done;
case SCTP_DEFAULT_SEND_PARAM:
goto done;
case SCTP_INITMSG:
goto done;
if (id != 0) {
goto done;
optlen);
error = 0;
if (error == 0) {
switch (option_name) {
case SO_DEBUG:
case SO_REUSEADDR:
case SO_KEEPALIVE:
case SO_DONTROUTE:
case SO_BROADCAST:
case SO_USELOOPBACK:
case SO_OOBINLINE:
case SO_SNDBUF:
case SO_RCVBUF:
case SO_SNDLOWAT:
case SO_RCVLOWAT:
case SO_DGRAM_ERRIND:
goto done;
case SO_LINGER:
goto done;
switch (option_name) {
case SO_TYPE:
case SO_ERROR:
case SO_ACCEPTCONN:
goto done;
case SO_LINGER: {
if (l->l_onoff) {
case SO_DEBUG:
case SO_REUSEADDR:
case SO_KEEPALIVE:
case SO_DONTROUTE:
case SO_BROADCAST:
case SO_USELOOPBACK:
case SO_OOBINLINE:
case SO_DGRAM_ERRIND:
if (intvalue != 0) {
option_name));
option_name));
case SO_SNDBUF:
case SO_RCVBUF:
case SO_SNDLOWAT:
case SO_RCVLOWAT:
if (error != 0) {
error = 0;
done:
return (error);
int error;
return (NULL);
return (NULL);
return (NULL);
return (nss);
return (NULL);
return (NULL);
return (ssa);
int event = 0;
* If socket is already disconnected/disconnecting,
if (event != 0)
int ret;
ret = 0;
return (ret);
int msglen;
int msglen;
case SCTP_ASSOC_CHANGE:
case SCTP_PEER_ADDR_CHANGE:
case SCTP_REMOTE_ERROR:
case SCTP_SEND_FAILED:
case SCTP_SHUTDOWN_EVENT:
case SCTP_ADAPTION_INDICATION:
ASSERT(0);
char *cend;
if (wroff != 0) {
if (maxblk != 0) {
if (wroff != 0) {
if (maxblk != 0) {
if (wroff != 0) {
if (maxblk != 0) {