Lines Matching refs:sock

143 	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()
271 static void dn_rehash_sock(struct sock *sk) in dn_rehash_sock()
374 struct sock *dn_sklist_find_listener(struct sockaddr_dn *addr) in dn_sklist_find_listener()
377 struct sock *sk; in dn_sklist_find_listener()
412 struct sock *dn_find_by_skb(struct sk_buff *skb) in dn_find_by_skb()
415 struct sock *sk; in dn_find_by_skb()
438 static void dn_destruct(struct sock *sk) in dn_destruct()
451 static void dn_enter_memory_pressure(struct sock *sk) in dn_enter_memory_pressure()
471 static struct sock *dn_alloc_sock(struct net *net, struct socket *sock, gfp_t gfp, int kern) in dn_alloc_sock() argument
474 struct sock *sk = sk_alloc(net, PF_DECnet, gfp, &dn_proto, kern); in dn_alloc_sock()
479 if (sock) in dn_alloc_sock()
480 sock->ops = &dn_proto_ops; in dn_alloc_sock()
481 sock_init_data(sock, sk); in dn_alloc_sock()
548 static void dn_keepalive(struct sock *sk) in dn_keepalive()
569 int dn_destroy_timer(struct sock *sk) in dn_destroy_timer()
611 static void dn_destroy_sock(struct sock *sk) in dn_destroy_sock()
676 static int dn_create(struct net *net, struct socket *sock, int protocol, in dn_create() argument
679 struct sock *sk; in dn_create()
687 switch (sock->type) { in dn_create()
699 if ((sk = dn_alloc_sock(net, sock, GFP_KERNEL, kern)) == NULL) in dn_create()
709 dn_release(struct socket *sock) in dn_release() argument
711 struct sock *sk = sock->sk; in dn_release()
725 static int dn_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) in dn_bind() argument
727 struct sock *sk = sock->sk; in dn_bind()
786 static int dn_auto_bind(struct socket *sock) in dn_auto_bind() argument
788 struct sock *sk = sock->sk; in dn_auto_bind()
823 static int dn_confirm_accept(struct sock *sk, long *timeo, gfp_t allocation) in dn_confirm_accept()
865 static int dn_wait_run(struct sock *sk, long *timeo) in dn_wait_run()
907 static int __dn_connect(struct sock *sk, struct sockaddr_dn *addr, int addrlen, long *timeo, int fl… in __dn_connect()
909 struct socket *sock = sk->sk_socket; in __dn_connect() local
915 if (sock->state == SS_CONNECTED) in __dn_connect()
918 if (sock->state == SS_CONNECTING) { in __dn_connect()
921 sock->state = SS_CONNECTED; in __dn_connect()
926 sock->state = SS_UNCONNECTED; in __dn_connect()
962 sock->state = SS_CONNECTING; in __dn_connect()
975 static int dn_connect(struct socket *sock, struct sockaddr *uaddr, int addrlen, int flags) in dn_connect() argument
978 struct sock *sk = sock->sk; in dn_connect()
989 static inline int dn_check_state(struct sock *sk, struct sockaddr_dn *addr, int addrlen, long *time… in dn_check_state()
1040 static struct sk_buff *dn_wait_for_connect(struct sock *sk, long *timeo) in dn_wait_for_connect()
1073 static int dn_accept(struct socket *sock, struct socket *newsock, int flags) in dn_accept() argument
1075 struct sock *sk = sock->sk, *newsk; in dn_accept()
1182 static int dn_getname(struct socket *sock, struct sockaddr *uaddr,int *uaddr_len,int peer) in dn_getname() argument
1185 struct sock *sk = sock->sk; in dn_getname()
1193 if ((sock->state != SS_CONNECTED && in dn_getname()
1194 sock->state != SS_CONNECTING) && in dn_getname()
1211 static unsigned int dn_poll(struct file *file, struct socket *sock, poll_table *wait) in dn_poll() argument
1213 struct sock *sk = sock->sk; in dn_poll()
1215 int mask = datagram_poll(file, sock, wait); in dn_poll()
1223 static int dn_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) in dn_ioctl() argument
1225 struct sock *sk = sock->sk; in dn_ioctl()
1274 static int dn_listen(struct socket *sock, int backlog) in dn_listen() argument
1276 struct sock *sk = sock->sk; in dn_listen()
1300 static int dn_shutdown(struct socket *sock, int how) in dn_shutdown() argument
1302 struct sock *sk = sock->sk; in dn_shutdown()
1308 if (sock->state == SS_UNCONNECTED) in dn_shutdown()
1312 if (sock->state == SS_DISCONNECTING) in dn_shutdown()
1332 static int dn_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned… in dn_setsockopt() argument
1334 struct sock *sk = sock->sk; in dn_setsockopt()
1338 err = __dn_setsockopt(sock, level, optname, optval, optlen, 0); in dn_setsockopt()
1344 static int __dn_setsockopt(struct socket *sock, int level,int optname, char __user *optval, unsigne… in __dn_setsockopt() argument
1346 struct sock *sk = sock->sk; in __dn_setsockopt()
1371 if (sock->state == SS_CONNECTED) in __dn_setsockopt()
1386 if (sock->state != SS_CONNECTED && in __dn_setsockopt()
1400 if (sock->state == SS_CONNECTED) in __dn_setsockopt()
1417 if (sock->state == SS_CONNECTED) in __dn_setsockopt()
1508 static int dn_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __us… in dn_getsockopt() argument
1510 struct sock *sk = sock->sk; in dn_getsockopt()
1514 err = __dn_getsockopt(sock, level, optname, optval, optlen, 0); in dn_getsockopt()
1520 static int __dn_getsockopt(struct socket *sock, int level,int optname, char __user *optval,int __us… in __dn_getsockopt() argument
1522 struct sock *sk = sock->sk; in __dn_getsockopt()
1563 switch (sock->state) { in __dn_getsockopt()
1645 static int dn_data_ready(struct sock *sk, struct sk_buff_head *q, int flags, int target) in dn_data_ready()
1675 static int dn_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, in dn_recvmsg() argument
1678 struct sock *sk = sock->sk; in dn_recvmsg()
1873 static inline unsigned int dn_current_mss(struct sock *sk, int flags) in dn_current_mss()
1898 static inline struct sk_buff *dn_alloc_send_pskb(struct sock *sk, in dn_alloc_send_pskb()
1911 static int dn_sendmsg(struct socket *sock, struct msghdr *msg, size_t size) in dn_sendmsg() argument
1913 struct sock *sk = sock->sk; in dn_sendmsg()
1941 if (sock->type == SOCK_STREAM) { in dn_sendmsg()
2120 static struct sock *dn_socket_get_first(struct seq_file *seq) in dn_socket_get_first()
2123 struct sock *n = NULL; in dn_socket_get_first()
2136 static struct sock *dn_socket_get_next(struct seq_file *seq, in dn_socket_get_next()
2137 struct sock *n) in dn_socket_get_next()
2153 static struct sock *socket_get_idx(struct seq_file *seq, loff_t *pos) in socket_get_idx()
2155 struct sock *sk = dn_socket_get_first(seq); in socket_get_idx()
2264 static inline void dn_socket_format_entry(struct seq_file *seq, struct sock *sk) in dn_socket_format_entry()