Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | net/sctp/input.c | static inline int sctp_rcv_checksum(struct net *net, struct sk_buff *skb) {
struct sctphdr *sh = sctp_hdr(skb);
__le32 cmp = sh->checksum;
__le32 val = sctp_compute_cksum(skb, 0);
if (val != cmp) {
__SCTP_INC_STATS(net, SCTP_MIB_CHECKSUMERRORS);
return -1;
}
return 0;
} | [
0,
0
] |
Linux Kernel | net/sctp/input.c | void sctp_icmp_proto_unreachable(struct sock *sk, struct sctp_association *asoc,
struct sctp_transport *t) {
if (sock_owned_by_user(sk)) {
if (timer_pending(&t->proto_unreach_timer))
return;
else {
if (!mod_timer(&t->proto_unreach_timer, jiffies + (HZ / 20)))
... | [
0,
0
] |
Linux Kernel | net/sctp/input.c | void sctp_err_finish(struct sock *sk, struct sctp_transport *t)
__releases(&((__sk)->sk_l | [
0,
0
] |
Linux Kernel | net/sctp/input.c | static void sctp_v4_err_handle(struct sctp_transport *t, struct sk_buff *skb,
__u8 type, __u8 code, __u32 info) {
struct sctp_association *asoc = t->asoc;
struct sock *sk = asoc->base.sk;
int err = 0;
switch (type) {
case ICMP_PARAMETERPROB:
err = EPROTO;
break;
case ... | [
0,
0
] |
Linux Kernel | net/sctp/input.c | static int sctp_rcv_ootb(struct sk_buff *skb) {
struct sctp_chunkhdr *ch, _ch;
int ch_end, offset = 0;
do {
/* Make sure we have at least the header there */
if (offset + sizeof(_ch) > skb->len)
break;
ch = skb_header_pointer(skb, offset, sizeof(*ch), &_ch);
/* Break out if chunk length i... | [
1,
0
] |
Linux Kernel | net/sctp/input.c | void sctp_unhash_endpoint(struct sctp_endpoint *ep) {
local_bh_disable();
__sctp_unhash_endpoint(ep);
local_bh_enable();
} | [
0,
0
] |
Linux Kernel | net/sctp/input.c |
void sctp_transport_hashtable_destroy(void) {
rhltable_destroy(&sctp_transport_hashtable);
} | [
0,
0
] |
Linux Kernel | net/sctp/input.c | static struct sctp_association *
__sctp_lookup_association(struct net *net, const union sctp_addr *local,
const union sctp_addr *peer,
struct sctp_transport **pt, int dif, int sdif) {
struct sctp_transport *t;
struct sctp_association *asoc = NULL;
t = sctp_addr... | [
0,
0
] |
Linux Kernel | net/sctp/input.c | bool sctp_has_association(struct net *net, const union sctp_addr *laddr,
const union sctp_addr *paddr, int dif, int sdif) {
struct sctp_transport *transport;
if (sctp_lookup_association(net, laddr, paddr, &transport, dif, sdif)) {
sctp_transport_put(transport);
return true;
}
... | [
0,
0
] |
Linux Kernel | net/sctp/input.c | static struct sctp_association *__sctp_rcv_asconf_lookup(
struct net *net, struct sctp_chunkhdr *ch, const union sctp_addr *laddr,
__be16 peer_port, struct sctp_transport **transportp, int dif, int sdif) {
struct sctp_addip_chunk *asconf = (struct sctp_addip_chunk *)ch;
struct sctp_af *af;
union sctp_addr... | [
1,
0
] |
Linux Kernel | net/sctp/input.c | static struct sctp_association *
__sctp_rcv_walk_lookup(struct net *net, struct sk_buff *skb,
const union sctp_addr *laddr,
struct sctp_transport **transportp, int dif, int sdif) {
struct sctp_association *asoc = NULL;
struct sctp_chunkhdr *ch;
int have_auth = 0;
un... | [
1,
0
] |
Linux Kernel | net/sctp/inqueue.c | void sctp_inq_init(struct sctp_inq *queue) {
INIT_LIST_HEAD(&queue->in_chunk_list);
queue->in_progress = NULL;
INIT_WORK(&queue->immediate, NULL);
} | [
0,
0
] |
Linux Kernel | net/sctp/inqueue.c | void sctp_inq_push(struct sctp_inq *q, struct sctp_chunk *chunk) {
if (chunk->rcvr->dead) {
sctp_chunk_free(chunk);
return;
}
/* We are now calling this either from the soft interrupt
* or from the backlog processing.
* Eventually, we should clean up inqueue to not rely
* on the BH related data... | [
1,
0
] |
Linux Kernel | net/sctp/ipv6.c | int sctp_udp_v6_err(struct sock *sk, struct sk_buff *skb) {
struct net *net = dev_net(skb->dev);
struct sctp_association *asoc;
struct sctp_transport *t;
struct icmp6hdr *hdr;
__u32 info = 0;
skb->transport_header += sizeof(struct udphdr);
sk = sctp_err_lookup(net, AF_INET6, skb, sctp_hdr(skb), &asoc, &t... | [
1,
0
] |
Linux Kernel | net/sctp/ipv6.c |
static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *t) {
struct dst_entry *dst = dst_clone(t->dst);
struct flowi6 *fl6 = &t->fl.u.ip6;
struct sock *sk = skb->sk;
struct ipv6_pinfo *np = inet6_sk(sk);
__u8 tclass = np->tclass;
__be32 label;
pr_debug("%s: skb:%p, len:%d, src:%pI6 dst:%pI6\... | [
0,
0
] |
Linux Kernel | net/sctp/ipv6.c | static bool sctp_v6_from_addr_param(union sctp_addr *addr,
union sctp_addr_param *param, __be16 port,
int iif) {
if (ntohs(param->v6.param_hdr.length) < sizeof(struct sctp_ipv6addr_param))
return false;
addr->v6.sin6_family = AF_INET6;
a... | [
1,
0
] |
Linux Kernel | net/sctp/ipv6.c | static int sctp_v6_to_addr_param(const union sctp_addr *addr,
union sctp_addr_param *param) {
int length = sizeof(struct sctp_ipv6addr_param);
param->v6.param_hdr.type = SCTP_PARAM_IPV6_ADDRESS;
param->v6.param_hdr.length = htons(length);
param->v6.addr = addr->v6.sin6_addr;
... | [
1,
0
] |
Linux Kernel | net/sctp/ipv6.c | static int sctp_v6_is_any(const union sctp_addr *addr) {
return ipv6_addr_any(&addr->v6.sin6_addr);
} | [
0,
0
] |
Linux Kernel | net/sctp/ipv6.c |
static int sctp_v6_skb_sdif(const struct sk_buff *skb) {
return inet6_sdif(skb);
} | [
0,
0
] |
Linux Kernel | net/sctp/ipv6.c | static int sctp_v6_is_ce(const struct sk_buff *skb) {
return *((__u32 *)(ipv6_hdr(skb))) & (__force __u32)htonl(1 << 20);
} | [
0,
0
] |
Linux Kernel | net/sctp/ipv6.c | static int sctp_inet6_af_supported(sa_family_t family, struct sctp_sock *sp) {
switch (family) {
case AF_INET6:
return 1;
case AF_INET:
if (!ipv6_only_sock(sctp_opt2sk(sp)))
return 1;
fallthrough;
default:
return 0;
}
} | [
0,
0
] |
Linux Kernel | net/sctp/ipv6.c | static int sctp_inet6_cmp_addr(const union sctp_addr *addr1,
const union sctp_addr *addr2,
struct sctp_sock *opt) {
struct sock *sk = sctp_opt2sk(opt);
struct sctp_af *af1, *af2;
af1 = sctp_get_af_specific(addr1->sa.sa_family);
af2 = sctp_get_af_spe... | [
1,
0
] |
Linux Kernel | net/sctp/ipv6.c | static int sctp_inet6_supported_addrs(const struct sctp_sock *opt,
__be16 *types) {
types[0] = SCTP_PARAM_IPV6_ADDRESS;
if (!opt || !ipv6_only_sock(sctp_opt2sk(opt))) {
types[1] = SCTP_PARAM_IPV4_ADDRESS;
return 2;
}
return 1;
} | [
0,
0
] |
Linux Kernel | net/sctp/ipv6.c | static int sctp_getname(struct socket *sock, struct sockaddr *uaddr, int peer) {
int rc;
rc = inet6_getname(sock, uaddr, peer);
if (rc < 0)
return rc;
rc = sctp_v6_addr_to_user(sctp_sk(sock->sk), (union sctp_addr *)uaddr);
return rc;
} | [
0,
0
] |
Linux Kernel | net/sctp/ipv6.c |
static int sctp6_rcv(struct sk_buff *skb) {
SCTP_INPUT_CB(skb)->encap_port = 0;
return sctp_rcv(skb) ? -1 : 0;
} | [
0,
0
] |
Linux Kernel | net/sctp/ipv6.c | void sctp_v6_pf_init(void) {
sctp_register_pf(&sctp_pf_inet6, PF_INET6);
/* Register the SCTP specific AF_INET6 functions. */
sctp_register_af(&sctp_af_inet6);
} | [
0,
0
] |
Linux Kernel | net/sctp/ipv6.c |
void sctp_v6_protosw_exit(void) {
inet6_unregister_protosw(&sctpv6_seqpacket_protosw);
inet6_unregister_protosw(&sctpv6_stream_protosw);
proto_unregister(&sctpv6_prot);
} | [
0,
0
] |
Linux Kernel | net/sctp/ipv6.c | void sctp_v6_del_protocol(void) {
inet6_del_protocol(&sctpv6_protocol, IPPROTO_SCTP);
unregister_inet6addr_notifier(&sctp_inet6addr_notifier);
} | [
0,
0
] |
Linux Kernel | net/sctp/objcnt.c | void sctp_dbg_objcnt_init(struct net *net) {
struct proc_dir_entry *ent;
ent = proc_create_seq("sctp_dbg_objcnt", 0, net->sctp.proc_net_sctp,
&sctp_objcnt_seq_ops);
if (!ent)
pr_warn("sctp_dbg_objcnt: Unable to create /proc entry.\n");
} | [
0,
0
] |
Linux Kernel | net/sctp/output.c | static enum sctp_xmit sctp_packet_bundle_sack(struct sctp_packet *pkt,
struct sctp_chunk *chunk) {
enum sctp_xmit retval = SCTP_XMIT_OK;
if (sctp_chunk_is_data(chunk) && !pkt->has_sack && !pkt->has_cookie_echo) {
struct sctp_association *asoc;
struct timer_list... | [
1,
0
] |
Linux Kernel | net/sctp/output.c | static enum sctp_xmit __sctp_packet_append_chunk(struct sctp_packet *packet,
struct sctp_chunk *chunk) {
__u16 chunk_len = SCTP_PAD4(ntohs(chunk->chunk_hdr->length));
enum sctp_xmit retval = SCTP_XMIT_OK;
retval = sctp_packet_will_fit(packet, chunk, chunk_len);
... | [
1,
0
] |
Linux Kernel | net/sctp/output.c | static void sctp_packet_append_data(struct sctp_packet *packet,
struct sctp_chunk *chunk) {
struct sctp_transport *transport = packet->transport;
size_t datasize = sctp_data_size(chunk);
struct sctp_association *asoc = transport->asoc;
u32 rwnd = asoc->peer.rwnd;
transport... | [
0,
0
] |
Linux Kernel | net/sctp/outqueue.c | static inline int sctp_cacc_skip_3_1_d(struct sctp_transport *primary,
struct sctp_transport *transport,
int count_of_newacks) {
if (count_of_newacks >= 2 && transport != primary)
return 1;
return 0;
} | [
1,
0
] |
Linux Kernel | net/sctp/outqueue.c | static inline int sctp_cacc_skip(struct sctp_transport *primary,
struct sctp_transport *transport,
int count_of_newacks, __u32 tsn) {
if (primary->cacc.changeover_active &&
(sctp_cacc_skip_3_1(primary, transport, count_of_newacks) ||
sctp_... | [
0,
0
] |
Linux Kernel | net/sctp/outqueue.c | void sctp_outq_init(struct sctp_association *asoc, struct sctp_outq *q) {
memset(q, 0, sizeof(struct sctp_outq));
q->asoc = asoc;
INIT_LIST_HEAD(&q->out_chunk_list);
INIT_LIST_HEAD(&q->control_chunk_list);
INIT_LIST_HEAD(&q->retransmit);
INIT_LIST_HEAD(&q->sacked);
INIT_LIST_HEAD(&q->abandoned);
sctp_s... | [
1,
0
] |
Linux Kernel | net/sctp/outqueue.c | static void __sctp_outq_teardown(struct sctp_outq *q) {
struct sctp_transport *transport;
struct list_head *lchunk, *temp;
struct sctp_chunk *chunk, *tmp;
list_for_each_entry(transport, &q->asoc->peer.transport_addr_list,
transports) {
while ((lchunk = sctp_list_dequeue(&transport->tr... | [
0,
0
] |
Linux Kernel | net/sctp/outqueue.c |
void sctp_outq_teardown(struct sctp_outq *q) {
__sctp_outq_teardown(q);
sctp_outq_init(q->asoc, q);
} | [
0,
0
] |
Linux Kernel | net/sctp/outqueue.c | static void sctp_sack_update_unack_data(struct sctp_association *assoc,
struct sctp_sackhdr *sack) {
union sctp_sack_variable *frags;
__u16 unack_data;
int i;
unack_data = assoc->next_tsn - assoc->ctsn_ack_point - 1;
frags = sack->variable;
for (i = 0; i < ntohs(sac... | [
0,
0
] |
Linux Kernel | net/sctp/outqueue.c | int sctp_outq_is_empty(const struct sctp_outq *q) {
return q->out_qlen == 0 && q->outstanding_bytes == 0 &&
list_empty(&q->retransmit);
} | [
1,
0
] |
Linux Kernel | net/sctp/outqueue.c | static int sctp_acked(struct sctp_sackhdr *sack, __u32 tsn) {
__u32 ctsn = ntohl(sack->cum_tsn_ack);
union sctp_sack_variable *frags;
__u16 tsn_offset, blocks;
int i;
if (TSN_lte(tsn, ctsn))
goto pass;
frags = sack->variable;
blocks = ntohs(sack->num_gap_ack_blocks);
tsn_offset = tsn - ctsn;
for... | [
0,
0
] |
Linux Kernel | net/sctp/outqueue.c |
static inline int sctp_get_skip_pos(struct sctp_fwdtsn_skip *skiplist,
int nskips, __be16 stream) {
int i;
for (i = 0; i < nskips; i++) {
if (skiplist[i].stream == stream)
return i;
}
return i;
} | [
0,
0
] |
Linux Kernel | net/sctp/proc.c | static int sctp_snmp_seq_show(struct seq_file *seq, void *v) {
unsigned long buff[SCTP_MIB_MAX];
struct net *net = seq->private;
int i;
memset(buff, 0, sizeof(unsigned long) * SCTP_MIB_MAX);
snmp_get_cpu_field_batch(buff, sctp_snmp_list, net->sctp.sctp_statistics);
for (i = 0; sctp_snmp_list[i].name; i++)... | [
1,
0
] |
Linux Kernel | net/sctp/proc.c | static void sctp_seq_dump_remote_addrs(struct seq_file *seq,
struct sctp_association *assoc) {
struct sctp_transport *transport;
union sctp_addr *addr, *primary;
struct sctp_af *af;
primary = &assoc->peer.primary_addr;
list_for_each_entry_rcu(transport, &assoc->peer.tra... | [
0,
0
] |
Linux Kernel | net/sctp/proc.c |
static void *sctp_eps_seq_next(struct seq_file *seq, void *v, loff_t *pos) {
if (++*pos >= sctp_ep_hashsize)
return NULL;
return pos;
} | [
0,
0
] |
Linux Kernel | net/sctp/proc.c |
static void sctp_transport_seq_stop(struct seq_file *seq, void *v) {
struct sctp_ht_iter *iter = seq->private;
if (v && v != SEQ_START_TOKEN) {
struct sctp_transport *transport = v;
sctp_transport_put(transport);
}
sctp_transport_walk_stop(&iter->hti);
} | [
1,
0
] |
Linux Kernel | net/sctp/protocol.c | static void sctp_free_local_addr_list(struct net *net) {
struct sctp_sockaddr_entry *addr;
struct list_head *pos, *temp;
list_for_each_safe(pos, temp, &net->sctp.local_addr_list) {
addr = list_entry(pos, struct sctp_sockaddr_entry, list);
list_del(pos);
kfree(addr);
}
} | [
0,
0
] |
Linux Kernel | net/sctp/protocol.c | static int sctp_v4_to_addr_param(const union sctp_addr *addr,
union sctp_addr_param *param) {
int length = sizeof(struct sctp_ipv4addr_param);
param->v4.param_hdr.type = SCTP_PARAM_IPV4_ADDRESS;
param->v4.param_hdr.length = htons(length);
param->v4.addr.s_addr = addr->v4.sin_ad... | [
1,
0
] |
Linux Kernel | net/sctp/protocol.c | static void sctp_v4_get_saddr(struct sctp_sock *sk, struct sctp_transport *t,
struct flowi *fl) {
union sctp_addr *saddr = &t->saddr;
struct rtable *rt = (struct rtable *)t->dst;
if (rt) {
saddr->v4.sin_family = AF_INET;
saddr->v4.sin_addr.s_addr = fl->u.ip4.saddr;
}
} | [
0,
0
] |
Linux Kernel | net/sctp/protocol.c | static struct sctp_sockaddr_entry *
sctp_addr_wq_lookup(struct net *net, struct sctp_sockaddr_entry *addr) {
struct sctp_sockaddr_entry *addrw;
list_for_each_entry(addrw, &net->sctp.addr_waitq, list) {
if (addrw->a.sa.sa_family != addr->a.sa.sa_family)
continue;
if (addrw->a.sa.sa_family == AF_INET) ... | [
0,
0
] |
Linux Kernel | net/sctp/protocol.c | void sctp_addr_wq_mgmt(struct net *net, struct sctp_sockaddr_entry *addr,
int cmd) {
struct sctp_sockaddr_entry *addrw;
unsigned long timeo_val;
/* first, we check if an opposite message already exist in the queue.
* If we found such message, it is removed.
* This operation is a bit ... | [
1,
0
] |
Linux Kernel | net/sctp/protocol.c | static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
void *ptr) {
struct in_ifaddr *ifa = (struct in_ifaddr *)ptr;
struct sctp_sockaddr_entry *addr = NULL;
struct sctp_sockaddr_entry *temp;
struct net *net = dev_net(ifa->ifa_dev->dev);
int found = 0;
... | [
1,
0
] |
Linux Kernel | net/sctp/protocol.c | static void sctp_inet_msgname(char *msgname, int *addr_len) {
struct sockaddr_in *sin;
sin = (struct sockaddr_in *)msgname;
*addr_len = sizeof(struct sockaddr_in);
sin->sin_family = AF_INET;
memset(sin->sin_zero, 0, sizeof(sin->sin_zero));
} | [
1,
0
] |
Linux Kernel | net/sctp/protocol.c | static int sctp_inet_af_supported(sa_family_t family, struct sctp_sock *sp) {
return AF_INET == family;
} | [
0,
0
] |
Linux Kernel | net/sctp/protocol.c | static inline int sctp_v4_xmit(struct sk_buff *skb, struct sctp_transport *t) {
struct dst_entry *dst = dst_clone(t->dst);
struct flowi4 *fl4 = &t->fl.u.ip4;
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
__u8 dscp = inet->tos;
__be16 df = 0;
pr_debug("%s: skb:%p, len:%d, src:%pI4, dst:... | [
1,
0
] |
Linux Kernel | net/sctp/protocol.c |
struct sctp_pf *sctp_get_pf_specific(sa_family_t family) {
switch (family) {
case PF_INET:
return sctp_pf_inet_specific;
case PF_INET6:
return sctp_pf_inet6_specific;
default:
return NULL;
}
} | [
0,
0
] |
Linux Kernel | net/sctp/protocol.c |
static inline void cleanup_sctp_mibs(struct net *net) {
free_percpu(net->sctp.sctp_statistics);
} | [
0,
0
] |
Linux Kernel | net/sctp/protocol.c | static void sctp_v4_pf_init(void) {
sctp_register_pf(&sctp_pf_inet, PF_INET);
sctp_register_af(&sctp_af_inet);
} | [
0,
0
] |
Linux Kernel | net/sctp/protocol.c |
static void sctp_v4_del_protocol(void) {
inet_del_protocol(&sctp_protocol, IPPROTO_SCTP);
unregister_inetaddr_notifier(&sctp_inetaddr_notifier);
} | [
0,
0
] |
Linux Kernel | net/sctp/protocol.c | static void __net_exit sctp_defaults_exit(struct net *net) {
sctp_free_addr_wq(net);
sctp_free_local_addr_list(net);
#ifdef CONFIG_PROC_FS
remove_proc_subtree("sctp", net->proc_net);
net->sctp.proc_net_sctp = NULL;
#endif
cleanup_sctp_mibs(net);
sctp_sysctl_net_unregister(net);
} | [
0,
0
] |
Linux Kernel | net/sctp/protocol.c | static int __net_init sctp_ctrlsock_init(struct net *net) {
int status;
status = sctp_ctl_sock_init(net);
if (status)
pr_err("Failed to initialize the SCTP control sock\n");
return status;
} | [
0,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | int sctp_chunk_iif(const struct sctp_chunk *chunk) {
struct sk_buff *skb = chunk->skb;
return SCTP_INPUT_CB(skb)->af->skb_iif(skb);
} | [
0,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | int sctp_init_cause(struct sctp_chunk *chunk, __be16 cause_code,
size_t paylen) {
struct sctp_errhdr err;
__u16 len;
err.cause = cause_code;
len = sizeof(err) + paylen;
err.length = htons(len);
if (skb_tailroom(chunk->skb) < len)
return -ENOSPC;
chunk->subh.err_hdr = sctp_addto_... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | struct sctp_chunk *sctp_make_datafrag_empty(const struct sctp_association *asoc,
const struct sctp_sndrcvinfo *sinfo,
int len, __u8 flags, gfp_t gfp) {
struct sctp_chunk *retval;
struct sctp_datahdr dp;
memset(&dp, 0, sizeof(... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | struct sctp_chunk *sctp_make_shutdown(const struct sctp_association *asoc,
const struct sctp_chunk *chunk) {
struct sctp_shutdownhdr shut;
struct sctp_chunk *retval;
__u32 ctsn;
ctsn = sctp_tsnmap_get_ctsn(&asoc->peer.tsn_map);
shut.cum_tsn_ack = htonl(ctsn);
retval =... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | struct sctp_chunk *sctp_make_abort_no_data(const struct sctp_association *asoc,
const struct sctp_chunk *chunk,
__u32 tsn) {
struct sctp_chunk *retval;
__be32 payload;
retval =
sctp_make_abort(asoc, chunk, sizeof(struct s... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | struct sctp_chunk *sctp_make_abort_user(const struct sctp_association *asoc,
struct msghdr *msg, size_t paylen) {
struct sctp_chunk *retval;
void *payload = NULL;
int err;
retval = sctp_make_abort(asoc, NULL, sizeof(struct sctp_errhdr) + paylen);
if (!retval)
goto ... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | static void *sctp_addto_param(struct sctp_chunk *chunk, int len,
const void *data) {
int chunklen = ntohs(chunk->chunk_hdr->length);
void *target;
target = skb_put(chunk->skb, len);
if (data)
memcpy(target, data, len);
else
memset(target, 0, len);
chunk->chunk_hdr->l... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c |
struct sctp_chunk *
sctp_make_violation_paramlen(const struct sctp_association *asoc,
const struct sctp_chunk *chunk,
struct sctp_paramhdr *param) {
static const char error[] = "The following parameter had invalid length:";
size_t payload_len =
sizeof... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c |
struct sctp_chunk *sctp_make_new_encap_port(const struct sctp_association *asoc,
const struct sctp_chunk *chunk) {
struct sctp_new_encap_port_hdr nep;
struct sctp_chunk *retval;
retval =
sctp_make_abort(asoc, chunk, sizeof(struct sctp_errhdr) + sizeof(nep));
i... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | static struct sctp_chunk *
sctp_make_op_error_space(const struct sctp_association *asoc,
const struct sctp_chunk *chunk, size_t size) {
struct sctp_chunk *retval;
retval = sctp_make_control(asoc, SCTP_CID_ERROR, 0,
sizeof(struct sctp_errhdr) + size, GFP_ATOMIC)... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | static inline struct sctp_chunk *
sctp_make_op_error_limited(const struct sctp_association *asoc,
const struct sctp_chunk *chunk) {
size_t size = SCTP_DEFAULT_MAXSEGMENT;
struct sctp_sock *sp = NULL;
if (asoc) {
size = min_t(size_t, size, asoc->pathmtu);
sp = sctp_sk(asoc->base... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | struct sctp_chunk *sctp_make_op_error(const struct sctp_association *asoc,
const struct sctp_chunk *chunk,
__be16 cause_code, const void *payload,
size_t paylen, size_t reserve_tail) {
struct sctp_chunk *... | [
0,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | void sctp_init_addrs(struct sctp_chunk *chunk, union sctp_addr *src,
union sctp_addr *dest) {
memcpy(&chunk->source, src, sizeof(union sctp_addr));
memcpy(&chunk->dest, dest, sizeof(union sctp_addr));
} | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | const union sctp_addr *sctp_source(const struct sctp_chunk *chunk) {
if (chunk->transport) {
return &chunk->transport->ipaddr;
} else {
/* Otherwise, extract it from the IP header. */
return &chunk->source;
}
} | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | static struct sctp_chunk *_sctp_make_chunk(const struct sctp_association *asoc,
__u8 type, __u8 flags, int paylen,
gfp_t gfp) {
struct sctp_chunkhdr *chunk_hdr;
struct sctp_chunk *retval;
struct sk_buff *skb;
struct sock *sk;
... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | static void sctp_chunk_destroy(struct sctp_chunk *chunk) {
BUG_ON(!list_empty(&chunk->list));
list_del_init(&chunk->transmitted_list);
consume_skb(chunk->skb);
consume_skb(chunk->auth_chunk);
SCTP_DBG_OBJCNT_DEC(chunk);
kmem_cache_free(sctp_chunk_cachep, chunk);
} | [
0,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | void sctp_chunk_free(struct sctp_chunk *chunk) {
if (chunk->msg)
sctp_datamsg_put(chunk->msg);
sctp_chunk_put(chunk);
} | [
0,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | void sctp_chunk_put(struct sctp_chunk *ch) {
if (refcount_dec_and_test(&ch->refcnt))
sctp_chunk_destroy(ch);
} | [
0,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | int sctp_user_addto_chunk(struct sctp_chunk *chunk, int len,
struct iov_iter *from) {
void *target;
target = skb_put(chunk->skb, len);
/* Copy data (whole iovec) into chunk */
if (!copy_from_iter_full(target, len, from))
return -EFAULT;
/* Adjust the chunk length field. */
... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep,
struct sctp_chunk *chunk,
gfp_t gfp) {
struct sctp_association *asoc;
enum sctp_scope scope;
struct sk_buff *skb;
scope = sctp_scope(sctp_source... | [
0,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | static int sctp_process_inv_mandatory(const struct sctp_association *asoc,
struct sctp_chunk *chunk,
struct sctp_chunk **errp) {
if (!*errp)
*errp = sctp_make_op_error_space(asoc, chunk, 0);
if (*errp)
sctp_init_cause(*errp, SCTP_... | [
0,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | static int sctp_process_inv_paramlength(const struct sctp_association *asoc,
struct sctp_paramhdr *param,
const struct sctp_chunk *chunk,
struct sctp_chunk **errp) {
if (*errp)
sctp_chunk_free(... | [
0,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | __u32 sctp_generate_tag(const struct sctp_endpoint *ep) {
__u32 x;
do {
get_random_bytes(&x, sizeof(__u32));
} while (x == 0);
return x;
} | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | static struct sctp_chunk *sctp_make_asconf(struct sctp_association *asoc,
union sctp_addr *addr,
int vparam_len) {
struct sctp_addiphdr asconf;
struct sctp_chunk *retval;
int length = sizeof(asconf) + vparam_len;
union sctp_ad... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | static void sctp_add_asconf_response(struct sctp_chunk *chunk, __be32 crr_id,
__be16 err_code,
struct sctp_addip_param *asconf_param) {
struct sctp_addip_param ack_param;
struct sctp_errhdr err_param;
int asconf_param_len = 0;
int err_par... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | static void sctp_asconf_param_success(struct sctp_association *asoc,
struct sctp_addip_param *asconf_param) {
struct sctp_bind_addr *bp = &asoc->base.bind_addr;
union sctp_addr_param *addr_param;
struct sctp_sockaddr_entry *saddr;
struct sctp_transport *transport;
union s... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | struct sctp_chunk *sctp_make_strreset_req(const struct sctp_association *asoc,
__u16 stream_num, __be16 *stream_list,
bool out, bool in) {
__u16 stream_len = stream_num * sizeof(__u16);
struct sctp_strreset_outreq outreq;
struct s... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | struct sctp_chunk *
sctp_make_strreset_tsnreq(const struct sctp_association *asoc) {
struct sctp_strreset_tsnreq tsnreq;
__u16 length = sizeof(tsnreq);
struct sctp_chunk *retval;
retval = sctp_make_reconf(asoc, length);
if (!retval)
return NULL;
tsnreq.param_hdr.type = SCTP_PARAM_RESET_TSN_REQUEST;
... | [
1,
0
] |
Linux Kernel | net/sctp/sm_make_chunk.c | struct sctp_chunk *sctp_make_strreset_tsnresp(struct sctp_association *asoc,
__u32 result, __u32 sn,
__u32 sender_tsn,
__u32 receiver_tsn) {
struct sctp_strreset_resptsn tsnresp;
... | [
1,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c |
static void sctp_generate_t1_cookie_event(struct timer_list *t) {
struct sctp_association *asoc =
from_timer(asoc, t, timers[SCTP_EVENT_TIMEOUT_T1_COOKIE]);
sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T1_COOKIE);
} | [
0,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c |
static void sctp_generate_t2_shutdown_event(struct timer_list *t) {
struct sctp_association *asoc =
from_timer(asoc, t, timers[SCTP_EVENT_TIMEOUT_T2_SHUTDOWN]);
sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T2_SHUTDOWN);
} | [
0,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c |
static void sctp_generate_t5_shutdown_guard_event(struct timer_list *t) {
struct sctp_association *asoc =
from_timer(asoc, t, timers[SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD]);
sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD);
} | [
0,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c | void sctp_generate_heartbeat_event(struct timer_list *t) {
struct sctp_transport *transport = from_timer(transport, t, hb_timer);
struct sctp_association *asoc = transport->asoc;
struct sock *sk = asoc->base.sk;
struct net *net = sock_net(sk);
u32 elapsed, timeout;
int error = 0;
bh_lock_sock(sk);
if (... | [
0,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c | void sctp_generate_proto_unreach_event(struct timer_list *t) {
struct sctp_transport *transport =
from_timer(transport, t, proto_unreach_timer);
struct sctp_association *asoc = transport->asoc;
struct sock *sk = asoc->base.sk;
struct net *net = sock_net(sk);
bh_lock_sock(sk);
if (sock_owned_by_user(s... | [
0,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c | void sctp_generate_reconf_event(struct timer_list *t) {
struct sctp_transport *transport = from_timer(transport, t, reconf_timer);
struct sctp_association *asoc = transport->asoc;
struct sock *sk = asoc->base.sk;
struct net *net = sock_net(sk);
int error = 0;
bh_lock_sock(sk);
if (sock_owned_by_user(sk))... | [
0,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c | static void sctp_generate_sack_event(struct timer_list *t) {
struct sctp_association *asoc =
from_timer(asoc, t, timers[SCTP_EVENT_TIMEOUT_SACK]);
sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_SACK);
} | [
0,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c | static void sctp_cmd_assoc_failed(struct sctp_cmd_seq *commands,
struct sctp_association *asoc,
enum sctp_event_type event_type,
union sctp_subtype subtype,
struct sctp_chunk *chunk,
... | [
0,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c | static void sctp_cmd_hb_timers_stop(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc) {
struct sctp_transport *t;
list_for_each_entry(t, &asoc->peer.transport_addr_list, transports) {
if (del_timer(&t->hb_timer))
sctp_transport_put(t);
}
} | [
0,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c | static void sctp_cmd_t3_rtx_timers_stop(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc) {
struct sctp_transport *t;
list_for_each_entry(t, &asoc->peer.transport_addr_list, transports) {
if (del_timer(&t->T3_rtx_timer))
sctp_transport_put(t);
}
} | [
0,
0
] |
Linux Kernel | net/sctp/sm_sideeffect.c | static void sctp_cmd_delete_tcb(struct sctp_cmd_seq *cmds,
struct sctp_association *asoc) {
struct sock *sk = asoc->base.sk;
if (sctp_style(sk, TCP) && sctp_sstate(sk, LISTENING) && (!asoc->temp) &&
(sk->sk_shutdown != SHUTDOWN_MASK))
return;
sctp_association_free(asoc)... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.