| /linux/include/net/ |
| H A D | sock.h | 448 void (*sk_data_ready)(struct sock *sk); 512 struct sk_buff* (*sk_validate_xmit_skb)(struct sock *sk, 575 void (*sk_state_change)(struct sock *sk); 576 void (*sk_write_space)(struct sock *sk); 577 void (*sk_error_report)(struct sock *sk); 578 int (*sk_backlog_rcv)(struct sock *sk, 580 void (*sk_destruct)(struct sock *sk); 638 static inline bool sk_user_data_is_nocopy(const struct sock *sk) in sk_user_data_is_nocopy() argument 640 return ((uintptr_t)sk->sk_user_data & SK_USER_DATA_NOCOPY); in sk_user_data_is_nocopy() 643 #define __sk_user_data(sk) ((*((void __rcu **)&(sk)->sk_user_data))) argument [all …]
|
| H A D | llc_c_ev.h | 128 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 …]
|
| H A D | llc_c_ac.h | 97 typedef int (*llc_conn_action_t)(struct sock *sk, struct sk_buff *skb); 99 int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb); 100 int llc_conn_ac_conn_ind(struct sock *sk, struct sk_buff *skb); 101 int llc_conn_ac_conn_confirm(struct sock *sk, struct sk_buff *skb); 102 int llc_conn_ac_data_ind(struct sock *sk, struct sk_buff *skb); 103 int llc_conn_ac_disc_ind(struct sock *sk, struct sk_buff *skb); 104 int llc_conn_ac_rst_ind(struct sock *sk, struct sk_buff *skb); 105 int llc_conn_ac_rst_confirm(struct sock *sk, struct sk_buff *skb); 106 int llc_conn_ac_clear_remote_busy_if_f_eq_1(struct sock *sk, 108 int llc_conn_ac_stop_rej_tmr_if_data_flag_eq_2(struct sock *sk, [all …]
|
| /linux/net/bluetooth/ |
| H A D | iso.c | 31 struct sock *sk; member 44 static void iso_sock_close(struct sock *sk); 45 static void iso_sock_kill(struct sock *sk); 48 #define iso_pi(sk) ((struct iso_pinfo *)sk) argument 82 static bool iso_match_sid(struct sock *sk, void *data); 83 static bool iso_match_sid_past(struct sock *sk, void *data); 84 static bool iso_match_sync_handle(struct sock *sk, void *data); 85 static bool iso_match_sync_handle_pa_report(struct sock *sk, void *data); 86 static void iso_sock_disconn(struct sock *sk); 88 typedef bool (*iso_sock_match_t)(struct sock *sk, void *data); [all …]
|
| H A D | sco.c | 49 struct sock *sk; member 60 static void sco_sock_close(struct sock *sk); 61 static void sco_sock_kill(struct sock *sk); 64 #define sco_pi(sk) ((struct sco_pinfo *) sk) argument 86 if (conn->sk) in sco_conn_free() 87 sco_pi(conn->sk)->conn = NULL; in sco_conn_free() 133 if (!conn || !bt_sock_linked(&sco_sk_list, conn->sk)) in sco_sock_hold() 136 sock_hold(conn->sk); in sco_sock_hold() 138 return conn->sk; in sco_sock_hold() 145 struct sock *sk; in sco_sock_timeout() local [all …]
|
| H A D | af_bluetooth.c | 74 void bt_sock_reclassify_lock(struct sock *sk, int proto) in bt_sock_reclassify_lock() argument 76 BUG_ON(!sk); in bt_sock_reclassify_lock() 77 BUG_ON(!sock_allow_reclassification(sk)); in bt_sock_reclassify_lock() 79 sock_lock_init_class_and_name(sk, in bt_sock_reclassify_lock() 137 bt_sock_reclassify_lock(sock->sk, proto); in bt_sock_create() 149 struct sock *sk; in bt_sock_alloc() local 151 sk = sk_alloc(net, PF_BLUETOOTH, prio, prot, kern); in bt_sock_alloc() 152 if (!sk) in bt_sock_alloc() 155 sock_init_data(sock, sk); in bt_sock_alloc() 156 INIT_LIST_HEAD(&bt_sk(sk)->accept_q); in bt_sock_alloc() [all …]
|
| /linux/net/bluetooth/rfcomm/ |
| H A 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 in rfcomm_sk_data_ready() 66 struct sock *sk = d->owner, *parent; rfcomm_sk_state_change() local 108 struct sock *sk = NULL; __rfcomm_get_listen_sock_by_addr() local 129 struct sock *sk = NULL, *sk1 = NULL; rfcomm_get_sock_by_channel() local 153 rfcomm_sock_destruct(struct sock * sk) rfcomm_sock_destruct() argument 175 struct sock *sk; rfcomm_sock_cleanup_listen() local 192 rfcomm_sock_kill(struct sock * sk) rfcomm_sock_kill() argument 205 __rfcomm_sock_close(struct sock * sk) __rfcomm_sock_close() argument 232 rfcomm_sock_close(struct sock * sk) rfcomm_sock_close() argument 239 rfcomm_sock_init(struct sock * sk,struct sock * parent) rfcomm_sock_init() argument 275 struct sock *sk; rfcomm_sock_alloc() local 308 struct sock *sk; rfcomm_sock_create() local 330 struct sock *sk = sock->sk; rfcomm_sock_bind() local 377 struct sock *sk = sock->sk; rfcomm_sock_connect() local 424 struct sock *sk = sock->sk; rfcomm_sock_listen() local 475 struct sock *sk = sock->sk, *nsk; rfcomm_sock_accept() local 535 struct sock *sk = sock->sk; rfcomm_sock_getname() local 557 struct sock *sk = sock->sk; rfcomm_sock_sendmsg() local 597 struct sock *sk = sock->sk; rfcomm_sock_recvmsg() local 622 struct sock *sk = sock->sk; rfcomm_sock_setsockopt_old() local 663 struct sock *sk = sock->sk; rfcomm_sock_setsockopt() local 727 struct sock *sk = sock->sk; rfcomm_sock_getsockopt_old() local 803 struct sock *sk = sock->sk; rfcomm_sock_getsockopt() local 887 struct sock *sk = sock->sk; rfcomm_sock_shutdown() local 913 struct sock *sk = sock->sk; rfcomm_sock_release() local 934 struct sock *sk, *parent; rfcomm_connect_ind() local 984 struct sock *sk; rfcomm_sock_debugfs_show() local [all...] |
| /linux/net/core/ |
| H A D | sock.c | 158 static void sock_def_write_space_wfree(struct sock *sk, int wmem_alloc); 159 static void sock_def_write_space(struct sock *sk); 171 bool sk_ns_capable(const struct sock *sk, in sk_ns_capable() argument 174 return file_ns_capable(sk->sk_socket->file, user_ns, cap) && in sk_ns_capable() 188 bool sk_capable(const struct sock *sk, int cap) in sk_capable() argument 190 return sk_ns_capable(sk, &init_user_ns, cap); in sk_capable() 203 bool sk_net_capable(const struct sock *sk, int cap) in sk_net_capable() argument 205 return sk_ns_capable(sk, sock_net(sk)->user_ns, cap); in sk_net_capable() 302 void sk_set_memalloc(struct sock *sk) in sk_set_memalloc() argument 304 sock_set_flag(sk, SOCK_MEMALLOC); in sk_set_memalloc() [all …]
|
| /linux/net/netrom/ |
| H A 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 …]
|
| /linux/net/smc/ |
| H A D | smc_close.c | 41 struct sock *sk; in smc_close_cleanup_listen() local 44 while ((sk = smc_accept_dequeue(parent, NULL))) in smc_close_cleanup_listen() 45 smc_close_non_accepted(sk); in smc_close_cleanup_listen() 52 struct sock *sk = &smc->sk; in smc_close_stream_wait() local 64 add_wait_queue(sk_sleep(sk), &wait); in smc_close_stream_wait() 68 rc = sk_wait_event(sk, &timeout, in smc_close_stream_wait() 70 READ_ONCE(sk->sk_err) == ECONNABORTED || in smc_close_stream_wait() 71 READ_ONCE(sk->sk_err) == ECONNRESET || in smc_close_stream_wait() 77 remove_wait_queue(sk_sleep(sk), &wait); in smc_close_stream_wait() 85 smc->sk.sk_state_change(&smc->sk); in smc_close_wake_tx_prepared() [all …]
|
| /linux/net/rose/ |
| H A D | rose_timer.c | 32 void rose_start_heartbeat(struct sock *sk) in rose_start_heartbeat() argument 34 sk_stop_timer(sk, &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 sk_reset_timer(sk, &sk->sk_timer, sk->sk_timer.expires); 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() 46 sk_stop_timer(sk, &rose->timer); in rose_start_t1timer() 51 sk_reset_timer(sk, &rose->timer, rose->timer.expires); in rose_start_t1timer() 54 void rose_start_t2timer(struct sock *sk) in rose_start_t2timer() argument [all …]
|
| H A D | rose_in.c | 37 static int rose_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) in rose_state1_machine() argument 39 struct rose_sock *rose = rose_sk(sk); in rose_state1_machine() 43 rose_stop_timer(sk); in rose_state1_machine() 44 rose_start_idletimer(sk); in rose_state1_machine() 51 sk->sk_state = TCP_ESTABLISHED; in rose_state1_machine() 52 if (!sock_flag(sk, SOCK_DEAD)) in rose_state1_machine() 53 sk->sk_state_change(sk); in rose_state1_machine() 57 rose_write_internal(sk, ROSE_CLEAR_CONFIRMATION); in rose_state1_machine() 58 rose_disconnect(sk, ECONNREFUSED, skb->data[3], skb->data[4]); in rose_state1_machine() 74 static int rose_state2_machine(struct sock *sk, struct sk_buff *skb, int frametype) in rose_state2_machine() argument [all …]
|
| /linux/tools/testing/selftests/net/tcp_ao/ |
| H A D | setsockopt-closed.c | 12 static void make_listen(int sk) in make_listen() argument 17 if (bind(sk, (struct sockaddr *)&addr, sizeof(addr)) < 0) in make_listen() 19 if (listen(sk, 1)) in make_listen() 23 static void test_vefify_ao_info(int sk, struct tcp_ao_info_opt *info, in test_vefify_ao_info() argument 29 if (getsockopt(sk, IPPROTO_TCP, TCP_AO_INFO, &tmp, &len)) in test_vefify_ao_info() 58 static void __setsockopt_checked(int sk, int optname, bool get, in __setsockopt_checked() argument 71 ret = getsockopt(sk, IPPROTO_TCP, optname, optval, len); in __setsockopt_checked() 73 ret = setsockopt(sk, IPPROTO_TCP, optname, optval, *len); in __setsockopt_checked() 80 close(sk); in __setsockopt_checked() 90 test_verify_socket_key(sk, optval); in __setsockopt_checked() [all …]
|
| /linux/net/caif/ |
| H A D | caif_socket.c | 49 struct sock sk; /* must be first member */ member 88 static void caif_read_lock(struct sock *sk) in caif_read_lock() argument 91 cf_sk = container_of(sk, struct caifsock, sk); in caif_read_lock() 95 static void caif_read_unlock(struct sock *sk) in caif_read_unlock() argument 98 cf_sk = container_of(sk, struct caifsock, sk); in caif_read_unlock() 105 return cf_sk->sk.sk_rcvbuf / 4; in sk_rcvbuf_lowwater() 108 static void caif_flow_ctrl(struct sock *sk, int mode) in caif_flow_ctrl() argument 111 cf_sk = container_of(sk, struc in caif_flow_ctrl() 120 caif_queue_rcv_skb(struct sock * sk,struct sk_buff * skb) caif_queue_rcv_skb() argument 250 caif_check_flow_release(struct sock * sk) caif_check_flow_release() argument 271 struct sock *sk = sock->sk; caif_seqpkt_recvmsg() local 305 caif_stream_data_wait(struct sock * sk,long timeo) caif_stream_data_wait() argument 346 struct sock *sk = sock->sk; caif_stream_recvmsg() local 463 struct sock *sk = &cf_sk->sk; caif_wait_for_flow_on() local 517 struct sock *sk = sock->sk; caif_seqpkt_sendmsg() local 589 struct sock *sk = sock->sk; caif_stream_sendmsg() local 668 struct sock *sk = sock->sk; setsockopt() local 740 struct sock *sk = sock->sk; caif_connect() local 893 struct sock *sk = sock->sk; caif_release() local 933 struct sock *sk = sock->sk; caif_poll() local 1002 caif_sock_destructor(struct sock * sk) caif_sock_destructor() argument 1020 struct sock *sk = NULL; caif_create() local [all...] |
| /linux/net/dccp/ |
| H A D | input.c | |
| H A D | proto.c | |
| H A D | timer.c | |
| /linux/net/iucv/ |
| H A D | af_iucv.c | 56 #define __iucv_sock_wait(sk, condition, timeo, ret) \ argument 61 prepare_to_wait(sk_sleep(sk), &__wait, TASK_INTERRUPTIBLE); \ 71 release_sock(sk); \ 73 lock_sock(sk); \ 74 ret = sock_error(sk); \ 78 finish_wait(sk_sleep(sk), &__wait); \ 81 #define iucv_sock_wait(sk, condition, timeo) \ argument 85 __iucv_sock_wait(sk, condition, timeo, __ret); \ 91 static void iucv_sock_kill(struct sock *sk); 92 static void iucv_sock_close(struct sock *sk); [all …]
|
| /linux/net/nfc/ |
| H A D | rawsock.c | 23 static void nfc_sock_link(struct nfc_sock_list *l, struct sock *sk) in nfc_sock_link() argument 26 sk_add_node(sk, &l->head); in nfc_sock_link() 30 static void nfc_sock_unlink(struct nfc_sock_list *l, struct sock *sk) in nfc_sock_unlink() argument 33 sk_del_node_init(sk); in nfc_sock_unlink() 37 static void rawsock_write_queue_purge(struct sock *sk) in rawsock_write_queue_purge() argument 39 pr_debug("sk=%p\n", sk); in rawsock_write_queue_purge() 41 spin_lock_bh(&sk->sk_write_queue.lock); in rawsock_write_queue_purge() 42 __skb_queue_purge(&sk->sk_write_queue); in rawsock_write_queue_purge() 43 nfc_rawsock(sk)->tx_work_scheduled = false; in rawsock_write_queue_purge() 44 spin_unlock_bh(&sk->sk_write_queue.lock); in rawsock_write_queue_purge() [all …]
|
| H A 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 in llcp_sock_bind() local 152 struct sock *sk = sock->sk; llcp_raw_sock_bind() local 206 struct sock *sk = sock->sk; llcp_sock_listen() local 234 struct sock *sk = sock->sk; nfc_llcp_setsockopt() local 308 struct sock *sk = sock->sk; nfc_llcp_getsockopt() local 381 nfc_llcp_accept_unlink(struct sock * sk) nfc_llcp_accept_unlink() argument 394 nfc_llcp_accept_enqueue(struct sock * parent,struct sock * sk) nfc_llcp_accept_enqueue() argument 412 struct sock *sk; nfc_llcp_accept_dequeue() local 453 struct sock *sk = sock->sk, *new_sk; llcp_sock_accept() local 506 struct sock *sk = sock->sk; llcp_sock_getname() local 540 struct sock *sk; llcp_accept_poll() local 558 struct sock *sk = sock->sk; llcp_sock_poll() local 596 struct sock *sk = sock->sk; llcp_sock_release() local 654 struct sock *sk = sock->sk; llcp_sock_connect() local 778 struct sock *sk = sock->sk; llcp_sock_sendmsg() local 831 struct sock *sk = sock->sk; llcp_sock_recvmsg() local 955 llcp_sock_destruct(struct sock * sk) llcp_sock_destruct() argument 976 struct sock *sk; nfc_llcp_sock_alloc() local 1027 struct sock *sk; llcp_sock_create() local [all...] |
| /linux/net/ipv4/ |
| H A D | inet_hashtables.c | 47 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() 61 static bool sk_is_connect_bind(const struct sock *sk) in sk_is_connect_bind() argument [all …]
|
| H A D | tcp_bbr.c | 204 static void bbr_check_probe_rtt_done(struct sock *sk); 207 static bool bbr_full_bw_reached(const struct sock *sk) in bbr_full_bw_reached() argument 209 const struct bbr *bbr = inet_csk_ca(sk); in bbr_full_bw_reached() 215 static u32 bbr_max_bw(const struct sock *sk) in bbr_max_bw() argument 217 struct bbr *bbr = inet_csk_ca(sk); in bbr_max_bw() 223 static u32 bbr_bw(const struct sock *sk) in bbr_bw() argument 225 struct bbr *bbr = inet_csk_ca(sk); in bbr_bw() 227 return bbr->lt_use_bw ? bbr->lt_bw : bbr_max_bw(sk); in bbr_bw() 233 static u16 bbr_extra_acked(const struct sock *sk) in bbr_extra_acked() argument 235 struct bbr *bbr = inet_csk_ca(sk); in bbr_extra_acked() [all …]
|
| /linux/net/mptcp/ |
| H A D | protocol.c | 31 static unsigned int mptcp_inq_hint(const struct sock *sk); 50 static void __mptcp_destroy_sock(struct sock *sk); 51 static void mptcp_check_send_data_fin(struct sock *sk); 64 static const struct proto_ops *mptcp_fallback_tcp_ops(const struct sock *sk) in mptcp_fallback_tcp_ops() argument 66 unsigned short family = READ_ONCE(sk->sk_family); in mptcp_fallback_tcp_ops() 106 struct sock *sk = (struct sock *)msk; in __mptcp_socket_create() local 110 err = mptcp_subflow_create_socket(sk, sk->sk_family, &ssock); in __mptcp_socket_create() 114 msk->scaling_ratio = tcp_sk(ssock->sk)->scaling_ratio; in __mptcp_socket_create() 115 WRITE_ONCE(msk->first, ssock->sk); in __mptcp_socket_create() 116 subflow = mptcp_subflow_ctx(ssock->sk); in __mptcp_socket_create() [all …]
|
| /linux/net/x25/ |
| H A D | x25_in.c | 32 static int x25_queue_rx_frame(struct sock *sk, struct sk_buff *skb, int more) in x25_queue_rx_frame() argument 35 struct x25_sock *x25 = x25_sk(sk); in x25_queue_rx_frame() 44 skb_set_owner_r(skb, sk); in x25_queue_rx_frame() 77 skb_set_owner_r(skbn, sk); in x25_queue_rx_frame() 78 skb_queue_tail(&sk->sk_receive_queue, skbn); in x25_queue_rx_frame() 79 if (!sock_flag(sk, SOCK_DEAD)) in x25_queue_rx_frame() 80 sk->sk_data_ready(sk); in x25_queue_rx_frame() 90 static int x25_state1_machine(struct sock *sk, struct sk_buff *skb, int frametype) in x25_state1_machine() argument 94 struct x25_sock *x25 = x25_sk(sk); in x25_state1_machine() 99 x25_stop_timer(sk); in x25_state1_machine() [all …]
|
| /linux/sound/usb/usx2y/ |
| H A D | usb_stream.c | 13 static unsigned int usb_stream_next_packet_size(struct usb_stream_kernel *sk) in usb_stream_next_packet_size() argument 15 struct usb_stream *s = sk->s; in usb_stream_next_packet_size() 17 sk->out_phase_peeked = (sk->out_phase & 0xffff) + sk->freqn; in usb_stream_next_packet_size() 18 return (sk->out_phase_peeked >> 16) * s->cfg.frame_size; in usb_stream_next_packet_size() 21 static void playback_prep_freqn(struct usb_stream_kernel *sk, struct urb *urb) in playback_prep_freqn() argument 23 struct usb_stream *s = sk->s; in playback_prep_freqn() 26 for (pack = 0; pack < sk->n_o_ps; pack++) { in playback_prep_freqn() 27 int l = usb_stream_next_packet_size(sk); in playback_prep_freqn() 32 sk->out_phase = sk->out_phase_peeked; in playback_prep_freqn() 44 static int init_pipe_urbs(struct usb_stream_kernel *sk, in init_pipe_urbs() argument [all …]
|