Home
last modified time | relevance | path

Searched refs:sk (Results 1 – 25 of 701) sorted by relevance

12345678910>>...29

/Linux-v4.19/include/net/
Dsock.h86 #define SOCK_DEBUG(sk, msg...) do { if ((sk) && sock_flag((sk), SOCK_DBG)) \ argument
91 void SOCK_DEBUG(const struct sock *sk, const char *msg, ...) in SOCK_DEBUG() argument
494 void (*sk_state_change)(struct sock *sk);
495 void (*sk_data_ready)(struct sock *sk);
496 void (*sk_write_space)(struct sock *sk);
497 void (*sk_error_report)(struct sock *sk);
498 int (*sk_backlog_rcv)(struct sock *sk,
501 struct sk_buff* (*sk_validate_xmit_skb)(struct sock *sk,
505 void (*sk_destruct)(struct sock *sk);
516 #define __sk_user_data(sk) ((*((void __rcu **)&(sk)->sk_user_data))) argument
[all …]
Dllc_c_ev.h128 typedef int (*llc_conn_ev_t)(struct sock *sk, struct sk_buff *skb);
129 typedef int (*llc_conn_ev_qfyr_t)(struct sock *sk, struct sk_buff *skb);
131 int llc_conn_ev_conn_req(struct sock *sk, struct sk_buff *skb);
132 int llc_conn_ev_data_req(struct sock *sk, struct sk_buff *skb);
133 int llc_conn_ev_disc_req(struct sock *sk, struct sk_buff *skb);
134 int llc_conn_ev_rst_req(struct sock *sk, struct sk_buff *skb);
135 int llc_conn_ev_local_busy_detected(struct sock *sk, struct sk_buff *skb);
136 int llc_conn_ev_local_busy_cleared(struct sock *sk, struct sk_buff *skb);
137 int llc_conn_ev_rx_bad_pdu(struct sock *sk, struct sk_buff *skb);
138 int llc_conn_ev_rx_disc_cmd_pbit_set_x(struct sock *sk, struct sk_buff *skb);
[all …]
Dllc_c_ac.h90 typedef int (*llc_conn_action_t)(struct sock *sk, struct sk_buff *skb);
92 int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb);
93 int llc_conn_ac_conn_ind(struct sock *sk, struct sk_buff *skb);
94 int llc_conn_ac_conn_confirm(struct sock *sk, struct sk_buff *skb);
95 int llc_conn_ac_data_ind(struct sock *sk, struct sk_buff *skb);
96 int llc_conn_ac_disc_ind(struct sock *sk, struct sk_buff *skb);
97 int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb);
98 int llc_conn_ac_rst_confirm(struct sock *sk, struct sk_buff *skb);
99 int llc_conn_ac_clear_remote_busy_if_f_eq_1(struct sock *sk,
101 int llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2(struct sock *sk,
[all …]
/Linux-v4.19/net/bluetooth/
Dsco.c49 struct sock *sk; member
57 static void sco_sock_close(struct sock *sk);
58 static void sco_sock_kill(struct sock *sk);
61 #define sco_pi(sk) ((struct sco_pinfo *) sk) argument
78 struct sock *sk = from_timer(sk, t, sk_timer); in sco_sock_timeout() local
80 BT_DBG("sock %p state %d", sk, sk->sk_state); in sco_sock_timeout()
82 bh_lock_sock(sk); in sco_sock_timeout()
83 sk->sk_err = ETIMEDOUT; in sco_sock_timeout()
84 sk->sk_state_change(sk); in sco_sock_timeout()
85 bh_unlock_sock(sk); in sco_sock_timeout()
[all …]
Daf_bluetooth.c69 void bt_sock_reclassify_lock(struct sock *sk, int proto) in bt_sock_reclassify_lock() argument
71 BUG_ON(!sk); in bt_sock_reclassify_lock()
72 BUG_ON(!sock_allow_reclassification(sk)); in bt_sock_reclassify_lock()
74 sock_lock_init_class_and_name(sk, in bt_sock_reclassify_lock()
132 bt_sock_reclassify_lock(sock->sk, proto); in bt_sock_create()
141 void bt_sock_link(struct bt_sock_list *l, struct sock *sk) in bt_sock_link() argument
144 sk_add_node(sk, &l->head); in bt_sock_link()
149 void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk) in bt_sock_unlink() argument
152 sk_del_node_init(sk); in bt_sock_unlink()
157 void bt_accept_enqueue(struct sock *parent, struct sock *sk) in bt_accept_enqueue() argument
[all …]
Dl2cap_sock.c45 static void l2cap_sock_init(struct sock *sk, struct sock *parent);
83 struct sock *sk = sock->sk; in l2cap_sock_bind() local
84 struct l2cap_chan *chan = l2cap_pi(sk)->chan; in l2cap_sock_bind()
88 BT_DBG("sk %p", sk); in l2cap_sock_bind()
111 lock_sock(sk); in l2cap_sock_bind()
113 if (sk->sk_state != BT_OPEN) { in l2cap_sock_bind()
168 sk->sk_state = BT_BOUND; in l2cap_sock_bind()
171 release_sock(sk); in l2cap_sock_bind()
178 struct sock *sk = sock->sk; in l2cap_sock_connect() local
179 struct l2cap_chan *chan = l2cap_pi(sk)->chan; in l2cap_sock_connect()
[all …]
/Linux-v4.19/net/ipv4/
Dtcp_timer.c25 static u32 tcp_retransmit_stamp(const struct sock *sk) in tcp_retransmit_stamp() argument
27 u32 start_ts = tcp_sk(sk)->retrans_stamp; in tcp_retransmit_stamp()
30 struct sk_buff *head = tcp_rtx_queue_head(sk); in tcp_retransmit_stamp()
39 static u32 tcp_clamp_rto_to_user_timeout(const struct sock *sk) in tcp_clamp_rto_to_user_timeout() argument
41 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_clamp_rto_to_user_timeout()
44 start_ts = tcp_retransmit_stamp(sk); in tcp_clamp_rto_to_user_timeout()
47 elapsed = tcp_time_stamp(tcp_sk(sk)) - start_ts; in tcp_clamp_rto_to_user_timeout()
61 static void tcp_write_err(struct sock *sk) in tcp_write_err() argument
63 sk->sk_err = sk->sk_err_soft ? : ETIMEDOUT; in tcp_write_err()
64 sk->sk_error_report(sk); in tcp_write_err()
[all …]
Dtcp_bbr.c177 static void bbr_check_probe_rtt_done(struct sock *sk);
180 static bool bbr_full_bw_reached(const struct sock *sk) in bbr_full_bw_reached() argument
182 const struct bbr *bbr = inet_csk_ca(sk); in bbr_full_bw_reached()
188 static u32 bbr_max_bw(const struct sock *sk) in bbr_max_bw() argument
190 struct bbr *bbr = inet_csk_ca(sk); in bbr_max_bw()
196 static u32 bbr_bw(const struct sock *sk) in bbr_bw() argument
198 struct bbr *bbr = inet_csk_ca(sk); in bbr_bw()
200 return bbr->lt_use_bw ? bbr->lt_bw : bbr_max_bw(sk); in bbr_bw()
207 static u64 bbr_rate_bytes_per_sec(struct sock *sk, u64 rate, int gain) in bbr_rate_bytes_per_sec() argument
209 unsigned int mss = tcp_sk(sk)->mss_cache; in bbr_rate_bytes_per_sec()
[all …]
Dinet_hashtables.c47 static u32 sk_ehashfn(const struct sock *sk) in sk_ehashfn() argument
50 if (sk->sk_family == AF_INET6 && in sk_ehashfn()
51 !ipv6_addr_v4mapped(&sk->sk_v6_daddr)) in sk_ehashfn()
52 return inet6_ehashfn(sock_net(sk), in sk_ehashfn()
53 &sk->sk_v6_rcv_saddr, sk->sk_num, in sk_ehashfn()
54 &sk->sk_v6_daddr, sk->sk_dport); in sk_ehashfn()
56 return inet_ehashfn(sock_net(sk), in sk_ehashfn()
57 sk->sk_rcv_saddr, sk->sk_num, in sk_ehashfn()
58 sk->sk_daddr, sk->sk_dport); in sk_ehashfn()
94 void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, in inet_bind_hash() argument
[all …]
/Linux-v4.19/net/smc/
Dsmc_close.c26 struct sock *sk; in smc_close_cleanup_listen() local
29 while ((sk = smc_accept_dequeue(parent, NULL))) in smc_close_cleanup_listen()
30 smc_close_non_accepted(sk); in smc_close_cleanup_listen()
37 struct sock *sk = &smc->sk; in smc_close_stream_wait() local
46 add_wait_queue(sk_sleep(sk), &wait); in smc_close_stream_wait()
50 rc = sk_wait_event(sk, &timeout, in smc_close_stream_wait()
52 (sk->sk_err == ECONNABORTED) || in smc_close_stream_wait()
53 (sk->sk_err == ECONNRESET), in smc_close_stream_wait()
58 remove_wait_queue(sk_sleep(sk), &wait); in smc_close_stream_wait()
66 smc->sk.sk_state_change(&smc->sk); in smc_close_wake_tx_prepared()
[all …]
/Linux-v4.19/net/core/
Dsock.c161 bool sk_ns_capable(const struct sock *sk, in sk_ns_capable() argument
164 return file_ns_capable(sk->sk_socket->file, user_ns, cap) && in sk_ns_capable()
178 bool sk_capable(const struct sock *sk, int cap) in sk_capable() argument
180 return sk_ns_capable(sk, &init_user_ns, cap); in sk_capable()
193 bool sk_net_capable(const struct sock *sk, int cap) in sk_net_capable() argument
195 return sk_ns_capable(sk, sock_net(sk)->user_ns, cap); in sk_net_capable()
297 void sk_set_memalloc(struct sock *sk) in sk_set_memalloc() argument
299 sock_set_flag(sk, SOCK_MEMALLOC); in sk_set_memalloc()
300 sk->sk_allocation |= __GFP_MEMALLOC; in sk_set_memalloc()
305 void sk_clear_memalloc(struct sock *sk) in sk_clear_memalloc() argument
[all …]
Dstream.c30 void sk_stream_write_space(struct sock *sk) in sk_stream_write_space() argument
32 struct socket *sock = sk->sk_socket; in sk_stream_write_space()
35 if (sk_stream_is_writeable(sk) && sock) { in sk_stream_write_space()
39 wq = rcu_dereference(sk->sk_wq); in sk_stream_write_space()
43 if (wq && wq->fasync_list && !(sk->sk_shutdown & SEND_SHUTDOWN)) in sk_stream_write_space()
56 int sk_stream_wait_connect(struct sock *sk, long *timeo_p) in sk_stream_wait_connect() argument
63 int err = sock_error(sk); in sk_stream_wait_connect()
66 if ((1 << sk->sk_state) & ~(TCPF_SYN_SENT | TCPF_SYN_RECV)) in sk_stream_wait_connect()
73 add_wait_queue(sk_sleep(sk), &wait); in sk_stream_wait_connect()
74 sk->sk_write_pending++; in sk_stream_wait_connect()
[all …]
/Linux-v4.19/net/bluetooth/rfcomm/
Dsock.c43 static void rfcomm_sock_close(struct sock *sk);
44 static void rfcomm_sock_kill(struct sock *sk);
52 struct sock *sk = d->owner; in rfcomm_sk_data_ready() local
53 if (!sk) in rfcomm_sk_data_ready()
56 atomic_add(skb->len, &sk->sk_rmem_alloc); in rfcomm_sk_data_ready()
57 skb_queue_tail(&sk->sk_receive_queue, skb); in rfcomm_sk_data_ready()
58 sk->sk_data_ready(sk); in rfcomm_sk_data_ready()
60 if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) in rfcomm_sk_data_ready()
66 struct sock *sk = d->owner, *parent; in rfcomm_sk_state_change() local
69 if (!sk) in rfcomm_sk_state_change()
[all …]
/Linux-v4.19/net/netrom/
Dnr_timer.c38 void nr_init_timers(struct sock *sk) in nr_init_timers() argument
40 struct nr_sock *nr = nr_sk(sk); in nr_init_timers()
48 sk->sk_timer.function = nr_heartbeat_expiry; in nr_init_timers()
51 void nr_start_t1timer(struct sock *sk) in nr_start_t1timer() argument
53 struct nr_sock *nr = nr_sk(sk); in nr_start_t1timer()
58 void nr_start_t2timer(struct sock *sk) in nr_start_t2timer() argument
60 struct nr_sock *nr = nr_sk(sk); in nr_start_t2timer()
65 void nr_start_t4timer(struct sock *sk) in nr_start_t4timer() argument
67 struct nr_sock *nr = nr_sk(sk); in nr_start_t4timer()
72 void nr_start_idletimer(struct sock *sk) in nr_start_idletimer() argument
[all …]
/Linux-v4.19/net/caif/
Dcaif_socket.c47 struct sock sk; /* must be first member */ member
92 static void caif_read_lock(struct sock *sk) in caif_read_lock() argument
95 cf_sk = container_of(sk, struct caifsock, sk); in caif_read_lock()
99 static void caif_read_unlock(struct sock *sk) in caif_read_unlock() argument
102 cf_sk = container_of(sk, struct caifsock, sk); in caif_read_unlock()
109 return cf_sk->sk.sk_rcvbuf / 4; in sk_rcvbuf_lowwater()
112 static void caif_flow_ctrl(struct sock *sk, int mode) in caif_flow_ctrl() argument
115 cf_sk = container_of(sk, struct caifsock, sk); in caif_flow_ctrl()
124 static void caif_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) in caif_queue_rcv_skb() argument
128 struct sk_buff_head *list = &sk->sk_receive_queue; in caif_queue_rcv_skb()
[all …]
/Linux-v4.19/net/dccp/
Dproto.c81 void dccp_set_state(struct sock *sk, const int state) in dccp_set_state() argument
83 const int oldstate = sk->sk_state; in dccp_set_state()
85 dccp_pr_debug("%s(%p) %s --> %s\n", dccp_role(sk), sk, in dccp_set_state()
95 dccp_feat_list_purge(&dccp_sk(sk)->dccps_featneg); in dccp_set_state()
103 sk->sk_prot->unhash(sk); in dccp_set_state()
104 if (inet_csk(sk)->icsk_bind_hash != NULL && in dccp_set_state()
105 !(sk->sk_userlocks & SOCK_BINDPORT_LOCK)) in dccp_set_state()
106 inet_put_port(sk); in dccp_set_state()
116 inet_sk_set_state(sk, state); in dccp_set_state()
121 static void dccp_finish_passive_close(struct sock *sk) in dccp_finish_passive_close() argument
[all …]
Dinput.c26 static void dccp_enqueue_skb(struct sock *sk, struct sk_buff *skb) in dccp_enqueue_skb() argument
29 __skb_queue_tail(&sk->sk_receive_queue, skb); in dccp_enqueue_skb()
30 skb_set_owner_r(skb, sk); in dccp_enqueue_skb()
31 sk->sk_data_ready(sk); in dccp_enqueue_skb()
34 static void dccp_fin(struct sock *sk, struct sk_buff *skb) in dccp_fin() argument
42 sk->sk_shutdown = SHUTDOWN_MASK; in dccp_fin()
43 sock_set_flag(sk, SOCK_DONE); in dccp_fin()
44 dccp_enqueue_skb(sk, skb); in dccp_fin()
47 static int dccp_rcv_close(struct sock *sk, struct sk_buff *skb) in dccp_rcv_close() argument
51 switch (sk->sk_state) { in dccp_rcv_close()
[all …]
Dtimer.c24 static void dccp_write_err(struct sock *sk) in dccp_write_err() argument
26 sk->sk_err = sk->sk_err_soft ? : ETIMEDOUT; in dccp_write_err()
27 sk->sk_error_report(sk); in dccp_write_err()
29 dccp_send_reset(sk, DCCP_RESET_CODE_ABORTED); in dccp_write_err()
30 dccp_done(sk); in dccp_write_err()
35 static int dccp_write_timeout(struct sock *sk) in dccp_write_timeout() argument
37 const struct inet_connection_sock *icsk = inet_csk(sk); in dccp_write_timeout()
40 if (sk->sk_state == DCCP_REQUESTING || sk->sk_state == DCCP_PARTOPEN) { in dccp_write_timeout()
42 dst_negative_advice(sk); in dccp_write_timeout()
67 dst_negative_advice(sk); in dccp_write_timeout()
[all …]
/Linux-v4.19/net/rose/
Drose_timer.c35 void rose_start_heartbeat(struct sock *sk) in rose_start_heartbeat() argument
37 del_timer(&sk->sk_timer); in rose_start_heartbeat()
39 sk->sk_timer.function = rose_heartbeat_expiry; in rose_start_heartbeat()
40 sk->sk_timer.expires = jiffies + 5 * HZ; in rose_start_heartbeat()
42 add_timer(&sk->sk_timer); in rose_start_heartbeat()
45 void rose_start_t1timer(struct sock *sk) in rose_start_t1timer() argument
47 struct rose_sock *rose = rose_sk(sk); in rose_start_t1timer()
57 void rose_start_t2timer(struct sock *sk) in rose_start_t2timer() argument
59 struct rose_sock *rose = rose_sk(sk); in rose_start_t2timer()
69 void rose_start_t3timer(struct sock *sk) in rose_start_t3timer() argument
[all …]
Drose_in.c39 static int rose_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) in rose_state1_machine() argument
41 struct rose_sock *rose = rose_sk(sk); in rose_state1_machine()
45 rose_stop_timer(sk); in rose_state1_machine()
46 rose_start_idletimer(sk); in rose_state1_machine()
53 sk->sk_state = TCP_ESTABLISHED; in rose_state1_machine()
54 if (!sock_flag(sk, SOCK_DEAD)) in rose_state1_machine()
55 sk->sk_state_change(sk); in rose_state1_machine()
59 rose_write_internal(sk, ROSE_CLEAR_CONFIRMATION); in rose_state1_machine()
60 rose_disconnect(sk, ECONNREFUSED, skb->data[3], skb->data[4]); in rose_state1_machine()
76 static int rose_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype) in rose_state2_machine() argument
[all …]
/Linux-v4.19/net/x25/
Dx25_timer.c32 void x25_init_timers(struct sock *sk) in x25_init_timers() argument
34 struct x25_sock *x25 = x25_sk(sk); in x25_init_timers()
39 sk->sk_timer.function = x25_heartbeat_expiry; in x25_init_timers()
42 void x25_start_heartbeat(struct sock *sk) in x25_start_heartbeat() argument
44 mod_timer(&sk->sk_timer, jiffies + 5 * HZ); in x25_start_heartbeat()
47 void x25_stop_heartbeat(struct sock *sk) in x25_stop_heartbeat() argument
49 del_timer(&sk->sk_timer); in x25_stop_heartbeat()
52 void x25_start_t2timer(struct sock *sk) in x25_start_t2timer() argument
54 struct x25_sock *x25 = x25_sk(sk); in x25_start_t2timer()
59 void x25_start_t21timer(struct sock *sk) in x25_start_t21timer() argument
[all …]
/Linux-v4.19/net/nfc/
Dllcp_sock.c29 static int sock_wait_state(struct sock *sk, int state, unsigned long timeo) in sock_wait_state() argument
34 pr_debug("sk %p", sk); in sock_wait_state()
36 add_wait_queue(sk_sleep(sk), &wait); in sock_wait_state()
39 while (sk->sk_state != state) { in sock_wait_state()
50 release_sock(sk); in sock_wait_state()
52 lock_sock(sk); in sock_wait_state()
55 err = sock_error(sk); in sock_wait_state()
61 remove_wait_queue(sk_sleep(sk), &wait); in sock_wait_state()
73 struct sock *sk = sock->sk; in llcp_sock_bind() local
74 struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk); in llcp_sock_bind()
[all …]
Drawsock.c34 static void nfc_sock_link(struct nfc_sock_list *l, struct sock *sk) in nfc_sock_link() argument
37 sk_add_node(sk, &l->head); in nfc_sock_link()
41 static void nfc_sock_unlink(struct nfc_sock_list *l, struct sock *sk) in nfc_sock_unlink() argument
44 sk_del_node_init(sk); in nfc_sock_unlink()
48 static void rawsock_write_queue_purge(struct sock *sk) in rawsock_write_queue_purge() argument
50 pr_debug("sk=%p\n", sk); in rawsock_write_queue_purge()
52 spin_lock_bh(&sk->sk_write_queue.lock); in rawsock_write_queue_purge()
53 __skb_queue_purge(&sk->sk_write_queue); in rawsock_write_queue_purge()
54 nfc_rawsock(sk)->tx_work_scheduled = false; in rawsock_write_queue_purge()
55 spin_unlock_bh(&sk->sk_write_queue.lock); in rawsock_write_queue_purge()
[all …]
/Linux-v4.19/net/phonet/
Dsocket.c43 struct sock *sk = sock->sk; in pn_socket_release() local
45 if (sk) { in pn_socket_release()
46 sock->sk = NULL; in pn_socket_release()
47 sk->sk_prot->close(sk, 0); in pn_socket_release()
145 int pn_sock_hash(struct sock *sk) in pn_sock_hash() argument
147 struct hlist_head *hlist = pn_hash_list(pn_sk(sk)->sobject); in pn_sock_hash()
150 sk_add_node_rcu(sk, hlist); in pn_sock_hash()
157 void pn_sock_unhash(struct sock *sk) in pn_sock_unhash() argument
160 sk_del_node_init_rcu(sk); in pn_sock_unhash()
162 pn_sock_unbind_all_res(sk); in pn_sock_unhash()
[all …]
/Linux-v4.19/net/iucv/
Daf_iucv.c53 #define __iucv_sock_wait(sk, condition, timeo, ret) \ argument
58 prepare_to_wait(sk_sleep(sk), &__wait, TASK_INTERRUPTIBLE); \
68 release_sock(sk); \
70 lock_sock(sk); \
71 ret = sock_error(sk); \
75 finish_wait(sk_sleep(sk), &__wait); \
78 #define iucv_sock_wait(sk, condition, timeo) \ argument
82 __iucv_sock_wait(sk, condition, timeo, __ret); \
86 static void iucv_sock_kill(struct sock *sk);
87 static void iucv_sock_close(struct sock *sk);
[all …]

12345678910>>...29