Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | net/sctp/sm_sideeffect.c | static void sctp_cmd_setup_t4(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc,
struct sctp_chunk *chunk) {
struct sctp_transport *t;
t = sctp_assoc_choose_alter_transport(asoc, chunk->transport);
asoc->timeouts[SCTP_EVENT_TIMEOUT_T4_RTO] = t->r... | [
0,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c | static void sctp_cmd_process_operr(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc,
struct sctp_chunk *chunk) {
struct sctp_errhdr *err_hdr;
struct sctp_ulpevent *ev;
while (chunk->chunk_end > chunk->skb->data) {
err_hdr = (struct... | [
1,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c | static void sctp_cmd_set_sk_err(struct sctp_association *asoc, int error) {
struct sock *sk = asoc->base.sk;
if (!sctp_style(sk, UDP))
sk->sk_err = error;
} | [
0,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c | static void sctp_cmd_send_msg(struct sctp_association *asoc,
struct sctp_datamsg *msg, gfp_t gfp) {
struct sctp_chunk *chunk;
list_for_each_entry(chunk, &msg->chunks, frag_list)
sctp_outq_tail(&asoc->outqueue, chunk, gfp);
asoc->outqueue.sched->enqueue(&asoc->outqueue, msg);
... | [
1,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | enum sctp_disposition sctp_sf_send_reconf(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type,
... | [
0,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | enum sctp_disposition sctp_sf_send_probe(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type,
... | [
0,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | static char sctp_tietags_compare(struct sctp_association *new_asoc,
const struct sctp_association *asoc) {
if ((asoc->c.my_vtag != new_asoc->c.my_vtag) &&
(asoc->c.peer_vtag != new_asoc->c.peer_vtag) &&
(asoc->c.my_vtag == new_asoc->c.my_ttag) &&
(asoc->c.peer_vtag ... | [
1,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | enum sctp_disposition
sctp_sf_cookie_echoed_err(struct net *net, const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type, void *arg,
struct sctp_cmd_seq *commands) {
struct sctp_chunk *chunk = arg;... | [
1,
1
] |
Linux Kernel | net/sctp/sm_statefuns.c | enum sctp_disposition
sctp_sf_cookie_wait_abort(struct net *net, const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type, void *arg,
struct sctp_cmd_seq *commands) {
__be16 error = SCTP_ERROR_NO_ER... | [
1,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | static enum sctp_disposition
sctp_sf_tabort_8_4_8(struct net *net, const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type, void *arg,
struct sctp_cmd_seq *commands) {
struct sctp_packet *packet = NULL;
struct ... | [
0,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | static enum sctp_disposition
sctp_sf_new_encap_port(struct net *net, const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type, void *arg,
struct sctp_cmd_seq *commands) {
struct sctp_packet *packet = NULL;
... | [
0,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | enum sctp_disposition sctp_sf_do_8_5_1_E_sa(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type,
... | [
1,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c |
static enum sctp_disposition
sctp_send_next_asconf(struct net *net, const struct sctp_endpoint *ep,
struct sctp_association *asoc,
const union sctp_subtype type,
struct sctp_cmd_seq *commands) {
struct sctp_chunk *asconf;
struct list_head *entry;
... | [
0,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | static enum sctp_disposition
sctp_sf_violation_chunklen(struct net *net, const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type, void *arg,
struct sctp_cmd_seq *commands) {
static const char er... | [
1,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | enum sctp_disposition
sctp_sf_cookie_echoed_prm_abort(struct net *net, const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type, void *arg,
struct sctp_cmd_seq *commands) {
return... | [
0,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | enum sctp_disposition
sctp_sf_do_prm_requestheartbeat(struct net *net, const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type, void *arg,
struct sctp_cmd_seq *commands) {
if (SCT... | [
0,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | enum sctp_disposition sctp_sf_do_prm_reconf(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type,
... | [
0,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | enum sctp_disposition sctp_sf_ignore_other(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type,
... | [
0,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | enum sctp_disposition
sctp_sf_t1_cookie_timer_expire(struct net *net, const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type, void *arg,
struct sctp_cmd_seq *commands) {
int attempt... | [
0,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | enum sctp_disposition sctp_sf_not_impl(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const union sctp_subtype type, void *arg,
... | [
0,
0
] |
Linux Kernel | net/sctp/sm_statefuns.c | static struct sctp_packet *
sctp_abort_pkt_new(struct net *net, const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
struct sctp_chunk *chunk, const void *payload,
size_t paylen) {
struct sctp_packet *packet;
struct sctp_chunk *abort;
packe... | [
0,
0
] |
Linux Kernel | net/sctp/socket.c |
static void sctp_enter_memory_pressure(struct sock *sk) {
sctp_memory_pressure = 1;
} | [
0,
0
] |
Linux Kernel | net/sctp/socket.c | static inline int sctp_wspace(struct sctp_association *asoc) {
struct sock *sk = asoc->base.sk;
return asoc->ep->sndbuf_policy ? sk->sk_sndbuf - asoc->sndbuf_used
: sk_stream_wspace(sk);
} | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static struct sctp_transport *
sctp_addr_id2transport(struct sock *sk, struct sockaddr_storage *addr,
sctp_assoc_t id) {
struct sctp_association *addr_asoc = NULL, *id_asoc = NULL;
struct sctp_af *af = sctp_get_af_specific(addr->ss_family);
union sctp_addr *laddr = (union sctp_addr *)addr;
... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static void sctp_sendmsg_update_sinfo(struct sctp_association *asoc,
struct sctp_sndrcvinfo *sinfo,
struct sctp_cmsgs *cmsgs) {
if (!cmsgs->srinfo && !cmsgs->sinfo) {
sinfo->sinfo_stream = asoc->default_stream;
sinfo->sinfo_ppid = aso... | [
0,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_setsockopt_events(struct sock *sk, __u8 *sn_type,
unsigned int optlen) {
struct sctp_sock *sp = sctp_sk(sk);
struct sctp_association *asoc;
int i;
if (optlen > sizeof(struct sctp_event_subscribe))
return -EINVAL;
for (i = 0; i < optlen; i++)
sctp_ulp... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_setsockopt_initmsg(struct sock *sk, struct sctp_initmsg *sinit,
unsigned int optlen) {
struct sctp_sock *sp = sctp_sk(sk);
if (optlen != sizeof(struct sctp_initmsg))
return -EINVAL;
if (sinit->sinit_num_ostreams)
sp->initmsg.sinit_num_ostreams = sinit->... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_setsockopt_rtoinfo(struct sock *sk,
struct sctp_rtoinfo *rtoinfo,
unsigned int optlen) {
struct sctp_association *asoc;
unsigned long rto_min, rto_max;
struct sctp_sock *sp = sctp_sk(sk);
if (optlen != sizeof(struct sctp_rtoi... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_setsockopt_associnfo(struct sock *sk,
struct sctp_assocparams *assocparams,
unsigned int optlen) {
struct sctp_association *asoc;
if (optlen != sizeof(struct sctp_assocparams))
return -EINVAL;
asoc = sctp_id2assoc(sk,... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_setsockopt_mappedv4(struct sock *sk, int *val,
unsigned int optlen) {
struct sctp_sock *sp = sctp_sk(sk);
if (optlen < sizeof(int))
return -EINVAL;
if (*val)
sp->v4mapped = 1;
else
sp->v4mapped = 0;
return 0;
} | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_setsockopt_fragment_interleave(struct sock *sk, int *val,
unsigned int optlen) {
if (optlen != sizeof(int))
return -EINVAL;
sctp_sk(sk)->frag_interleave = !!*val;
if (!sctp_sk(sk)->frag_interleave)
sctp_sk(sk)->ep->intl_enable = 0;
return... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_setsockopt_partial_delivery_point(struct sock *sk, u32 *val,
unsigned int optlen) {
if (optlen != sizeof(u32))
return -EINVAL;
if (*val > (sk->sk_rcvbuf >> 1))
return -EINVAL;
sctp_sk(sk)->pd_point = *val;
return 0; /* is this the righ... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_setsockopt_auth_chunk(struct sock *sk,
struct sctp_authchunk *val,
unsigned int optlen) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
if (!ep->auth_enable)
return -EACCES;
if (optlen != sizeof(struct sctp_authchunk))... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_setsockopt_auth_key(struct sock *sk,
struct sctp_authkey *authkey,
unsigned int optlen) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_association *asoc;
int ret = -EINVAL;
if (optlen <= sizeof(struct sctp_authke... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_setsockopt_deactivate_key(struct sock *sk,
struct sctp_authkeyid *val,
unsigned int optlen) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_association *asoc;
int ret = 0;
if (optlen != sizeof(struct s... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_setsockopt_recvrcvinfo(struct sock *sk, int *val,
unsigned int optlen) {
if (optlen < sizeof(int))
return -EINVAL;
sctp_sk(sk)->recvrcvinfo = (*val == 0) ? 0 : 1;
return 0;
} | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_setsockopt_default_prinfo(struct sock *sk,
struct sctp_default_prinfo *info,
unsigned int optlen) {
struct sctp_sock *sp = sctp_sk(sk);
struct sctp_association *asoc;
int retval = -EINVAL;
if (optlen != sizeof(... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_setsockopt_reset_streams(struct sock *sk,
struct sctp_reset_streams *params,
unsigned int optlen) {
struct sctp_association *asoc;
if (optlen < sizeof(*params))
return -EINVAL;
optlen =
min_t(unsigned int... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_setsockopt_scheduler(struct sock *sk,
struct sctp_assoc_value *params,
unsigned int optlen) {
struct sctp_sock *sp = sctp_sk(sk);
struct sctp_association *asoc;
int retval = 0;
if (optlen < sizeof(*params))
return -E... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_setsockopt_scheduler_value(struct sock *sk,
struct sctp_stream_value *params,
unsigned int optlen) {
struct sctp_association *asoc;
int retval = -EINVAL;
if (optlen < sizeof(*params))
goto out;
asoc = sct... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_setsockopt_reuse_port(struct sock *sk, int *val,
unsigned int optlen) {
if (!sctp_style(sk, TCP))
return -EOPNOTSUPP;
if (sctp_sk(sk)->ep->base.bind_addr.port)
return -EFAULT;
if (optlen < sizeof(int))
return -EINVAL;
sctp_sk(sk)->reuse = !!*... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_setsockopt_ecn_supported(struct sock *sk,
struct sctp_assoc_value *params,
unsigned int optlen) {
struct sctp_association *asoc;
int retval = -EINVAL;
if (optlen != sizeof(*params))
goto out;
asoc = sctp_id2... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_setsockopt_pf_expose(struct sock *sk,
struct sctp_assoc_value *params,
unsigned int optlen) {
struct sctp_association *asoc;
int retval = -EINVAL;
if (optlen != sizeof(*params))
goto out;
if (params->assoc_value > S... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | int sctp_transport_traverse_process(sctp_callback_t cb, sctp_callback_t cb_done,
struct net *net, int *pos, void *p) {
struct rhashtable_iter hti;
struct sctp_transport *tsp;
struct sctp_endpoint *ep;
int ret;
again:
ret = 0;
sctp_transport_walk_start(&hti);
tsp = sct... | [
0,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_getsockopt_delayed_ack(struct sock *sk, int len,
char __user *optval,
int __user *optlen) {
struct sctp_sack_info params;
struct sctp_association *asoc = NULL;
struct sctp_sock *sp = sctp_sk(sk);
if (len >= sizeof(str... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_getsockopt_default_sndinfo(struct sock *sk, int len,
char __user *optval,
int __user *optlen) {
struct sctp_sock *sp = sctp_sk(sk);
struct sctp_association *asoc;
struct sctp_sndinfo info;
if (len < sizeof(inf... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_getsockopt_mappedv4(struct sock *sk, int len,
char __user *optval, int __user *optlen) {
int val;
struct sctp_sock *sp = sctp_sk(sk);
if (len < sizeof(int))
return -EINVAL;
len = sizeof(int);
val = sp->v4mapped;
if (put_user(len, optlen))
return ... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_getsockopt_maxseg(struct sock *sk, int len, char __user *optval,
int __user *optlen) {
struct sctp_assoc_value params;
struct sctp_association *asoc;
if (len == sizeof(int)) {
pr_warn_ratelimited(DEPRECATED "%s (pid %d) "
"U... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_getsockopt_hmac_ident(struct sock *sk, int len,
char __user *optval, int __user *optlen) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_hmacalgo __user *p = (void __user *)optval;
struct sctp_hmac_algo_param *hmacs;
__u16 data_len = 0;
u32 num_... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_getsockopt_peer_auth_chunks(struct sock *sk, int len,
char __user *optval,
int __user *optlen) {
struct sctp_authchunks __user *p = (void __user *)optval;
struct sctp_authchunks val;
struct sctp_association *as... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_getsockopt_local_auth_chunks(struct sock *sk, int len,
char __user *optval,
int __user *optlen) {
struct sctp_endpoint *ep = sctp_sk(sk)->ep;
struct sctp_authchunks __user *p = (void __user *)optval;
struct ... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_getsockopt_assoc_number(struct sock *sk, int len,
char __user *optval,
int __user *optlen) {
struct sctp_sock *sp = sctp_sk(sk);
struct sctp_association *asoc;
u32 val = 0;
if (sctp_style(sk, TCP))
return -EOPNO... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_getsockopt_recvrcvinfo(struct sock *sk, int len,
char __user *optval,
int __user *optlen) {
int val = 0;
if (len < sizeof(int))
return -EINVAL;
len = sizeof(int);
if (sctp_sk(sk)->recvrcvinfo)
val = 1;
if ... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_getsockopt_pr_supported(struct sock *sk, int len,
char __user *optval,
int __user *optlen) {
struct sctp_assoc_value params;
struct sctp_association *asoc;
int retval = -EFAULT;
if (len < sizeof(params)) {
retv... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_getsockopt_enable_strreset(struct sock *sk, int len,
char __user *optval,
int __user *optlen) {
struct sctp_assoc_value params;
struct sctp_association *asoc;
int retval = -EFAULT;
if (len < sizeof(params)) {... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_getsockopt_scheduler_value(struct sock *sk, int len,
char __user *optval,
int __user *optlen) {
struct sctp_stream_value params;
struct sctp_association *asoc;
int retval = -EFAULT;
if (len < sizeof(params)) ... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c |
static int sctp_getsockopt_ecn_supported(struct sock *sk, int len,
char __user *optval,
int __user *optlen) {
struct sctp_assoc_value params;
struct sctp_association *asoc;
int retval = -EFAULT;
if (len < sizeof(params)) {
r... | [
1,
0
] |
Linux Kernel | net/sctp/socket.c | static int sctp_wait_for_packet(struct sock *sk, int *err, long *timeo_p) {
int error;
DEFINE_WAIT(wait);
prepare_to_wait_exclusive(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE);
error = sock_error(sk);
if (error)
goto out;
if (!skb_queue_empty(&sk->sk_receive_queue))
goto ready;
/* Socket shut dow... | [
0,
0
] |
Linux Kernel | net/sctp/stream.c |
void sctp_stream_clear(struct sctp_stream *stream) {
int i;
for (i = 0; i < stream->outcnt; i++) {
SCTP_SO(stream, i)->mid = 0;
SCTP_SO(stream, i)->mid_uo = 0;
}
for (i = 0; i < stream->incnt; i++)
SCTP_SI(stream, i)->mid = 0;
} | [
0,
0
] |
Linux Kernel | net/sctp/stream_interleave.c |
static struct sctp_chunk *
sctp_make_idatafrag_empty(const struct sctp_association *asoc,
const struct sctp_sndrcvinfo *sinfo, int len,
__u8 flags, gfp_t gfp) {
struct sctp_chunk *retval;
struct sctp_idatahdr dp;
memset(&dp, 0, sizeof(dp));
dp.stream = htons... | [
1,
0
] |
Linux Kernel | net/sctp/stream_interleave.c |
static void sctp_intl_retrieve_ordered(struct sctp_ulpq *ulpq,
struct sctp_ulpevent *event) {
struct sk_buff_head *event_list;
struct sctp_stream *stream;
struct sk_buff *pos, *tmp;
__u16 sid = event->stream;
stream = &ulpq->asoc->stream;
event_list = (struct sk_buff... | [
0,
0
] |
Linux Kernel | net/sctp/stream_interleave.c |
static void sctp_intl_stream_abort_pd(struct sctp_ulpq *ulpq, __u16 sid,
__u32 mid, __u16 flags, gfp_t gfp) {
struct sock *sk = ulpq->asoc->base.sk;
struct sctp_ulpevent *ev = NULL;
if (!sctp_ulpevent_type_enabled(ulpq->asoc->subscribe,
SCT... | [
1,
0
] |
Linux Kernel | net/sctp/stream_interleave.c | static void sctp_intl_abort_pd(struct sctp_ulpq *ulpq, gfp_t gfp) {
struct sctp_stream *stream = &ulpq->asoc->stream;
__u16 sid;
for (sid = 0; sid < stream->incnt; sid++) {
struct sctp_stream_in *sin = SCTP_SI(stream, sid);
__u32 mid;
if (sin->pd_mode_uo) {
sin->pd_mode_uo = 0;
mid = si... | [
0,
0
] |
Linux Kernel | net/sctp/stream_interleave.c |
static bool sctp_validate_iftsn(struct sctp_chunk *chunk) {
struct sctp_ifwdtsn_skip *skip;
__u16 incnt;
if (chunk->chunk_hdr->type != SCTP_CID_I_FWD_TSN)
return false;
incnt = chunk->asoc->stream.incnt;
sctp_walk_ifwdtsn(skip, chunk) if (ntohs(skip->stream) >= incnt) return false;
return true;
} | [
1,
0
] |
Linux Kernel | net/sctp/stream_interleave.c | static void sctp_report_iftsn(struct sctp_ulpq *ulpq, __u32 ftsn) {
sctp_tsnmap_skip(&ulpq->asoc->peer.tsn_map, ftsn);
/* purge the fragmentation queue */
sctp_intl_reasm_flushtsn(ulpq, ftsn);
/* abort only when it's for all data */
if (ftsn == sctp_tsnmap_get_max_tsn_seen(&ulpq->asoc->peer.tsn_map))
sct... | [
0,
0
] |
Linux Kernel | net/sctp/stream_interleave.c |
static void sctp_intl_skip(struct sctp_ulpq *ulpq, __u16 sid, __u32 mid,
__u8 flags) {
struct sctp_stream_in *sin = sctp_stream_in(&ulpq->asoc->stream, sid);
struct sctp_stream *stream = &ulpq->asoc->stream;
if (flags & SCTP_FTSN_U_BIT) {
if (sin->pd_mode_uo && MID_lt(sin->mid_uo,... | [
0,
0
] |
Linux Kernel | net/sctp/stream_sched.c | static int sctp_sched_fcfs_set(struct sctp_stream *stream, __u16 sid,
__u16 value, gfp_t gfp) {
return 0;
} | [
0,
0
] |
Linux Kernel | net/sctp/stream_sched.c |
static void sctp_sched_fcfs_enqueue(struct sctp_outq *q,
struct sctp_datamsg *msg) {} | [
0,
0
] |
Linux Kernel | net/sctp/stream_sched.c |
static struct sctp_chunk *sctp_sched_fcfs_dequeue(struct sctp_outq *q) {
struct sctp_stream *stream = &q->asoc->stream;
struct sctp_chunk *ch = NULL;
struct list_head *entry;
if (list_empty(&q->out_chunk_list))
goto out;
if (stream->out_curr) {
ch = list_entry(stream->out_curr->ext->outq.next, stru... | [
0,
0
] |
Linux Kernel | net/sctp/stream_sched.c |
static void sctp_sched_ops_fcfs_init(void) {
sctp_sched_ops_register(SCTP_SS_FCFS, &sctp_sched_fcfs);
} | [
0,
0
] |
Linux Kernel | net/sctp/stream_sched.c |
void sctp_sched_ops_register(enum sctp_sched_type sched,
struct sctp_sched_ops *sched_ops) {
sctp_sched_ops[sched] = sched_ops;
} | [
0,
0
] |
Linux Kernel | net/sctp/stream_sched.c | int sctp_sched_set_sched(struct sctp_association *asoc,
enum sctp_sched_type sched) {
struct sctp_sched_ops *n = sctp_sched_ops[sched];
struct sctp_sched_ops *old = asoc->outqueue.sched;
struct sctp_datamsg *msg = NULL;
struct sctp_chunk *ch;
int i, ret = 0;
if (old == n)
retur... | [
0,
0
] |
Linux Kernel | net/sctp/stream_sched.c | void sctp_sched_dequeue_done(struct sctp_outq *q, struct sctp_chunk *ch) {
if (!list_is_last(&ch->frag_list, &ch->msg->chunks) &&
!q->asoc->peer.intl_capable) {
struct sctp_stream_out *sout;
__u16 sid;
sid = sctp_chunk_stream_no(ch);
sout = SCTP_SO(&q->asoc->stream, sid);
q->asoc->stream.ou... | [
1,
0
] |
Linux Kernel | net/sctp/stream_sched_prio.c |
static struct sctp_stream_priorities *
sctp_sched_prio_new_head(struct sctp_stream *stream, int prio, gfp_t gfp) {
struct sctp_stream_priorities *p;
p = kmalloc(sizeof(*p), gfp);
if (!p)
return NULL;
INIT_LIST_HEAD(&p->prio_sched);
INIT_LIST_HEAD(&p->active);
p->next = NULL;
p->prio = prio;
retu... | [
0,
0
] |
Linux Kernel | net/sctp/stream_sched_prio.c | static void sctp_sched_prio_sched(struct sctp_stream *stream,
struct sctp_stream_out_ext *soute) {
struct sctp_stream_priorities *prio, *prio_head;
prio_head = soute->prio_head;
if (!list_empty(&soute->prio_list))
return;
/* Schedule the stream. If there is a next, we sc... | [
0,
0
] |
Linux Kernel | net/sctp/stream_sched_prio.c |
static int sctp_sched_prio_get(struct sctp_stream *stream, __u16 sid,
__u16 *value) {
*value = SCTP_SO(stream, sid)->ext->prio_head->prio;
return 0;
} | [
0,
0
] |
Linux Kernel | net/sctp/stream_sched_prio.c |
static int sctp_sched_prio_init(struct sctp_stream *stream) {
INIT_LIST_HEAD(&stream->prio_list);
return 0;
} | [
0,
0
] |
Linux Kernel | net/sctp/stream_sched_rr.c |
static void sctp_sched_rr_enqueue(struct sctp_outq *q,
struct sctp_datamsg *msg) {
struct sctp_stream *stream;
struct sctp_chunk *ch;
__u16 sid;
ch = list_first_entry(&msg->chunks, struct sctp_chunk, frag_list);
sid = sctp_chunk_stream_no(ch);
stream = &q->asoc->stream;
... | [
0,
0
] |
Linux Kernel | net/sctp/sysctl.c |
int sctp_sysctl_net_register(struct net *net) {
struct ctl_table *table;
int i;
table = kmemdup(sctp_net_table, sizeof(sctp_net_table), GFP_KERNEL);
if (!table)
return -ENOMEM;
for (i = 0; table[i].data; i++)
table[i].data += (char *)(&net->sctp) - (char *)&init_net.sctp;
table[SCTP_RTO_MIN_IDX]... | [
1,
0
] |
Linux Kernel | net/sctp/sysctl.c | void sctp_sysctl_register(void) {
sctp_sysctl_header = register_net_sysctl(&init_net, "net/sctp", sctp_table);
} | [
0,
0
] |
Linux Kernel | net/sctp/transport.c | struct sctp_transport *
sctp_transport_new(struct net *net, const union sctp_addr *addr, gfp_t gfp) {
struct sctp_transport *transport;
transport = kzalloc(sizeof(*transport), gfp);
if (!transport)
goto fail;
if (!sctp_transport_init(net, transport, addr, gfp))
goto fail_init;
SCTP_DBG_OBJCNT_INC(t... | [
0,
0
] |
Linux Kernel | net/sctp/transport.c | void sctp_transport_reset_hb_timer(struct sctp_transport *transport) {
unsigned long expires;
expires = jiffies + sctp_transport_timeout(transport);
if ((time_before(transport->hb_timer.expires, expires) ||
!timer_pending(&transport->hb_timer)) &&
!mod_timer(&transport->hb_timer,
ex... | [
0,
0
] |
Linux Kernel | net/sctp/transport.c |
void sctp_transport_reset_raise_timer(struct sctp_transport *transport) {
if (!mod_timer(&transport->probe_timer,
jiffies + transport->probe_interval * 30))
sctp_transport_hold(transport);
} | [
0,
0
] |
Linux Kernel | net/sctp/transport.c | void sctp_transport_set_owner(struct sctp_transport *transport,
struct sctp_association *asoc) {
transport->asoc = asoc;
sctp_association_hold(asoc);
} | [
0,
0
] |
Linux Kernel | net/sctp/transport.c | bool sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) {
struct sock *sk = t->asoc->base.sk;
struct dst_entry *dst;
bool change = true;
if (unlikely(pmtu < SCTP_DEFAULT_MINSEGMENT)) {
pr_warn_ratelimited(
"%s: Reported pmtu %d too low, using default minimum of %d\n", __func__,
... | [
1,
0
] |
Linux Kernel | net/sctp/tsnmap.c |
void sctp_tsnmap_free(struct sctp_tsnmap *map) {
map->len = 0;
kfree(map->tsn_map);
} | [
0,
0
] |
Linux Kernel | net/sctp/tsnmap.c | int sctp_tsnmap_mark(struct sctp_tsnmap *map, __u32 tsn,
struct sctp_transport *trans) {
u16 gap;
if (TSN_lt(tsn, map->base_tsn))
return 0;
gap = tsn - map->base_tsn;
if (gap >= map->len && !sctp_tsnmap_grow(map, gap + 1))
return -ENOMEM;
if (!sctp_tsnmap_has_gap(map) && gap =... | [
1,
0
] |
Linux Kernel | net/sctp/tsnmap.c | static int sctp_tsnmap_next_gap_ack(const struct sctp_tsnmap *map,
struct sctp_tsnmap_iter *iter, __u16 *start,
__u16 *end) {
int ended = 0;
__u16 start_ = 0, end_ = 0, offset;
if (TSN_lte(map->max_tsn_seen, iter->start))
return 0;
of... | [
0,
0
] |
Linux Kernel | net/sctp/ulpevent.c | static inline void
sctp_ulpevent_set_owner(struct sctp_ulpevent *event,
const struct sctp_association *asoc) {
struct sctp_chunk *chunk = event->chunk;
struct sk_buff *skb;
sctp_association_hold((struct sctp_association *)asoc);
skb = sctp_event2skb(event);
event->asoc = (struct sctp_... | [
1,
0
] |
Linux Kernel | net/sctp/ulpevent.c |
void sctp_ulpevent_notify_peer_addr_change(struct sctp_transport *transport,
int state, int error) {
struct sctp_association *asoc = transport->asoc;
struct sockaddr_storage addr;
struct sctp_ulpevent *event;
if (asoc->state < SCTP_STATE_ESTABLISHED)
return;
m... | [
1,
0
] |
Linux Kernel | net/sctp/ulpevent.c | struct sctp_ulpevent *
sctp_ulpevent_make_remote_error(const struct sctp_association *asoc,
struct sctp_chunk *chunk, __u16 flags,
gfp_t gfp) {
struct sctp_remote_error *sre;
struct sctp_ulpevent *event;
struct sctp_errhdr *ch;
struct sk_buff *skb;... | [
1,
0
] |
Linux Kernel | net/sctp/ulpevent.c | struct sctp_ulpevent *
sctp_ulpevent_make_sender_dry_event(const struct sctp_association *asoc,
gfp_t gfp) {
struct sctp_ulpevent *event;
struct sctp_sender_dry_event *sdry;
struct sk_buff *skb;
event = sctp_ulpevent_new(sizeof(struct sctp_sender_dry_event),
... | [
1,
0
] |
Linux Kernel | net/sctp/ulpevent.c | __u16 sctp_ulpevent_get_notification_type(const struct sctp_ulpevent *event) {
union sctp_notification *notification;
struct sk_buff *skb;
skb = sctp_event2skb(event);
notification = (union sctp_notification *)skb->data;
return notification->sn_header.sn_type;
} | [
0,
0
] |
Linux Kernel | net/sctp/ulpevent.c | static void sctp_ulpevent_release_frag_data(struct sctp_ulpevent *event) {
struct sk_buff *skb, *frag;
skb = sctp_event2skb(event);
if (!skb->data_len)
goto done;
skb_walk_frags(skb, frag) {
/* NOTE: skb_shinfos are recursive. Although IP returns
* skb's with only 1 level of fragments, SCTP rea... | [
0,
0
] |
Linux Kernel | net/sctp/ulpevent.c | unsigned int sctp_queue_purge_ulpevents(struct sk_buff_head *list) {
struct sk_buff *skb;
unsigned int data_unread = 0;
while ((skb = skb_dequeue(list)) != NULL) {
struct sctp_ulpevent *event = sctp_skb2event(skb);
if (!sctp_ulpevent_is_notification(event))
data_unread += skb->len;
sctp_ulpev... | [
1,
0
] |
Linux Kernel | net/sctp/ulpqueue.c | void sctp_ulpq_init(struct sctp_ulpq *ulpq, struct sctp_association *asoc) {
memset(ulpq, 0, sizeof(struct sctp_ulpq));
ulpq->asoc = asoc;
skb_queue_head_init(&ulpq->reasm);
skb_queue_head_init(&ulpq->reasm_uo);
skb_queue_head_init(&ulpq->lobby);
ulpq->pd_mode = 0;
} | [
1,
0
] |
Linux Kernel | net/sctp/ulpqueue.c | static void sctp_ulpq_store_reasm(struct sctp_ulpq *ulpq,
struct sctp_ulpevent *event) {
struct sk_buff *pos;
struct sctp_ulpevent *cevent;
__u32 tsn, ctsn;
tsn = event->tsn;
pos = skb_peek_tail(&ulpq->reasm);
if (!pos) {
__skb_queue_tail(&ulpq->reasm, sctp_event2skb(... | [
0,
0
] |
Linux Kernel | net/sctp/ulpqueue.c | static struct sctp_ulpevent *sctp_ulpq_reasm(struct sctp_ulpq *ulpq,
struct sctp_ulpevent *event) {
struct sctp_ulpevent *retval = NULL;
if (SCTP_DATA_NOT_FRAG == (event->msg_flags & SCTP_DATA_FRAG_MASK)) {
event->msg_flags |= MSG_EOR;
return event;
}
sctp_... | [
0,
0
] |
Linux Kernel | net/sctp/ulpqueue.c | void sctp_ulpq_reasm_flushtsn(struct sctp_ulpq *ulpq, __u32 fwd_tsn) {
struct sk_buff *pos, *tmp;
struct sctp_ulpevent *event;
__u32 tsn;
if (skb_queue_empty(&ulpq->reasm))
return;
skb_queue_walk_safe(&ulpq->reasm, pos, tmp) {
event = sctp_skb2event(pos);
tsn = event->tsn;
if (TSN_lte(tsn, ... | [
0,
0
] |
Linux Kernel | net/sctp/ulpqueue.c | void sctp_ulpq_skip(struct sctp_ulpq *ulpq, __u16 sid, __u16 ssn) {
struct sctp_stream *stream;
stream = &ulpq->asoc->stream;
/* Is this an old SSN? If so ignore. */
if (SSN_lt(ssn, sctp_ssn_peek(stream, in, sid)))
return;
/* Mark that we are no longer expecting this SSN or lower. */
sctp_ssn_skip(s... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.