/Linux-v4.19/net/sctp/ |
D | associola.c | 58 static void sctp_select_active_and_retran_path(struct sctp_association *asoc); 60 static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc); 61 static void sctp_assoc_free_asconf_queue(struct sctp_association *asoc); 67 struct sctp_association *asoc, in sctp_association_init() argument 81 asoc->ep = (struct sctp_endpoint *)ep; in sctp_association_init() 82 asoc->base.sk = (struct sock *)sk; in sctp_association_init() 84 sctp_endpoint_hold(asoc->ep); in sctp_association_init() 85 sock_hold(asoc->base.sk); in sctp_association_init() 88 asoc->base.type = SCTP_EP_TYPE_ASSOCIATION; in sctp_association_init() 91 refcount_set(&asoc->base.refcnt, 1); in sctp_association_init() [all …]
|
D | sm_sideeffect.c | 59 struct sctp_association *asoc, 68 struct sctp_association **asoc, 79 static void sctp_do_ecn_ce_work(struct sctp_association *asoc, in sctp_do_ecn_ce_work() argument 84 asoc->last_ecne_tsn = lowest_tsn; in sctp_do_ecn_ce_work() 85 asoc->need_ecne = 1; in sctp_do_ecn_ce_work() 100 static struct sctp_chunk *sctp_do_ecn_ecne_work(struct sctp_association *asoc, in sctp_do_ecn_ecne_work() argument 116 if (TSN_lt(asoc->last_cwr_tsn, lowest_tsn)) { in sctp_do_ecn_ecne_work() 122 transport = sctp_assoc_lookup_tsn(asoc, lowest_tsn); in sctp_do_ecn_ecne_work() 128 asoc->last_cwr_tsn = lowest_tsn; in sctp_do_ecn_ecne_work() 134 repl = sctp_make_cwr(asoc, asoc->last_cwr_tsn, chunk); in sctp_do_ecn_ecne_work() [all …]
|
D | stream.c | 94 struct sctp_association *asoc; in sctp_stream_outq_migrate() local 99 asoc = container_of(stream, struct sctp_association, stream); in sctp_stream_outq_migrate() 100 outq = &asoc->outqueue; in sctp_stream_outq_migrate() 115 if (asoc->peer.prsctp_capable && in sctp_stream_outq_migrate() 117 asoc->sent_cnt_removable--; in sctp_stream_outq_migrate() 291 static int sctp_send_reconf(struct sctp_association *asoc, in sctp_send_reconf() argument 294 struct net *net = sock_net(asoc->base.sk); in sctp_send_reconf() 297 retval = sctp_primitive_RECONF(net, asoc, chunk); in sctp_send_reconf() 307 struct sctp_association *asoc; in sctp_stream_outq_is_empty() local 310 asoc = container_of(stream, struct sctp_association, stream); in sctp_stream_outq_is_empty() [all …]
|
D | sm_statefuns.c | 68 const struct sctp_association *asoc, 71 static int sctp_eat_data(const struct sctp_association *asoc, 76 const struct sctp_association *asoc, 80 const struct sctp_association *asoc, 87 const struct sctp_association *asoc, 94 const struct sctp_association *asoc, 101 const struct sctp_association *asoc, 111 const struct sctp_association *asoc, 117 const struct sctp_association *asoc, 126 const struct sctp_association *asoc, [all …]
|
D | sm_make_chunk.c | 64 static struct sctp_chunk *sctp_make_control(const struct sctp_association *asoc, 67 static struct sctp_chunk *sctp_make_data(const struct sctp_association *asoc, 69 static struct sctp_chunk *_sctp_make_chunk(const struct sctp_association *asoc, 74 const struct sctp_association *asoc, 78 static int sctp_process_param(struct sctp_association *asoc, 92 struct sctp_association *asoc = chunk->asoc; in sctp_control_release_owner() local 102 ev = sctp_ulpevent_make_authkey(asoc, shkey->key_id, in sctp_control_release_owner() 106 asoc->stream.si->enqueue_event(&asoc->ulpq, ev); in sctp_control_release_owner() 114 struct sctp_association *asoc = chunk->asoc; in sctp_control_set_owner_w() local 125 chunk->shkey = asoc->shkey; in sctp_control_set_owner_w() [all …]
|
D | auth.c | 237 const struct sctp_association *asoc, in sctp_auth_make_local_vector() argument 241 (struct sctp_random_param *)asoc->c.auth_random, in sctp_auth_make_local_vector() 242 (struct sctp_chunks_param *)asoc->c.auth_chunks, in sctp_auth_make_local_vector() 243 (struct sctp_hmac_algo_param *)asoc->c.auth_hmacs, gfp); in sctp_auth_make_local_vector() 248 const struct sctp_association *asoc, in sctp_auth_make_peer_vector() argument 251 return sctp_auth_make_key_vector(asoc->peer.peer_random, in sctp_auth_make_peer_vector() 252 asoc->peer.peer_chunks, in sctp_auth_make_peer_vector() 253 asoc->peer.peer_hmacs, in sctp_auth_make_peer_vector() 302 const struct sctp_association *asoc, in sctp_auth_asoc_create_secret() argument 326 local_key_vector = sctp_auth_make_local_vector(asoc, gfp); in sctp_auth_asoc_create_secret() [all …]
|
D | stream_sched.c | 75 struct sctp_stream *stream = &q->asoc->stream; in sctp_sched_fcfs_dequeue() 144 int sctp_sched_set_sched(struct sctp_association *asoc, in sctp_sched_set_sched() argument 148 struct sctp_sched_ops *old = asoc->outqueue.sched; in sctp_sched_set_sched() 160 old->free(&asoc->stream); in sctp_sched_set_sched() 163 for (i = 0; i < asoc->stream.outcnt; i++) { in sctp_sched_set_sched() 164 void *p = SCTP_SO(&asoc->stream, i)->ext; in sctp_sched_set_sched() 175 asoc->outqueue.sched = n; in sctp_sched_set_sched() 176 n->init(&asoc->stream); in sctp_sched_set_sched() 177 for (i = 0; i < asoc->stream.outcnt; i++) { in sctp_sched_set_sched() 178 if (!SCTP_SO(&asoc->stream, i)->ext) in sctp_sched_set_sched() [all …]
|
D | transport.c | 151 sctp_association_put(transport->asoc); in sctp_transport_free() 179 if (transport->asoc) in sctp_transport_destroy() 180 sctp_association_put(transport->asoc); in sctp_transport_destroy() 229 struct sctp_association *asoc) in sctp_transport_set_owner() argument 231 transport->asoc = asoc; in sctp_transport_set_owner() 232 sctp_association_hold(asoc); in sctp_transport_set_owner() 246 struct sctp_association *asoc = transport->asoc; in sctp_transport_pmtu() local 248 if (!transport->pathmtu && asoc && asoc->pathmtu) in sctp_transport_pmtu() 249 transport->pathmtu = asoc->pathmtu; in sctp_transport_pmtu() 263 struct sock *sk = t->asoc->base.sk; in sctp_transport_update_pmtu() [all …]
|
D | socket.c | 88 static int sctp_wait_for_sndbuf(struct sctp_association *asoc, long *timeo_p, 101 static int sctp_send_asconf(struct sctp_association *asoc, 120 static inline int sctp_wspace(struct sctp_association *asoc) in sctp_wspace() argument 124 if (asoc->ep->sndbuf_policy) in sctp_wspace() 125 amt = asoc->sndbuf_used; in sctp_wspace() 127 amt = sk_wmem_alloc_get(asoc->base.sk); in sctp_wspace() 129 if (amt >= asoc->base.sk->sk_sndbuf) { in sctp_wspace() 130 if (asoc->base.sk->sk_userlocks & SOCK_SNDBUF_LOCK) in sctp_wspace() 133 amt = sk_stream_wspace(asoc->base.sk); in sctp_wspace() 138 amt = asoc->base.sk->sk_sndbuf - amt; in sctp_wspace() [all …]
|
D | ulpevent.c | 47 struct sctp_association *asoc); 92 const struct sctp_association *asoc) in sctp_ulpevent_set_owner() argument 100 sctp_association_hold((struct sctp_association *)asoc); in sctp_ulpevent_set_owner() 102 event->asoc = (struct sctp_association *)asoc; in sctp_ulpevent_set_owner() 103 atomic_add(event->rmem_len, &event->asoc->rmem_alloc); in sctp_ulpevent_set_owner() 104 sctp_skb_set_owner_r(skb, asoc->base.sk); in sctp_ulpevent_set_owner() 106 chunk->head_skb->sk = asoc->base.sk; in sctp_ulpevent_set_owner() 112 struct sctp_association *asoc = event->asoc; in sctp_ulpevent_release_owner() local 114 atomic_sub(event->rmem_len, &asoc->rmem_alloc); in sctp_ulpevent_release_owner() 115 sctp_association_put(asoc); in sctp_ulpevent_release_owner() [all …]
|
D | outqueue.c | 83 oute = SCTP_SO(&q->asoc->stream, stream)->ext; in sctp_outq_head_data() 104 oute = SCTP_SO(&q->asoc->stream, stream)->ext; in sctp_outq_tail_data() 205 void sctp_outq_init(struct sctp_association *asoc, struct sctp_outq *q) in sctp_outq_init() argument 209 q->asoc = asoc; in sctp_outq_init() 215 sctp_sched_set_sched(asoc, SCTP_SS_FCFS); in sctp_outq_init() 227 list_for_each_entry(transport, &q->asoc->peer.transport_addr_list, in __sctp_outq_teardown() 284 sctp_outq_init(q->asoc, q); in sctp_outq_teardown() 297 struct net *net = sock_net(q->asoc->base.sk); in sctp_outq_tail() 314 if (chunk->asoc->peer.prsctp_capable && in sctp_outq_tail() 316 chunk->asoc->sent_cnt_removable++; in sctp_outq_tail() [all …]
|
D | chunk.c | 93 struct sctp_association *asoc = NULL; in sctp_datamsg_destroy() local 105 asoc = chunk->asoc; in sctp_datamsg_destroy() 109 error = asoc->outqueue.error; in sctp_datamsg_destroy() 111 sp = sctp_sk(asoc->base.sk); in sctp_datamsg_destroy() 124 ev = sctp_ulpevent_make_send_failed(asoc, chunk, sent, in sctp_datamsg_destroy() 127 asoc->stream.si->enqueue_event(&asoc->ulpq, ev); in sctp_datamsg_destroy() 165 struct sctp_datamsg *sctp_datamsg_from_user(struct sctp_association *asoc, in sctp_datamsg_from_user() argument 184 if (asoc->peer.prsctp_capable && sinfo->sinfo_timetolive && in sctp_datamsg_from_user() 193 max_data = asoc->frag_point; in sctp_datamsg_from_user() 199 if (sctp_auth_send_cid(SCTP_CID_DATA, asoc)) { in sctp_datamsg_from_user() [all …]
|
D | output.c | 92 struct sctp_association *asoc = tp->asoc; in sctp_packet_config() local 106 if (asoc) { in sctp_packet_config() 107 sk = asoc->base.sk; in sctp_packet_config() 113 if (!asoc) in sctp_packet_config() 119 if (asoc->param_flags & SPP_PMTUD_ENABLE) in sctp_packet_config() 120 sctp_assoc_sync_pmtu(asoc); in sctp_packet_config() 123 if (asoc->pmtu_pending) { in sctp_packet_config() 124 if (asoc->param_flags & SPP_PMTUD_ENABLE) in sctp_packet_config() 125 sctp_assoc_sync_pmtu(asoc); in sctp_packet_config() 126 asoc->pmtu_pending = 0; in sctp_packet_config() [all …]
|
D | input.c | 100 struct sctp_association *asoc; in sctp_rcv() local 171 asoc = __sctp_rcv_lookup(net, skb, &src, &dest, &transport); in sctp_rcv() 173 if (!asoc) in sctp_rcv() 177 rcvr = asoc ? &asoc->base : &ep->base; in sctp_rcv() 187 asoc = NULL; in sctp_rcv() 207 if (!asoc) { in sctp_rcv() 222 chunk = sctp_chunkify(skb, asoc, sk, GFP_ATOMIC); in sctp_rcv() 391 void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc, in sctp_icmp_frag_needed() argument 399 asoc->pmtu_pending = 1; in sctp_icmp_frag_needed() 419 sctp_assoc_sync_pmtu(asoc); in sctp_icmp_frag_needed() [all …]
|
D | diag.c | 43 struct sctp_association *asoc) in inet_diag_msg_sctpasoc_fill() argument 47 struct timer_list *t3_rtx = &asoc->peer.primary_path->T3_rtx_timer; in inet_diag_msg_sctpasoc_fill() 49 laddr = list_entry(asoc->base.bind_addr.address_list.next, in inet_diag_msg_sctpasoc_fill() 51 paddr = asoc->peer.primary_path->ipaddr; in inet_diag_msg_sctpasoc_fill() 52 dst = asoc->peer.primary_path->dst; in inet_diag_msg_sctpasoc_fill() 55 r->id.idiag_sport = htons(asoc->base.bind_addr.port); in inet_diag_msg_sctpasoc_fill() 56 r->id.idiag_dport = htons(asoc->peer.port); in inet_diag_msg_sctpasoc_fill() 74 r->idiag_state = asoc->state; in inet_diag_msg_sctpasoc_fill() 77 r->idiag_retrans = asoc->rtx_data_chunks; in inet_diag_msg_sctpasoc_fill() 113 struct sctp_association *asoc) in inet_diag_msg_sctpaddrs_fill() argument [all …]
|
D | endpointola.c | 209 struct sctp_association *asoc) in sctp_endpoint_add_asoc() argument 217 if (asoc->temp) in sctp_endpoint_add_asoc() 221 list_add_tail(&asoc->asocs, &ep->asocs); in sctp_endpoint_add_asoc() 326 struct sctp_association *asoc = NULL; in sctp_endpoint_lookup_assoc() local 343 asoc = t->asoc; in sctp_endpoint_lookup_assoc() 346 return asoc; in sctp_endpoint_lookup_assoc() 379 struct sctp_association *asoc; in sctp_endpoint_bh_rcv() local 393 asoc = NULL; in sctp_endpoint_bh_rcv() 430 if (NULL == chunk->asoc) { in sctp_endpoint_bh_rcv() 431 asoc = sctp_endpoint_lookup_assoc(ep, in sctp_endpoint_bh_rcv() [all …]
|
D | ulpqueue.c | 57 struct sctp_association *asoc) in sctp_ulpq_init() argument 61 ulpq->asoc = asoc; in sctp_ulpq_init() 108 event = sctp_ulpevent_make_rcvmsg(chunk->asoc, chunk, gfp); in sctp_ulpq_tail_data() 142 int sctp_clear_pd(struct sock *sk, struct sctp_association *asoc) in sctp_clear_pd() argument 161 if (!skb_queue_empty(&sp->pd_lobby) && asoc) { in sctp_clear_pd() 167 if (event->asoc == asoc) { in sctp_clear_pd() 182 struct sctp_sock *sp = sctp_sk(ulpq->asoc->base.sk); in sctp_ulpq_set_pd() 193 return sctp_clear_pd(ulpq->asoc->base.sk, ulpq->asoc); in sctp_ulpq_clear_pd() 201 struct sock *sk = ulpq->asoc->base.sk; in sctp_ulpq_tail_event() 430 struct sctp_association *asoc; in sctp_ulpq_retrieve_reassembled() local [all …]
|
D | stream_interleave.c | 40 const struct sctp_association *asoc, in sctp_make_idatafrag_empty() argument 53 retval = sctp_make_idata(asoc, flags, sizeof(dp) + len, gfp); in sctp_make_idatafrag_empty() 74 stream = &chunk->asoc->stream; in sctp_chunk_assign_mid() 113 stream = &chunk->asoc->stream; in sctp_validate_data() 132 stream = &chunk->asoc->stream; in sctp_validate_idata() 200 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_retrieve_partial() 252 retval = sctp_make_reassembled_event(sock_net(ulpq->asoc->base.sk), in sctp_intl_retrieve_partial() 270 struct sctp_association *asoc = ulpq->asoc; in sctp_intl_retrieve_reassembled() local 281 sin = sctp_stream_in(&ulpq->asoc->stream, event->stream); in sctp_intl_retrieve_reassembled() 335 pd_point = sctp_sk(asoc->base.sk)->pd_point; in sctp_intl_retrieve_reassembled() [all …]
|
D | primitive.c | 53 int sctp_primitive_ ## name(struct net *net, struct sctp_association *asoc, \ 62 state = asoc ? asoc->state : SCTP_STATE_CLOSED; \ 63 ep = asoc ? asoc->ep : NULL; \ 65 error = sctp_do_sm(net, event_type, subtype, state, ep, asoc, \
|
D | stream_sched_rr.c | 122 stream = &q->asoc->stream; in sctp_sched_rr_enqueue() 128 struct sctp_stream *stream = &q->asoc->stream; in sctp_sched_rr_dequeue() 157 soute = SCTP_SO(&q->asoc->stream, sid)->ext; in sctp_sched_rr_dequeue_done() 159 sctp_sched_rr_next_stream(&q->asoc->stream); in sctp_sched_rr_dequeue_done() 162 sctp_sched_rr_unsched(&q->asoc->stream, soute); in sctp_sched_rr_dequeue_done() 167 struct sctp_association *asoc; in sctp_sched_rr_sched_all() local 171 asoc = container_of(stream, struct sctp_association, stream); in sctp_sched_rr_sched_all() 172 list_for_each_entry(ch, &asoc->outqueue.out_chunk_list, list) { in sctp_sched_rr_sched_all()
|
/Linux-v4.19/include/net/sctp/ |
D | sm.h | 71 const struct sctp_association *asoc, 187 struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc, 190 struct sctp_chunk *sctp_make_init_ack(const struct sctp_association *asoc, 193 struct sctp_chunk *sctp_make_cookie_echo(const struct sctp_association *asoc, 195 struct sctp_chunk *sctp_make_cookie_ack(const struct sctp_association *asoc, 197 struct sctp_chunk *sctp_make_cwr(const struct sctp_association *asoc, 200 struct sctp_chunk *sctp_make_idata(const struct sctp_association *asoc, 202 struct sctp_chunk *sctp_make_ifwdtsn(const struct sctp_association *asoc, 205 struct sctp_chunk *sctp_make_datafrag_empty(const struct sctp_association *asoc, 208 struct sctp_chunk *sctp_make_ecne(const struct sctp_association *asoc, [all …]
|
D | auth.h | 88 int sctp_auth_asoc_init_active_key(struct sctp_association *asoc, gfp_t gfp); 90 const struct sctp_association *asoc, 93 struct sctp_association *asoc, 98 struct sctp_hmac *sctp_auth_asoc_get_hmac(const struct sctp_association *asoc); 99 void sctp_auth_asoc_set_default_hmac(struct sctp_association *asoc, 101 int sctp_auth_asoc_verify_hmac_id(const struct sctp_association *asoc, 104 const struct sctp_association *asoc); 106 const struct sctp_association *asoc); 107 void sctp_auth_calculate_hmac(const struct sctp_association *asoc, 117 int sctp_auth_set_key(struct sctp_endpoint *ep, struct sctp_association *asoc, [all …]
|
D | ulpevent.h | 54 struct sctp_association *asoc; member 89 const struct sctp_association *asoc, 99 const struct sctp_association *asoc, 107 const struct sctp_association *asoc, 112 const struct sctp_association *asoc, 119 const struct sctp_association *asoc, 124 const struct sctp_association *asoc, 129 const struct sctp_association *asoc, gfp_t gfp); 131 struct sctp_ulpevent *sctp_ulpevent_make_rcvmsg(struct sctp_association *asoc, 136 const struct sctp_association *asoc, __u16 key_id, [all …]
|
D | sctp.h | 116 struct sctp_association *asoc); 135 int sctp_get_sctp_info(struct sock *sk, struct sctp_association *asoc, 147 int sctp_primitive_RECONF(struct net *net, struct sctp_association *asoc, 166 struct sctp_association *asoc, 200 int sctp_send_reset_streams(struct sctp_association *asoc, 202 int sctp_send_reset_assoc(struct sctp_association *asoc); 203 int sctp_send_add_streams(struct sctp_association *asoc, 273 static inline void sctp_max_rto(struct sctp_association *asoc, in sctp_max_rto() argument 276 if (asoc->stats.max_obs_rto < (__u64)trans->rto) { in sctp_max_rto() 277 asoc->stats.max_obs_rto = trans->rto; in sctp_max_rto() [all …]
|
/Linux-v4.19/include/trace/events/ |
D | sctp.h | 14 const struct sctp_association *asoc), 16 TP_ARGS(sp, asoc), 19 __field(__u64, asoc) 31 __entry->asoc = (unsigned long)asoc; 32 __entry->primary = (sp == asoc->peer.primary_path); 44 __entry->asoc, __entry->primary ? "(*)" : "", 53 const struct sctp_association *asoc, 56 TP_ARGS(ep, asoc, chunk), 59 __field(__u64, asoc) 71 __entry->asoc = (unsigned long)asoc; [all …]
|