struct sctp_sndrcvinfo default_sinfo = { 0 };
struct sctp_sndrcvinfo *sinfo;
struct sctp_initmsg *sinit;
- sctp_assoc_t associd = 0;
+ sctp_assoc_t associd = NULL;
sctp_cmsgs_t cmsgs = { NULL };
int err;
sctp_scope_t scope;
return err;
}
-static int sctp_setsockopt_adaption_layer(struct sock *sk, char __user *optval,
- int optlen)
-{
- __u32 val;
-
- if (optlen < sizeof(__u32))
- return -EINVAL;
- if (copy_from_user(&val, optval, sizeof(__u32)))
- return -EFAULT;
-
- sctp_sk(sk)->adaption_ind = val;
-
- return 0;
-}
/* API 6.2 setsockopt(), getsockopt()
*
case SCTP_MAXSEG:
retval = sctp_setsockopt_maxseg(sk, optval, optlen);
break;
- case SCTP_ADAPTION_LAYER:
- retval = sctp_setsockopt_adaption_layer(sk, optval, optlen);
- break;
-
default:
retval = -ENOPROTOOPT;
break;
/* User specified fragmentation limit. */
sp->user_frag = 0;
- sp->adaption_ind = 0;
-
sp->pf = sctp_get_pf_specific(sk->sk_family);
/* Control variables for partial data delivery. */
goto out;
}
- SCTP_DEBUG_PRINTK("sctp_getsockopt_sctp_status(%d): %d %d %d\n",
+ SCTP_DEBUG_PRINTK("sctp_getsockopt_sctp_status(%d): %d %d %p\n",
len, status.sstat_state, status.sstat_rwnd,
status.sstat_assoc_id);
return 0;
}
-/*
- * 7.1.11 Set Adaption Layer Indicator (SCTP_ADAPTION_LAYER)
- *
- * Requests that the local endpoint set the specified Adaption Layer
- * Indication parameter for all future INIT and INIT-ACK exchanges.
- */
-static int sctp_getsockopt_adaption_layer(struct sock *sk, int len,
- char __user *optval, int __user *optlen)
-{
- __u32 val;
-
- if (len < sizeof(__u32))
- return -EINVAL;
-
- len = sizeof(__u32);
- val = sctp_sk(sk)->adaption_ind;
- if (put_user(len, optlen))
- return -EFAULT;
- if (copy_to_user(optval, &val, len))
- return -EFAULT;
- return 0;
-}
-
/*
*
* 7.1.14 Set default send parameters (SCTP_DEFAULT_SEND_PARAM)
retval = sctp_getsockopt_peer_addr_info(sk, len, optval,
optlen);
break;
- case SCTP_ADAPTION_LAYER:
- retval = sctp_getsockopt_adaption_layer(sk, len, optval,
- optlen);
- break;
default:
retval = -ENOPROTOOPT;
break;
* delivery. Three cases:
* 1) No partial deliver; no work.
* 2) Peeling off partial delivery; keep pd_lobby in new pd_lobby.
- * 3) Peeling off non-partial delivery; move pd_lobby to receive_queue.
+ * 3) Peeling off non-partial delivery; move pd_lobby to recieve_queue.
*/
skb_queue_head_init(&newsp->pd_lobby);
sctp_sk(newsk)->pd_mode = assoc->ulpq.pd_mode;
/* This proto struct describes the ULP interface for SCTP. */
struct proto sctp_prot = {
.name = "SCTP",
- .owner = THIS_MODULE,
.close = sctp_close,
.connect = sctp_connect,
.disconnect = sctp_disconnect,
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
struct proto sctpv6_prot = {
.name = "SCTPv6",
- .owner = THIS_MODULE,
.close = sctp_close,
.connect = sctp_connect,
.disconnect = sctp_disconnect,