/net/bluetooth/ |
D | sco.c | 49 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 …]
|
D | af_bluetooth.c | 69 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, bool bh) in bt_accept_enqueue() argument [all …]
|
D | l2cap_sock.c | 45 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 …]
|
/net/ipv4/ |
D | tcp_timer.c | 26 static u32 tcp_clamp_rto_to_user_timeout(const struct sock *sk) in tcp_clamp_rto_to_user_timeout() argument 28 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_clamp_rto_to_user_timeout() 32 start_ts = tcp_sk(sk)->retrans_stamp; in tcp_clamp_rto_to_user_timeout() 35 elapsed = tcp_time_stamp(tcp_sk(sk)) - start_ts; in tcp_clamp_rto_to_user_timeout() 50 static void tcp_write_err(struct sock *sk) in tcp_write_err() argument 52 sk->sk_err = sk->sk_err_soft ? : ETIMEDOUT; in tcp_write_err() 53 sk->sk_error_report(sk); in tcp_write_err() 55 tcp_write_queue_purge(sk); in tcp_write_err() 56 tcp_done(sk); in tcp_write_err() 57 __NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPABORTONTIMEOUT); in tcp_write_err() [all …]
|
D | tcp_input.c | 119 void (*cad)(struct sock *sk, u32 ack_seq)) in clean_acked_data_enable() argument 140 static void tcp_gro_dev_warn(struct sock *sk, const struct sk_buff *skb, in tcp_gro_dev_warn() argument 151 dev = dev_get_by_index_rcu(sock_net(sk), skb->skb_iif); in tcp_gro_dev_warn() 162 static void tcp_measure_rcv_mss(struct sock *sk, const struct sk_buff *skb) in tcp_measure_rcv_mss() argument 164 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_measure_rcv_mss() 176 tcp_sk(sk)->advmss); in tcp_measure_rcv_mss() 180 tcp_gro_dev_warn(sk, skb, len); in tcp_measure_rcv_mss() 200 len -= tcp_sk(sk)->tcp_header_len; in tcp_measure_rcv_mss() 213 static void tcp_incr_quickack(struct sock *sk, unsigned int max_quickacks) in tcp_incr_quickack() argument 215 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_incr_quickack() [all …]
|
D | inet_hashtables.c | 43 static u32 sk_ehashfn(const struct sock *sk) in sk_ehashfn() argument 46 if (sk->sk_family == AF_INET6 && in sk_ehashfn() 47 !ipv6_addr_v4mapped(&sk->sk_v6_daddr)) in sk_ehashfn() 48 return inet6_ehashfn(sock_net(sk), in sk_ehashfn() 49 &sk->sk_v6_rcv_saddr, sk->sk_num, in sk_ehashfn() 50 &sk->sk_v6_daddr, sk->sk_dport); in sk_ehashfn() 52 return inet_ehashfn(sock_net(sk), in sk_ehashfn() 53 sk->sk_rcv_saddr, sk->sk_num, in sk_ehashfn() 54 sk->sk_daddr, sk->sk_dport); in sk_ehashfn() 92 void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, in inet_bind_hash() argument [all …]
|
D | tcp.c | 325 void tcp_enter_memory_pressure(struct sock *sk) in tcp_enter_memory_pressure() argument 336 NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPMEMORYPRESSURES); in tcp_enter_memory_pressure() 340 void tcp_leave_memory_pressure(struct sock *sk) in tcp_leave_memory_pressure() argument 348 NET_ADD_STATS(sock_net(sk), LINUX_MIB_TCPMEMORYPRESSURESCHRONO, in tcp_leave_memory_pressure() 408 void tcp_init_sock(struct sock *sk) in tcp_init_sock() argument 410 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_init_sock() 411 struct tcp_sock *tp = tcp_sk(sk); in tcp_init_sock() 414 sk->tcp_rtx_queue = RB_ROOT; in tcp_init_sock() 415 tcp_init_xmit_timers(sk); in tcp_init_sock() 440 tp->reordering = sock_net(sk)->ipv4.sysctl_tcp_reordering; in tcp_init_sock() [all …]
|
D | tcp_output.c | 60 static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, 64 static void tcp_event_new_data_sent(struct sock *sk, struct sk_buff *skb) in tcp_event_new_data_sent() argument 66 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_event_new_data_sent() 67 struct tcp_sock *tp = tcp_sk(sk); in tcp_event_new_data_sent() 72 __skb_unlink(skb, &sk->sk_write_queue); in tcp_event_new_data_sent() 73 tcp_rbtree_insert(&sk->tcp_rtx_queue, skb); in tcp_event_new_data_sent() 80 tcp_rearm_rto(sk); in tcp_event_new_data_sent() 82 NET_ADD_STATS(sock_net(sk), LINUX_MIB_TCPORIGDATASENT, in tcp_event_new_data_sent() 93 static inline __u32 tcp_acceptable_seq(const struct sock *sk) in tcp_acceptable_seq() argument 95 const struct tcp_sock *tp = tcp_sk(sk); in tcp_acceptable_seq() [all …]
|
D | tcp_bbr.c | 202 static void bbr_check_probe_rtt_done(struct sock *sk); 205 static bool bbr_full_bw_reached(const struct sock *sk) in bbr_full_bw_reached() argument 207 const struct bbr *bbr = inet_csk_ca(sk); in bbr_full_bw_reached() 213 static u32 bbr_max_bw(const struct sock *sk) in bbr_max_bw() argument 215 struct bbr *bbr = inet_csk_ca(sk); in bbr_max_bw() 221 static u32 bbr_bw(const struct sock *sk) in bbr_bw() argument 223 struct bbr *bbr = inet_csk_ca(sk); in bbr_bw() 225 return bbr->lt_use_bw ? bbr->lt_bw : bbr_max_bw(sk); in bbr_bw() 231 static u16 bbr_extra_acked(const struct sock *sk) in bbr_extra_acked() argument 233 struct bbr *bbr = inet_csk_ca(sk); in bbr_extra_acked() [all …]
|
D | udp.c | 131 struct sock *sk, unsigned int log) in udp_lib_lport_inuse() argument 134 kuid_t uid = sock_i_uid(sk); in udp_lib_lport_inuse() 138 sk2 != sk && in udp_lib_lport_inuse() 140 (!sk2->sk_reuse || !sk->sk_reuse) && in udp_lib_lport_inuse() 141 (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if || in udp_lib_lport_inuse() 142 sk2->sk_bound_dev_if == sk->sk_bound_dev_if) && in udp_lib_lport_inuse() 143 inet_rcv_saddr_equal(sk, sk2, true)) { in udp_lib_lport_inuse() 144 if (sk2->sk_reuseport && sk->sk_reuseport && in udp_lib_lport_inuse() 145 !rcu_access_pointer(sk->sk_reuseport_cb) && in udp_lib_lport_inuse() 166 struct sock *sk) in udp_lib_lport_inuse2() argument [all …]
|
/net/bluetooth/rfcomm/ |
D | sock.c | 43 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 …]
|
/net/core/ |
D | sock.c | 156 bool sk_ns_capable(const struct sock *sk, in sk_ns_capable() argument 159 return file_ns_capable(sk->sk_socket->file, user_ns, cap) && in sk_ns_capable() 173 bool sk_capable(const struct sock *sk, int cap) in sk_capable() argument 175 return sk_ns_capable(sk, &init_user_ns, cap); in sk_capable() 188 bool sk_net_capable(const struct sock *sk, int cap) in sk_net_capable() argument 190 return sk_ns_capable(sk, sock_net(sk)->user_ns, cap); in sk_net_capable() 292 void sk_set_memalloc(struct sock *sk) in sk_set_memalloc() argument 294 sock_set_flag(sk, SOCK_MEMALLOC); in sk_set_memalloc() 295 sk->sk_allocation |= __GFP_MEMALLOC; in sk_set_memalloc() 300 void sk_clear_memalloc(struct sock *sk) in sk_clear_memalloc() argument [all …]
|
/net/netrom/ |
D | nr_timer.c | 35 void nr_init_timers(struct sock *sk) in nr_init_timers() argument 37 struct nr_sock *nr = nr_sk(sk); in nr_init_timers() 45 sk->sk_timer.function = nr_heartbeat_expiry; in nr_init_timers() 48 void nr_start_t1timer(struct sock *sk) in nr_start_t1timer() argument 50 struct nr_sock *nr = nr_sk(sk); in nr_start_t1timer() 52 sk_reset_timer(sk, &nr->t1timer, jiffies + nr->t1); in nr_start_t1timer() 55 void nr_start_t2timer(struct sock *sk) in nr_start_t2timer() argument 57 struct nr_sock *nr = nr_sk(sk); in nr_start_t2timer() 59 sk_reset_timer(sk, &nr->t2timer, jiffies + nr->t2); in nr_start_t2timer() 62 void nr_start_t4timer(struct sock *sk) in nr_start_t4timer() argument [all …]
|
/net/smc/ |
D | smc_close.c | 42 struct sock *sk; in smc_close_cleanup_listen() local 45 while ((sk = smc_accept_dequeue(parent, NULL))) in smc_close_cleanup_listen() 46 smc_close_non_accepted(sk); in smc_close_cleanup_listen() 53 struct sock *sk = &smc->sk; in smc_close_stream_wait() local 62 add_wait_queue(sk_sleep(sk), &wait); in smc_close_stream_wait() 66 rc = sk_wait_event(sk, &timeout, in smc_close_stream_wait() 68 (sk->sk_err == ECONNABORTED) || in smc_close_stream_wait() 69 (sk->sk_err == ECONNRESET), in smc_close_stream_wait() 74 remove_wait_queue(sk_sleep(sk), &wait); in smc_close_stream_wait() 82 smc->sk.sk_state_change(&smc->sk); in smc_close_wake_tx_prepared() [all …]
|
/net/caif/ |
D | caif_socket.c | 47 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/ |
D | proto.c | 78 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 inet_sk_set_state(sk, state); in dccp_set_state() 118 static void dccp_finish_passive_close(struct sock *sk) in dccp_finish_passive_close() argument [all …]
|
D | input.c | 22 static void dccp_enqueue_skb(struct sock *sk, struct sk_buff *skb) in dccp_enqueue_skb() argument 25 __skb_queue_tail(&sk->sk_receive_queue, skb); in dccp_enqueue_skb() 26 skb_set_owner_r(skb, sk); in dccp_enqueue_skb() 27 sk->sk_data_ready(sk); in dccp_enqueue_skb() 30 static void dccp_fin(struct sock *sk, struct sk_buff *skb) in dccp_fin() argument 38 sk->sk_shutdown = SHUTDOWN_MASK; in dccp_fin() 39 sock_set_flag(sk, SOCK_DONE); in dccp_fin() 40 dccp_enqueue_skb(sk, skb); in dccp_fin() 43 static int dccp_rcv_close(struct sock *sk, struct sk_buff *skb) in dccp_rcv_close() argument 47 switch (sk->sk_state) { in dccp_rcv_close() [all …]
|
D | timer.c | 20 static void dccp_write_err(struct sock *sk) in dccp_write_err() argument 22 sk->sk_err = sk->sk_err_soft ? : ETIMEDOUT; in dccp_write_err() 23 sk->sk_error_report(sk); in dccp_write_err() 25 dccp_send_reset(sk, DCCP_RESET_CODE_ABORTED); in dccp_write_err() 26 dccp_done(sk); in dccp_write_err() 31 static int dccp_write_timeout(struct sock *sk) in dccp_write_timeout() argument 33 const struct inet_connection_sock *icsk = inet_csk(sk); in dccp_write_timeout() 36 if (sk->sk_state == DCCP_REQUESTING || sk->sk_state == DCCP_PARTOPEN) { in dccp_write_timeout() 38 dst_negative_advice(sk); in dccp_write_timeout() 63 dst_negative_advice(sk); in dccp_write_timeout() [all …]
|
/net/iucv/ |
D | af_iucv.c | 55 #define __iucv_sock_wait(sk, condition, timeo, ret) \ argument 60 prepare_to_wait(sk_sleep(sk), &__wait, TASK_INTERRUPTIBLE); \ 70 release_sock(sk); \ 72 lock_sock(sk); \ 73 ret = sock_error(sk); \ 77 finish_wait(sk_sleep(sk), &__wait); \ 80 #define iucv_sock_wait(sk, condition, timeo) \ argument 84 __iucv_sock_wait(sk, condition, timeo, __ret); \ 88 static void iucv_sock_kill(struct sock *sk); 89 static void iucv_sock_close(struct sock *sk); [all …]
|
/net/nfc/ |
D | llcp_sock.c | 17 static int sock_wait_state(struct sock *sk, int state, unsigned long timeo) in sock_wait_state() argument 22 pr_debug("sk %p", sk); in sock_wait_state() 24 add_wait_queue(sk_sleep(sk), &wait); in sock_wait_state() 27 while (sk->sk_state != state) { in sock_wait_state() 38 release_sock(sk); in sock_wait_state() 40 lock_sock(sk); in sock_wait_state() 43 err = sock_error(sk); in sock_wait_state() 49 remove_wait_queue(sk_sleep(sk), &wait); in sock_wait_state() 61 struct sock *sk = sock->sk; in llcp_sock_bind() local 62 struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk); in llcp_sock_bind() [all …]
|
D | rawsock.c | 22 static void nfc_sock_link(struct nfc_sock_list *l, struct sock *sk) in nfc_sock_link() argument 25 sk_add_node(sk, &l->head); in nfc_sock_link() 29 static void nfc_sock_unlink(struct nfc_sock_list *l, struct sock *sk) in nfc_sock_unlink() argument 32 sk_del_node_init(sk); in nfc_sock_unlink() 36 static void rawsock_write_queue_purge(struct sock *sk) in rawsock_write_queue_purge() argument 38 pr_debug("sk=%p\n", sk); in rawsock_write_queue_purge() 40 spin_lock_bh(&sk->sk_write_queue.lock); in rawsock_write_queue_purge() 41 __skb_queue_purge(&sk->sk_write_queue); in rawsock_write_queue_purge() 42 nfc_rawsock(sk)->tx_work_scheduled = false; in rawsock_write_queue_purge() 43 spin_unlock_bh(&sk->sk_write_queue.lock); in rawsock_write_queue_purge() [all …]
|
/net/phonet/ |
D | socket.c | 30 struct sock *sk = sock->sk; in pn_socket_release() local 32 if (sk) { in pn_socket_release() 33 sock->sk = NULL; in pn_socket_release() 34 sk->sk_prot->close(sk, 0); in pn_socket_release() 132 int pn_sock_hash(struct sock *sk) in pn_sock_hash() argument 134 struct hlist_head *hlist = pn_hash_list(pn_sk(sk)->sobject); in pn_sock_hash() 137 sk_add_node_rcu(sk, hlist); in pn_sock_hash() 144 void pn_sock_unhash(struct sock *sk) in pn_sock_unhash() argument 147 sk_del_node_init_rcu(sk); in pn_sock_unhash() 149 pn_sock_unbind_all_res(sk); in pn_sock_unhash() [all …]
|
D | pep.c | 69 static struct sk_buff *pep_alloc_skb(struct sock *sk, const void *payload, in pep_alloc_skb() argument 75 skb_set_owner_w(skb, sk); in pep_alloc_skb() 85 static int pep_reply(struct sock *sk, struct sk_buff *oskb, u8 code, in pep_reply() argument 93 skb = pep_alloc_skb(sk, data, len, priority); in pep_reply() 104 return pn_skb_send(sk, skb, &peer); in pep_reply() 107 static int pep_indicate(struct sock *sk, u8 id, u8 code, in pep_indicate() argument 110 struct pep_sock *pn = pep_sk(sk); in pep_indicate() 114 skb = pep_alloc_skb(sk, data, len, priority); in pep_indicate() 123 return pn_skb_send(sk, skb, NULL); in pep_indicate() 128 static int pipe_handler_request(struct sock *sk, u8 id, u8 code, in pipe_handler_request() argument [all …]
|
/net/rose/ |
D | rose_timer.c | 32 void rose_start_heartbeat(struct sock *sk) in rose_start_heartbeat() argument 34 del_timer(&sk->sk_timer); in rose_start_heartbeat() 36 sk->sk_timer.function = rose_heartbeat_expiry; in rose_start_heartbeat() 37 sk->sk_timer.expires = jiffies + 5 * HZ; in rose_start_heartbeat() 39 add_timer(&sk->sk_timer); in rose_start_heartbeat() 42 void rose_start_t1timer(struct sock *sk) in rose_start_t1timer() argument 44 struct rose_sock *rose = rose_sk(sk); in rose_start_t1timer() 54 void rose_start_t2timer(struct sock *sk) in rose_start_t2timer() argument 56 struct rose_sock *rose = rose_sk(sk); in rose_start_t2timer() 66 void rose_start_t3timer(struct sock *sk) in rose_start_t3timer() argument [all …]
|
D | rose_in.c | 36 static int rose_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) in rose_state1_machine() argument 38 struct rose_sock *rose = rose_sk(sk); in rose_state1_machine() 42 rose_stop_timer(sk); in rose_state1_machine() 43 rose_start_idletimer(sk); in rose_state1_machine() 50 sk->sk_state = TCP_ESTABLISHED; in rose_state1_machine() 51 if (!sock_flag(sk, SOCK_DEAD)) in rose_state1_machine() 52 sk->sk_state_change(sk); in rose_state1_machine() 56 rose_write_internal(sk, ROSE_CLEAR_CONFIRMATION); in rose_state1_machine() 57 rose_disconnect(sk, ECONNREFUSED, skb->data[3], skb->data[4]); in rose_state1_machine() 73 static int rose_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype) in rose_state2_machine() argument [all …]
|