Lines Matching refs:base
39 * Initialize the base fields of the endpoint structure.
63 /* Initialize the base structure. */
65 ep->base.type = SCTP_EP_TYPE_SOCKET;
68 refcount_set(&ep->base.refcnt, 1);
69 ep->base.dead = false;
72 sctp_inq_init(&ep->base.inqueue);
75 sctp_inq_set_th_handler(&ep->base.inqueue, sctp_endpoint_bh_rcv);
78 sctp_bind_addr_init(&ep->base.bind_addr, 0);
112 ep->base.sk = sk;
113 ep->base.net = sock_net(sk);
114 sock_hold(ep->base.sk);
154 struct sock *sk = ep->base.sk;
176 ep->base.dead = true;
178 inet_sk_set_state(ep->base.sk, SCTP_SS_CLOSED);
190 struct sock *sk = ep->base.sk;
203 if (unlikely(!ep->base.dead)) {
218 sctp_inq_free(&ep->base.inqueue);
219 sctp_bind_addr_free(&ep->base.bind_addr);
223 sk = ep->base.sk;
234 return refcount_inc_not_zero(&ep->base.refcnt);
242 if (refcount_dec_and_test(&ep->base.refcnt))
252 int bound_dev_if = READ_ONCE(ep->base.sk->sk_bound_dev_if);
255 if (net_eq(ep->base.net, net) &&
257 (htons(ep->base.bind_addr.port) == laddr->v4.sin_port)) {
258 if (sctp_bind_addr_match(&ep->base.bind_addr, laddr,
259 sctp_sk(ep->base.sk)))
283 if (!ep->base.bind_addr.port)
304 int bound_dev_if = READ_ONCE(ep->base.sk->sk_bound_dev_if);
306 struct net *net = ep->base.net;
309 bp = &ep->base.bind_addr;
329 base.inqueue.immediate);
341 if (ep->base.dead)
345 inqueue = &ep->base.inqueue;
346 sk = ep->base.sk;
399 SCTP_INC_STATS(ep->base.net, SCTP_MIB_INCTRLCHUNKS);