Home
last modified time | relevance | path

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

12345678910>>...17

/net/bluetooth/
Dsco.c48 struct sock *sk; member
56 static void sco_sock_close(struct sock *sk);
57 static void sco_sock_kill(struct sock *sk);
60 #define sco_pi(sk) ((struct sco_pinfo *) sk) argument
77 struct sock *sk = (struct sock *)arg; in sco_sock_timeout() local
79 BT_DBG("sock %p state %d", sk, sk->sk_state); in sco_sock_timeout()
81 bh_lock_sock(sk); in sco_sock_timeout()
82 sk->sk_err = ETIMEDOUT; in sco_sock_timeout()
83 sk->sk_state_change(sk); in sco_sock_timeout()
84 bh_unlock_sock(sk); in sco_sock_timeout()
[all …]
Dl2cap_sock.c44 static void l2cap_sock_init(struct sock *sk, struct sock *parent);
82 struct sock *sk = sock->sk; in l2cap_sock_bind() local
83 struct l2cap_chan *chan = l2cap_pi(sk)->chan; in l2cap_sock_bind()
87 BT_DBG("sk %p", sk); in l2cap_sock_bind()
109 lock_sock(sk); in l2cap_sock_bind()
111 if (sk->sk_state != BT_OPEN) { in l2cap_sock_bind()
166 sk->sk_state = BT_BOUND; in l2cap_sock_bind()
169 release_sock(sk); in l2cap_sock_bind()
176 struct sock *sk = sock->sk; in l2cap_sock_connect() local
177 struct l2cap_chan *chan = l2cap_pi(sk)->chan; in l2cap_sock_connect()
[all …]
Daf_bluetooth.c67 void bt_sock_reclassify_lock(struct sock *sk, int proto) in bt_sock_reclassify_lock() argument
69 BUG_ON(!sk); in bt_sock_reclassify_lock()
70 BUG_ON(!sock_allow_reclassification(sk)); in bt_sock_reclassify_lock()
72 sock_lock_init_class_and_name(sk, in bt_sock_reclassify_lock()
159 bt_sock_reclassify_lock(sock->sk, proto); in bt_sock_create()
168 void bt_sock_link(struct bt_sock_list *l, struct sock *sk) in bt_sock_link() argument
171 sk_add_node(sk, &l->head); in bt_sock_link()
176 void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk) in bt_sock_unlink() argument
179 sk_del_node_init(sk); in bt_sock_unlink()
184 void bt_accept_enqueue(struct sock *parent, struct sock *sk) in bt_accept_enqueue() argument
[all …]
/net/ipv4/
Dtcp_timer.c34 static void tcp_write_err(struct sock *sk) in tcp_write_err() argument
36 sk->sk_err = sk->sk_err_soft ? : ETIMEDOUT; in tcp_write_err()
37 sk->sk_error_report(sk); in tcp_write_err()
39 tcp_done(sk); in tcp_write_err()
40 __NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTONTIMEOUT); in tcp_write_err()
67 static int tcp_out_of_resources(struct sock *sk, bool do_reset) in tcp_out_of_resources() argument
69 struct tcp_sock *tp = tcp_sk(sk); in tcp_out_of_resources()
78 if (sk->sk_err_soft) in tcp_out_of_resources()
81 if (tcp_check_oom(sk, shift)) { in tcp_out_of_resources()
89 tcp_send_active_reset(sk, GFP_ATOMIC); in tcp_out_of_resources()
[all …]
Dinet_hashtables.c46 u32 sk_ehashfn(const struct sock *sk) in sk_ehashfn() argument
49 if (sk->sk_family == AF_INET6 && in sk_ehashfn()
50 !ipv6_addr_v4mapped(&sk->sk_v6_daddr)) in sk_ehashfn()
51 return inet6_ehashfn(sock_net(sk), in sk_ehashfn()
52 &sk->sk_v6_rcv_saddr, sk->sk_num, in sk_ehashfn()
53 &sk->sk_v6_daddr, sk->sk_dport); in sk_ehashfn()
55 return inet_ehashfn(sock_net(sk), in sk_ehashfn()
56 sk->sk_rcv_saddr, sk->sk_num, in sk_ehashfn()
57 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 …]
Dtcp.c327 void tcp_enter_memory_pressure(struct sock *sk) in tcp_enter_memory_pressure() argument
330 NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPMEMORYPRESSURES); in tcp_enter_memory_pressure()
378 void tcp_init_sock(struct sock *sk) in tcp_init_sock() argument
380 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_init_sock()
381 struct tcp_sock *tp = tcp_sk(sk); in tcp_init_sock()
384 tcp_init_xmit_timers(sk); in tcp_init_sock()
410 tp->reordering = sock_net(sk)->ipv4.sysctl_tcp_reordering; in tcp_init_sock()
412 tcp_assign_congestion_control(sk); in tcp_init_sock()
416 sk->sk_state = TCP_CLOSE; in tcp_init_sock()
418 sk->sk_write_space = sk_stream_write_space; in tcp_init_sock()
[all …]
Dtcp_bbr.c151 static bool bbr_full_bw_reached(const struct sock *sk) in bbr_full_bw_reached() argument
153 const struct bbr *bbr = inet_csk_ca(sk); in bbr_full_bw_reached()
159 static u32 bbr_max_bw(const struct sock *sk) in bbr_max_bw() argument
161 struct bbr *bbr = inet_csk_ca(sk); in bbr_max_bw()
167 static u32 bbr_bw(const struct sock *sk) in bbr_bw() argument
169 struct bbr *bbr = inet_csk_ca(sk); in bbr_bw()
171 return bbr->lt_use_bw ? bbr->lt_bw : bbr_max_bw(sk); in bbr_bw()
178 static u64 bbr_rate_bytes_per_sec(struct sock *sk, u64 rate, int gain) in bbr_rate_bytes_per_sec() argument
180 rate *= tcp_mss_to_mtu(sk, tcp_sk(sk)->mss_cache); in bbr_rate_bytes_per_sec()
188 static u32 bbr_bw_to_pacing_rate(struct sock *sk, u32 bw, int gain) in bbr_bw_to_pacing_rate() argument
[all …]
Dtcp_input.c133 static void tcp_gro_dev_warn(struct sock *sk, const struct sk_buff *skb) in tcp_gro_dev_warn() argument
143 dev = dev_get_by_index_rcu(sock_net(sk), skb->skb_iif); in tcp_gro_dev_warn()
153 static void tcp_measure_rcv_mss(struct sock *sk, const struct sk_buff *skb) in tcp_measure_rcv_mss() argument
155 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_measure_rcv_mss()
167 tcp_sk(sk)->advmss); in tcp_measure_rcv_mss()
169 tcp_gro_dev_warn(sk, skb); in tcp_measure_rcv_mss()
189 len -= tcp_sk(sk)->tcp_header_len; in tcp_measure_rcv_mss()
202 static void tcp_incr_quickack(struct sock *sk) in tcp_incr_quickack() argument
204 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_incr_quickack()
205 unsigned int quickacks = tcp_sk(sk)->rcv_wnd / (2 * icsk->icsk_ack.rcv_mss); in tcp_incr_quickack()
[all …]
/net/core/
Dsock.c157 bool sk_ns_capable(const struct sock *sk, in sk_ns_capable() argument
160 return file_ns_capable(sk->sk_socket->file, user_ns, cap) && in sk_ns_capable()
174 bool sk_capable(const struct sock *sk, int cap) in sk_capable() argument
176 return sk_ns_capable(sk, &init_user_ns, cap); in sk_capable()
189 bool sk_net_capable(const struct sock *sk, int cap) in sk_net_capable() argument
191 return sk_ns_capable(sk, sock_net(sk)->user_ns, cap); in sk_net_capable()
300 void sk_set_memalloc(struct sock *sk) in sk_set_memalloc() argument
302 sock_set_flag(sk, SOCK_MEMALLOC); in sk_set_memalloc()
303 sk->sk_allocation |= __GFP_MEMALLOC; in sk_set_memalloc()
308 void sk_clear_memalloc(struct sock *sk) in sk_clear_memalloc() argument
[all …]
/net/bluetooth/rfcomm/
Dsock.c42 static void rfcomm_sock_close(struct sock *sk);
43 static void rfcomm_sock_kill(struct sock *sk);
51 struct sock *sk = d->owner; in rfcomm_sk_data_ready() local
52 if (!sk) in rfcomm_sk_data_ready()
55 atomic_add(skb->len, &sk->sk_rmem_alloc); in rfcomm_sk_data_ready()
56 skb_queue_tail(&sk->sk_receive_queue, skb); in rfcomm_sk_data_ready()
57 sk->sk_data_ready(sk); in rfcomm_sk_data_ready()
59 if (atomic_read(&sk->sk_rmem_alloc) >= sk->sk_rcvbuf) in rfcomm_sk_data_ready()
65 struct sock *sk = d->owner, *parent; in rfcomm_sk_state_change() local
68 if (!sk) in rfcomm_sk_state_change()
[all …]
/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()
42 setup_timer(&nr->t1timer, nr_t1timer_expiry, (unsigned long)sk); in nr_init_timers()
43 setup_timer(&nr->t2timer, nr_t2timer_expiry, (unsigned long)sk); in nr_init_timers()
44 setup_timer(&nr->t4timer, nr_t4timer_expiry, (unsigned long)sk); in nr_init_timers()
45 setup_timer(&nr->idletimer, nr_idletimer_expiry, (unsigned long)sk); in nr_init_timers()
48 sk->sk_timer.data = (unsigned long)sk; in nr_init_timers()
49 sk->sk_timer.function = &nr_heartbeat_expiry; in nr_init_timers()
52 void nr_start_t1timer(struct sock *sk) in nr_start_t1timer() argument
54 struct nr_sock *nr = nr_sk(sk); in nr_start_t1timer()
[all …]
Daf_netrom.c94 static void nr_remove_socket(struct sock *sk) in nr_remove_socket() argument
97 sk_del_node_init(sk); in nr_remove_socket()
137 static void nr_insert_socket(struct sock *sk) in nr_insert_socket() argument
140 sk_add_node(sk, &nr_list); in nr_insert_socket()
218 struct sock *sk; in nr_find_next_circuit() local
225 if ((sk=nr_find_socket(i, j)) == NULL) in nr_find_next_circuit()
227 bh_unlock_sock(sk); in nr_find_next_circuit()
246 struct sock *sk=(struct sock *)data; in nr_destroy_timer() local
247 bh_lock_sock(sk); in nr_destroy_timer()
248 sock_hold(sk); in nr_destroy_timer()
[all …]
/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 …]
/net/dccp/
Dproto.c78 void dccp_set_state(struct sock *sk, const int state) in dccp_set_state() argument
80 const int oldstate = sk->sk_state; in dccp_set_state()
82 dccp_pr_debug("%s(%p) %s --> %s\n", dccp_role(sk), sk, in dccp_set_state()
92 dccp_feat_list_purge(&dccp_sk(sk)->dccps_featneg); in dccp_set_state()
100 sk->sk_prot->unhash(sk); in dccp_set_state()
101 if (inet_csk(sk)->icsk_bind_hash != NULL && in dccp_set_state()
102 !(sk->sk_userlocks & SOCK_BINDPORT_LOCK)) in dccp_set_state()
103 inet_put_port(sk); in dccp_set_state()
113 sk->sk_state = state; in dccp_set_state()
118 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 …]
Doutput.c25 static inline void dccp_event_ack_sent(struct sock *sk) in dccp_event_ack_sent() argument
27 inet_csk_clear_xmit_timer(sk, ICSK_TIME_DACK); in dccp_event_ack_sent()
31 static struct sk_buff *dccp_skb_entail(struct sock *sk, struct sk_buff *skb) in dccp_skb_entail() argument
33 skb_set_owner_w(skb, sk); in dccp_skb_entail()
34 WARN_ON(sk->sk_send_head); in dccp_skb_entail()
35 sk->sk_send_head = skb; in dccp_skb_entail()
36 return skb_clone(sk->sk_send_head, gfp_any()); in dccp_skb_entail()
45 static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) in dccp_transmit_skb() argument
48 struct inet_sock *inet = inet_sk(sk); in dccp_transmit_skb()
49 const struct inet_connection_sock *icsk = inet_csk(sk); in dccp_transmit_skb()
[all …]
/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.data = (unsigned long)sk; in rose_start_heartbeat()
40 sk->sk_timer.function = &rose_heartbeat_expiry; in rose_start_heartbeat()
41 sk->sk_timer.expires = jiffies + 5 * HZ; in rose_start_heartbeat()
43 add_timer(&sk->sk_timer); in rose_start_heartbeat()
46 void rose_start_t1timer(struct sock *sk) in rose_start_t1timer() argument
48 struct rose_sock *rose = rose_sk(sk); in rose_start_t1timer()
52 rose->timer.data = (unsigned long)sk; in rose_start_t1timer()
59 void rose_start_t2timer(struct sock *sk) in rose_start_t2timer() 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 …]
/net/nfc/
Dllcp_sock.c28 static int sock_wait_state(struct sock *sk, int state, unsigned long timeo) in sock_wait_state() argument
33 pr_debug("sk %p", sk); in sock_wait_state()
35 add_wait_queue(sk_sleep(sk), &wait); in sock_wait_state()
38 while (sk->sk_state != state) { in sock_wait_state()
49 release_sock(sk); in sock_wait_state()
51 lock_sock(sk); in sock_wait_state()
54 err = sock_error(sk); in sock_wait_state()
60 remove_wait_queue(sk_sleep(sk), &wait); in sock_wait_state()
72 struct sock *sk = sock->sk; in llcp_sock_bind() local
73 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 …]
/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 …]
/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()
36 setup_timer(&x25->timer, x25_timer_expiry, (unsigned long)sk); in x25_init_timers()
39 sk->sk_timer.data = (unsigned long)sk; in x25_init_timers()
40 sk->sk_timer.function = &x25_heartbeat_expiry; in x25_init_timers()
43 void x25_start_heartbeat(struct sock *sk) in x25_start_heartbeat() argument
45 mod_timer(&sk->sk_timer, jiffies + 5 * HZ); in x25_start_heartbeat()
48 void x25_stop_heartbeat(struct sock *sk) in x25_stop_heartbeat() argument
50 del_timer(&sk->sk_timer); in x25_stop_heartbeat()
53 void x25_start_t2timer(struct sock *sk) in x25_start_t2timer() argument
[all …]
/net/phonet/
Dpep.c81 static struct sk_buff *pep_alloc_skb(struct sock *sk, const void *payload, in pep_alloc_skb() argument
87 skb_set_owner_w(skb, sk); in pep_alloc_skb()
97 static int pep_reply(struct sock *sk, struct sk_buff *oskb, u8 code, in pep_reply() argument
105 skb = pep_alloc_skb(sk, data, len, priority); in pep_reply()
116 return pn_skb_send(sk, skb, &peer); in pep_reply()
119 static int pep_indicate(struct sock *sk, u8 id, u8 code, in pep_indicate() argument
122 struct pep_sock *pn = pep_sk(sk); in pep_indicate()
126 skb = pep_alloc_skb(sk, data, len, priority); in pep_indicate()
135 return pn_skb_send(sk, skb, NULL); in pep_indicate()
140 static int pipe_handler_request(struct sock *sk, u8 id, u8 code, in pipe_handler_request() argument
[all …]
Dsocket.c41 struct sock *sk = sock->sk; in pn_socket_release() local
43 if (sk) { in pn_socket_release()
44 sock->sk = NULL; in pn_socket_release()
45 sk->sk_prot->close(sk, 0); in pn_socket_release()
143 int pn_sock_hash(struct sock *sk) in pn_sock_hash() argument
145 struct hlist_head *hlist = pn_hash_list(pn_sk(sk)->sobject); in pn_sock_hash()
148 sk_add_node_rcu(sk, hlist); in pn_sock_hash()
155 void pn_sock_unhash(struct sock *sk) in pn_sock_unhash() argument
158 sk_del_node_init_rcu(sk); in pn_sock_unhash()
160 pn_sock_unbind_all_res(sk); in pn_sock_unhash()
[all …]

12345678910>>...17