Home
last modified time | relevance | path

Searched refs:sock (Results 1 – 200 of 633) sorted by relevance

1234

/linux-4.4.14/drivers/pcmcia/
Ddb1xxx_ss.c70 static int db1300_card_inserted(struct db1x_pcmcia_sock *sock) in db1300_card_inserted() argument
76 static int db1200_card_inserted(struct db1x_pcmcia_sock *sock) in db1200_card_inserted() argument
81 return sigstat & 1 << (8 + 2 * sock->nr); in db1200_card_inserted()
85 static int db1000_card_inserted(struct db1x_pcmcia_sock *sock) in db1000_card_inserted() argument
87 return !gpio_get_value(sock->insert_gpio); in db1000_card_inserted()
90 static int db1x_card_inserted(struct db1x_pcmcia_sock *sock) in db1x_card_inserted() argument
92 switch (sock->board_type) { in db1x_card_inserted()
94 return db1200_card_inserted(sock); in db1x_card_inserted()
96 return db1300_card_inserted(sock); in db1x_card_inserted()
98 return db1000_card_inserted(sock); in db1x_card_inserted()
[all …]
Dxxs1500_ss.c70 struct xxs1500_pcmcia_sock *sock = data; in cdirq() local
72 pcmcia_parse_events(&sock->socket, SS_DETECT); in cdirq()
80 struct xxs1500_pcmcia_sock *sock = to_xxs_socket(skt); in xxs1500_pcmcia_configure() local
96 changed = state->flags ^ sock->old_flags; in xxs1500_pcmcia_configure()
109 sock->old_flags = state->flags; in xxs1500_pcmcia_configure()
178 struct xxs1500_pcmcia_sock *sock = to_xxs_socket(skt); in au1x00_pcmcia_set_io_map() local
180 map->start = (u32)sock->virt_io; in au1x00_pcmcia_set_io_map()
189 struct xxs1500_pcmcia_sock *sock = to_xxs_socket(skt); in au1x00_pcmcia_set_mem_map() local
192 map->static_start = sock->phys_attr + map->card_start; in au1x00_pcmcia_set_mem_map()
194 map->static_start = sock->phys_mem + map->card_start; in au1x00_pcmcia_set_mem_map()
[all …]
Dsa11xx_base.h69 #define MECR_SET(mecr, sock, shift, mask, bs) \ argument
71 ((sock)==0?MECR_SOCKET_0_SHIFT:MECR_SOCKET_1_SHIFT)))|\
72 (((bs)<<(shift))<<((sock)==0?MECR_SOCKET_0_SHIFT:MECR_SOCKET_1_SHIFT)))
74 #define MECR_GET(mecr, sock, shift, mask) \ argument
75 ((((mecr)>>(((sock)==0)?MECR_SOCKET_0_SHIFT:MECR_SOCKET_1_SHIFT))>>\
78 #define MECR_BSIO_SET(mecr, sock, bs) \ argument
79 MECR_SET((mecr), (sock), MECR_BSIO_SHIFT, MECR_BS_MASK, (bs))
81 #define MECR_BSIO_GET(mecr, sock) \ argument
82 MECR_GET((mecr), (sock), MECR_BSIO_SHIFT, MECR_BS_MASK)
84 #define MECR_BSA_SET(mecr, sock, bs) \ argument
[all …]
Di82365.c217 static u_char i365_get(u_short sock, u_short reg) in i365_get() argument
222 unsigned int port = socket[sock].ioaddr; in i365_get()
224 reg = I365_REG(socket[sock].psock, reg); in i365_get()
231 static void i365_set(u_short sock, u_short reg, u_char data) in i365_set() argument
236 unsigned int port = socket[sock].ioaddr; in i365_set()
237 u_char val = I365_REG(socket[sock].psock, reg); in i365_set()
243 static void i365_bset(u_short sock, u_short reg, u_char mask) in i365_bset() argument
245 u_char d = i365_get(sock, reg); in i365_bset()
247 i365_set(sock, reg, d); in i365_bset()
250 static void i365_bclr(u_short sock, u_short reg, u_char mask) in i365_bclr() argument
[all …]
Dm32r_pcc.c84 void pcc_iorw(int sock, unsigned long port, void *buf, size_t size, size_t nmemb, int wr, int flag) in pcc_iorw() argument
92 pcc_socket_t *t = &socket[sock]; in pcc_iorw()
124 pcc_set(sock, PCCR, 0); in pcc_iorw()
130 pcc_set(sock, PCMOD, PCMOD_AS_IO | cbsz | need_ex); in pcc_iorw()
131 pcc_set(sock, PCADR, addr & 0x1ff00000); in pcc_iorw()
136 pcc_set(sock, PCCR, 1); in pcc_iorw()
214 if ((addr = pcc_get(sock, PCIRC)) & PCIRC_BWERR) { in pcc_iorw()
217 pcc_set(sock, PCIRC, addr); in pcc_iorw()
233 void pcc_ioread(int sock, unsigned long port, void *buf, size_t size, size_t nmemb, int flag) { in pcc_ioread() argument
234 pcc_iorw(sock, port, buf, size, nmemb, 0, flag); in pcc_ioread()
[all …]
Dm32r_cfc.c104 void pcc_ioread_byte(int sock, unsigned long port, void *buf, size_t size, in pcc_ioread_byte() argument
113 sock, port, buf, size, nmemb, flag); in pcc_ioread_byte()
129 void pcc_ioread_word(int sock, unsigned long port, void *buf, size_t size, in pcc_ioread_word() argument
138 sock, port, buf, size, nmemb, flag); in pcc_ioread_word()
160 void pcc_iowrite_byte(int sock, unsigned long port, void *buf, size_t size, in pcc_iowrite_byte() argument
169 sock, port, buf, size, nmemb, flag); in pcc_iowrite_byte()
185 void pcc_iowrite_word(int sock, unsigned long port, void *buf, size_t size, in pcc_iowrite_word() argument
194 sock, port, buf, size, nmemb, flag); in pcc_iowrite_word()
247 static unsigned int pcc_get(u_short sock, unsigned int reg) in pcc_get() argument
255 static void pcc_set(u_short sock, unsigned int reg, unsigned int data) in pcc_set() argument
[all …]
Di82092.c380 static void set_bridge_state(int sock) in set_bridge_state() argument
383 indirect_write(sock, I365_GBLCTL,0x00); in set_bridge_state()
384 indirect_write(sock, I365_GENCTL,0x00); in set_bridge_state()
386 indirect_setbit(sock, I365_INTCTL,0x08); in set_bridge_state()
395 static int i82092aa_init(struct pcmcia_socket *sock) in i82092aa_init() argument
406 i82092aa_set_io_map(sock, &io); in i82092aa_init()
410 i82092aa_set_mem_map(sock, &mem); in i82092aa_init()
419 unsigned int sock = container_of(socket, struct socket_info, socket)->number; in i82092aa_get_status() local
424 status = indirect_read(sock,I365_STATUS); /* Interface Status Register */ in i82092aa_get_status()
433 if (indirect_read(sock, I365_INTCTL) & I365_PC_IOCARD) { in i82092aa_get_status()
[all …]
Dtcic.h102 #define TCIC_PWR_VCC(sock) (0x01<<(sock)) argument
104 #define TCIC_PWR_VPP(sock) (0x08<<(sock)) argument
185 #define TCIC_SCF1(sock) ((sock)<<3) argument
186 #define TCIC_SCF2(sock) (((sock)<<3)+2) argument
217 #define TCIC_MWIN(sock,map) (0x100+(((map)+((sock)<<2))<<3)) argument
245 #define TCIC_IWIN(sock,map) (0x200+(((map)+((sock)<<1))<<2)) argument
Dbcm63xx_pcmcia.c52 static int bcm63xx_pcmcia_sock_init(struct pcmcia_socket *sock) in bcm63xx_pcmcia_sock_init() argument
63 static int bcm63xx_pcmcia_suspend(struct pcmcia_socket *sock) in bcm63xx_pcmcia_suspend() argument
75 static int bcm63xx_pcmcia_set_socket(struct pcmcia_socket *sock, in bcm63xx_pcmcia_set_socket() argument
82 skt = sock->driver_data; in bcm63xx_pcmcia_set_socket()
249 static int bcm63xx_pcmcia_get_status(struct pcmcia_socket *sock, in bcm63xx_pcmcia_get_status() argument
254 skt = sock->driver_data; in bcm63xx_pcmcia_get_status()
290 static int bcm63xx_pcmcia_set_io_map(struct pcmcia_socket *sock, in bcm63xx_pcmcia_set_io_map() argument
298 static int bcm63xx_pcmcia_set_mem_map(struct pcmcia_socket *sock, in bcm63xx_pcmcia_set_mem_map() argument
304 skt = sock->driver_data; in bcm63xx_pcmcia_set_mem_map()
329 struct pcmcia_socket *sock; in bcm63xx_drv_pcmcia_probe() local
[all …]
Dvrc4171_card.c235 static int pccard_init(struct pcmcia_socket *sock) in pccard_init() argument
240 sock->features |= SS_CAP_PCCARD | SS_CAP_PAGE_REGS; in pccard_init()
241 sock->irq_mask = 0; in pccard_init()
242 sock->map_size = 0x1000; in pccard_init()
243 sock->pci_irq = vrc4171_irq; in pccard_init()
245 slot = sock->sock; in pccard_init()
254 static int pccard_get_status(struct pcmcia_socket *sock, u_int *value) in pccard_get_status() argument
260 if (sock == NULL || sock->sock >= CARD_MAX_SLOTS || value == NULL) in pccard_get_status()
263 slot = sock->sock; in pccard_get_status()
318 static int pccard_set_socket(struct pcmcia_socket *sock, socket_state_t *state) in pccard_set_socket() argument
[all …]
Dpd6729.c245 static int pd6729_get_status(struct pcmcia_socket *sock, u_int *value) in pd6729_get_status() argument
248 = container_of(sock, struct pd6729_socket, socket); in pd6729_get_status()
294 static int pd6729_set_socket(struct pcmcia_socket *sock, socket_state_t *state) in pd6729_set_socket() argument
297 = container_of(sock, struct pd6729_socket, socket); in pd6729_set_socket()
322 dev_dbg(&sock->dev, "Auto power\n"); in pd6729_set_socket()
326 dev_dbg(&sock->dev, "Power Enabled\n"); in pd6729_set_socket()
334 dev_dbg(&sock->dev, in pd6729_set_socket()
341 dev_dbg(&sock->dev, in pd6729_set_socket()
348 dev_dbg(&sock->dev, in pd6729_set_socket()
356 dev_dbg(&sock->dev, "not setting Vpp on socket %i\n", in pd6729_set_socket()
[all …]
/linux-4.4.14/include/net/
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 …]
Dinet_connection_sock.h39 int (*queue_xmit)(struct sock *sk, struct sk_buff *skb, struct flowi *fl);
40 void (*send_check)(struct sock *sk, struct sk_buff *skb);
41 int (*rebuild_header)(struct sock *sk);
42 void (*sk_rx_dst_set)(struct sock *sk, const struct sk_buff *skb);
43 int (*conn_request)(struct sock *sk, struct sk_buff *skb);
44 struct sock *(*syn_recv_sock)(const struct sock *sk, struct sk_buff *skb,
52 int (*setsockopt)(struct sock *sk, int level, int optname,
54 int (*getsockopt)(struct sock *sk, int level, int optname,
57 int (*compat_setsockopt)(struct sock *sk,
60 int (*compat_getsockopt)(struct sock *sk,
[all …]
Dsock.h102 void SOCK_DEBUG(const struct sock *sk, const char *msg, ...) in SOCK_DEBUG()
126 struct sock;
214 struct sock *skc_listener; /* request_sock */
321 struct sock { struct
453 void (*sk_state_change)(struct sock *sk); argument
454 void (*sk_data_ready)(struct sock *sk); argument
455 void (*sk_write_space)(struct sock *sk); argument
456 void (*sk_error_report)(struct sock *sk); argument
457 int (*sk_backlog_rcv)(struct sock *sk, argument
459 void (*sk_destruct)(struct sock *sk); argument
[all …]
Dtcp.h53 void tcp_time_wait(struct sock *sk, int state, int timeo);
293 static inline bool tcp_under_memory_pressure(const struct sock *sk) in tcp_under_memory_pressure()
317 static inline bool tcp_out_of_memory(struct sock *sk) in tcp_out_of_memory()
325 void sk_forced_mem_schedule(struct sock *sk, int size);
327 static inline bool tcp_too_many_orphans(struct sock *sk, int shift) in tcp_too_many_orphans()
340 bool tcp_check_oom(struct sock *sk, int shift);
355 void tcp_shutdown(struct sock *sk, int how);
361 int tcp_sendmsg(struct sock *sk, struct msghdr *msg, size_t size);
362 int tcp_sendpage(struct sock *sk, struct page *page, int offset, size_t size,
364 void tcp_release_cb(struct sock *sk);
[all …]
Dnetrom.h64 struct sock sock; member
187 void nr_destroy_socket(struct sock *);
194 int nr_process_rx_frame(struct sock *, struct sk_buff *);
202 void nr_output(struct sock *, struct sk_buff *);
203 void nr_send_nak_frame(struct sock *);
204 void nr_kick(struct sock *);
205 void nr_transmit_buffer(struct sock *, struct sk_buff *);
206 void nr_establish_data_link(struct sock *);
207 void nr_enquiry_response(struct sock *);
208 void nr_check_iframes_acked(struct sock *, unsigned short);
[all …]
Dinet_common.h12 struct sock;
16 int inet_release(struct socket *sock);
17 int inet_stream_connect(struct socket *sock, struct sockaddr *uaddr,
19 int __inet_stream_connect(struct socket *sock, struct sockaddr *uaddr,
21 int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr,
23 int inet_accept(struct socket *sock, struct socket *newsock, int flags);
24 int inet_sendmsg(struct socket *sock, struct msghdr *msg, size_t size);
25 ssize_t inet_sendpage(struct socket *sock, struct page *page, int offset,
27 int inet_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
29 int inet_shutdown(struct socket *sock, int how);
[all …]
Dx25.h148 struct sock sk;
177 static inline struct x25_sock *x25_sk(const struct sock *sk) in x25_sk()
196 struct sock *x25_find_socket(unsigned int, struct x25_neigh *);
197 void x25_destroy_socket_from_timer(struct sock *);
213 int x25_negotiate_facilities(struct sk_buff *, struct sock *,
226 int x25_process_rx_frame(struct sock *, struct sk_buff *);
227 int x25_backlog_rcv(struct sock *, struct sk_buff *);
255 int x25_output(struct sock *, struct sk_buff *);
256 void x25_kick(struct sock *);
257 void x25_enquiry_response(struct sock *);
[all …]
Drose.h126 struct sock sock; member
167 struct sock *rose_find_socket(unsigned int, struct rose_neigh *);
172 void rose_destroy_socket(struct sock *);
178 int rose_process_rx_frame(struct sock *, struct sk_buff *);
197 void rose_kick(struct sock *);
198 void rose_enquiry_response(struct sock *);
222 void rose_clear_queues(struct sock *);
223 void rose_frames_acked(struct sock *, unsigned short);
224 void rose_requeue_frames(struct sock *);
225 int rose_validate_nr(struct sock *, unsigned short);
[all …]
Dinet_hashtables.h187 void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb,
196 static inline int inet_sk_listen_hashfn(const struct sock *sk) in inet_sk_listen_hashfn()
202 int __inet_inherit_port(const struct sock *sk, struct sock *child);
204 void inet_put_port(struct sock *sk);
208 bool inet_ehash_insert(struct sock *sk, struct sock *osk);
209 bool inet_ehash_nolisten(struct sock *sk, struct sock *osk);
210 void __inet_hash(struct sock *sk, struct sock *osk);
211 void inet_hash(struct sock *sk);
212 void inet_unhash(struct sock *sk);
214 struct sock *__inet_lookup_listener(struct net *net,
[all …]
Ddn_nsp.h18 void dn_nsp_send_data_ack(struct sock *sk);
19 void dn_nsp_send_oth_ack(struct sock *sk);
20 void dn_nsp_delayed_ack(struct sock *sk);
21 void dn_send_conn_ack(struct sock *sk);
22 void dn_send_conn_conf(struct sock *sk, gfp_t gfp);
23 void dn_nsp_send_disc(struct sock *sk, unsigned char type,
27 void dn_nsp_send_link(struct sock *sk, unsigned char lsflags, char fcval);
28 void dn_nsp_send_conninit(struct sock *sk, unsigned char flags);
30 void dn_nsp_output(struct sock *sk);
31 int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb,
[all …]
Dllc_conn.h34 struct sock sk;
83 static inline struct llc_sock *llc_sk(const struct sock *sk) in llc_sk()
98 struct sock *llc_sk_alloc(struct net *net, int family, gfp_t priority,
100 void llc_sk_free(struct sock *sk);
102 void llc_sk_reset(struct sock *sk);
105 int llc_conn_state_process(struct sock *sk, struct sk_buff *skb);
106 void llc_conn_send_pdu(struct sock *sk, struct sk_buff *skb);
107 void llc_conn_rtn_pdu(struct sock *sk, struct sk_buff *skb);
108 void llc_conn_resend_i_pdu_as_cmd(struct sock *sk, u8 nr, u8 first_p_bit);
109 void llc_conn_resend_i_pdu_as_rsp(struct sock *sk, u8 nr, u8 first_f_bit);
[all …]
Dudp.h131 static inline __wsum udp_csum_outgoing(struct sock *sk, struct sk_buff *skb) in udp_csum_outgoing()
180 static inline void udp_lib_hash(struct sock *sk) in udp_lib_hash()
185 void udp_lib_unhash(struct sock *sk);
186 void udp_lib_rehash(struct sock *sk, u16 new_hash);
188 static inline void udp_lib_close(struct sock *sk, long timeout) in udp_lib_close()
193 int udp_lib_get_port(struct sock *sk, unsigned short snum,
194 int (*)(const struct sock *, const struct sock *),
237 int udp_get_port(struct sock *sk, unsigned short snum,
238 int (*saddr_cmp)(const struct sock *,
239 const struct sock *));
[all …]
Dip.h36 struct sock;
73 struct sock *sk;
75 void (*destructor)(struct sock *);
76 struct sock *saved_sk;
103 int ip_build_and_send_pkt(struct sk_buff *skb, const struct sock *sk,
110 int ip_output(struct net *net, struct sock *sk, struct sk_buff *skb);
111 int ip_mc_output(struct net *net, struct sock *sk, struct sk_buff *skb);
112 int ip_do_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
113 int (*output)(struct net *, struct sock *, struct sk_buff *));
115 int __ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb);
[all …]
Daf_vsock.h35 struct sock sk;
53 struct sock *listener;
77 struct sock *__vsock_create(struct net *net,
78 struct socket *sock,
79 struct sock *parent,
170 void vsock_release_pending(struct sock *pending);
171 void vsock_add_pending(struct sock *listener, struct sock *pending);
172 void vsock_remove_pending(struct sock *listener, struct sock *pending);
173 void vsock_enqueue_accept(struct sock *listener, struct sock *connected);
177 struct sock *vsock_find_bound_socket(struct sockaddr_vm *addr);
[all …]
Dinet_sock.h108 static inline u32 inet_request_mark(const struct sock *sk, struct sk_buff *skb) in inet_request_mark()
160 struct sock sk;
220 static inline struct sock *sk_to_full_sk(struct sock *sk) in sk_to_full_sk()
230 static inline const struct sock *sk_const_to_full_sk(const struct sock *sk) in sk_const_to_full_sk()
239 static inline struct sock *skb_to_full_sk(const struct sk_buff *skb) in skb_to_full_sk()
244 static inline struct inet_sock *inet_sk(const struct sock *sk) in inet_sk()
249 static inline void __inet_sk_copy_descendant(struct sock *sk_to, in __inet_sk_copy_descendant()
250 const struct sock *sk_from, in __inet_sk_copy_descendant()
257 static inline void inet_sk_copy_descendant(struct sock *sk_to, in inet_sk_copy_descendant()
258 const struct sock *sk_from) in inet_sk_copy_descendant()
[all …]
Dping.h34 int (*ipv6_recv_error)(struct sock *sk, struct msghdr *msg, int len,
36 void (*ip6_datagram_recv_common_ctl)(struct sock *sk,
39 void (*ip6_datagram_recv_specific_ctl)(struct sock *sk,
43 void (*ipv6_icmp_error)(struct sock *sk, struct sk_buff *skb, int err,
67 int ping_get_port(struct sock *sk, unsigned short ident);
68 void ping_hash(struct sock *sk);
69 void ping_unhash(struct sock *sk);
71 int ping_init_sock(struct sock *sk);
72 void ping_close(struct sock *sk, long timeout);
73 int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len);
[all …]
Dscm.h39 int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm);
44 static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm) in unix_get_peersec_dgram() argument
46 security_socket_getpeersec_dgram(sock, NULL, &scm->secid); in unix_get_peersec_dgram()
49 static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm) in unix_get_peersec_dgram() argument
75 static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, in scm_send() argument
83 unix_get_peersec_dgram(sock, scm); in scm_send()
86 return __scm_send(sock, msg, scm); in scm_send()
90 static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm) in scm_passec() argument
96 if (test_bit(SOCK_PASSSEC, &sock->flags)) { in scm_passec()
106 static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm) in scm_passec() argument
[all …]
Dcompat.h5 struct sock;
32 int compat_sock_get_timestamp(struct sock *, struct timeval __user *);
33 int compat_sock_get_timestampns(struct sock *, struct timespec __user *);
58 int cmsghdr_from_user_compat_to_kern(struct msghdr *, struct sock *,
61 int compat_mc_setsockopt(struct sock *, int, int, char __user *, unsigned int,
62 int (*)(struct sock *, int, int, char __user *,
64 int compat_mc_getsockopt(struct sock *, int, int, char __user *, int __user *,
65 int (*)(struct sock *, int, int, char __user *,
Daf_unix.h13 struct sock *unix_get_socket(struct file *filp);
14 struct sock *unix_peer_get(struct sock *);
52 struct sock sk;
56 struct sock *peer;
68 static inline struct unix_sock *unix_sk(const struct sock *sk) in unix_sk()
75 long unix_inq_len(struct sock *sk);
76 long unix_outq_len(struct sock *sk);
Dinet6_connection_sock.h22 struct sock;
25 int inet6_csk_bind_conflict(const struct sock *sk,
28 struct dst_entry *inet6_csk_route_req(const struct sock *sk, struct flowi6 *fl6,
31 void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr);
33 int inet6_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl);
35 struct dst_entry *inet6_csk_update_pmtu(struct sock *sk, u32 mtu);
Dipv6.h194 struct sock *sk;
196 void (*destructor)(struct sock *);
274 struct ip6_flowlabel *fl6_sock_lookup(struct sock *sk, __be32 label);
278 void fl6_free_socklist(struct sock *sk);
279 int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen);
280 int ipv6_flowlabel_opt_get(struct sock *sk, struct in6_flowlabel_req *freq,
293 int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
296 int ip6_ra_control(struct sock *sk, int sel);
300 struct ipv6_txoptions *ipv6_dup_options(struct sock *sk,
302 struct ipv6_txoptions *ipv6_renew_options(struct sock *sk,
[all …]
Dtransp_v6.h33 int udpv6_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len);
36 void ip6_datagram_recv_ctl(struct sock *sk, struct msghdr *msg,
38 void ip6_datagram_recv_common_ctl(struct sock *sk, struct msghdr *msg,
40 void ip6_datagram_recv_specific_ctl(struct sock *sk, struct msghdr *msg,
43 int ip6_datagram_send_ctl(struct net *net, struct sock *sk, struct msghdr *msg,
47 void ip6_dgram_sock_seq_show(struct seq_file *seq, struct sock *sp,
55 void inet6_destroy_sock(struct sock *sk);
Dtimewait_sock.h22 int (*twsk_unique)(struct sock *sk,
23 struct sock *sktw, void *twp);
24 void (*twsk_destructor)(struct sock *sk);
27 static inline int twsk_unique(struct sock *sk, struct sock *sktw, void *twp) in twsk_unique()
34 static inline void twsk_destructor(struct sock *sk) in twsk_destructor()
Drequest_sock.h35 int (*rtx_syn_ack)(const struct sock *sk,
37 void (*send_ack)(const struct sock *sk, struct sk_buff *skb,
39 void (*send_reset)(const struct sock *sk,
45 int inet_rtx_syn_ack(const struct sock *parent, struct request_sock *req);
65 struct sock *sk;
71 static inline struct request_sock *inet_reqsk(struct sock *sk) in inet_reqsk()
76 static inline struct sock *req_to_sk(struct request_sock *req) in req_to_sk()
78 return (struct sock *)req; in req_to_sk()
82 reqsk_alloc(const struct request_sock_ops *ops, struct sock *sk_listener, in reqsk_alloc()
181 void reqsk_fastopen_remove(struct sock *sk, struct request_sock *req,
[all …]
Drawv6.h10 int rawv6_rcv(struct sock *sk, struct sk_buff *skb);
13 int rawv6_mh_filter_register(int (*filter)(struct sock *sock,
15 int rawv6_mh_filter_unregister(int (*filter)(struct sock *sock,
Dbusy_poll.h50 static inline unsigned long sk_busy_loop_end_time(struct sock *sk) in sk_busy_loop_end_time()
61 static inline bool sk_can_busy_loop(struct sock *sk) in sk_can_busy_loop()
78 static inline bool sk_busy_loop(struct sock *sk, int nonblock) in sk_busy_loop()
128 static inline void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb) in sk_mark_napi_id()
144 static inline bool sk_can_busy_loop(struct sock *sk) in sk_can_busy_loop()
154 static inline void sk_mark_napi_id(struct sock *sk, struct sk_buff *skb) in sk_mark_napi_id()
163 static inline bool sk_busy_loop(struct sock *sk, int nonblock) in sk_busy_loop()
Dudp_tunnel.h65 typedef int (*udp_tunnel_encap_rcv_t)(struct sock *sk, struct sk_buff *skb);
66 typedef void (*udp_tunnel_encap_destroy_t)(struct sock *sk);
77 void setup_udp_tunnel_sock(struct net *net, struct socket *sock,
81 int udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb,
87 int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk,
95 void udp_tunnel_sock_release(struct socket *sock);
118 static inline void udp_tunnel_encap_enable(struct socket *sock) in udp_tunnel_encap_enable() argument
121 if (sock->sk->sk_family == PF_INET6) in udp_tunnel_encap_enable()
Ddn.h121 int (*persist_fxn)(struct sock *sk);
123 void (*keepalive_fxn)(struct sock *sk);
130 void (*delack_fxn)(struct sock *sk);
134 static inline struct dn_scp *DN_SK(struct sock *sk) in DN_SK()
211 struct sock *dn_sklist_find_listener(struct sockaddr_dn *addr);
212 struct sock *dn_find_by_skb(struct sk_buff *skb);
215 int dn_destroy_timer(struct sock *sk);
222 void dn_start_slow_timer(struct sock *sk);
223 void dn_stop_slow_timer(struct sock *sk);
Dinet6_hashtables.h47 struct sock *__inet6_lookup_established(struct net *net,
54 struct sock *inet6_lookup_listener(struct net *net,
61 static inline struct sock *__inet6_lookup(struct net *net, in __inet6_lookup()
69 struct sock *sk = __inet6_lookup_established(net, hashinfo, saddr, in __inet6_lookup()
78 static inline struct sock *__inet6_lookup_skb(struct inet_hashinfo *hashinfo, in __inet6_lookup_skb()
84 struct sock *sk = skb_steal_sock(skb); in __inet6_lookup_skb()
95 struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo,
Dip6_route.h67 struct dst_entry *ip6_route_output_flags(struct net *net, const struct sock *sk,
71 const struct sock *sk, in ip6_route_output()
120 void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu);
124 void ip6_sk_redirect(struct sk_buff *skb, struct sock *sk);
144 static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, in ip6_dst_store()
175 int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
176 int (*output)(struct net *, struct sock *, struct sk_buff *));
187 static inline bool ip6_sk_accept_pmtu(const struct sock *sk) in ip6_sk_accept_pmtu()
193 static inline bool ip6_sk_ignore_df(const struct sock *sk) in ip6_sk_ignore_df()
Daddrconf.h90 int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2);
159 int ipv6_sock_mc_join(struct sock *sk, int ifindex,
161 int ipv6_sock_mc_drop(struct sock *sk, int ifindex,
163 void ipv6_sock_mc_close(struct sock *sk);
164 bool inet6_mc_check(struct sock *sk, const struct in6_addr *mc_addr,
188 int (*ipv6_sock_mc_join)(struct sock *sk, int ifindex,
190 int (*ipv6_sock_mc_drop)(struct sock *sk, int ifindex,
192 int (*ipv6_dst_lookup)(struct net *net, struct sock *sk,
233 int ipv6_sock_ac_join(struct sock *sk, int ifindex,
235 int ipv6_sock_ac_drop(struct sock *sk, int ifindex,
[all …]
/linux-4.4.14/net/rds/
Dtcp_listen.c41 int rds_tcp_keepalive(struct socket *sock) in rds_tcp_keepalive() argument
49 ret = kernel_setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, in rds_tcp_keepalive()
54 ret = kernel_setsockopt(sock, IPPROTO_TCP, TCP_KEEPCNT, in rds_tcp_keepalive()
59 ret = kernel_setsockopt(sock, IPPROTO_TCP, TCP_KEEPIDLE, in rds_tcp_keepalive()
67 ret = kernel_setsockopt(sock, IPPROTO_TCP, TCP_KEEPINTVL, in rds_tcp_keepalive()
73 int rds_tcp_accept_one(struct socket *sock) in rds_tcp_accept_one() argument
81 ret = sock_create_kern(sock_net(sock->sk), sock->sk->sk_family, in rds_tcp_accept_one()
82 sock->sk->sk_type, sock->sk->sk_protocol, in rds_tcp_accept_one()
87 new_sock->type = sock->type; in rds_tcp_accept_one()
88 new_sock->ops = sock->ops; in rds_tcp_accept_one()
[all …]
Dtcp_connect.c40 void rds_tcp_state_change(struct sock *sk) in rds_tcp_state_change()
42 void (*state_change)(struct sock *sk); in rds_tcp_state_change()
78 struct socket *sock = NULL; in rds_tcp_conn_connect() local
83 SOCK_STREAM, IPPROTO_TCP, &sock); in rds_tcp_conn_connect()
87 rds_tcp_tune(sock); in rds_tcp_conn_connect()
93 ret = sock->ops->bind(sock, (struct sockaddr *)&src, sizeof(src)); in rds_tcp_conn_connect()
108 rds_tcp_set_callbacks(sock, conn); in rds_tcp_conn_connect()
109 ret = sock->ops->connect(sock, (struct sockaddr *)&dest, sizeof(dest), in rds_tcp_conn_connect()
116 rds_tcp_keepalive(sock); in rds_tcp_conn_connect()
117 sock = NULL; in rds_tcp_conn_connect()
[all …]
Dtcp.c59 void rds_tcp_nonagle(struct socket *sock) in rds_tcp_nonagle() argument
65 sock->ops->setsockopt(sock, SOL_TCP, TCP_NODELAY, (char __user *)&val, in rds_tcp_nonagle()
74 void rds_tcp_tune(struct socket *sock) in rds_tcp_tune() argument
76 rds_tcp_nonagle(sock); in rds_tcp_tune()
89 void rds_tcp_restore_callbacks(struct socket *sock, in rds_tcp_restore_callbacks() argument
92 rdsdebug("restoring sock %p callbacks from tc %p\n", sock, tc); in rds_tcp_restore_callbacks()
93 write_lock_bh(&sock->sk->sk_callback_lock); in rds_tcp_restore_callbacks()
103 sock->sk->sk_write_space = tc->t_orig_write_space; in rds_tcp_restore_callbacks()
104 sock->sk->sk_data_ready = tc->t_orig_data_ready; in rds_tcp_restore_callbacks()
105 sock->sk->sk_state_change = tc->t_orig_state_change; in rds_tcp_restore_callbacks()
[all …]
Dtcp.h46 void rds_tcp_tune(struct socket *sock);
47 void rds_tcp_nonagle(struct socket *sock);
48 void rds_tcp_set_callbacks(struct socket *sock, struct rds_connection *conn);
49 void rds_tcp_restore_callbacks(struct socket *sock,
55 void rds_tcp_accept_work(struct sock *sk);
60 void rds_tcp_state_change(struct sock *sk);
65 void rds_tcp_listen_data_ready(struct sock *sk);
66 int rds_tcp_accept_one(struct socket *sock);
67 int rds_tcp_keepalive(struct socket *sock);
72 void rds_tcp_data_ready(struct sock *sk);
[all …]
Daf_rds.c58 static int rds_release(struct socket *sock) in rds_release() argument
60 struct sock *sk = sock->sk; in rds_release()
88 sock->sk = NULL; in rds_release()
112 static int rds_getname(struct socket *sock, struct sockaddr *uaddr, in rds_getname() argument
116 struct rds_sock *rs = rds_sk_to_rs(sock->sk); in rds_getname()
155 static unsigned int rds_poll(struct file *file, struct socket *sock, in rds_poll() argument
158 struct sock *sk = sock->sk; in rds_poll()
195 static int rds_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in rds_ioctl() argument
280 static int rds_setsockopt(struct socket *sock, int level, int optname, in rds_setsockopt() argument
283 struct rds_sock *rs = rds_sk_to_rs(sock->sk); in rds_setsockopt()
[all …]
Dtcp_send.c40 static void rds_tcp_cork(struct socket *sock, int val) in rds_tcp_cork() argument
46 sock->ops->setsockopt(sock, SOL_TCP, TCP_CORK, (char __user *)&val, in rds_tcp_cork()
66 static int rds_tcp_sendmsg(struct socket *sock, void *data, unsigned int len) in rds_tcp_sendmsg() argument
76 return kernel_sendmsg(sock, &msg, &vec, 1, vec.iov_len); in rds_tcp_sendmsg()
177 void rds_tcp_write_space(struct sock *sk) in rds_tcp_write_space()
179 void (*write_space)(struct sock *sk); in rds_tcp_write_space()
/linux-4.4.14/drivers/memstick/host/
Dtifm_ms.c89 struct tifm_dev *sock = host->dev; in tifm_ms_read_data() local
102 while (!(TIFM_MS_STAT_EMP & readl(sock->addr + SOCK_MS_STATUS))) { in tifm_ms_read_data()
105 *(unsigned int *)(buf + off) = __raw_readl(sock->addr in tifm_ms_read_data()
112 && !(TIFM_MS_STAT_EMP & readl(sock->addr + SOCK_MS_STATUS))) { in tifm_ms_read_data()
113 host->io_word = readl(sock->addr + SOCK_MS_DATA); in tifm_ms_read_data()
129 struct tifm_dev *sock = host->dev; in tifm_ms_write_data() local
141 && !(TIFM_MS_STAT_FUL & readl(sock->addr + SOCK_MS_STATUS))) { in tifm_ms_write_data()
142 writel(TIFM_MS_SYS_FDIR | readl(sock->addr + SOCK_MS_SYSTEM), in tifm_ms_write_data()
143 sock->addr + SOCK_MS_SYSTEM); in tifm_ms_write_data()
144 writel(host->io_word, sock->addr + SOCK_MS_DATA); in tifm_ms_write_data()
[all …]
/linux-4.4.14/drivers/mmc/host/
Dtifm_sd.c117 struct tifm_dev *sock = host->dev; in tifm_sd_read_fifo() local
128 val = readl(sock->addr + SOCK_MMCSD_DATA); in tifm_sd_read_fifo()
143 struct tifm_dev *sock = host->dev; in tifm_sd_write_fifo() local
150 writel(val, sock->addr + SOCK_MMCSD_DATA); in tifm_sd_write_fifo()
162 writel(val, sock->addr + SOCK_MMCSD_DATA); in tifm_sd_write_fifo()
265 struct tifm_dev *sock = host->dev; in tifm_sd_set_dma_data() local
318 dev_dbg(&sock->dev, "setting dma for %d blocks\n", dma_blk_cnt); in tifm_sd_set_dma_data()
319 writel(sg_dma_address(sg) + dma_off, sock->addr + SOCK_DMA_ADDRESS); in tifm_sd_set_dma_data()
322 sock->addr + SOCK_DMA_CONTROL); in tifm_sd_set_dma_data()
325 sock->addr + SOCK_DMA_CONTROL); in tifm_sd_set_dma_data()
[all …]
/linux-4.4.14/drivers/misc/
Dtifm_core.c38 static int tifm_dev_match(struct tifm_dev *sock, struct tifm_device_id *id) in tifm_dev_match() argument
40 if (sock->type == id->type) in tifm_dev_match()
47 struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); in tifm_bus_match() local
54 if (tifm_dev_match(sock, ids)) in tifm_bus_match()
64 struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); in tifm_uevent() local
66 if (add_uevent_var(env, "TIFM_CARD_TYPE=%s", tifm_media_type_name(sock->type, 1))) in tifm_uevent()
74 struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); in tifm_device_probe() local
81 rc = drv->probe(sock); in tifm_device_probe()
89 static void tifm_dummy_event(struct tifm_dev *sock) in tifm_dummy_event() argument
96 struct tifm_dev *sock = container_of(dev, struct tifm_dev, dev); in tifm_device_remove() local
[all …]
Dtifm_7xx1.c26 struct tifm_dev *sock) in tifm_7xx1_dummy_eject() argument
30 static void tifm_7xx1_eject(struct tifm_adapter *fm, struct tifm_dev *sock) in tifm_7xx1_eject() argument
35 fm->socket_change_set |= 1 << sock->socket_id; in tifm_7xx1_eject()
43 struct tifm_dev *sock; in tifm_7xx1_isr() local
57 sock = fm->sockets[cnt]; in tifm_7xx1_isr()
58 if (sock) { in tifm_7xx1_isr()
60 sock->data_event(sock); in tifm_7xx1_isr()
62 sock->card_event(sock); in tifm_7xx1_isr()
143 struct tifm_dev *sock; in tifm_7xx1_switch_media() local
164 sock = fm->sockets[cnt]; in tifm_7xx1_switch_media()
[all …]
/linux-4.4.14/net/dccp/
Ddccp.h56 void dccp_time_wait(struct sock *sk, int state, int timeo);
227 void dccp_v4_send_check(struct sock *sk, struct sk_buff *skb);
229 int dccp_retransmit_skb(struct sock *sk);
231 void dccp_send_ack(struct sock *sk);
232 void dccp_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb,
235 void dccp_send_sync(struct sock *sk, const u64 seq,
241 void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb);
242 bool dccp_qpolicy_full(struct sock *sk);
243 void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb);
244 struct sk_buff *dccp_qpolicy_top(struct sock *sk);
[all …]
Dccid.h59 int (*ccid_hc_rx_init)(struct ccid *ccid, struct sock *sk);
60 int (*ccid_hc_tx_init)(struct ccid *ccid, struct sock *sk);
61 void (*ccid_hc_rx_exit)(struct sock *sk);
62 void (*ccid_hc_tx_exit)(struct sock *sk);
63 void (*ccid_hc_rx_packet_recv)(struct sock *sk,
65 int (*ccid_hc_rx_parse_options)(struct sock *sk, u8 pkt,
67 int (*ccid_hc_rx_insert_options)(struct sock *sk,
69 void (*ccid_hc_tx_packet_recv)(struct sock *sk,
71 int (*ccid_hc_tx_parse_options)(struct sock *sk, u8 pkt,
73 int (*ccid_hc_tx_send_packet)(struct sock *sk,
[all …]
Dqpolicy.c18 static void qpolicy_simple_push(struct sock *sk, struct sk_buff *skb) in qpolicy_simple_push()
23 static bool qpolicy_simple_full(struct sock *sk) in qpolicy_simple_full()
29 static struct sk_buff *qpolicy_simple_top(struct sock *sk) in qpolicy_simple_top()
39 static struct sk_buff *qpolicy_prio_best_skb(struct sock *sk) in qpolicy_prio_best_skb()
49 static struct sk_buff *qpolicy_prio_worst_skb(struct sock *sk) in qpolicy_prio_worst_skb()
59 static bool qpolicy_prio_full(struct sock *sk) in qpolicy_prio_full()
73 void (*push) (struct sock *sk, struct sk_buff *skb);
74 bool (*full) (struct sock *sk);
75 struct sk_buff* (*top) (struct sock *sk);
96 void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb) in dccp_qpolicy_push()
[all …]
Dtimer.c24 static void dccp_write_err(struct sock *sk) in dccp_write_err()
35 static int dccp_write_timeout(struct sock *sk) in dccp_write_timeout()
87 static void dccp_retransmit_timer(struct sock *sk) in dccp_retransmit_timer()
130 struct sock *sk = (struct sock *)data; in dccp_write_timer()
166 struct sock *sk = (struct sock *)data; in dccp_keepalive_timer()
175 struct sock *sk = (struct sock *)data; in dccp_delack_timer()
225 struct sock *sk = (struct sock *)data; in dccp_write_xmitlet()
238 sock_put((struct sock *)data); in dccp_write_xmit_timer()
241 void dccp_init_xmit_timers(struct sock *sk) in dccp_init_xmit_timers()
Dminisocks.c35 void dccp_time_wait(struct sock *sk, int state, int timeo) in dccp_time_wait()
75 struct sock *dccp_create_openreq_child(const struct sock *sk, in dccp_create_openreq_child()
85 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); in dccp_create_openreq_child()
141 struct sock *dccp_check_req(struct sock *sk, struct sk_buff *skb, in dccp_check_req()
144 struct sock *child = NULL; in dccp_check_req()
211 int dccp_child_process(struct sock *parent, struct sock *child, in dccp_child_process()
239 void dccp_reqsk_send_ack(const struct sock *sk, struct sk_buff *skb, in dccp_reqsk_send_ack()
Dproto.c77 void dccp_set_state(struct sock *sk, const int state) in dccp_set_state()
117 static void dccp_finish_passive_close(struct sock *sk) in dccp_finish_passive_close()
135 void dccp_done(struct sock *sk) in dccp_done()
173 int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) in dccp_init_sock()
200 void dccp_destroy_sock(struct sock *sk) in dccp_destroy_sock()
234 static inline int dccp_listen_start(struct sock *sk, int backlog) in dccp_listen_start()
251 int dccp_disconnect(struct sock *sk, int flags) in dccp_disconnect()
309 unsigned int dccp_poll(struct file *file, struct socket *sock, in dccp_poll() argument
313 struct sock *sk = sock->sk; in dccp_poll()
359 int dccp_ioctl(struct sock *sk, int cmd, unsigned long arg) in dccp_ioctl()
[all …]
Doutput.c25 static inline void dccp_event_ack_sent(struct sock *sk) in dccp_event_ack_sent()
31 static struct sk_buff *dccp_skb_entail(struct sock *sk, struct sk_buff *skb) in dccp_skb_entail()
45 static int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb) in dccp_transmit_skb()
162 unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu) in dccp_sync_mss()
198 void dccp_write_space(struct sock *sk) in dccp_write_space()
220 static int dccp_wait_for_ccid(struct sock *sk, unsigned long delay) in dccp_wait_for_ccid()
244 static void dccp_xmit_packet(struct sock *sk) in dccp_xmit_packet()
307 void dccp_flush_write_queue(struct sock *sk, long *time_budget) in dccp_flush_write_queue()
346 void dccp_write_xmit(struct sock *sk) in dccp_write_xmit()
380 int dccp_retransmit_skb(struct sock *sk) in dccp_retransmit_skb()
[all …]
/linux-4.4.14/include/linux/
Dnet.h122 struct sock *sk;
135 int (*release) (struct socket *sock);
136 int (*bind) (struct socket *sock,
139 int (*connect) (struct socket *sock,
144 int (*accept) (struct socket *sock,
146 int (*getname) (struct socket *sock,
149 unsigned int (*poll) (struct file *file, struct socket *sock,
151 int (*ioctl) (struct socket *sock, unsigned int cmd,
154 int (*compat_ioctl) (struct socket *sock, unsigned int cmd,
157 int (*listen) (struct socket *sock, int len);
[all …]
Dnetlink.h30 struct sock *sk;
53 bool (*compare)(struct net *net, struct sock *sk);
56 extern struct sock *__netlink_kernel_create(struct net *net, int unit,
59 static inline struct sock *
65 extern void netlink_kernel_release(struct sock *sk);
66 extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups);
67 extern int netlink_change_ngroups(struct sock *sk, unsigned int groups);
68 extern void __netlink_clear_multicast_users(struct sock *sk, unsigned int group);
70 extern int netlink_has_listeners(struct sock *sk, unsigned int group);
72 extern struct sk_buff *__netlink_alloc_skb(struct sock *ssk, unsigned int size,
[all …]
Dmroute6.h22 struct sock;
25 extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, unsigned int);
26 extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *);
28 extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg);
29 extern int ip6mr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);
34 int ip6_mroute_setsockopt(struct sock *sock, in ip6_mroute_setsockopt() argument
41 int ip6_mroute_getsockopt(struct sock *sock, in ip6_mroute_getsockopt() argument
48 int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg) in ip6mr_ioctl()
121 extern struct sock *mroute6_socket(struct net *net, struct sk_buff *skb);
122 extern int ip6mr_sk_done(struct sock *sk);
[all …]
Dnetfilter.h48 struct sock;
56 struct sock *sk;
59 int (*okfn)(struct net *, struct sock *, struct sk_buff *);
68 struct sock *sk, in nf_hook_state_init() argument
70 int (*okfn)(struct net *, struct sock *, struct sk_buff *)) in nf_hook_state_init()
108 int (*set)(struct sock *sk, int optval, void __user *user, unsigned int len);
110 int (*compat_set)(struct sock *sk, int optval,
115 int (*get)(struct sock *sk, int optval, void __user *user, int *len);
117 int (*compat_get)(struct sock *sk, int optval,
173 struct sock *sk, in nf_hook_thresh() argument
[all …]
Dsock_diag.h12 struct sock;
17 int (*get_info)(struct sk_buff *skb, struct sock *sk);
26 int sock_diag_check_cookie(struct sock *sk, const __u32 *cookie);
27 void sock_diag_save_cookie(struct sock *sk, __u32 *cookie);
29 int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr);
30 int sock_diag_put_filterinfo(bool may_report_filterinfo, struct sock *sk,
34 enum sknetlink_groups sock_diag_destroy_group(const struct sock *sk) in sock_diag_destroy_group()
61 bool sock_diag_has_destroy_listeners(const struct sock *sk) in sock_diag_has_destroy_listeners()
69 void sock_diag_broadcast_destroy(struct sock *sk);
Dsecurity.h100 struct sock;
350 int security_netlink_send(struct sock *sk, struct sk_buff *skb);
1070 static inline int security_netlink_send(struct sock *sk, struct sk_buff *skb) in security_netlink_send()
1112 int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk);
1113 int security_unix_may_send(struct socket *sock, struct socket *other);
1115 int security_socket_post_create(struct socket *sock, int family,
1117 int security_socket_bind(struct socket *sock, struct sockaddr *address, int addrlen);
1118 int security_socket_connect(struct socket *sock, struct sockaddr *address, int addrlen);
1119 int security_socket_listen(struct socket *sock, int backlog);
1120 int security_socket_accept(struct socket *sock, struct socket *newsock);
[all …]
Dmroute.h22 extern int ip_mroute_setsockopt(struct sock *, int, char __user *, unsigned int);
23 extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *);
24 extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg);
25 extern int ipmr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg);
29 int ip_mroute_setsockopt(struct sock *sock, in ip_mroute_setsockopt() argument
36 int ip_mroute_getsockopt(struct sock *sock, in ip_mroute_getsockopt() argument
43 int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg) in ipmr_ioctl()
Dif_pppox.h50 struct sock sk;
64 static inline struct pppox_sock *pppox_sk(struct sock *sk) in pppox_sk()
69 static inline struct sock *sk_pppox(struct pppox_sock *po) in sk_pppox()
71 return (struct sock *)po; in sk_pppox()
77 int (*create)(struct net *net, struct socket *sock, int kern);
78 int (*ioctl)(struct socket *sock, unsigned int cmd,
85 extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */
86 extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
Dudp.h72 int (*encap_rcv)(struct sock *sk, struct sk_buff *skb);
73 void (*encap_destroy)(struct sock *sk);
76 static inline struct udp_sock *udp_sk(const struct sock *sk) in udp_sk()
81 static inline void udp_set_no_check6_tx(struct sock *sk, bool val) in udp_set_no_check6_tx()
86 static inline void udp_set_no_check6_rx(struct sock *sk, bool val) in udp_set_no_check6_rx()
91 static inline bool udp_get_no_check6_tx(struct sock *sk) in udp_get_no_check6_tx()
96 static inline bool udp_get_no_check6_rx(struct sock *sk) in udp_get_no_check6_rx()
Dtifm.h97 void (*card_event)(struct tifm_dev *sock);
98 void (*data_event)(struct tifm_dev *sock);
127 struct tifm_dev *sock);
129 struct tifm_dev *sock);
146 void tifm_eject(struct tifm_dev *sock);
147 int tifm_has_ms_pif(struct tifm_dev *sock);
148 int tifm_map_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents,
150 void tifm_unmap_sg(struct tifm_dev *sock, struct scatterlist *sg, int nents,
Dlsm_hooks.h1507 int (*netlink_send)(struct sock *sk, struct sk_buff *skb);
1524 int (*unix_stream_connect)(struct sock *sock, struct sock *other,
1525 struct sock *newsk);
1526 int (*unix_may_send)(struct socket *sock, struct socket *other);
1529 int (*socket_post_create)(struct socket *sock, int family, int type,
1531 int (*socket_bind)(struct socket *sock, struct sockaddr *address,
1533 int (*socket_connect)(struct socket *sock, struct sockaddr *address,
1535 int (*socket_listen)(struct socket *sock, int backlog);
1536 int (*socket_accept)(struct socket *sock, struct socket *newsock);
1537 int (*socket_sendmsg)(struct socket *sock, struct msghdr *msg,
[all …]
Digmp.h115 extern int ip_mc_join_group(struct sock *sk, struct ip_mreqn *imr);
116 extern int ip_mc_leave_group(struct sock *sk, struct ip_mreqn *imr);
117 extern void ip_mc_drop_socket(struct sock *sk);
118 extern int ip_mc_source(int add, int omode, struct sock *sk,
120 extern int ip_mc_msfilter(struct sock *sk, struct ip_msfilter *msf,int ifindex);
121 extern int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf,
123 extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf,
125 extern int ip_mc_sf_allow(struct sock *sk, __be32 local, __be32 rmt, int dif);
Dipv6.h260 extern int inet6_sk_rebuild_header(struct sock *sk);
267 static inline struct ipv6_pinfo *inet6_sk(const struct sock *__sk) in inet6_sk()
272 static inline struct raw6_sock *raw6_sk(const struct sock *sk) in raw6_sk()
277 static inline void inet_sk_copy_descendant(struct sock *sk_to, in inet_sk_copy_descendant()
278 const struct sock *sk_from) in inet_sk_copy_descendant()
293 static inline const struct in6_addr *inet6_rcv_saddr(const struct sock *sk) in inet6_rcv_saddr()
300 static inline int inet_v6_ipv6only(const struct sock *sk) in inet_v6_ipv6only()
310 static inline struct ipv6_pinfo * inet6_sk(const struct sock *__sk) in inet6_sk()
321 static inline struct raw6_sock *raw6_sk(const struct sock *sk) in raw6_sk()
/linux-4.4.14/net/
Dsocket.c355 struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname) in sock_alloc_file() argument
364 } else if (sock->sk) { in sock_alloc_file()
365 name.name = sock->sk->sk_prot_creator->name; in sock_alloc_file()
373 d_instantiate(path.dentry, SOCK_INODE(sock)); in sock_alloc_file()
384 sock->file = file; in sock_alloc_file()
386 file->private_data = sock; in sock_alloc_file()
391 static int sock_map_fd(struct socket *sock, int flags) in sock_map_fd() argument
398 newfile = sock_alloc_file(sock, flags, NULL); in sock_map_fd()
434 struct socket *sock; in sockfd_lookup() local
442 sock = sock_from_file(file, err); in sockfd_lookup()
[all …]
Dcompat.c124 int cmsghdr_from_user_compat_to_kern(struct msghdr *kmsg, struct sock *sk, in cmsghdr_from_user_compat_to_kern()
312 static int do_set_attach_filter(struct socket *sock, int level, int optname, in do_set_attach_filter() argument
328 return sock_setsockopt(sock, level, optname, (char __user *)kfprog, in do_set_attach_filter()
332 static int do_set_sock_timeout(struct socket *sock, int level, in do_set_sock_timeout() argument
348 err = sock_setsockopt(sock, level, optname, (char *)&ktime, sizeof(ktime)); in do_set_sock_timeout()
354 static int compat_sock_setsockopt(struct socket *sock, int level, int optname, in compat_sock_setsockopt() argument
358 return do_set_attach_filter(sock, level, optname, in compat_sock_setsockopt()
361 return do_set_sock_timeout(sock, level, optname, optval, optlen); in compat_sock_setsockopt()
363 return sock_setsockopt(sock, level, optname, optval, optlen); in compat_sock_setsockopt()
370 struct socket *sock = sockfd_lookup(fd, &err); in COMPAT_SYSCALL_DEFINE5() local
[all …]
/linux-4.4.14/net/llc/
Dllc_c_ev.c75 static u16 llc_util_nr_inside_tx_window(struct sock *sk, u8 nr) in llc_util_nr_inside_tx_window()
99 int llc_conn_ev_conn_req(struct sock *sk, struct sk_buff *skb) in llc_conn_ev_conn_req()
107 int llc_conn_ev_data_req(struct sock *sk, struct sk_buff *skb) in llc_conn_ev_data_req()
115 int llc_conn_ev_disc_req(struct sock *sk, struct sk_buff *skb) in llc_conn_ev_disc_req()
123 int llc_conn_ev_rst_req(struct sock *sk, struct sk_buff *skb) in llc_conn_ev_rst_req()
131 int llc_conn_ev_local_busy_detected(struct sock *sk, struct sk_buff *skb) in llc_conn_ev_local_busy_detected()
139 int llc_conn_ev_local_busy_cleared(struct sock *sk, struct sk_buff *skb) in llc_conn_ev_local_busy_cleared()
147 int llc_conn_ev_rx_bad_pdu(struct sock *sk, struct sk_buff *skb) in llc_conn_ev_rx_bad_pdu()
152 int llc_conn_ev_rx_disc_cmd_pbit_set_x(struct sock *sk, struct sk_buff *skb) in llc_conn_ev_rx_disc_cmd_pbit_set_x()
160 int llc_conn_ev_rx_dm_rsp_fbit_set_x(struct sock *sk, struct sk_buff *skb) in llc_conn_ev_rx_dm_rsp_fbit_set_x()
[all …]
Daf_llc.c41 static int llc_ui_wait_for_conn(struct sock *sk, long timeout);
42 static int llc_ui_wait_for_disc(struct sock *sk, long timeout);
43 static int llc_ui_wait_for_busy_core(struct sock *sk, long timeout);
95 static inline u8 llc_ui_header_len(struct sock *sk, struct sockaddr_llc *addr) in llc_ui_header_len()
115 static int llc_ui_send_data(struct sock* sk, struct sk_buff *skb, int noblock) in llc_ui_send_data()
132 static void llc_ui_sk_init(struct socket *sock, struct sock *sk) in llc_ui_sk_init() argument
134 sock_graft(sk, sock); in llc_ui_sk_init()
135 sk->sk_type = sock->type; in llc_ui_sk_init()
136 sock->ops = &llc_ui_ops; in llc_ui_sk_init()
157 static int llc_ui_create(struct net *net, struct socket *sock, int protocol, in llc_ui_create() argument
[all …]
Dllc_c_ac.c32 static int llc_conn_ac_inc_vs_by_1(struct sock *sk, struct sk_buff *skb);
33 static void llc_process_tmr_ev(struct sock *sk, struct sk_buff *skb);
34 static int llc_conn_ac_data_confirm(struct sock *sk, struct sk_buff *ev);
36 static int llc_conn_ac_inc_npta_value(struct sock *sk, struct sk_buff *skb);
38 static int llc_conn_ac_send_rr_rsp_f_set_ackpf(struct sock *sk,
41 static int llc_conn_ac_set_p_flag_1(struct sock *sk, struct sk_buff *skb);
45 int llc_conn_ac_clear_remote_busy(struct sock *sk, struct sk_buff *skb) in llc_conn_ac_clear_remote_busy()
61 int llc_conn_ac_conn_ind(struct sock *sk, struct sk_buff *skb) in llc_conn_ac_conn_ind()
69 int llc_conn_ac_conn_confirm(struct sock *sk, struct sk_buff *skb) in llc_conn_ac_conn_confirm()
77 static int llc_conn_ac_data_confirm(struct sock *sk, struct sk_buff *skb) in llc_conn_ac_data_confirm()
[all …]
Dllc_conn.c33 static void llc_conn_send_pdus(struct sock *sk);
34 static int llc_conn_service(struct sock *sk, struct sk_buff *skb);
35 static int llc_exec_conn_trans_actions(struct sock *sk,
38 static struct llc_conn_state_trans *llc_qualify_conn_ev(struct sock *sk,
59 int llc_conn_state_process(struct sock *sk, struct sk_buff *skb) in llc_conn_state_process()
196 void llc_conn_send_pdu(struct sock *sk, struct sk_buff *skb) in llc_conn_send_pdu()
212 void llc_conn_rtn_pdu(struct sock *sk, struct sk_buff *skb) in llc_conn_rtn_pdu()
229 void llc_conn_resend_i_pdu_as_cmd(struct sock *sk, u8 nr, u8 first_p_bit) in llc_conn_resend_i_pdu_as_cmd()
272 void llc_conn_resend_i_pdu_as_rsp(struct sock *sk, u8 nr, u8 first_f_bit) in llc_conn_resend_i_pdu_as_rsp()
312 int llc_conn_remove_acked_pdus(struct sock *sk, u8 nr, u16 *how_many_unacked) in llc_conn_remove_acked_pdus()
[all …]
/linux-4.4.14/net/atm/
Dsvc.c30 static int svc_create(struct net *net, struct socket *sock, int protocol,
40 static int svc_shutdown(struct socket *sock, int how) in svc_shutdown() argument
49 struct sock *sk = sk_atm(vcc); in svc_disconnect()
74 static int svc_release(struct socket *sock) in svc_release() argument
76 struct sock *sk = sock->sk; in svc_release()
80 vcc = ATM_SD(sock); in svc_release()
89 vcc_release(sock); in svc_release()
94 static int svc_bind(struct socket *sock, struct sockaddr *sockaddr, in svc_bind() argument
98 struct sock *sk = sock->sk; in svc_bind()
106 if (sock->state == SS_CONNECTED) { in svc_bind()
[all …]
Dpvc.c21 static int pvc_shutdown(struct socket *sock, int how) in pvc_shutdown() argument
26 static int pvc_bind(struct socket *sock, struct sockaddr *sockaddr, in pvc_bind() argument
29 struct sock *sk = sock->sk; in pvc_bind()
40 vcc = ATM_SD(sock); in pvc_bind()
51 error = vcc_connect(sock, addr->sap_addr.itf, addr->sap_addr.vpi, in pvc_bind()
58 static int pvc_connect(struct socket *sock, struct sockaddr *sockaddr, in pvc_connect() argument
61 return pvc_bind(sock, sockaddr, sockaddr_len); in pvc_connect()
64 static int pvc_setsockopt(struct socket *sock, int level, int optname, in pvc_setsockopt() argument
67 struct sock *sk = sock->sk; in pvc_setsockopt()
71 error = vcc_setsockopt(sock, level, optname, optval, optlen); in pvc_setsockopt()
[all …]
Dcommon.h13 int vcc_create(struct net *net, struct socket *sock, int protocol, int family, int kern);
14 int vcc_release(struct socket *sock);
15 int vcc_connect(struct socket *sock, int itf, short vpi, int vci);
16 int vcc_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
18 int vcc_sendmsg(struct socket *sock, struct msghdr *m, size_t total_len);
19 unsigned int vcc_poll(struct file *file, struct socket *sock, poll_table *wait);
20 int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
21 int vcc_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
22 int vcc_setsockopt(struct socket *sock, int level, int optname,
24 int vcc_getsockopt(struct socket *sock, int level, int optname,
Dioctl.c50 static int do_vcc_ioctl(struct socket *sock, unsigned int cmd, in do_vcc_ioctl() argument
53 struct sock *sk = sock->sk; in do_vcc_ioctl()
59 vcc = ATM_SD(sock); in do_vcc_ioctl()
62 if (sock->state != SS_CONNECTED || in do_vcc_ioctl()
74 if (sock->state != SS_CONNECTED) { in do_vcc_ioctl()
132 sock->state = SS_CONNECTED; in do_vcc_ioctl()
169 error = ic->ioctl(sock, cmd, arg); in do_vcc_ioctl()
186 int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in vcc_ioctl() argument
188 return do_vcc_ioctl(sock, cmd, arg, 0); in vcc_ioctl()
245 static int do_atm_iobuf(struct socket *sock, unsigned int cmd, in do_atm_iobuf() argument
[all …]
Dcommon.c42 static void __vcc_insert_socket(struct sock *sk) in __vcc_insert_socket()
50 void vcc_insert_socket(struct sock *sk) in vcc_insert_socket()
58 static void vcc_remove_socket(struct sock *sk) in vcc_remove_socket()
68 struct sock *sk = sk_atm(vcc); in alloc_tx()
82 static void vcc_sock_destruct(struct sock *sk) in vcc_sock_destruct()
93 static void vcc_def_wakeup(struct sock *sk) in vcc_def_wakeup()
104 static inline int vcc_writable(struct sock *sk) in vcc_writable()
112 static void vcc_write_space(struct sock *sk) in vcc_write_space()
129 static void vcc_release_cb(struct sock *sk) in vcc_release_cb()
144 int vcc_create(struct net *net, struct socket *sock, int protocol, int family, int kern) in vcc_create() argument
[all …]
/linux-4.4.14/net/nfc/
Dllcp_commands.c249 int nfc_llcp_parse_connection_tlv(struct nfc_llcp_sock *sock, in nfc_llcp_parse_connection_tlv() argument
256 if (sock == NULL) in nfc_llcp_parse_connection_tlv()
267 sock->remote_miu = llcp_tlv_miux(tlv) + 128; in nfc_llcp_parse_connection_tlv()
270 sock->remote_rw = llcp_tlv_rw(tlv); in nfc_llcp_parse_connection_tlv()
283 pr_debug("sock %p rw %d miu %d\n", sock, in nfc_llcp_parse_connection_tlv()
284 sock->remote_rw, sock->remote_miu); in nfc_llcp_parse_connection_tlv()
319 static struct sk_buff *llcp_allocate_pdu(struct nfc_llcp_sock *sock, in llcp_allocate_pdu() argument
325 if (sock->ssap == 0) in llcp_allocate_pdu()
328 skb = nfc_alloc_send_skb(sock->dev, &sock->sk, MSG_DONTWAIT, in llcp_allocate_pdu()
335 skb = llcp_add_header(skb, sock->dsap, sock->ssap, cmd); in llcp_allocate_pdu()
[all …]
Drawsock.c34 static void nfc_sock_link(struct nfc_sock_list *l, struct sock *sk) in nfc_sock_link()
41 static void nfc_sock_unlink(struct nfc_sock_list *l, struct sock *sk) in nfc_sock_unlink()
48 static void rawsock_write_queue_purge(struct sock *sk) in rawsock_write_queue_purge()
58 static void rawsock_report_error(struct sock *sk, int err) in rawsock_report_error()
69 static int rawsock_release(struct socket *sock) in rawsock_release() argument
71 struct sock *sk = sock->sk; in rawsock_release()
73 pr_debug("sock=%p sk=%p\n", sock, sk); in rawsock_release()
78 if (sock->type == SOCK_RAW) in rawsock_release()
87 static int rawsock_connect(struct socket *sock, struct sockaddr *_addr, in rawsock_connect() argument
90 struct sock *sk = sock->sk; in rawsock_connect()
[all …]
Dllcp_sock.c28 static int sock_wait_state(struct sock *sk, int state, unsigned long timeo) in sock_wait_state()
70 static int llcp_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) in llcp_sock_bind() argument
72 struct sock *sk = sock->sk; in llcp_sock_bind()
143 static int llcp_raw_sock_bind(struct socket *sock, struct sockaddr *addr, in llcp_raw_sock_bind() argument
146 struct sock *sk = sock->sk; in llcp_raw_sock_bind()
197 static int llcp_sock_listen(struct socket *sock, int backlog) in llcp_sock_listen() argument
199 struct sock *sk = sock->sk; in llcp_sock_listen()
206 if ((sock->type != SOCK_SEQPACKET && sock->type != SOCK_STREAM) || in llcp_sock_listen()
224 static int nfc_llcp_setsockopt(struct socket *sock, int level, int optname, in nfc_llcp_setsockopt() argument
227 struct sock *sk = sock->sk; in nfc_llcp_setsockopt()
[all …]
Dllcp.h116 struct sock sk;
151 struct sock *parent;
213 void nfc_llcp_sock_link(struct llcp_sock_list *l, struct sock *s);
214 void nfc_llcp_sock_unlink(struct llcp_sock_list *l, struct sock *s);
215 void nfc_llcp_socket_remote_param_init(struct nfc_llcp_sock *sock);
220 struct nfc_llcp_sock *sock);
223 int nfc_llcp_queue_i_frames(struct nfc_llcp_sock *sock);
228 struct sock *nfc_llcp_sock_alloc(struct socket *sock, int type, gfp_t gfp, int kern);
229 void nfc_llcp_sock_free(struct nfc_llcp_sock *sock);
230 void nfc_llcp_accept_unlink(struct sock *sk);
[all …]
Dllcp_core.c35 void nfc_llcp_sock_link(struct llcp_sock_list *l, struct sock *sk) in nfc_llcp_sock_link()
42 void nfc_llcp_sock_unlink(struct llcp_sock_list *l, struct sock *sk) in nfc_llcp_sock_unlink()
49 void nfc_llcp_socket_remote_param_init(struct nfc_llcp_sock *sock) in nfc_llcp_socket_remote_param_init() argument
51 sock->remote_rw = LLCP_DEFAULT_RW; in nfc_llcp_socket_remote_param_init()
52 sock->remote_miu = LLCP_MAX_MIU + 1; in nfc_llcp_socket_remote_param_init()
55 static void nfc_llcp_socket_purge(struct nfc_llcp_sock *sock) in nfc_llcp_socket_purge() argument
57 struct nfc_llcp_local *local = sock->local; in nfc_llcp_socket_purge()
60 pr_debug("%p\n", &sock->sk); in nfc_llcp_socket_purge()
62 skb_queue_purge(&sock->tx_queue); in nfc_llcp_socket_purge()
63 skb_queue_purge(&sock->tx_pending_queue); in nfc_llcp_socket_purge()
[all …]
/linux-4.4.14/net/vmw_vsock/
Dvmci_transport_notify.h48 void (*socket_init) (struct sock *sk);
50 int (*poll_in) (struct sock *sk, size_t target,
52 int (*poll_out) (struct sock *sk, size_t target,
54 void (*handle_notify_pkt) (struct sock *sk,
59 int (*recv_init) (struct sock *sk, size_t target,
61 int (*recv_pre_block) (struct sock *sk, size_t target,
63 int (*recv_pre_dequeue) (struct sock *sk, size_t target,
65 int (*recv_post_dequeue) (struct sock *sk, size_t target,
68 int (*send_init) (struct sock *sk,
70 int (*send_pre_block) (struct sock *sk,
[all …]
Daf_vsock.c102 static int __vsock_bind(struct sock *sk, struct sockaddr_vm *addr);
103 static void vsock_sk_destruct(struct sock *sk);
104 static int vsock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
169 struct sock *sk = sk_vsock(vsk); in vsock_auto_bind()
215 static struct sock *__vsock_find_bound_socket(struct sockaddr_vm *addr) in __vsock_find_bound_socket()
226 static struct sock *__vsock_find_connected_socket(struct sockaddr_vm *src, in __vsock_find_connected_socket()
286 struct sock *vsock_find_bound_socket(struct sockaddr_vm *addr) in vsock_find_bound_socket()
288 struct sock *sk; in vsock_find_bound_socket()
301 struct sock *vsock_find_connected_socket(struct sockaddr_vm *src, in vsock_find_connected_socket()
304 struct sock *sk; in vsock_find_connected_socket()
[all …]
Dvmci_transport_notify_qstate.c81 vmci_transport_handle_read(struct sock *sk, in vmci_transport_handle_read()
90 vmci_transport_handle_wrote(struct sock *sk, in vmci_transport_handle_wrote()
98 static void vsock_block_update_write_window(struct sock *sk) in vsock_block_update_write_window()
108 static int vmci_transport_send_read_notification(struct sock *sk) in vmci_transport_send_read_notification()
148 static void vmci_transport_notify_pkt_socket_init(struct sock *sk) in vmci_transport_notify_pkt_socket_init()
167 vmci_transport_notify_pkt_poll_in(struct sock *sk, in vmci_transport_notify_pkt_poll_in()
188 vmci_transport_notify_pkt_poll_out(struct sock *sk, in vmci_transport_notify_pkt_poll_out()
210 struct sock *sk, in vmci_transport_notify_pkt_recv_init()
242 struct sock *sk, in vmci_transport_notify_pkt_recv_pre_block()
262 struct sock *sk, in vmci_transport_notify_pkt_recv_post_dequeue()
[all …]
Dvmci_transport_notify.c113 vmci_transport_handle_waiting_read(struct sock *sk, in vmci_transport_handle_waiting_read()
143 vmci_transport_handle_waiting_write(struct sock *sk, in vmci_transport_handle_waiting_write()
173 vmci_transport_handle_read(struct sock *sk, in vmci_transport_handle_read()
188 static bool send_waiting_read(struct sock *sk, u64 room_needed) in send_waiting_read()
230 static bool send_waiting_write(struct sock *sk, u64 room_needed) in send_waiting_write()
267 static int vmci_transport_send_read_notification(struct sock *sk) in vmci_transport_send_read_notification()
309 vmci_transport_handle_wrote(struct sock *sk, in vmci_transport_handle_wrote()
321 static void vmci_transport_notify_pkt_socket_init(struct sock *sk) in vmci_transport_notify_pkt_socket_init()
346 vmci_transport_notify_pkt_poll_in(struct sock *sk, in vmci_transport_notify_pkt_poll_in()
370 vmci_transport_notify_pkt_poll_out(struct sock *sk, in vmci_transport_notify_pkt_poll_out()
[all …]
/linux-4.4.14/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()
65 struct sock *sk = d->owner, *parent; in rfcomm_sk_state_change()
108 static struct sock *__rfcomm_get_listen_sock_by_addr(u8 channel, bdaddr_t *src) in __rfcomm_get_listen_sock_by_addr()
110 struct sock *sk = NULL; in __rfcomm_get_listen_sock_by_addr()
129 static struct sock *rfcomm_get_sock_by_channel(int state, u8 channel, bdaddr_t *src) in rfcomm_get_sock_by_channel()
131 struct sock *sk = NULL, *sk1 = NULL; in rfcomm_get_sock_by_channel()
155 static void rfcomm_sock_destruct(struct sock *sk) in rfcomm_sock_destruct()
175 static void rfcomm_sock_cleanup_listen(struct sock *parent) in rfcomm_sock_cleanup_listen()
[all …]
/linux-4.4.14/net/phonet/
Dsocket.c39 static int pn_socket_release(struct socket *sock) in pn_socket_release() argument
41 struct sock *sk = sock->sk; in pn_socket_release()
44 sock->sk = NULL; in pn_socket_release()
77 struct sock *pn_find_sock_by_sa(struct net *net, const struct sockaddr_pn *spn) in pn_find_sock_by_sa()
79 struct sock *sknode; in pn_find_sock_by_sa()
80 struct sock *rval = NULL; in pn_find_sock_by_sa()
122 struct sock *sknode; in pn_deliver_sock_broadcast()
143 void pn_sock_hash(struct sock *sk) in pn_sock_hash()
153 void pn_sock_unhash(struct sock *sk) in pn_sock_unhash()
165 static int pn_socket_bind(struct socket *sock, struct sockaddr *addr, int len) in pn_socket_bind() argument
[all …]
Dpep.c81 static struct sk_buff *pep_alloc_skb(struct sock *sk, const void *payload, in pep_alloc_skb()
97 static int pep_reply(struct sock *sk, struct sk_buff *oskb, u8 code, in pep_reply()
119 static int pep_indicate(struct sock *sk, u8 id, u8 code, in pep_indicate()
140 static int pipe_handler_request(struct sock *sk, u8 id, u8 code, in pipe_handler_request()
159 static int pipe_handler_send_created_ind(struct sock *sk) in pipe_handler_send_created_ind()
171 static int pep_accept_conn(struct sock *sk, struct sk_buff *skb) in pep_accept_conn()
192 static int pep_reject_conn(struct sock *sk, struct sk_buff *skb, u8 code, in pep_reject_conn()
202 static int pep_ctrlreq_error(struct sock *sk, struct sk_buff *oskb, u8 code, in pep_ctrlreq_error()
229 static int pipe_snd_status(struct sock *sk, u8 type, u8 status, gfp_t priority) in pipe_snd_status()
239 static void pipe_grant_credits(struct sock *sk, gfp_t priority) in pipe_grant_credits()
[all …]
Ddatagram.c36 static int pn_backlog_rcv(struct sock *sk, struct sk_buff *skb);
39 static void pn_sock_close(struct sock *sk, long timeout) in pn_sock_close()
44 static int pn_ioctl(struct sock *sk, int cmd, unsigned long arg) in pn_ioctl()
75 static void pn_destruct(struct sock *sk) in pn_destruct()
80 static int pn_init(struct sock *sk) in pn_init()
86 static int pn_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) in pn_sendmsg()
127 static int pn_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, in pn_recvmsg()
173 static int pn_backlog_rcv(struct sock *sk, struct sk_buff *skb) in pn_backlog_rcv()
Dpep-gprs.c38 struct sock *sk;
39 void (*old_state_change)(struct sock *);
40 void (*old_data_ready)(struct sock *);
41 void (*old_write_space)(struct sock *);
76 static void gprs_state_change(struct sock *sk) in gprs_state_change()
149 static void gprs_data_ready(struct sock *sk) in gprs_data_ready()
160 static void gprs_write_space(struct sock *sk) in gprs_write_space()
189 struct sock *sk = gp->sk; in gprs_xmit()
258 int gprs_attach(struct sock *sk) in gprs_attach()
312 void gprs_detach(struct sock *sk) in gprs_detach()
/linux-4.4.14/net/bluetooth/
Dsco.c48 struct sock *sk;
56 static void sco_sock_close(struct sock *sk);
57 static void sco_sock_kill(struct sock *sk);
77 struct sock *sk = (struct sock *)arg; in sco_sock_timeout()
90 static void sco_sock_set_timer(struct sock *sk, long timeout) in sco_sock_set_timer()
96 static void sco_sock_clear_timer(struct sock *sk) in sco_sock_clear_timer()
132 static void sco_chan_del(struct sock *sk, int err) in sco_chan_del()
160 struct sock *sk; in sco_conn_del()
186 static void __sco_chan_add(struct sco_conn *conn, struct sock *sk, in __sco_chan_add()
187 struct sock *parent) in __sco_chan_add()
[all …]
Dl2cap_sock.c44 static void l2cap_sock_init(struct sock *sk, struct sock *parent);
45 static struct sock *l2cap_sock_alloc(struct net *net, struct socket *sock,
48 bool l2cap_is_socket(struct socket *sock) in l2cap_is_socket() argument
50 return sock && sock->ops == &l2cap_sock_ops; in l2cap_is_socket()
80 static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen) in l2cap_sock_bind() argument
82 struct sock *sk = sock->sk; in l2cap_sock_bind()
173 static int l2cap_sock_connect(struct socket *sock, struct sockaddr *addr, in l2cap_sock_connect() argument
176 struct sock *sk = sock->sk; in l2cap_sock_connect()
251 static int l2cap_sock_listen(struct socket *sock, int backlog) in l2cap_sock_listen() argument
253 struct sock *sk = sock->sk; in l2cap_sock_listen()
[all …]
Daf_bluetooth.c67 void bt_sock_reclassify_lock(struct sock *sk, int proto) in bt_sock_reclassify_lock()
109 static int bt_sock_create(struct net *net, struct socket *sock, int proto, in bt_sock_create() argument
128 err = bt_proto[proto]->create(net, sock, proto, kern); in bt_sock_create()
130 bt_sock_reclassify_lock(sock->sk, proto); in bt_sock_create()
139 void bt_sock_link(struct bt_sock_list *l, struct sock *sk) in bt_sock_link()
147 void bt_sock_unlink(struct bt_sock_list *l, struct sock *sk) in bt_sock_unlink()
155 void bt_accept_enqueue(struct sock *parent, struct sock *sk) in bt_accept_enqueue()
166 void bt_accept_unlink(struct sock *sk) in bt_accept_unlink()
177 struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock) in bt_accept_dequeue()
180 struct sock *sk; in bt_accept_dequeue()
[all …]
Dhci_sock.c56 void hci_sock_set_flag(struct sock *sk, int nr) in hci_sock_set_flag()
61 void hci_sock_clear_flag(struct sock *sk, int nr) in hci_sock_clear_flag()
66 int hci_sock_test_flag(struct sock *sk, int nr) in hci_sock_test_flag()
71 unsigned short hci_sock_get_channel(struct sock *sk) in hci_sock_get_channel()
115 static bool is_filtered_packet(struct sock *sk, struct sk_buff *skb) in is_filtered_packet()
155 struct sock *sk; in hci_send_to_sock()
217 int flag, struct sock *skip_sk) in hci_send_to_channel()
219 struct sock *sk; in hci_send_to_channel()
386 static void send_monitor_replay(struct sock *sk) in send_monitor_replay()
481 struct sock *sk; in hci_sock_dev_event()
[all …]
Dmgmt_util.h29 struct sock *sk;
35 void *data, u16 data_len, int flag, struct sock *skip_sk);
36 int mgmt_cmd_status(struct sock *sk, u16 index, u16 cmd, u8 status);
37 int mgmt_cmd_complete(struct sock *sk, u16 index, u16 cmd, u8 status,
49 struct mgmt_pending_cmd *mgmt_pending_add(struct sock *sk, u16 opcode,
/linux-4.4.14/net/netrom/
Dnr_timer.c38 void nr_init_timers(struct sock *sk) in nr_init_timers()
52 void nr_start_t1timer(struct sock *sk) in nr_start_t1timer()
59 void nr_start_t2timer(struct sock *sk) in nr_start_t2timer()
66 void nr_start_t4timer(struct sock *sk) in nr_start_t4timer()
73 void nr_start_idletimer(struct sock *sk) in nr_start_idletimer()
81 void nr_start_heartbeat(struct sock *sk) in nr_start_heartbeat()
86 void nr_stop_t1timer(struct sock *sk) in nr_stop_t1timer()
91 void nr_stop_t2timer(struct sock *sk) in nr_stop_t2timer()
96 void nr_stop_t4timer(struct sock *sk) in nr_stop_t4timer()
101 void nr_stop_idletimer(struct sock *sk) in nr_stop_idletimer()
[all …]
Daf_netrom.c94 static void nr_remove_socket(struct sock *sk) in nr_remove_socket()
106 struct sock *s; in nr_kill_by_device()
137 static void nr_insert_socket(struct sock *sk) in nr_insert_socket()
148 static struct sock *nr_find_listener(ax25_address *addr) in nr_find_listener()
150 struct sock *s; in nr_find_listener()
168 static struct sock *nr_find_socket(unsigned char index, unsigned char id) in nr_find_socket()
170 struct sock *s; in nr_find_socket()
190 static struct sock *nr_find_peer(unsigned char index, unsigned char id, in nr_find_peer()
193 struct sock *s; in nr_find_peer()
218 struct sock *sk; in nr_find_next_circuit()
[all …]
Dnr_out.c35 void nr_output(struct sock *sk, struct sk_buff *skb) in nr_output()
82 static void nr_send_iframe(struct sock *sk, struct sk_buff *skb) in nr_send_iframe()
100 void nr_send_nak_frame(struct sock *sk) in nr_send_nak_frame()
125 void nr_kick(struct sock *sk) in nr_kick()
188 void nr_transmit_buffer(struct sock *sk, struct sk_buff *skb) in nr_transmit_buffer()
223 void nr_establish_data_link(struct sock *sk) in nr_establish_data_link()
241 void nr_enquiry_response(struct sock *sk) in nr_enquiry_response()
259 void nr_check_iframes_acked(struct sock *sk, unsigned short nr) in nr_check_iframes_acked()
/linux-4.4.14/fs/dlm/
Dlowcomms.c104 struct socket *sock; /* NULL if not connected */ member
127 void (*orig_error_report)(struct sock *sk);
406 static void lowcomms_data_ready(struct sock *sk) in lowcomms_data_ready()
413 static void lowcomms_write_space(struct sock *sk) in lowcomms_write_space()
420 clear_bit(SOCK_NOSPACE, &con->sock->flags); in lowcomms_write_space()
423 con->sock->sk->sk_write_pending--; in lowcomms_write_space()
424 clear_bit(SOCKWQ_ASYNC_NOSPACE, &con->sock->flags); in lowcomms_write_space()
439 static void lowcomms_state_change(struct sock *sk) in lowcomms_state_change()
468 static void lowcomms_error_report(struct sock *sk) in lowcomms_error_report()
506 static void add_sock(struct socket *sock, struct connection *con) in add_sock() argument
[all …]
/linux-4.4.14/net/ipv4/
Dudp_tunnel.c16 struct socket *sock = NULL; in udp_sock_create4() local
19 err = sock_create_kern(net, AF_INET, SOCK_DGRAM, 0, &sock); in udp_sock_create4()
26 err = kernel_bind(sock, (struct sockaddr *)&udp_addr, in udp_sock_create4()
35 err = kernel_connect(sock, (struct sockaddr *)&udp_addr, in udp_sock_create4()
41 sock->sk->sk_no_check_tx = !cfg->use_udp_checksums; in udp_sock_create4()
43 *sockp = sock; in udp_sock_create4()
47 if (sock) { in udp_sock_create4()
48 kernel_sock_shutdown(sock, SHUT_RDWR); in udp_sock_create4()
49 sock_release(sock); in udp_sock_create4()
56 void setup_udp_tunnel_sock(struct net *net, struct socket *sock, in setup_udp_tunnel_sock() argument
[all …]
Dudp_impl.h11 int udp_v4_get_port(struct sock *sk, unsigned short snum);
13 int udp_setsockopt(struct sock *sk, int level, int optname,
15 int udp_getsockopt(struct sock *sk, int level, int optname,
19 int compat_udp_setsockopt(struct sock *sk, int level, int optname,
21 int compat_udp_getsockopt(struct sock *sk, int level, int optname,
24 int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
26 int udp_sendpage(struct sock *sk, struct page *page, int offset, size_t size,
28 int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
29 void udp_destroy_sock(struct sock *sk);
Daf_inet.c133 void inet_sock_destruct(struct sock *sk) in inet_sock_destruct()
174 static int inet_autobind(struct sock *sk) in inet_autobind()
194 int inet_listen(struct socket *sock, int backlog) in inet_listen() argument
196 struct sock *sk = sock->sk; in inet_listen()
203 if (sock->state != SS_UNCONNECTED || sock->type != SOCK_STREAM) in inet_listen()
249 static int inet_create(struct net *net, struct socket *sock, int protocol, in inet_create() argument
252 struct sock *sk; in inet_create()
263 sock->state = SS_UNCONNECTED; in inet_create()
269 list_for_each_entry_rcu(answer, &inetsw[sock->type], list) { in inet_create()
297 PF_INET, protocol, sock->type); in inet_create()
[all …]
Dinet_connection_sock.c46 int inet_csk_bind_conflict(const struct sock *sk, in inet_csk_bind_conflict()
49 struct sock *sk2; in inet_csk_bind_conflict()
52 kuid_t uid = sock_i_uid((struct sock *)sk); in inet_csk_bind_conflict()
93 int inet_csk_get_port(struct sock *sk, unsigned short snum) in inet_csk_get_port()
255 static int inet_csk_wait_for_connect(struct sock *sk, long timeo) in inet_csk_wait_for_connect()
303 struct sock *inet_csk_accept(struct sock *sk, int flags, int *err) in inet_csk_accept()
308 struct sock *newsk; in inet_csk_accept()
369 void inet_csk_init_xmit_timers(struct sock *sk, in inet_csk_init_xmit_timers()
385 void inet_csk_clear_xmit_timers(struct sock *sk) in inet_csk_clear_xmit_timers()
397 void inet_csk_delete_keepalive_timer(struct sock *sk) in inet_csk_delete_keepalive_timer()
[all …]
Dinet_hashtables.c43 u32 sk_ehashfn(const struct sock *sk) in sk_ehashfn()
91 void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, in inet_bind_hash()
103 static void __inet_put_port(struct sock *sk) in __inet_put_port()
121 void inet_put_port(struct sock *sk) in inet_put_port()
129 int __inet_inherit_port(const struct sock *sk, struct sock *child) in __inet_inherit_port()
171 static inline int compute_score(struct sock *sk, struct net *net, in compute_score()
206 struct sock *__inet_lookup_listener(struct net *net, in __inet_lookup_listener()
212 struct sock *sk, *result; in __inet_lookup_listener()
263 void sock_gen_put(struct sock *sk) in sock_gen_put()
283 struct sock *__inet_lookup_established(struct net *net, in __inet_lookup_established()
[all …]
Dtcp_vegas.h18 void tcp_vegas_init(struct sock *sk);
19 void tcp_vegas_state(struct sock *sk, u8 ca_state);
20 void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us);
21 void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event);
22 size_t tcp_vegas_get_info(struct sock *sk, u32 ext, int *attr,
Dtcp_veno.c44 static inline void veno_enable(struct sock *sk) in veno_enable()
54 static inline void veno_disable(struct sock *sk) in veno_disable()
62 static void tcp_veno_init(struct sock *sk) in tcp_veno_init()
72 static void tcp_veno_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us) in tcp_veno_pkts_acked()
94 static void tcp_veno_state(struct sock *sk, u8 ca_state) in tcp_veno_state()
111 static void tcp_veno_cwnd_event(struct sock *sk, enum tcp_ca_event event) in tcp_veno_cwnd_event()
117 static void tcp_veno_cong_avoid(struct sock *sk, u32 ack, u32 acked) in tcp_veno_cong_avoid()
190 static u32 tcp_veno_ssthresh(struct sock *sk) in tcp_veno_ssthresh()
Draw.c96 void raw_hash_sk(struct sock *sk) in raw_hash_sk()
110 void raw_unhash_sk(struct sock *sk) in raw_unhash_sk()
121 static struct sock *__raw_v4_lookup(struct net *net, struct sock *sk, in __raw_v4_lookup()
142 static int icmp_filter(const struct sock *sk, const struct sk_buff *skb) in icmp_filter()
170 struct sock *sk; in raw_v4_input()
208 struct sock *raw_sk; in raw_local_deliver()
223 static void raw_err(struct sock *sk, struct sk_buff *skb, u32 info) in raw_err()
287 struct sock *raw_sk; in raw_icmp_error()
310 static int raw_rcv_skb(struct sock *sk, struct sk_buff *skb) in raw_rcv_skb()
323 int raw_rcv(struct sock *sk, struct sk_buff *skb) in raw_rcv()
[all …]
Dtcp_timer.c35 static void tcp_write_err(struct sock *sk) in tcp_write_err()
55 static int tcp_out_of_resources(struct sock *sk, bool do_reset) in tcp_out_of_resources()
86 static int tcp_orphan_retries(struct sock *sk, bool alive) in tcp_orphan_retries()
102 static void tcp_mtu_probing(struct inet_connection_sock *icsk, struct sock *sk) in tcp_mtu_probing()
131 static bool retransmits_timed_out(struct sock *sk, in retransmits_timed_out()
159 static int tcp_write_timeout(struct sock *sk) in tcp_write_timeout()
219 void tcp_delack_timer_handler(struct sock *sk) in tcp_delack_timer_handler()
268 struct sock *sk = (struct sock *)data; in tcp_delack_timer()
284 static void tcp_probe_timer(struct sock *sk) in tcp_probe_timer()
334 static void tcp_fastopen_synack_timer(struct sock *sk) in tcp_fastopen_synack_timer()
[all …]
Dudp.c138 struct sock *sk, in udp_lib_lport_inuse()
139 int (*saddr_comp)(const struct sock *sk1, in udp_lib_lport_inuse()
140 const struct sock *sk2), in udp_lib_lport_inuse()
143 struct sock *sk2; in udp_lib_lport_inuse()
171 struct sock *sk, in udp_lib_lport_inuse2()
172 int (*saddr_comp)(const struct sock *sk1, in udp_lib_lport_inuse2()
173 const struct sock *sk2)) in udp_lib_lport_inuse2()
175 struct sock *sk2; in udp_lib_lport_inuse2()
208 int udp_lib_get_port(struct sock *sk, unsigned short snum, in udp_lib_get_port()
209 int (*saddr_comp)(const struct sock *sk1, in udp_lib_get_port()
[all …]
Dtcp_vegas.c70 static void vegas_enable(struct sock *sk) in vegas_enable()
86 static inline void vegas_disable(struct sock *sk) in vegas_disable()
93 void tcp_vegas_init(struct sock *sk) in tcp_vegas_init()
110 void tcp_vegas_pkts_acked(struct sock *sk, u32 cnt, s32 rtt_us) in tcp_vegas_pkts_acked()
133 void tcp_vegas_state(struct sock *sk, u8 ca_state) in tcp_vegas_state()
151 void tcp_vegas_cwnd_event(struct sock *sk, enum tcp_ca_event event) in tcp_vegas_cwnd_event()
164 static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 acked) in tcp_vegas_cong_avoid()
289 size_t tcp_vegas_get_info(struct sock *sk, u32 ext, int *attr, in tcp_vegas_get_info()
Dtcp_westwood.c60 static void tcp_westwood_init(struct sock *sk) in tcp_westwood_init()
102 static void tcp_westwood_pkts_acked(struct sock *sk, u32 cnt, s32 rtt) in tcp_westwood_pkts_acked()
115 static void westwood_update_window(struct sock *sk) in westwood_update_window()
161 static inline void westwood_fast_bw(struct sock *sk) in westwood_fast_bw()
178 static inline u32 westwood_acked_count(struct sock *sk) in westwood_acked_count()
215 static u32 tcp_westwood_bw_rttmin(const struct sock *sk) in tcp_westwood_bw_rttmin()
223 static void tcp_westwood_ack(struct sock *sk, u32 ack_flags) in tcp_westwood_ack()
238 static void tcp_westwood_event(struct sock *sk, enum tcp_ca_event event) in tcp_westwood_event()
259 static size_t tcp_westwood_info(struct sock *sk, u32 ext, int *attr, in tcp_westwood_info()
Dtcp_dctcp.c84 static void dctcp_init(struct sock *sk) in dctcp_init()
112 static u32 dctcp_ssthresh(struct sock *sk) in dctcp_ssthresh()
126 static void dctcp_ce_state_0_to_1(struct sock *sk) in dctcp_ce_state_0_to_1()
156 static void dctcp_ce_state_1_to_0(struct sock *sk) in dctcp_ce_state_1_to_0()
186 static void dctcp_update_alpha(struct sock *sk, u32 flags) in dctcp_update_alpha()
231 static void dctcp_state(struct sock *sk, u8 new_state) in dctcp_state()
248 static void dctcp_update_ack_reserved(struct sock *sk, enum tcp_ca_event ev) in dctcp_update_ack_reserved()
267 static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev) in dctcp_cwnd_event()
286 static size_t dctcp_get_info(struct sock *sk, u32 ext, int *attr, in dctcp_get_info()
/linux-4.4.14/net/tipc/
Dsocket.c82 struct sock sk;
105 static int tipc_backlog_rcv(struct sock *sk, struct sk_buff *skb);
106 static void tipc_data_ready(struct sock *sk);
107 static void tipc_write_space(struct sock *sk);
108 static void tipc_sock_destruct(struct sock *sk);
109 static int tipc_release(struct socket *sock);
110 static int tipc_accept(struct socket *sock, struct socket *new_sock, int flags);
111 static int tipc_wait_for_sndmsg(struct socket *sock, long *timeo_p);
120 static int __tipc_send_stream(struct socket *sock, struct msghdr *m,
122 static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dsz);
[all …]
Dserver.c68 struct socket *sock; member
94 struct socket *sock = con->sock; in tipc_conn_kref_release() local
95 struct sock *sk; in tipc_conn_kref_release()
97 if (sock) { in tipc_conn_kref_release()
98 sk = sock->sk; in tipc_conn_kref_release()
100 __module_get(sock->ops->owner); in tipc_conn_kref_release()
104 kernel_bind(sock, (struct sockaddr *)saddr, sizeof(*saddr)); in tipc_conn_kref_release()
105 sock_release(sock); in tipc_conn_kref_release()
106 con->sock = NULL; in tipc_conn_kref_release()
135 static void sock_data_ready(struct sock *sk) in sock_data_ready()
[all …]
/linux-4.4.14/net/unix/
Daf_unix.c184 static inline int unix_our_peer(struct sock *sk, struct sock *osk) in unix_our_peer()
189 static inline int unix_may_send(struct sock *sk, struct sock *osk) in unix_may_send()
194 static inline int unix_recvq_full(struct sock const *sk) in unix_recvq_full()
199 struct sock *unix_peer_get(struct sock *s) in unix_peer_get()
201 struct sock *peer; in unix_peer_get()
248 static void __unix_remove_socket(struct sock *sk) in __unix_remove_socket()
253 static void __unix_insert_socket(struct hlist_head *list, struct sock *sk) in __unix_insert_socket()
259 static inline void unix_remove_socket(struct sock *sk) in unix_remove_socket()
266 static inline void unix_insert_socket(struct hlist_head *list, struct sock *sk) in unix_insert_socket()
273 static struct sock *__unix_find_socket_byname(struct net *net, in __unix_find_socket_byname()
[all …]
Dgarbage.c98 struct sock *unix_get_socket(struct file *filp) in unix_get_socket()
100 struct sock *u_sock = NULL; in unix_get_socket()
105 struct socket *sock = SOCKET_I(inode); in unix_get_socket() local
106 struct sock *s = sock->sk; in unix_get_socket()
109 if (s && sock->ops && sock->ops->family == PF_UNIX) in unix_get_socket()
121 struct sock *s = unix_get_socket(fp); in unix_inflight()
142 struct sock *s = unix_get_socket(fp); in unix_notinflight()
159 static void scan_inflight(struct sock *x, void (*func)(struct unix_sock *), in scan_inflight()
176 struct sock *sk = unix_get_socket(*fp++); in scan_inflight()
201 static void scan_children(struct sock *x, void (*func)(struct unix_sock *), in scan_children()
Ddiag.c11 static int sk_diag_dump_name(struct sock *sk, struct sk_buff *nlskb) in sk_diag_dump_name()
22 static int sk_diag_dump_vfs(struct sock *sk, struct sk_buff *nlskb) in sk_diag_dump_vfs()
38 static int sk_diag_dump_peer(struct sock *sk, struct sk_buff *nlskb) in sk_diag_dump_peer()
40 struct sock *peer; in sk_diag_dump_peer()
56 static int sk_diag_dump_icons(struct sock *sk, struct sk_buff *nlskb) in sk_diag_dump_icons()
74 struct sock *req, *peer; in sk_diag_dump_icons()
97 static int sk_diag_show_rqlen(struct sock *sk, struct sk_buff *nlskb) in sk_diag_show_rqlen()
112 static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, struct unix_diag_req *req, in sk_diag_fill()
166 static int sk_diag_dump(struct sock *sk, struct sk_buff *skb, struct unix_diag_req *req, in sk_diag_dump()
196 struct sock *sk; in unix_diag_dump()
[all …]
/linux-4.4.14/Documentation/networking/timestamping/
Dtimestamping.c137 static void sendpacket(int sock, struct sockaddr *addr, socklen_t addr_len) in sendpacket() argument
142 res = sendto(sock, sync, sizeof(sync), 0, in sendpacket()
155 int sock, int recvmsg_flags, in printpacket() argument
261 if (ioctl(sock, SIOCGSTAMP, &tv)) in printpacket()
269 if (ioctl(sock, SIOCGSTAMPNS, &ts)) in printpacket()
278 static void recvpacket(int sock, int recvmsg_flags, in recvpacket() argument
301 res = recvmsg(sock, &msg, recvmsg_flags|MSG_DONTWAIT); in recvpacket()
309 sock, recvmsg_flags, in recvpacket()
325 int sock; in main() local
367 sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); in main()
[all …]
/linux-4.4.14/net/x25/
Dx25_timer.c32 void x25_init_timers(struct sock *sk) in x25_init_timers()
43 void x25_start_heartbeat(struct sock *sk) in x25_start_heartbeat()
48 void x25_stop_heartbeat(struct sock *sk) in x25_stop_heartbeat()
53 void x25_start_t2timer(struct sock *sk) in x25_start_t2timer()
60 void x25_start_t21timer(struct sock *sk) in x25_start_t21timer()
67 void x25_start_t22timer(struct sock *sk) in x25_start_t22timer()
74 void x25_start_t23timer(struct sock *sk) in x25_start_t23timer()
81 void x25_stop_timer(struct sock *sk) in x25_stop_timer()
86 unsigned long x25_display_timer(struct sock *sk) in x25_display_timer()
98 struct sock *sk = (struct sock *)param; in x25_heartbeat_expiry()
[all …]
Daf_x25.c200 static void x25_remove_socket(struct sock *sk) in x25_remove_socket()
212 struct sock *s; in x25_kill_by_device()
265 static void x25_insert_socket(struct sock *sk) in x25_insert_socket()
279 static struct sock *x25_find_listener(struct x25_address *addr, in x25_find_listener()
282 struct sock *s; in x25_find_listener()
283 struct sock *next_best; in x25_find_listener()
323 static struct sock *__x25_find_socket(unsigned int lci, struct x25_neigh *nb) in __x25_find_socket()
325 struct sock *s; in __x25_find_socket()
337 struct sock *x25_find_socket(unsigned int lci, struct x25_neigh *nb) in x25_find_socket()
339 struct sock *s; in x25_find_socket()
[all …]
/linux-4.4.14/net/ipv6/
Dudp_impl.h14 int udp_v6_get_port(struct sock *sk, unsigned short snum);
16 int udpv6_getsockopt(struct sock *sk, int level, int optname,
18 int udpv6_setsockopt(struct sock *sk, int level, int optname,
21 int compat_udpv6_setsockopt(struct sock *sk, int level, int optname,
23 int compat_udpv6_getsockopt(struct sock *sk, int level, int optname,
26 int udpv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len);
27 int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
29 int udpv6_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
30 void udpv6_destroy_sock(struct sock *sk);
32 void udp_v6_clear_sk(struct sock *sk, int size);
Dip6_udp_tunnel.c20 struct socket *sock = NULL; in udp_sock_create6() local
22 err = sock_create_kern(net, AF_INET6, SOCK_DGRAM, 0, &sock); in udp_sock_create6()
29 err = kernel_setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, in udp_sock_create6()
39 err = kernel_bind(sock, (struct sockaddr *)&udp6_addr, in udp_sock_create6()
49 err = kernel_connect(sock, in udp_sock_create6()
56 udp_set_no_check6_tx(sock->sk, !cfg->use_udp6_tx_checksums); in udp_sock_create6()
57 udp_set_no_check6_rx(sock->sk, !cfg->use_udp6_rx_checksums); in udp_sock_create6()
59 *sockp = sock; in udp_sock_create6()
63 if (sock) { in udp_sock_create6()
64 kernel_sock_shutdown(sock, SHUT_RDWR); in udp_sock_create6()
[all …]
Dinet6_hashtables.c51 struct sock *__inet6_lookup_established(struct net *net, in __inet6_lookup_established()
59 struct sock *sk; in __inet6_lookup_established()
96 static inline int compute_score(struct sock *sk, struct net *net, in compute_score()
123 struct sock *inet6_lookup_listener(struct net *net, in inet6_lookup_listener()
128 struct sock *sk; in inet6_lookup_listener()
130 struct sock *result; in inet6_lookup_listener()
179 struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo, in inet6_lookup()
184 struct sock *sk; in inet6_lookup()
195 struct sock *sk, const __u16 lport, in __inet6_check_established()
209 struct sock *sk2; in __inet6_check_established()
[all …]
Dinet6_connection_sock.c30 int inet6_csk_bind_conflict(const struct sock *sk, in inet6_csk_bind_conflict()
33 const struct sock *sk2; in inet6_csk_bind_conflict()
36 kuid_t uid = sock_i_uid((struct sock *)sk); in inet6_csk_bind_conflict()
53 sock_i_uid((struct sock *)sk2))))) { in inet6_csk_bind_conflict()
68 struct dst_entry *inet6_csk_route_req(const struct sock *sk, in inet6_csk_route_req()
99 void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr) in inet6_csk_addr2sockaddr()
114 struct dst_entry *__inet6_csk_dst_check(struct sock *sk, u32 cookie) in __inet6_csk_dst_check()
119 static struct dst_entry *inet6_csk_route_socket(struct sock *sk, in inet6_csk_route_socket()
153 int inet6_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl_unused) in inet6_csk_xmit()
181 struct dst_entry *inet6_csk_update_pmtu(struct sock *sk, u32 mtu) in inet6_csk_update_pmtu()
Daf_inet6.c93 static __inline__ struct ipv6_pinfo *inet6_sk_generic(struct sock *sk) in inet6_sk_generic()
100 static int inet6_create(struct net *net, struct socket *sock, int protocol, in inet6_create() argument
105 struct sock *sk; in inet6_create()
119 list_for_each_entry_rcu(answer, &inetsw6[sock->type], list) { in inet6_create()
147 PF_INET6, protocol, sock->type); in inet6_create()
161 if (sock->type == SOCK_RAW && !kern && in inet6_create()
165 sock->ops = answer->ops; in inet6_create()
177 sock_init_data(sock, sk); in inet6_create()
186 if (SOCK_RAW == sock->type) { in inet6_create()
256 int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) in inet6_bind() argument
[all …]
/linux-4.4.14/drivers/infiniband/hw/usnic/
Dusnic_transport.c65 struct socket *sock) in usnic_transport_sock_to_str() argument
73 err = usnic_transport_sock_get_addr(sock, &proto, &addr, &port); in usnic_transport_sock_to_str()
147 struct socket *sock; in usnic_transport_get_socket() local
152 sock = sockfd_lookup(sock_fd, &err); in usnic_transport_get_socket()
153 if (!sock) { in usnic_transport_get_socket()
159 usnic_transport_sock_to_str(buf, sizeof(buf), sock); in usnic_transport_get_socket()
162 return sock; in usnic_transport_get_socket()
165 void usnic_transport_put_socket(struct socket *sock) in usnic_transport_put_socket() argument
169 usnic_transport_sock_to_str(buf, sizeof(buf), sock); in usnic_transport_put_socket()
171 sockfd_put(sock); in usnic_transport_put_socket()
[all …]
/linux-4.4.14/crypto/
Dalgif_hash.c42 static int hash_sendmsg(struct socket *sock, struct msghdr *msg, in hash_sendmsg() argument
46 struct sock *sk = sock->sk; in hash_sendmsg()
104 static ssize_t hash_sendpage(struct socket *sock, struct page *page, in hash_sendpage() argument
107 struct sock *sk = sock->sk; in hash_sendpage()
149 static int hash_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, in hash_recvmsg() argument
152 struct sock *sk = sock->sk; in hash_recvmsg()
181 static int hash_accept(struct socket *sock, struct socket *newsock, int flags) in hash_accept() argument
183 struct sock *sk = sock->sk; in hash_accept()
188 struct sock *sk2; in hash_accept()
245 static int hash_check_key(struct socket *sock) in hash_check_key() argument
[all …]
Dalgif_skcipher.c106 static inline int skcipher_sndbuf(struct sock *sk) in skcipher_sndbuf()
115 static inline bool skcipher_writable(struct sock *sk) in skcipher_writable()
120 static int skcipher_alloc_sgl(struct sock *sk) in skcipher_alloc_sgl()
150 static void skcipher_pull_sgl(struct sock *sk, int used, int put) in skcipher_pull_sgl()
192 static void skcipher_free_sgl(struct sock *sk) in skcipher_free_sgl()
200 static int skcipher_wait_for_wmem(struct sock *sk, unsigned flags) in skcipher_wait_for_wmem()
226 static void skcipher_wmem_wakeup(struct sock *sk) in skcipher_wmem_wakeup()
243 static int skcipher_wait_for_data(struct sock *sk, unsigned flags) in skcipher_wait_for_data()
274 static void skcipher_data_wakeup(struct sock *sk) in skcipher_data_wakeup()
293 static int skcipher_sendmsg(struct socket *sock, struct msghdr *msg, in skcipher_sendmsg() argument
[all …]
Daf_alg.c122 int af_alg_release(struct socket *sock) in af_alg_release() argument
124 if (sock->sk) in af_alg_release()
125 sock_put(sock->sk); in af_alg_release()
130 void af_alg_release_parent(struct sock *sk) in af_alg_release_parent()
150 static int alg_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) in alg_bind() argument
153 struct sock *sk = sock->sk; in alg_bind()
160 if (sock->state == SS_CONNECTED) in alg_bind()
204 static int alg_setkey(struct sock *sk, char __user *ukey, in alg_setkey()
228 static int alg_setsockopt(struct socket *sock, int level, int optname, in alg_setsockopt() argument
231 struct sock *sk = sock->sk; in alg_setsockopt()
[all …]
Dalgif_aead.c57 static inline int aead_sndbuf(struct sock *sk) in aead_sndbuf()
66 static inline bool aead_writable(struct sock *sk) in aead_writable()
78 static void aead_put_sgl(struct sock *sk) in aead_put_sgl()
100 static void aead_wmem_wakeup(struct sock *sk) in aead_wmem_wakeup()
117 static int aead_wait_for_data(struct sock *sk, unsigned flags) in aead_wait_for_data()
147 static void aead_data_wakeup(struct sock *sk) in aead_data_wakeup()
168 static int aead_sendmsg(struct socket *sock, struct msghdr *msg, size_t size) in aead_sendmsg() argument
170 struct sock *sk = sock->sk; in aead_sendmsg()
300 static ssize_t aead_sendpage(struct socket *sock, struct page *page, in aead_sendpage() argument
303 struct sock *sk = sock->sk; in aead_sendpage()
[all …]
/linux-4.4.14/drivers/staging/lustre/lnet/lnet/
Dlib-socket.c63 struct socket *sock; in lnet_sock_ioctl() local
66 rc = sock_create(PF_INET, SOCK_STREAM, 0, &sock); in lnet_sock_ioctl()
72 sock_filp = sock_alloc_file(sock, 0, NULL); in lnet_sock_ioctl()
74 sock_release(sock); in lnet_sock_ioctl()
253 lnet_sock_write(struct socket *sock, void *buffer, int nob, int timeout) in lnet_sock_write() argument
279 rc = kernel_setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, in lnet_sock_write()
289 rc = kernel_sendmsg(sock, &msg, &iov, 1, nob); in lnet_sock_write()
314 lnet_sock_read(struct socket *sock, void *buffer, int nob, int timeout) in lnet_sock_read() argument
338 rc = kernel_setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, in lnet_sock_read()
347 rc = kernel_recvmsg(sock, &msg, &iov, 1, nob, 0); in lnet_sock_read()
[all …]
Dacceptor.c146 struct socket *sock; in lnet_connect() local
158 rc = lnet_sock_connect(&sock, &fatal, local_ip, port, peer_ip, in lnet_connect()
186 rc = lnet_sock_write(sock, &cr, sizeof(cr), accept_timeout); in lnet_connect()
190 *sockp = sock; in lnet_connect()
198 sock_release(sock); in lnet_connect()
208 lnet_accept(struct socket *sock, __u32 magic) in lnet_accept() argument
220 rc = lnet_sock_getaddr(sock, 1, &peer_ip, &peer_port); in lnet_accept()
234 rc = lnet_sock_write(sock, &cr, sizeof(cr), in lnet_accept()
255 rc = lnet_sock_read(sock, &cr.acr_version, sizeof(cr.acr_version), in lnet_accept()
277 rc = lnet_sock_write(sock, &cr, sizeof(cr), accept_timeout); in lnet_accept()
[all …]
/linux-4.4.14/include/net/phonet/
Dphonet.h37 struct sock sk;
43 static inline struct pn_sock *pn_sk(struct sock *sk) in pn_sk()
51 struct sock *pn_find_sock_by_sa(struct net *net, const struct sockaddr_pn *sa);
54 void pn_sock_hash(struct sock *sk);
55 void pn_sock_unhash(struct sock *sk);
56 int pn_sock_get_port(struct sock *sk, unsigned short sport);
58 struct sock *pn_find_sock_by_res(struct net *net, u8 res);
59 int pn_sock_bind_res(struct sock *sock, u8 res);
60 int pn_sock_unbind_res(struct sock *sk, u8 res);
61 void pn_sock_unbind_all_res(struct sock *sk);
[all …]
Dgprs.h28 struct sock;
31 int pep_writeable(struct sock *sk);
32 int pep_write(struct sock *sk, struct sk_buff *skb);
33 struct sk_buff *pep_read(struct sock *sk);
35 int gprs_attach(struct sock *sk);
36 void gprs_detach(struct sock *sk);
/linux-4.4.14/drivers/staging/gdm724x/
Dnetlink_k.c90 struct sock *netlink_init(int unit, in netlink_init()
93 struct sock *sock; in netlink_init() local
102 sock = netlink_kernel_create(&init_net, unit, &cfg); in netlink_init()
104 if (sock) in netlink_init()
107 return sock; in netlink_init()
110 void netlink_exit(struct sock *sock) in netlink_exit() argument
112 sock_release(sock->sk_socket); in netlink_exit()
115 int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len) in netlink_send() argument
125 if (!netlink_has_listeners(sock, group + 1)) in netlink_send()
139 ret = netlink_broadcast(sock, skb, 0, group + 1, GFP_ATOMIC); in netlink_send()
[all …]
Dnetlink_k.h20 struct sock *netlink_init(int unit,
22 void netlink_exit(struct sock *sock);
23 int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len);
/linux-4.4.14/drivers/isdn/mISDN/
Dsocket.c55 mISDN_sock_link(struct mISDN_sock_list *l, struct sock *sk) in mISDN_sock_link()
62 static void mISDN_sock_unlink(struct mISDN_sock_list *l, struct sock *sk) in mISDN_sock_unlink()
104 mISDN_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_buff *skb) in mISDN_sock_cmsg()
115 mISDN_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, in mISDN_sock_recvmsg() argument
119 struct sock *sk = sock->sk; in mISDN_sock_recvmsg()
176 mISDN_sock_sendmsg(struct socket *sock, struct msghdr *msg, size_t len) in mISDN_sock_sendmsg() argument
178 struct sock *sk = sock->sk; in mISDN_sock_sendmsg()
246 data_sock_release(struct socket *sock) in data_sock_release() argument
248 struct sock *sk = sock->sk; in data_sock_release()
251 printk(KERN_DEBUG "%s(%p) sk=%p\n", __func__, sock, sk); in data_sock_release()
[all …]
/linux-4.4.14/include/net/bluetooth/
Dbluetooth.h240 struct sock sk;
242 struct sock *parent;
262 void bt_sock_link(struct bt_sock_list *l, struct sock *s);
263 void bt_sock_unlink(struct bt_sock_list *l, struct sock *s);
264 int bt_sock_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
266 int bt_sock_stream_recvmsg(struct socket *sock, struct msghdr *msg,
268 uint bt_sock_poll(struct file *file, struct socket *sock, poll_table *wait);
269 int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
270 int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo);
271 int bt_sock_wait_ready(struct sock *sk, unsigned long flags);
[all …]
/linux-4.4.14/net/decnet/
Daf_decnet.c143 struct sock sk;
147 static void dn_keepalive(struct sock *sk);
160 static int __dn_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsign…
161 static int __dn_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __…
163 static struct hlist_head *dn_find_list(struct sock *sk) in dn_find_list()
178 struct sock *sk; in check_port()
191 static unsigned short port_alloc(struct sock *sk) in port_alloc()
212 static int dn_hash_sock(struct sock *sk) in dn_hash_sock()
236 static void dn_unhash_sock(struct sock *sk) in dn_unhash_sock()
243 static void dn_unhash_sock_bh(struct sock *sk) in dn_unhash_sock_bh()
[all …]
Ddn_nsp_out.c76 struct sock *sk = skb->sk; in dn_nsp_send()
118 struct sk_buff *dn_alloc_skb(struct sock *sk, int size, gfp_t pri) in dn_alloc_skb()
142 unsigned long dn_nsp_persist(struct sock *sk) in dn_nsp_persist()
165 static void dn_nsp_rtt(struct sock *sk, long rtt) in dn_nsp_rtt()
238 void dn_nsp_output(struct sock *sk) in dn_nsp_output()
274 int dn_nsp_xmit_timeout(struct sock *sk) in dn_nsp_xmit_timeout()
301 static __le16 *dn_mk_ack_header(struct sock *sk, struct sk_buff *skb, unsigned char msgflag, int hl… in dn_mk_ack_header()
333 static __le16 *dn_nsp_mk_data_header(struct sock *sk, struct sk_buff *skb, int oth) in dn_nsp_mk_data_header()
351 void dn_nsp_queue_xmit(struct sock *sk, struct sk_buff *skb, in dn_nsp_queue_xmit()
380 int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *q, unsigned … in dn_nsp_check_xmit_queue()
[all …]
/linux-4.4.14/net/rxrpc/
Daf_rxrpc.c50 static void rxrpc_sock_destructor(struct sock *);
55 static inline int rxrpc_writable(struct sock *sk) in rxrpc_writable()
63 static void rxrpc_write_space(struct sock *sk) in rxrpc_write_space()
122 static int rxrpc_bind(struct socket *sock, struct sockaddr *saddr, int len) in rxrpc_bind() argument
125 struct sock *sk = sock->sk; in rxrpc_bind()
188 static int rxrpc_listen(struct socket *sock, int backlog) in rxrpc_listen() argument
190 struct sock *sk = sock->sk; in rxrpc_listen()
223 static struct rxrpc_transport *rxrpc_name_to_transport(struct socket *sock, in rxrpc_name_to_transport() argument
230 struct rxrpc_sock *rx = rxrpc_sk(sock->sk); in rxrpc_name_to_transport()
269 struct rxrpc_call *rxrpc_kernel_begin_call(struct socket *sock, in rxrpc_kernel_begin_call() argument
[all …]
/linux-4.4.14/net/core/
Dsock.c159 bool sk_ns_capable(const struct sock *sk, in sk_ns_capable()
176 bool sk_capable(const struct sock *sk, int cap) in sk_capable()
191 bool sk_net_capable(const struct sock *sk, int cap) in sk_net_capable()
342 void sk_set_memalloc(struct sock *sk) in sk_set_memalloc()
350 void sk_clear_memalloc(struct sock *sk) in sk_clear_memalloc()
367 int __sk_backlog_rcv(struct sock *sk, struct sk_buff *skb) in __sk_backlog_rcv()
425 static bool sock_needs_netstamp(const struct sock *sk) in sock_needs_netstamp()
436 static void sock_disable_timestamp(struct sock *sk, unsigned long flags) in sock_disable_timestamp()
447 int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) in sock_queue_rcv_skb()
487 int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested) in sk_receive_skb()
[all …]
Dstream.c28 void sk_stream_write_space(struct sock *sk) in sk_stream_write_space()
30 struct socket *sock = sk->sk_socket; in sk_stream_write_space() local
33 if (sk_stream_is_writeable(sk) && sock) { in sk_stream_write_space()
34 clear_bit(SOCK_NOSPACE, &sock->flags); in sk_stream_write_space()
55 int sk_stream_wait_connect(struct sock *sk, long *timeo_p) in sk_stream_wait_connect()
89 static inline int sk_stream_closing(struct sock *sk) in sk_stream_closing()
95 void sk_stream_wait_close(struct sock *sk, long timeout) in sk_stream_wait_close()
117 int sk_stream_wait_memory(struct sock *sk, long *timeo_p) in sk_stream_wait_memory()
180 int sk_stream_error(struct sock *sk, int flags, int err) in sk_stream_error()
190 void sk_stream_kill_queues(struct sock *sk) in sk_stream_kill_queues()
/linux-4.4.14/net/l2tp/
Dl2tp_ppp.c125 struct sock *sock; /* Pointer to the session member
127 struct sock *tunnel_sock; /* Pointer to the tunnel UDP
143 static inline struct l2tp_session *pppol2tp_sock_to_session(struct sock *sk) in pppol2tp_sock_to_session()
188 static int pppol2tp_recvmsg(struct socket *sock, struct msghdr *msg, in pppol2tp_recvmsg() argument
193 struct sock *sk = sock->sk; in pppol2tp_recvmsg()
222 struct sock *sk = NULL; in pppol2tp_recv()
227 sk = ps->sock; in pppol2tp_recv()
277 if (ps->sock) in pppol2tp_session_sock_hold()
278 sock_hold(ps->sock); in pppol2tp_session_sock_hold()
285 if (ps->sock) in pppol2tp_session_sock_put()
[all …]
Dl2tp_core.c118 static inline struct l2tp_tunnel *l2tp_tunnel(struct sock *sk) in l2tp_tunnel()
179 static struct sock *l2tp_tunnel_sock_lookup(struct l2tp_tunnel *tunnel) in l2tp_tunnel_sock_lookup()
182 struct socket *sock = NULL; in l2tp_tunnel_sock_lookup() local
183 struct sock *sk = NULL; in l2tp_tunnel_sock_lookup()
193 sock = sockfd_lookup(tunnel->fd, &err); in l2tp_tunnel_sock_lookup()
194 if (sock) in l2tp_tunnel_sock_lookup()
195 sk = sock->sk; in l2tp_tunnel_sock_lookup()
198 sk = tunnel->sock; in l2tp_tunnel_sock_lookup()
207 static void l2tp_tunnel_sock_put(struct sock *sk) in l2tp_tunnel_sock_put()
949 int l2tp_udp_encap_recv(struct sock *sk, struct sk_buff *skb) in l2tp_udp_encap_recv()
[all …]
Dl2tp_ip.c45 static inline struct l2tp_ip_sock *l2tp_ip_sk(const struct sock *sk) in l2tp_ip_sk()
50 static struct sock *__l2tp_ip_bind_lookup(struct net *net, __be32 laddr, int dif, u32 tunnel_id) in __l2tp_ip_bind_lookup()
52 struct sock *sk; in __l2tp_ip_bind_lookup()
73 static inline struct sock *l2tp_ip_bind_lookup(struct net *net, __be32 laddr, int dif, u32 tunnel_i… in l2tp_ip_bind_lookup()
75 struct sock *sk = __l2tp_ip_bind_lookup(net, laddr, dif, tunnel_id); in l2tp_ip_bind_lookup()
118 struct sock *sk; in l2tp_ip_recv()
180 sk = tunnel->sock; in l2tp_ip_recv()
209 static int l2tp_ip_open(struct sock *sk) in l2tp_ip_open()
221 static void l2tp_ip_close(struct sock *sk, long timeout) in l2tp_ip_close()
230 static void l2tp_ip_destroy_sock(struct sock *sk) in l2tp_ip_destroy_sock()
[all …]
/linux-4.4.14/net/bluetooth/cmtp/
Dsock.c49 static int cmtp_sock_release(struct socket *sock) in cmtp_sock_release() argument
51 struct sock *sk = sock->sk; in cmtp_sock_release()
53 BT_DBG("sock %p sk %p", sock, sk); in cmtp_sock_release()
66 static int cmtp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in cmtp_sock_ioctl() argument
86 nsock = sockfd_lookup(ca.sock, &err); in cmtp_sock_ioctl()
141 static int cmtp_sock_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in cmtp_sock_compat_ioctl() argument
165 return cmtp_sock_ioctl(sock, cmd, arg); in cmtp_sock_compat_ioctl()
198 static int cmtp_sock_create(struct net *net, struct socket *sock, int protocol, in cmtp_sock_create() argument
201 struct sock *sk; in cmtp_sock_create()
203 BT_DBG("sock %p", sock); in cmtp_sock_create()
[all …]
Dcore.c196 struct socket *sock = session->sock; in cmtp_send_frame() local
207 return kernel_sendmsg(sock, &msg, &iv, 1, len); in cmtp_send_frame()
282 struct sock *sk = session->sock->sk; in cmtp_session()
320 fput(session->sock->file); in cmtp_session()
331 int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock) in cmtp_add_connection() argument
339 if (!l2cap_is_socket(sock)) in cmtp_add_connection()
351 s = __cmtp_get_session(&l2cap_pi(sock->sk)->chan->dst); in cmtp_add_connection()
357 bacpy(&session->bdaddr, &l2cap_pi(sock->sk)->chan->dst); in cmtp_add_connection()
359 session->mtu = min_t(uint, l2cap_pi(sock->sk)->chan->omtu, in cmtp_add_connection()
360 l2cap_pi(sock->sk)->chan->imtu); in cmtp_add_connection()
[all …]
/linux-4.4.14/net/rose/
Drose_timer.c35 void rose_start_heartbeat(struct sock *sk) in rose_start_heartbeat()
46 void rose_start_t1timer(struct sock *sk) in rose_start_t1timer()
59 void rose_start_t2timer(struct sock *sk) in rose_start_t2timer()
72 void rose_start_t3timer(struct sock *sk) in rose_start_t3timer()
85 void rose_start_hbtimer(struct sock *sk) in rose_start_hbtimer()
98 void rose_start_idletimer(struct sock *sk) in rose_start_idletimer()
113 void rose_stop_heartbeat(struct sock *sk) in rose_stop_heartbeat()
118 void rose_stop_timer(struct sock *sk) in rose_stop_timer()
123 void rose_stop_idletimer(struct sock *sk) in rose_stop_idletimer()
130 struct sock *sk = (struct sock *)param; in rose_heartbeat_expiry()
[all …]
Daf_rose.c154 static void rose_remove_socket(struct sock *sk) in rose_remove_socket()
167 struct sock *s; in rose_kill_by_neigh()
187 struct sock *s; in rose_kill_by_device()
233 static void rose_insert_socket(struct sock *sk) in rose_insert_socket()
245 static struct sock *rose_find_listener(rose_address *addr, ax25_address *call) in rose_find_listener()
247 struct sock *s; in rose_find_listener()
276 struct sock *rose_find_socket(unsigned int lci, struct rose_neigh *neigh) in rose_find_socket()
278 struct sock *s; in rose_find_socket()
316 void rose_destroy_socket(struct sock *);
323 rose_destroy_socket((struct sock *)data); in rose_destroy_timer()
[all …]
/linux-4.4.14/net/bluetooth/bnep/
Dsock.c36 static int bnep_sock_release(struct socket *sock) in bnep_sock_release() argument
38 struct sock *sk = sock->sk; in bnep_sock_release()
40 BT_DBG("sock %p sk %p", sock, sk); in bnep_sock_release()
52 static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in bnep_sock_ioctl() argument
73 nsock = sockfd_lookup(ca.sock, &err); in bnep_sock_ioctl()
138 static int bnep_sock_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in bnep_sock_compat_ioctl() argument
162 return bnep_sock_ioctl(sock, cmd, arg); in bnep_sock_compat_ioctl()
195 static int bnep_sock_create(struct net *net, struct socket *sock, int protocol, in bnep_sock_create() argument
198 struct sock *sk; in bnep_sock_create()
200 BT_DBG("sock %p", sock); in bnep_sock_create()
[all …]
/linux-4.4.14/net/sunrpc/
Dxprtsock.c219 static inline struct rpc_xprt *xprt_from_sock(struct sock *sk) in xprt_from_sock()
326 static int xs_send_kvec(struct socket *sock, struct sockaddr *addr, int addrlen, struct kvec *vec, … in xs_send_kvec() argument
339 return kernel_sendmsg(sock, &msg, &iov, 1, iov.iov_len); in xs_send_kvec()
340 return kernel_sendmsg(sock, &msg, NULL, 0, 0); in xs_send_kvec()
343 static int xs_send_pagedata(struct socket *sock, struct xdr_buf *xdr, unsigned int base, int more, … in xs_send_pagedata() argument
345 ssize_t (*do_sendpage)(struct socket *sock, struct page *page, in xs_send_pagedata()
355 do_sendpage = sock->ops->sendpage; in xs_send_pagedata()
367 err = do_sendpage(sock, *ppage, base, len, flags); in xs_send_pagedata()
392 static int xs_sendpages(struct socket *sock, struct sockaddr *addr, int addrlen, struct xdr_buf *xd… in xs_sendpages() argument
398 if (unlikely(!sock)) in xs_sendpages()
[all …]
Dsvcsock.c63 static void svc_udp_data_ready(struct sock *);
84 static void svc_reclassify_socket(struct socket *sock) in svc_reclassify_socket() argument
86 struct sock *sk = sock->sk; in svc_reclassify_socket()
112 static void svc_reclassify_socket(struct socket *sock) in svc_reclassify_socket() argument
175 int svc_send_common(struct socket *sock, struct xdr_buf *xdr, in svc_send_common() argument
193 len = kernel_sendpage(sock, headpage, headoffset, in svc_send_common()
206 result = kernel_sendpage(sock, *ppage, base, size, flags); in svc_send_common()
220 result = kernel_sendpage(sock, tailpage, tailoffset, in svc_send_common()
238 struct socket *sock = svsk->sk_sock; in svc_sendto() local
260 if (sock_sendmsg(sock, &msg) < 0) in svc_sendto()
[all …]
/linux-4.4.14/drivers/net/ppp/
Dpptp.c93 struct pppox_sock *sock; in lookup_chan() local
97 sock = rcu_dereference(callid_sock[call_id]); in lookup_chan()
98 if (sock) { in lookup_chan()
99 opt = &sock->proto.pptp; in lookup_chan()
101 sock = NULL; in lookup_chan()
103 sock_hold(sk_pppox(sock)); in lookup_chan()
107 return sock; in lookup_chan()
112 struct pppox_sock *sock; in lookup_chan_dst() local
119 sock = rcu_dereference(callid_sock[i]); in lookup_chan_dst()
120 if (!sock) in lookup_chan_dst()
[all …]
Dpppox.c57 void pppox_unbind_sock(struct sock *sk) in pppox_unbind_sock()
71 int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in pppox_ioctl() argument
73 struct sock *sk = sock->sk; in pppox_ioctl()
97 pppox_protos[sk->sk_protocol]->ioctl(sock, cmd, arg) : -ENOTTY; in pppox_ioctl()
106 static int pppox_create(struct net *net, struct socket *sock, int protocol, in pppox_create() argument
121 rc = pppox_protos[protocol]->create(net, sock, kern); in pppox_create()
Dpppoe.c92 static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb);
289 struct sock *sk; in pppoe_flush_dev()
372 static int pppoe_rcv_core(struct sock *sk, struct sk_buff *skb) in pppoe_rcv_core()
466 struct sock *sk = sk_pppox(po); in pppoe_unbind_sock_work()
506 struct sock *sk = sk_pppox(po); in pppoe_disc_rcv()
554 static int pppoe_create(struct net *net, struct socket *sock, int kern) in pppoe_create() argument
556 struct sock *sk; in pppoe_create()
562 sock_init_data(sock, sk); in pppoe_create()
564 sock->state = SS_UNCONNECTED; in pppoe_create()
565 sock->ops = &pppoe_ops; in pppoe_create()
[all …]
/linux-4.4.14/tools/testing/selftests/net/
Dpsock_tpacket.c83 void (*walk)(int sock, struct ring *ring);
113 int ret, sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); in pfsocket() local
114 if (sock == -1) { in pfsocket()
119 ret = setsockopt(sock, SOL_PACKET, PACKET_VERSION, &ver, sizeof(ver)); in pfsocket()
125 return sock; in pfsocket()
232 static void walk_v1_v2_rx(int sock, struct ring *ring) in walk_v1_v2_rx() argument
242 pair_udp_setfilter(sock); in walk_v1_v2_rx()
245 pfd.fd = sock; in walk_v1_v2_rx()
339 static void __v1_v2_set_packet_loss_discard(int sock) in __v1_v2_set_packet_loss_discard() argument
343 ret = setsockopt(sock, SOL_PACKET, PACKET_LOSS, (void *) &discard, in __v1_v2_set_packet_loss_discard()
[all …]
/linux-4.4.14/drivers/staging/gdm72xx/
Dnetlink_k.c91 struct sock *netlink_init(int unit, void (*cb)(struct net_device *dev, u16 type, in netlink_init()
94 struct sock *sock; in netlink_init() local
103 sock = netlink_kernel_create(&init_net, unit, &cfg); in netlink_init()
105 if (sock) in netlink_init()
108 return sock; in netlink_init()
111 void netlink_exit(struct sock *sock) in netlink_exit() argument
113 netlink_kernel_release(sock); in netlink_exit()
116 int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len) in netlink_send() argument
146 ret = netlink_broadcast(sock, skb, 0, group+1, GFP_ATOMIC); in netlink_send()
Dnetlink_k.h20 struct sock *netlink_init(int unit, void (*cb)(struct net_device *dev, u16 type,
22 void netlink_exit(struct sock *sock);
23 int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len);
/linux-4.4.14/net/netlink/
Daf_netlink.c89 static inline int netlink_is_kernel(struct sock *sk) in netlink_is_kernel()
99 static int netlink_dump(struct sock *sk);
199 struct sock *sk = skb->sk; in netlink_filter_tap()
223 struct sock *sk = skb->sk; in __netlink_deliver_tap_skb()
272 static void netlink_deliver_tap_kernel(struct sock *dst, struct sock *src, in netlink_deliver_tap_kernel()
279 static void netlink_overrun(struct sock *sk) in netlink_overrun()
293 static void netlink_rcv_wake(struct sock *sk) in netlink_rcv_wake()
304 static bool netlink_rx_is_mmaped(struct sock *sk) in netlink_rx_is_mmaped()
309 static bool netlink_tx_is_mmaped(struct sock *sk) in netlink_tx_is_mmaped()
380 __netlink_set_ring(struct sock *sk, struct nl_mmap_req *req, bool tx_ring, void **pg_vec, in __netlink_set_ring()
[all …]
/linux-4.4.14/drivers/staging/lustre/lnet/klnds/socklnd/
Dsocklnd_lib.c78 struct socket *sock = conn->ksnc_sock; in ksocknal_lib_send_iov() local
112 rc = kernel_sendmsg(sock, &msg, scratchiov, niov, nob); in ksocknal_lib_send_iov()
120 struct socket *sock = conn->ksnc_sock; in ksocknal_lib_send_kiov() local
132 struct sock *sk = sock->sk; in ksocknal_lib_send_kiov()
176 rc = kernel_sendmsg(sock, &msg, (struct kvec *)scratchiov, niov, nob); in ksocknal_lib_send_kiov()
188 struct socket *sock = conn->ksnc_sock; in ksocknal_lib_eager_ack() local
195 kernel_setsockopt(sock, SOL_TCP, TCP_QUICKACK, in ksocknal_lib_eager_ack()
425 struct socket *sock = conn->ksnc_sock; in ksocknal_lib_get_conn_tunables() local
436 rc = lnet_sock_getbuf(sock, txmem, rxmem); in ksocknal_lib_get_conn_tunables()
439 rc = kernel_getsockopt(sock, SOL_TCP, TCP_NODELAY, in ksocknal_lib_get_conn_tunables()
[all …]
/linux-4.4.14/net/iucv/
Daf_iucv.c85 static void iucv_sock_kill(struct sock *sk);
86 static void iucv_sock_close(struct sock *sk);
87 static void iucv_sever_path(struct sock *, int);
91 static int afiucv_hs_send(struct iucv_message *imsg, struct sock *sock,
151 struct sock *sk; in afiucv_pm_freeze()
188 struct sock *sk; in afiucv_pm_restore_thaw()
271 static int iucv_sock_in_state(struct sock *sk, int state, int state2) in iucv_sock_in_state()
284 static inline int iucv_below_msglim(struct sock *sk) in iucv_below_msglim()
300 static void iucv_sock_wake_msglim(struct sock *sk) in iucv_sock_wake_msglim()
315 static int afiucv_hs_send(struct iucv_message *imsg, struct sock *sock, in afiucv_hs_send() argument
[all …]
/linux-4.4.14/net/ieee802154/
Dsocket.c88 static int ieee802154_sock_release(struct socket *sock) in ieee802154_sock_release() argument
90 struct sock *sk = sock->sk; in ieee802154_sock_release()
93 sock->sk = NULL; in ieee802154_sock_release()
99 static int ieee802154_sock_sendmsg(struct socket *sock, struct msghdr *msg, in ieee802154_sock_sendmsg() argument
102 struct sock *sk = sock->sk; in ieee802154_sock_sendmsg()
107 static int ieee802154_sock_bind(struct socket *sock, struct sockaddr *uaddr, in ieee802154_sock_bind() argument
110 struct sock *sk = sock->sk; in ieee802154_sock_bind()
115 return sock_no_bind(sock, uaddr, addr_len); in ieee802154_sock_bind()
118 static int ieee802154_sock_connect(struct socket *sock, struct sockaddr *uaddr, in ieee802154_sock_connect() argument
121 struct sock *sk = sock->sk; in ieee802154_sock_connect()
[all …]
/linux-4.4.14/include/net/iucv/
Daf_iucv.h108 struct sock sk;
115 struct sock *parent;
155 unsigned int iucv_sock_poll(struct file *file, struct socket *sock,
157 void iucv_sock_link(struct iucv_sock_list *l, struct sock *s);
158 void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s);
159 void iucv_accept_enqueue(struct sock *parent, struct sock *sk);
160 void iucv_accept_unlink(struct sock *sk);
161 struct sock *iucv_accept_dequeue(struct sock *parent, struct socket *newsock);
/linux-4.4.14/security/selinux/include/
Dnetlabel.h57 void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family);
58 int selinux_netlbl_socket_post_create(struct sock *sk, u16 family);
63 int selinux_netlbl_socket_setsockopt(struct socket *sock,
66 int selinux_netlbl_socket_connect(struct sock *sk, struct sockaddr *addr);
109 static inline int selinux_netlbl_conn_setsid(struct sock *sk, in selinux_netlbl_conn_setsid()
120 static inline void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family) in selinux_netlbl_inet_csk_clone()
124 static inline int selinux_netlbl_socket_post_create(struct sock *sk, in selinux_netlbl_socket_post_create()
136 static inline int selinux_netlbl_socket_setsockopt(struct socket *sock, in selinux_netlbl_socket_setsockopt() argument
142 static inline int selinux_netlbl_socket_connect(struct sock *sk, in selinux_netlbl_socket_connect()
/linux-4.4.14/drivers/vhost/
Dnet.c227 static bool vhost_sock_zcopy(struct socket *sock) in vhost_sock_zcopy() argument
230 sock_flag(sock->sk, SOCK_ZEROCOPY); in vhost_sock_zcopy()
308 struct socket *sock; in handle_tx() local
313 sock = vq->private_data; in handle_tx()
314 if (!sock) in handle_tx()
392 err = sock->ops->sendmsg(sock, &msg, len); in handle_tx()
420 static int peek_head_len(struct sock *sk) in peek_head_len()
539 struct socket *sock; in handle_rx() local
544 sock = vq->private_data; in handle_rx()
545 if (!sock) in handle_rx()
[all …]
/linux-4.4.14/include/crypto/
Dif_alg.h29 struct sock sk;
31 struct sock *parent;
55 int (*accept)(void *private, struct sock *sk);
56 int (*accept_nokey)(void *private, struct sock *sk);
74 int af_alg_release(struct socket *sock);
75 void af_alg_release_parent(struct sock *sk);
76 int af_alg_accept(struct sock *sk, struct socket *newsock);
87 static inline struct alg_sock *alg_sk(struct sock *sk) in alg_sk()
/linux-4.4.14/net/caif/
Dcaif_socket.c47 struct sock sk; /* must be first member */
92 static void caif_read_lock(struct sock *sk) in caif_read_lock()
99 static void caif_read_unlock(struct sock *sk) in caif_read_unlock()
112 static void caif_flow_ctrl(struct sock *sk, int mode) in caif_flow_ctrl()
124 static void caif_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) in caif_queue_rcv_skb()
254 static void caif_check_flow_release(struct sock *sk) in caif_check_flow_release()
271 static int caif_seqpkt_recvmsg(struct socket *sock, struct msghdr *m, in caif_seqpkt_recvmsg() argument
275 struct sock *sk = sock->sk; in caif_seqpkt_recvmsg()
309 static long caif_stream_data_wait(struct sock *sk, long timeo) in caif_stream_data_wait()
347 static int caif_stream_recvmsg(struct socket *sock, struct msghdr *msg, in caif_stream_recvmsg() argument
[all …]
/linux-4.4.14/net/can/
Draw.c84 struct sock sk;
113 static inline struct raw_sock *raw_sk(const struct sock *sk) in raw_sk()
120 struct sock *sk = (struct sock *)data; in raw_rcv()
184 static int raw_enable_filters(struct net_device *dev, struct sock *sk, in raw_enable_filters()
207 static int raw_enable_errfilter(struct net_device *dev, struct sock *sk, in raw_enable_errfilter()
219 static void raw_disable_filters(struct net_device *dev, struct sock *sk, in raw_disable_filters()
230 struct sock *sk, in raw_disable_errfilter()
240 struct sock *sk) in raw_disable_allfilters()
248 static int raw_enable_allfilters(struct net_device *dev, struct sock *sk) in raw_enable_allfilters()
268 struct sock *sk = &ro->sk; in raw_notifier()
[all …]
/linux-4.4.14/net/ipx/
Daf_ipx.c114 static void ipx_remove_socket(struct sock *sk) in ipx_remove_socket()
131 static void ipx_destroy_socket(struct sock *sk) in ipx_destroy_socket()
201 static void ipxitf_insert_socket(struct ipx_interface *intrfc, struct sock *sk) in ipxitf_insert_socket()
212 static struct sock *__ipxitf_find_socket(struct ipx_interface *intrfc, in __ipxitf_find_socket()
215 struct sock *s; in __ipxitf_find_socket()
226 static struct sock *ipxitf_find_socket(struct ipx_interface *intrfc, in ipxitf_find_socket()
229 struct sock *s; in ipxitf_find_socket()
241 static struct sock *ipxitf_find_internal_socket(struct ipx_interface *intrfc, in ipxitf_find_internal_socket()
245 struct sock *s; in ipxitf_find_internal_socket()
267 struct sock *s; in __ipxitf_down()
[all …]
/linux-4.4.14/include/linux/sunrpc/
Dxprtsock.h26 struct socket * sock; member
27 struct sock * inet;
61 void (*old_data_ready)(struct sock *);
62 void (*old_state_change)(struct sock *);
63 void (*old_write_space)(struct sock *);
64 void (*old_error_report)(struct sock *);
/linux-4.4.14/net/irda/
Daf_irda.c62 static int irda_create(struct net *net, struct socket *sock, int protocol, int kern);
84 struct sock *sk; in irda_data_indication()
112 struct sock *sk; in irda_disconnect_indication()
177 struct sock *sk; in irda_connect_confirm()
241 struct sock *sk; in irda_connect_indication()
324 struct sock *sk; in irda_flow_indication()
698 static int irda_getname(struct socket *sock, struct sockaddr *uaddr, in irda_getname() argument
702 struct sock *sk = sock->sk; in irda_getname()
735 static int irda_listen(struct socket *sock, int backlog) in irda_listen() argument
737 struct sock *sk = sock->sk; in irda_listen()
[all …]
/linux-4.4.14/drivers/scsi/
Discsi_tcp.c114 static inline int iscsi_sw_sk_state_check(struct sock *sk) in iscsi_sw_sk_state_check()
128 static void iscsi_sw_tcp_data_ready(struct sock *sk) in iscsi_sw_tcp_data_ready()
160 static void iscsi_sw_tcp_state_change(struct sock *sk) in iscsi_sw_tcp_state_change()
166 void (*old_state_change)(struct sock *); in iscsi_sw_tcp_state_change()
191 static void iscsi_sw_tcp_write_space(struct sock *sk) in iscsi_sw_tcp_write_space()
196 void (*old_write_space)(struct sock *); in iscsi_sw_tcp_write_space()
220 struct sock *sk = tcp_sw_conn->sock->sk; in iscsi_sw_tcp_conn_set_callbacks()
239 struct sock *sk = tcp_sw_conn->sock->sk; in iscsi_sw_tcp_conn_restore_callbacks()
268 struct socket *sk = tcp_sw_conn->sock; in iscsi_sw_tcp_xmit_segment()
587 struct socket *sock = tcp_sw_conn->sock; in iscsi_sw_tcp_release_conn() local
[all …]
Discsi_tcp.h39 struct socket *sock; member
43 void (*old_data_ready)(struct sock *);
44 void (*old_state_change)(struct sock *);
45 void (*old_write_space)(struct sock *);
/linux-4.4.14/net/bluetooth/hidp/
Dsock.c32 static int hidp_sock_release(struct socket *sock) in hidp_sock_release() argument
34 struct sock *sk = sock->sk; in hidp_sock_release()
36 BT_DBG("sock %p sk %p", sock, sk); in hidp_sock_release()
49 static int hidp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in hidp_sock_ioctl() argument
142 static int hidp_sock_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in hidp_sock_compat_ioctl() argument
195 return hidp_sock_ioctl(sock, cmd, arg); in hidp_sock_compat_ioctl()
228 static int hidp_sock_create(struct net *net, struct socket *sock, int protocol, in hidp_sock_create() argument
231 struct sock *sk; in hidp_sock_create()
233 BT_DBG("sock %p", sock); in hidp_sock_create()
235 if (sock->type != SOCK_RAW) in hidp_sock_create()
[all …]
/linux-4.4.14/include/net/sctp/
Dsctp.h101 int sctp_backlog_rcv(struct sock *sk, struct sk_buff *skb);
102 int sctp_inet_listen(struct socket *sock, int backlog);
103 void sctp_write_space(struct sock *sk);
104 void sctp_data_ready(struct sock *sk);
105 unsigned int sctp_poll(struct file *file, struct socket *sock,
108 void sctp_copy_sock(struct sock *newsk, struct sock *sk,
112 struct sk_buff *sctp_skb_recv_datagram(struct sock *, int, int, int *);
133 struct sock *sctp_err_lookup(struct net *net, int family, struct sk_buff *,
136 void sctp_err_finish(struct sock *, struct sctp_association *);
137 void sctp_icmp_frag_needed(struct sock *, struct sctp_association *,
[all …]
Dstructs.h234 static inline struct sctp_sock *sctp_sk(const struct sock *sk) in sctp_sk()
239 static inline struct sock *sctp_opt2sk(const struct sctp_sock *sp) in sctp_opt2sk()
241 return (struct sock *)sp; in sctp_opt2sk()
434 int (*setsockopt) (struct sock *sk,
439 int (*getsockopt) (struct sock *sk,
444 int (*compat_setsockopt) (struct sock *sk,
449 int (*compat_getsockopt) (struct sock *sk,
457 struct sock *sk);
471 struct sock *sk);
489 void (*ecn_capable)(struct sock *sk);
[all …]
/linux-4.4.14/drivers/block/drbd/
Ddrbd_main.c619 struct drbd_socket *sock) in __conn_prepare_command() argument
621 if (!sock->socket) in __conn_prepare_command()
623 return sock->sbuf + drbd_header_size(connection); in __conn_prepare_command()
626 void *conn_prepare_command(struct drbd_connection *connection, struct drbd_socket *sock) in conn_prepare_command() argument
630 mutex_lock(&sock->mutex); in conn_prepare_command()
631 p = __conn_prepare_command(connection, sock); in conn_prepare_command()
633 mutex_unlock(&sock->mutex); in conn_prepare_command()
638 void *drbd_prepare_command(struct drbd_peer_device *peer_device, struct drbd_socket *sock) in drbd_prepare_command() argument
640 return conn_prepare_command(peer_device->connection, sock); in drbd_prepare_command()
644 struct drbd_socket *sock, enum drbd_packet cmd, in __send_command() argument
[all …]
/linux-4.4.14/net/ax25/
Daf_ax25.c58 static void ax25_free_sock(struct sock *sk) in ax25_free_sock()
155 struct sock *ax25_find_listener(ax25_address *addr, int digi, in ax25_find_listener()
182 struct sock *ax25_get_socket(ax25_address *my_addr, ax25_address *dest_addr, in ax25_get_socket()
185 struct sock *sk = NULL; in ax25_get_socket()
274 struct sock *sk; in ax25_destroy_timer()
334 struct sock *sk=ax25->sk; in ax25_destroy_socket()
534 static int ax25_setsockopt(struct socket *sock, int level, int optname, in ax25_setsockopt() argument
537 struct sock *sk = sock->sk; in ax25_setsockopt()
651 (sock->state != SS_UNCONNECTED || in ax25_setsockopt()
676 static int ax25_getsockopt(struct socket *sock, int level, int optname, in ax25_getsockopt() argument
[all …]
/linux-4.4.14/drivers/block/
Dnbd.c45 struct socket * sock; /* If == NULL, device is not ready, yet */ member
132 if (!nbd->sock) in sock_shutdown()
136 kernel_sock_shutdown(nbd->sock, SHUT_RDWR); in sock_shutdown()
137 nbd->sock = NULL; in sock_shutdown()
170 struct socket *sock = nbd->sock; in sock_xmit() local
177 if (unlikely(!sock)) { in sock_xmit()
191 sock->sk->sk_allocation = GFP_NOIO | __GFP_MEMALLOC; in sock_xmit()
201 result = kernel_sendmsg(sock, &msg, &iov, 1, size); in sock_xmit()
203 result = kernel_recvmsg(sock, &msg, &iov, 1, size, in sock_xmit()
413 sk_set_memalloc(nbd->sock->sk); in nbd_thread_recv()
[all …]
/linux-4.4.14/net/appletalk/
Dddp.c80 static inline void __atalk_insert_socket(struct sock *sk) in __atalk_insert_socket()
85 static inline void atalk_remove_socket(struct sock *sk) in atalk_remove_socket()
92 static struct sock *atalk_search_socket(struct sockaddr_at *to, in atalk_search_socket()
95 struct sock *s; in atalk_search_socket()
139 static struct sock *atalk_find_or_insert_socket(struct sock *sk, in atalk_find_or_insert_socket()
142 struct sock *s; in atalk_find_or_insert_socket()
163 struct sock *sk = (struct sock *)data; in atalk_destroy_timer()
172 static inline void atalk_destroy_socket(struct sock *sk) in atalk_destroy_socket()
1017 static int atalk_create(struct net *net, struct socket *sock, int protocol, in atalk_create() argument
1020 struct sock *sk; in atalk_create()
[all …]
/linux-4.4.14/net/netfilter/ipvs/
Dip_vs_sync.c197 struct socket *sock; member
1276 static void set_sock_size(struct sock *sk, int mode, int val) in set_sock_size()
1298 static void set_mcast_loop(struct sock *sk, u_char loop) in set_mcast_loop()
1319 static void set_mcast_ttl(struct sock *sk, u_char ttl) in set_mcast_ttl()
1338 static void set_mcast_pmtudisc(struct sock *sk, int val) in set_mcast_pmtudisc()
1359 static int set_mcast_if(struct sock *sk, char *ifname) in set_mcast_if()
1395 join_mcast_group(struct sock *sk, struct in_addr *addr, char *ifname) in join_mcast_group()
1421 static int join_mcast_group6(struct sock *sk, struct in6_addr *addr, in join_mcast_group6()
1442 static int bind_mcastif_addr(struct socket *sock, char *ifname) in bind_mcastif_addr() argument
1444 struct net *net = sock_net(sock->sk); in bind_mcastif_addr()
[all …]
/linux-4.4.14/fs/ncpfs/
Dncp_fs_sb.h20 struct sock;
112 void (*data_ready)(struct sock* sk);
113 void (*error_report)(struct sock* sk);
114 void (*write_space)(struct sock* sk); /* STREAM mode only */
154 extern void ncp_tcp_data_ready(struct sock* sk);
155 extern void ncp_tcp_write_space(struct sock* sk);
156 extern void ncp_tcp_error_report(struct sock* sk);
/linux-4.4.14/fs/ocfs2/cluster/
Dtcp.c140 static void o2net_listen_data_ready(struct sock *sk);
600 static void o2net_data_ready(struct sock *sk) in o2net_data_ready()
602 void (*ready)(struct sock *sk); in o2net_data_ready()
620 static void o2net_state_change(struct sock *sk) in o2net_state_change()
622 void (*state_change)(struct sock *sk); in o2net_state_change()
661 static void o2net_register_callbacks(struct sock *sk, in o2net_register_callbacks()
686 static int o2net_unregister_callbacks(struct sock *sk, in o2net_unregister_callbacks()
917 static int o2net_recv_tcp_msg(struct socket *sock, void *data, size_t len) in o2net_recv_tcp_msg() argument
921 return kernel_recvmsg(sock, &msg, &vec, 1, len, msg.msg_flags); in o2net_recv_tcp_msg()
924 static int o2net_send_tcp_msg(struct socket *sock, struct kvec *vec, in o2net_send_tcp_msg() argument
[all …]
/linux-4.4.14/net/sctp/
Dsocket.c83 static int sctp_writeable(struct sock *sk);
87 static int sctp_wait_for_packet(struct sock *sk, int *err, long *timeo_p);
89 static int sctp_wait_for_accept(struct sock *sk, long timeo);
90 static void sctp_wait_for_close(struct sock *sk, long timeo);
91 static void sctp_destruct_sock(struct sock *sk);
94 static int sctp_bindx_add(struct sock *, struct sockaddr *, int);
95 static int sctp_bindx_rem(struct sock *, struct sockaddr *, int);
96 static int sctp_send_asconf_add_ip(struct sock *, struct sockaddr *, int);
97 static int sctp_send_asconf_del_ip(struct sock *, struct sockaddr *, int);
100 static int sctp_do_bind(struct sock *, union sctp_addr *, int);
[all …]
/linux-4.4.14/include/net/netns/
Dipv6.h70 struct sock **icmp_sk;
71 struct sock *ndisc_sk;
72 struct sock *tcp_sk;
73 struct sock *igmp_sk;
74 struct sock *mc_autojoin_sk;
Dipv4.h18 struct sock;
52 struct sock *fibnl;
54 struct sock * __percpu *icmp_sk;
55 struct sock *mc_autojoin_sk;
58 struct sock * __percpu *tcp_sk;
/linux-4.4.14/net/dccp/ccids/
Dccid3.c63 static void ccid3_hc_tx_set_state(struct sock *sk, in ccid3_hc_tx_set_state()
85 static inline u64 rfc3390_initial_rate(struct sock *sk) in rfc3390_initial_rate()
124 static void ccid3_hc_tx_update_x(struct sock *sk, ktime_t *stamp) in ccid3_hc_tx_update_x()
200 struct sock *sk = (struct sock *)data; in ccid3_hc_tx_no_feedback_timer()
280 static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb) in ccid3_hc_tx_send_packet()
357 static void ccid3_hc_tx_packet_sent(struct sock *sk, unsigned int len) in ccid3_hc_tx_packet_sent()
367 static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) in ccid3_hc_tx_packet_recv()
465 static int ccid3_hc_tx_parse_options(struct sock *sk, u8 packet_type, in ccid3_hc_tx_parse_options()
502 static int ccid3_hc_tx_init(struct ccid *ccid, struct sock *sk) in ccid3_hc_tx_init()
513 static void ccid3_hc_tx_exit(struct sock *sk) in ccid3_hc_tx_exit()
[all …]
/linux-4.4.14/net/sched/
Dem_meta.c346 const struct sock *sk = skb_to_full_sk(skb); in META_COLLECTOR()
357 const struct sock *sk = skb_to_full_sk(skb); in META_COLLECTOR()
368 const struct sock *sk = skb_to_full_sk(skb); in META_COLLECTOR()
379 const struct sock *sk = skb_to_full_sk(skb); in META_COLLECTOR()
390 const struct sock *sk = skb_to_full_sk(skb); in META_COLLECTOR()
401 const struct sock *sk = skb_to_full_sk(skb); in META_COLLECTOR()
412 const struct sock *sk = skb_to_full_sk(skb); in META_COLLECTOR()
423 const struct sock *sk = skb_to_full_sk(skb); in META_COLLECTOR()
434 const struct sock *sk = skb_to_full_sk(skb); in META_COLLECTOR()
445 const struct sock *sk = skb_to_full_sk(skb); in META_COLLECTOR()
[all …]
/linux-4.4.14/tools/usb/usbip/src/
Dusbipd.c372 int sock; in listen_all_addrinfo() local
376 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); in listen_all_addrinfo()
377 if (sock < 0) { in listen_all_addrinfo()
383 usbip_net_set_reuseaddr(sock); in listen_all_addrinfo()
384 usbip_net_set_nodelay(sock); in listen_all_addrinfo()
387 usbip_net_set_v6only(sock); in listen_all_addrinfo()
389 if (sock >= FD_SETSIZE) { in listen_all_addrinfo()
391 ai_buf, sock, FD_SETSIZE); in listen_all_addrinfo()
392 close(sock); in listen_all_addrinfo()
396 ret = bind(sock, ai->ai_addr, ai->ai_addrlen); in listen_all_addrinfo()
[all …]
/linux-4.4.14/net/packet/
Daf_packet.c169 static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
217 static void packet_flush_mclist(struct sock *sk);
246 static void __fanout_unlink(struct sock *sk, struct packet_sock *po);
247 static void __fanout_link(struct sock *sk, struct packet_sock *po);
340 static void register_prot_hook(struct sock *sk) in register_prot_hook()
362 static void __unregister_prot_hook(struct sock *sk, bool sync) in __unregister_prot_hook()
382 static void unregister_prot_hook(struct sock *sk, bool sync) in unregister_prot_hook()
795 struct sock *sk = &po->sk; in prb_close_block()
1267 struct sock *sk = &po->sk; in __packet_rcv_has_room()
1311 static void packet_sock_destruct(struct sock *sk) in packet_sock_destruct()
[all …]
/linux-4.4.14/net/netfilter/
Dnf_sockopt.c61 static struct nf_sockopt_ops *nf_sockopt_find(struct sock *sk, u_int8_t pf, in nf_sockopt_find()
92 static int nf_sockopt(struct sock *sk, u_int8_t pf, int val, in nf_sockopt()
111 int nf_setsockopt(struct sock *sk, u_int8_t pf, int val, char __user *opt, in nf_setsockopt()
118 int nf_getsockopt(struct sock *sk, u_int8_t pf, int val, char __user *opt, in nf_getsockopt()
126 static int compat_nf_sockopt(struct sock *sk, u_int8_t pf, int val, in compat_nf_sockopt()
152 int compat_nf_setsockopt(struct sock *sk, u_int8_t pf, in compat_nf_setsockopt()
159 int compat_nf_getsockopt(struct sock *sk, u_int8_t pf, in compat_nf_getsockopt()

1234