taglinefilesource code
sock216drivers/net/d_link.cstatic unsigned long  d_link_rspace(struct sock *sk);
sock749drivers/net/d_link.cd_link_rspace(struct sock *sk)
sock38fs/nfs/sock.cstruct socket *sock;
sock60fs/nfs/sock.csock = socki_lookup(inode);
sock61fs/nfs/sock.cif (!sock) {
sock84fs/nfs/sock.cresult = sock->ops->send(sock, (void *) start, len, 0, 0);
sock132fs/nfs/sock.cresult = sock->ops->recvfrom(sock, (void *) start, PAGE_SIZE, 1, 0,
sock89include/linux/net.hint  (*create)  (struct socket *sock, int protocol);
sock91include/linux/net.hint  (*release)  (struct socket *sock, struct socket *peer);
sock92include/linux/net.hint  (*bind)    (struct socket *sock, struct sockaddr *umyaddr,
sock94include/linux/net.hint  (*connect)  (struct socket *sock, struct sockaddr *uservaddr,
sock97include/linux/net.hint  (*accept)  (struct socket *sock, struct socket *newsock,
sock99include/linux/net.hint  (*getname)  (struct socket *sock, struct sockaddr *uaddr,
sock101include/linux/net.hint  (*read)    (struct socket *sock, char *ubuf, int size,
sock103include/linux/net.hint  (*write)  (struct socket *sock, char *ubuf, int size,
sock105include/linux/net.hint  (*select)  (struct socket *sock, int sel_type,
sock107include/linux/net.hint  (*ioctl)  (struct socket *sock, unsigned int cmd,
sock109include/linux/net.hint  (*listen)  (struct socket *sock, int len);
sock110include/linux/net.hint  (*send)    (struct socket *sock, void *buff, int len, int nonblock,
sock112include/linux/net.hint  (*recv)    (struct socket *sock, void *buff, int len, int nonblock,
sock114include/linux/net.hint  (*sendto)  (struct socket *sock, void *buff, int len, int nonblock,
sock116include/linux/net.hint  (*recvfrom)  (struct socket *sock, void *buff, int len, int nonblock,
sock118include/linux/net.hint  (*shutdown)  (struct socket *sock, int flags);
sock119include/linux/net.hint  (*setsockopt)  (struct socket *sock, int level, int optname,
sock121include/linux/net.hint  (*getsockopt)  (struct socket *sock, int level, int optname,
sock123include/linux/net.hint  (*fcntl)  (struct socket *sock, unsigned int cmd,
sock46net/inet/datagram.cstruct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, int *err)
sock150net/inet/datagram.cint datagram_select(struct sock *sk, int sel_type, select_table *wait)
sock278net/inet/icmp.cip_queue_xmit((struct sock *)NULL, dev, skb2, 1);
sock345net/inet/icmp.cip_queue_xmit((struct sock *)NULL, dev, skb2, 1);
sock431net/inet/icmp.cicmp_ioctl(struct sock *sk, int cmd, unsigned long arg)
sock33net/inet/icmp.hextern int  icmp_ioctl(struct sock *sk, int cmd,
sock68net/inet/ip.cextern void sort_send(struct sock *sk);
sock115net/inet/ip.cip_ioctl(struct sock *sk, int cmd, unsigned long arg)
sock950net/inet/ip.cvoid ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int is_frag)
sock1329net/inet/ip.cip_queue_xmit(struct sock *sk, struct device *dev, 
sock1405net/inet/ip.cip_retransmit(struct sock *sk, int all)
sock65net/inet/ip.hextern int    ip_ioctl(struct sock *sk, int cmd,
sock76net/inet/ip.hextern void    ip_queue_xmit(struct sock *sk,
sock79net/inet/ip.hextern void    ip_retransmit(struct sock *sk, int all);
sock60net/inet/packet.cstruct sock *sk;
sock62net/inet/packet.csk = (struct sock *) pt->data;
sock84net/inet/packet.cpacket_sendto(struct sock *sk, unsigned char *from, int len,
sock143net/inet/packet.cpacket_write(struct sock *sk, unsigned char *buff, 
sock151net/inet/packet.cpacket_close(struct sock *sk, int timeout)
sock163net/inet/packet.cpacket_init(struct sock *sk)
sock176net/inet/packet.csk->pair = (struct sock *)p;
sock187net/inet/packet.cpacket_recvfrom(struct sock *sk, unsigned char *to, int len,
sock236net/inet/packet.cpacket_read(struct sock *sk, unsigned char *buff,
sock58net/inet/proc.cstruct sock **s_array;
sock59net/inet/proc.cstruct sock *sp;
sock62net/inet/raw.cstruct sock *sk;
sock68net/inet/raw.csk = (struct sock *) protocol->data;
sock93net/inet/raw.cstruct sock *sk;
sock104net/inet/raw.csk = (struct sock *) protocol->data;
sock133net/inet/raw.craw_sendto(struct sock *sk, unsigned char *from, int len,
sock256net/inet/raw.craw_write(struct sock *sk, unsigned char *buff, int len, int noblock,
sock264net/inet/raw.craw_close(struct sock *sk, int timeout)
sock281net/inet/raw.craw_init(struct sock *sk)
sock297net/inet/raw.csk->pair = (struct sock *)p;
sock310net/inet/raw.craw_recvfrom(struct sock *sk, unsigned char *to, int len,
sock361net/inet/raw.craw_read (struct sock *sk, unsigned char *buff, int len, int noblock,
sock30net/inet/raw.hextern int  raw_recvfrom(struct sock *sk, unsigned char *to,
sock33net/inet/raw.hextern int  raw_read(struct sock *sk, unsigned char *buff,
sock47net/inet/skbuff.hstruct sock      *sk;
sock103net/inet/skbuff.hextern struct sk_buff *    skb_recv_datagram(struct sock *sk,unsigned flags,int noblock, int *err);
sock104net/inet/skbuff.hextern int      datagram_select(struct sock *sk, int sel_type, select_table *wait);
sock101net/inet/sock.cprint_sk(struct sock *sk)
sock149net/inet/sock.cstruct sock *sk;
sock172net/inet/sock.cstruct sock *sk;
sock210net/inet/sock.cput_sock(unsigned short num, struct sock *sk)
sock212net/inet/sock.cstruct sock *sk1;
sock213net/inet/sock.cstruct sock *sk2;
sock264net/inet/sock.cremove_sock(struct sock *sk1)
sock266net/inet/sock.cstruct sock *sk2;
sock304net/inet/sock.cdestroy_sock(struct sock *sk)
sock444net/inet/sock.cinet_fcntl(struct socket *sock, unsigned int cmd, unsigned long arg)
sock446net/inet/sock.cstruct sock *sk;
sock448net/inet/sock.csk = (struct sock *) sock->data;
sock474net/inet/sock.cinet_setsockopt(struct socket *sock, int level, int optname,
sock477net/inet/sock.cstruct sock *sk;
sock485net/inet/sock.csk = (struct sock *) sock->data;
sock572net/inet/sock.cinet_getsockopt(struct socket *sock, int level, int optname,
sock575net/inet/sock.cstruct sock *sk;
sock583net/inet/sock.csk = (struct sock *) sock->data;
sock672net/inet/sock.cinet_listen(struct socket *sock, int backlog)
sock674net/inet/sock.cstruct sock *sk;
sock676net/inet/sock.csk = (struct sock *) sock->data;
sock701net/inet/sock.cinet_create(struct socket *sock, int protocol)
sock703net/inet/sock.cstruct sock *sk;
sock707net/inet/sock.csk = (struct sock *) kmalloc(sizeof(*sk), GFP_KERNEL);
sock712net/inet/sock.cswitch(sock->type) {
sock773net/inet/sock.csk->socket = sock;
sock827net/inet/sock.csk->sleep = sock->wait;
sock841net/inet/sock.csock->data =(void *) sk;
sock880net/inet/sock.c((struct sock *)(oldsock->data))->protocol));
sock886net/inet/sock.cinet_release(struct socket *sock, struct socket *peer)
sock888net/inet/sock.cstruct sock *sk;
sock890net/inet/sock.csk = (struct sock *) sock->data;
sock893net/inet/sock.cDPRINTF((DBG_INET, "inet_release(sock = %X, peer = %X)\n", sock, peer));
sock927net/inet/sock.csock->data = NULL;
sock938net/inet/sock.cinet_bind(struct socket *sock, struct sockaddr *uaddr,
sock942net/inet/sock.cstruct sock *sk, *sk2;
sock946net/inet/sock.csk = (struct sock *) sock->data;
sock963net/inet/sock.csk = (struct sock *) sock->data;
sock1020net/inet/sock.cinet_connect(struct socket *sock, struct sockaddr * uaddr,
sock1023net/inet/sock.cstruct sock *sk;
sock1026net/inet/sock.csock->conn = NULL;
sock1027net/inet/sock.csk = (struct sock *) sock->data;
sock1033net/inet/sock.cif (sock->state == SS_CONNECTING && sk->state == TCP_ESTABLISHED)
sock1035net/inet/sock.csock->state = SS_CONNECTED;
sock1040net/inet/sock.cif (sock->state == SS_CONNECTING && sk->protocol == IPPROTO_TCP &&
sock1044net/inet/sock.cif (sock->state != SS_CONNECTING) {
sock1060net/inet/sock.csock->state = SS_CONNECTING;
sock1079net/inet/sock.csock->state = SS_UNCONNECTED;
sock1084net/inet/sock.csock->state = SS_CONNECTED;
sock1087net/inet/sock.csock->state = SS_UNCONNECTED;
sock1102net/inet/sock.cinet_accept(struct socket *sock, struct socket *newsock, int flags)
sock1104net/inet/sock.cstruct sock *sk1, *sk2;
sock1107net/inet/sock.csk1 = (struct sock *) sock->data;
sock1118net/inet/sock.cif (newsock->data) kfree_s(newsock->data, sizeof(struct sock));
sock1169net/inet/sock.cinet_getname(struct socket *sock, struct sockaddr *uaddr,
sock1173net/inet/sock.cstruct sock *sk;
sock1192net/inet/sock.csk = (struct sock *) sock->data;
sock1216net/inet/sock.cinet_read(struct socket *sock, char *ubuf, int size, int noblock)
sock1218net/inet/sock.cstruct sock *sk;
sock1220net/inet/sock.csk = (struct sock *) sock->data;
sock1238net/inet/sock.cinet_recv(struct socket *sock, void *ubuf, int size, int noblock,
sock1241net/inet/sock.cstruct sock *sk;
sock1243net/inet/sock.csk = (struct sock *) sock->data;
sock1261net/inet/sock.cinet_write(struct socket *sock, char *ubuf, int size, int noblock)
sock1263net/inet/sock.cstruct sock *sk;
sock1265net/inet/sock.csk = (struct sock *) sock->data;
sock1288net/inet/sock.cinet_send(struct socket *sock, void *ubuf, int size, int noblock, 
sock1291net/inet/sock.cstruct sock *sk;
sock1293net/inet/sock.csk = (struct sock *) sock->data;
sock1316net/inet/sock.cinet_sendto(struct socket *sock, void *ubuf, int size, int noblock, 
sock1319net/inet/sock.cstruct sock *sk;
sock1321net/inet/sock.csk = (struct sock *) sock->data;
sock1347net/inet/sock.cinet_recvfrom(struct socket *sock, void *ubuf, int size, int noblock, 
sock1350net/inet/sock.cstruct sock *sk;
sock1352net/inet/sock.csk = (struct sock *) sock->data;
sock1374net/inet/sock.cinet_shutdown(struct socket *sock, int how)
sock1376net/inet/sock.cstruct sock *sk;
sock1386net/inet/sock.csk = (struct sock *) sock->data;
sock1391net/inet/sock.cif (sock->state == SS_CONNECTING && sk->state == TCP_ESTABLISHED)
sock1392net/inet/sock.csock->state = SS_CONNECTED;
sock1402net/inet/sock.cinet_select(struct socket *sock, int sel_type, select_table *wait )
sock1404net/inet/sock.cstruct sock *sk;
sock1406net/inet/sock.csk = (struct sock *) sock->data;
sock1421net/inet/sock.cinet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
sock1423net/inet/sock.cstruct sock *sk;
sock1428net/inet/sock.cif (sock && (sk = (struct sock *) sock->data) == NULL) {
sock1501net/inet/sock.csock_wmalloc(struct sock *sk, unsigned long size, int force,
sock1520net/inet/sock.csock_rmalloc(struct sock *sk, unsigned long size, int force, int priority)
sock1539net/inet/sock.csock_rspace(struct sock *sk)
sock1554net/inet/sock.csock_wspace(struct sock *sk)
sock1566net/inet/sock.csock_wfree(struct sock *sk, void *mem, unsigned long size)
sock1587net/inet/sock.csock_rfree(struct sock *sk, void *mem, unsigned long size)
sock1606net/inet/sock.cstruct sock *get_sock(struct proto *prot, unsigned short num,
sock1610net/inet/sock.cstruct sock *s;
sock1646net/inet/sock.cvoid release_sock(struct sock *sk)
sock81net/inet/sock.hstruct sock      *next;
sock82net/inet/sock.hstruct sock      *pair;
sock129net/inet/sock.hvoid      *(*wmalloc)(struct sock *sk,
sock132net/inet/sock.hvoid      *(*rmalloc)(struct sock *sk,
sock135net/inet/sock.hvoid      (*wfree)(struct sock *sk, void *mem,
sock137net/inet/sock.hvoid      (*rfree)(struct sock *sk, void *mem,
sock139net/inet/sock.hunsigned long    (*rspace)(struct sock *sk);
sock140net/inet/sock.hunsigned long    (*wspace)(struct sock *sk);
sock141net/inet/sock.hvoid      (*close)(struct sock *sk, int timeout);
sock142net/inet/sock.hint      (*read)(struct sock *sk, unsigned char *to,
sock144net/inet/sock.hint      (*write)(struct sock *sk, unsigned char *to,
sock146net/inet/sock.hint      (*sendto)(struct sock *sk,
sock150net/inet/sock.hint      (*recvfrom)(struct sock *sk,
sock159net/inet/sock.hint      (*connect)(struct sock *sk,
sock161net/inet/sock.hstruct sock    *(*accept) (struct sock *sk, int flags);
sock162net/inet/sock.hvoid      (*queue_xmit)(struct sock *sk,
sock165net/inet/sock.hvoid      (*retransmit)(struct sock *sk, int all);
sock166net/inet/sock.hvoid      (*write_wakeup)(struct sock *sk);
sock167net/inet/sock.hvoid      (*read_wakeup)(struct sock *sk);
sock172net/inet/sock.hint      (*select)(struct sock *sk, int which,
sock174net/inet/sock.hint      (*ioctl)(struct sock *sk, int cmd,
sock176net/inet/sock.hint      (*init)(struct sock *sk);
sock177net/inet/sock.hvoid      (*shutdown)(struct sock *sk, int how);
sock180net/inet/sock.hstruct sock    *sock_array[SOCK_ARRAY_SIZE];
sock198net/inet/sock.hextern void      destroy_sock(struct sock *sk);
sock200net/inet/sock.hextern void      put_sock(unsigned short, struct sock *); 
sock201net/inet/sock.hextern void      release_sock(struct sock *sk);
sock202net/inet/sock.hextern struct sock    *get_sock(struct proto *, unsigned short,
sock205net/inet/sock.hextern void      print_sk(struct sock *);
sock206net/inet/sock.hextern void      *sock_wmalloc(struct sock *sk,
sock209net/inet/sock.hextern void      *sock_rmalloc(struct sock *sk,
sock212net/inet/sock.hextern void      sock_wfree(struct sock *sk, void *mem,
sock214net/inet/sock.hextern void      sock_rfree(struct sock *sk, void *mem,
sock216net/inet/sock.hextern unsigned long    sock_rspace(struct sock *sk);
sock217net/inet/sock.hextern unsigned long    sock_wspace(struct sock *sk);
sock221net/inet/sock.hextern struct sock *timer_base;
sock223net/inet/sock.hvoid delete_timer (struct sock *);
sock224net/inet/sock.hvoid reset_timer (struct sock *, int, unsigned long);
sock129net/inet/tcp.cget_firstr(struct sock *sk)
sock153net/inet/tcp.cstatic void tcp_time_wait(struct sock *sk)
sock170net/inet/tcp.ctcp_retransmit(struct sock *sk, int all)
sock199net/inet/tcp.cstruct sock *sk;
sock253net/inet/tcp.ctcp_readable(struct sock *sk)
sock321net/inet/tcp.ctcp_select(struct sock *sk, int sel_type, select_table *wait)
sock410net/inet/tcp.ctcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
sock545net/inet/tcp.cunsigned long daddr, int len, struct sock *sk)
sock554net/inet/tcp.ctcp_send_partial(struct sock *sk)
sock592net/inet/tcp.cstruct sock *sk,
sock671net/inet/tcp.ctcp_build_header(struct tcphdr *th, struct sock *sk, int push)
sock697net/inet/tcp.ctcp_write(struct sock *sk, unsigned char *from,
sock961net/inet/tcp.ctcp_sendto(struct sock *sk, unsigned char *from,
sock977net/inet/tcp.ctcp_read_wakeup(struct sock *sk)
sock1048net/inet/tcp.ccleanup_rbuf(struct sock *sk)
sock1119net/inet/tcp.ctcp_read_urg(struct sock * sk, int nonblock,
sock1216net/inet/tcp.ctcp_read(struct sock *sk, unsigned char *to,
sock1447net/inet/tcp.ctcp_shutdown(struct sock *sk, int how)
sock1533net/inet/tcp.ctcp_recvfrom(struct sock *sk, unsigned char *to,
sock1644net/inet/tcp.ctcp_options(struct sock *sk, struct tcphdr *th)
sock1698net/inet/tcp.ctcp_conn_request(struct sock *sk, struct sk_buff *skb,
sock1705net/inet/tcp.cstruct sock *newsk;
sock1741net/inet/tcp.cnewsk = (struct sock *) kmalloc(sizeof(struct sock), GFP_ATOMIC);
sock1897net/inet/tcp.ctcp_close(struct sock *sk, int timeout)
sock2058net/inet/tcp.ctcp_write_xmit(struct sock *sk)
sock2104net/inet/tcp.csort_send(struct sock *sk)
sock2133net/inet/tcp.ctcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len)
sock2400net/inet/tcp.ctcp_data(struct sk_buff *skb, struct sock *sk, 
sock2637net/inet/tcp.ctcp_urg(struct sock *sk, struct tcphdr *th, unsigned long saddr)
sock2667net/inet/tcp.ctcp_fin(struct sock *sk, struct tcphdr *th, 
sock2712net/inet/tcp.cstatic struct sock *
sock2713net/inet/tcp.ctcp_accept(struct sock *sk, int flags)
sock2715net/inet/tcp.cstruct sock *newsk;
sock2764net/inet/tcp.ctcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
sock2864net/inet/tcp.ctcp_sequence(struct sock *sk, struct tcphdr *th, short len,
sock2917net/inet/tcp.cstruct sock *sk;
sock3332net/inet/tcp.ctcp_write_wakeup(struct sock *sk)
sock139net/inet/tcp.hextern void  tcp_shutdown (struct sock *sk, int how);
sock145net/inet/tcp.hextern int  tcp_ioctl(struct sock *sk, int cmd, unsigned long arg);
sock53net/inet/timer.cdelete_timer (struct sock *t)
sock67net/inet/timer.creset_timer (struct sock *t, int timeout, unsigned long len)
sock92net/inet/timer.cstruct sock *sk = (struct sock*)data;
sock99net/inet/udp.cstruct sock *sk;
sock204net/inet/udp.cunsigned long daddr, int len, struct sock *sk)
sock215net/inet/udp.cudp_send(struct sock *sk, struct sockaddr_in *sin,
sock302net/inet/udp.cudp_sendto(struct sock *sk, unsigned char *from, int len, int noblock,
sock351net/inet/udp.cudp_write(struct sock *sk, unsigned char *buff, int len, int noblock,
sock359net/inet/udp.cudp_ioctl(struct sock *sk, int cmd, unsigned long arg)
sock434net/inet/udp.cudp_recvfrom(struct sock *sk, unsigned char *to, int len,
sock500net/inet/udp.cudp_read(struct sock *sk, unsigned char *buff, int len, int noblock,
sock508net/inet/udp.cudp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
sock535net/inet/udp.cudp_close(struct sock *sk, int timeout)
sock550net/inet/udp.cstruct sock *sk;
sock36net/inet/udp.hextern int  udp_recvfrom(struct sock *sk, unsigned char *to,
sock39net/inet/udp.hextern int  udp_read(struct sock *sk, unsigned char *buff,
sock41net/inet/udp.hextern int  udp_connect(struct sock *sk,
sock47net/inet/udp.hextern int  udp_ioctl(struct sock *sk, int cmd, unsigned long arg);
sock139net/socket.cstruct socket *sock;
sock141net/socket.cfor (sock = sockets; sock <= last_socket; ++sock)
sock142net/socket.cif (sock->state != SS_FREE && SOCK_INODE(sock) == inode) return(sock);
sock161net/socket.cstruct socket *sock;
sock165net/socket.cfor (sock = sockets; sock <= last_socket; ++sock) {
sock166net/socket.cif (sock->state == SS_FREE) {
sock167net/socket.csock->state = SS_UNCONNECTED;
sock169net/socket.csock->flags = 0;
sock170net/socket.csock->ops = NULL;
sock171net/socket.csock->data = NULL;
sock172net/socket.csock->conn = NULL;
sock173net/socket.csock->iconn = NULL;
sock182net/socket.cif (!(SOCK_INODE(sock) = get_empty_inode())) {
sock184net/socket.csock->state = SS_FREE;
sock187net/socket.cSOCK_INODE(sock)->i_mode = S_IFSOCK;
sock188net/socket.cSOCK_INODE(sock)->i_uid = current->euid;
sock189net/socket.cSOCK_INODE(sock)->i_gid = current->egid;
sock191net/socket.csock->wait = &SOCK_INODE(sock)->i_wait;
sock194net/socket.csock, SOCK_INODE(sock)));
sock195net/socket.creturn(sock);
sock220net/socket.csock_release(struct socket *sock)
sock226net/socket.csock, SOCK_INODE(sock)));
sock227net/socket.cif ((oldstate = sock->state) != SS_UNCONNECTED)
sock228net/socket.csock->state = SS_DISCONNECTING;
sock231net/socket.cfor (peersock = sock->iconn; peersock; peersock = nextsock) {
sock240net/socket.cpeersock = (oldstate == SS_CONNECTED) ? sock->conn : NULL;
sock241net/socket.cif (sock->ops) sock->ops->release(sock, peersock);
sock243net/socket.csock->state = SS_FREE;    /* this really releases us */
sock247net/socket.ciput(SOCK_INODE(sock));
sock262net/socket.cstruct socket *sock;
sock265net/socket.cif (!(sock = socki_lookup(inode))) {
sock269net/socket.cif (sock->flags & SO_ACCEPTCON) return(-EINVAL);
sock270net/socket.creturn(sock->ops->read(sock, ubuf, size, (file->f_flags & O_NONBLOCK)));
sock277net/socket.cstruct socket *sock;
sock280net/socket.cif (!(sock = socki_lookup(inode))) {
sock284net/socket.cif (sock->flags & SO_ACCEPTCON) return(-EINVAL);
sock285net/socket.creturn(sock->ops->write(sock, ubuf, size,(file->f_flags & O_NONBLOCK)));
sock302net/socket.cstruct socket *sock;
sock306net/socket.cif (!(sock = socki_lookup(inode))) {
sock310net/socket.creturn(sock->ops->ioctl(sock, cmd, arg));
sock317net/socket.cstruct socket *sock;
sock322net/socket.cif (!(sock = socki_lookup(inode))) {
sock328net/socket.cif (sock->ops && sock->ops->select)
sock329net/socket.creturn(sock->ops->select(sock, sel_type, wait));
sock337net/socket.cstruct socket *sock;
sock344net/socket.cif (!(sock = socki_lookup(inode))) {
sock348net/socket.csock_release(sock);
sock419net/socket.cstruct socket *sock;
sock452net/socket.cif (!(sock = sock_alloc(1))) {
sock456net/socket.csock->type = type;
sock457net/socket.csock->ops = ops;
sock458net/socket.cif ((i = sock->ops->create(sock, protocol)) < 0) {
sock459net/socket.csock_release(sock);
sock463net/socket.cif ((fd = get_fd(SOCK_INODE(sock))) < 0) {
sock464net/socket.csock_release(sock);
sock527net/socket.cstruct socket *sock;
sock533net/socket.cif (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK);
sock534net/socket.cif ((i = sock->ops->bind(sock, umyaddr, addrlen)) < 0) {
sock550net/socket.cstruct socket *sock;
sock555net/socket.cif (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK);
sock556net/socket.cif (sock->state != SS_UNCONNECTED) {
sock560net/socket.cif (sock->ops && sock->ops->listen) sock->ops->listen(sock, backlog);
sock561net/socket.csock->flags |= SO_ACCEPTCON;
sock575net/socket.cstruct socket *sock, *newsock;
sock582net/socket.cif (!(sock = sockfd_lookup(fd, &file))) return(-ENOTSOCK);
sock583net/socket.cif (sock->state != SS_UNCONNECTED) {
sock587net/socket.cif (!(sock->flags & SO_ACCEPTCON)) {
sock597net/socket.cnewsock->type = sock->type;
sock598net/socket.cnewsock->ops = sock->ops;
sock599net/socket.cif ((i = sock->ops->dup(newsock, sock)) < 0) {
sock604net/socket.ci = newsock->ops->accept(sock, newsock, file->f_flags);
sock616net/socket.csock, newsock));
sock629net/socket.cstruct socket *sock;
sock637net/socket.cif (!(sock = sockfd_lookup(fd, &file))) return(-ENOTSOCK);
sock638net/socket.cswitch(sock->state) {
sock647net/socket.creturn(sock->ops->connect(sock, uservaddr,
sock654net/socket.ci = sock->ops->connect(sock, uservaddr, addrlen, file->f_flags);
sock666net/socket.cstruct socket *sock;
sock671net/socket.cif (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK);
sock672net/socket.creturn(sock->ops->getname(sock, usockaddr, usockaddr_len, 0));
sock679net/socket.cstruct socket *sock;
sock684net/socket.cif (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK);
sock685net/socket.creturn(sock->ops->getname(sock, usockaddr, usockaddr_len, 1));
sock692net/socket.cstruct socket *sock;
sock701net/socket.cif (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK);
sock703net/socket.creturn(sock->ops->send(sock, buff, len, (file->f_flags & O_NONBLOCK), flags));
sock711net/socket.cstruct socket *sock;
sock720net/socket.cif (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK);
sock722net/socket.creturn(sock->ops->sendto(sock, buff, len, (file->f_flags & O_NONBLOCK),
sock730net/socket.cstruct socket *sock;
sock739net/socket.cif (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK);
sock741net/socket.creturn(sock->ops->recv(sock, buff, len,(file->f_flags & O_NONBLOCK), flags));
sock749net/socket.cstruct socket *sock;
sock758net/socket.cif (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK);
sock760net/socket.creturn(sock->ops->recvfrom(sock, buff, len, (file->f_flags & O_NONBLOCK),
sock768net/socket.cstruct socket *sock;
sock778net/socket.cif (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK);
sock780net/socket.creturn(sock->ops->setsockopt(sock, level, optname, optval, optlen));
sock787net/socket.cstruct socket *sock;
sock797net/socket.cif (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK);
sock799net/socket.cif (!sock->ops || !sock->ops->getsockopt) return(0);
sock800net/socket.creturn(sock->ops->getsockopt(sock, level, optname, optval, optlen));
sock807net/socket.cstruct socket *sock;
sock815net/socket.cif (!(sock = sockfd_lookup(fd, NULL))) return(-ENOTSOCK);
sock817net/socket.creturn(sock->ops->shutdown(sock, how));
sock824net/socket.cstruct socket *sock;
sock826net/socket.csock = socki_lookup (filp->f_inode);
sock827net/socket.cif (sock != NULL && sock->ops != NULL && sock->ops->fcntl != NULL)
sock828net/socket.creturn(sock->ops->fcntl(sock, cmd, arg));
sock1060net/socket.cstruct socket *sock;
sock1070net/socket.cfor (sock = sockets; sock <= last_socket; ++sock) sock->state = SS_FREE;
sock57net/unix/sock.cstatic int unix_proto_create(struct socket *sock, int protocol);
sock59net/unix/sock.cstatic int unix_proto_release(struct socket *sock, struct socket *peer);
sock60net/unix/sock.cstatic int unix_proto_bind(struct socket *sock, struct sockaddr *umyaddr,
sock62net/unix/sock.cstatic int unix_proto_connect(struct socket *sock, struct sockaddr *uservaddr,
sock65net/unix/sock.cstatic int unix_proto_accept(struct socket *sock, struct socket *newsock, 
sock67net/unix/sock.cstatic int unix_proto_getname(struct socket *sock, struct sockaddr *usockaddr,
sock69net/unix/sock.cstatic int unix_proto_read(struct socket *sock, char *ubuf, int size,
sock71net/unix/sock.cstatic int unix_proto_write(struct socket *sock, char *ubuf, int size,
sock73net/unix/sock.cstatic int unix_proto_select(struct socket *sock, int sel_type, select_table * wait);
sock74net/unix/sock.cstatic int unix_proto_ioctl(struct socket *sock, unsigned int cmd,
sock76net/unix/sock.cstatic int unix_proto_listen(struct socket *sock, int backlog);
sock77net/unix/sock.cstatic int unix_proto_send(struct socket *sock, void *buff, int len,
sock79net/unix/sock.cstatic int unix_proto_recv(struct socket *sock, void *buff, int len,
sock81net/unix/sock.cstatic int unix_proto_sendto(struct socket *sock, void *buff, int len,
sock84net/unix/sock.cstatic int unix_proto_recvfrom(struct socket *sock, void *buff, int len,
sock88net/unix/sock.cstatic int unix_proto_shutdown(struct socket *sock, int how);
sock90net/unix/sock.cstatic int unix_proto_setsockopt(struct socket *sock, int level, int optname,
sock92net/unix/sock.cstatic int unix_proto_getsockopt(struct socket *sock, int level, int optname,
sock146net/unix/sock.cunix_proto_listen(struct socket *sock, int backlog)
sock153net/unix/sock.cunix_proto_setsockopt(struct socket *sock, int level, int optname,
sock161net/unix/sock.cunix_proto_getsockopt(struct socket *sock, int level, int optname,
sock168net/unix/sock.cunix_proto_sendto(struct socket *sock, void *buff, int len, int nonblock, 
sock175net/unix/sock.cunix_proto_recvfrom(struct socket *sock, void *buff, int len, int nonblock, 
sock183net/unix/sock.cunix_proto_shutdown(struct socket *sock, int how)
sock191net/unix/sock.cunix_proto_send(struct socket *sock, void *buff, int len, int nonblock,
sock195net/unix/sock.creturn(unix_proto_write(sock, (char *) buff, len, nonblock));
sock201net/unix/sock.cunix_proto_recv(struct socket *sock, void *buff, int len, int nonblock,
sock205net/unix/sock.creturn(unix_proto_read(sock, (char *) buff, len, nonblock));
sock286net/unix/sock.cunix_proto_create(struct socket *sock, int protocol)
sock290net/unix/sock.cdprintf(1, "UNIX: create: socket 0x%x, proto %d\n", sock, protocol);
sock305net/unix/sock.cupd->socket = sock;
sock306net/unix/sock.cUN_DATA(sock) = upd;
sock322net/unix/sock.cunix_proto_release(struct socket *sock, struct socket *peer)
sock324net/unix/sock.cstruct unix_proto_data *upd = UN_DATA(sock);
sock326net/unix/sock.cdprintf(1, "UNIX: release: socket 0x%x, unix_data 0x%x\n", sock, upd);
sock328net/unix/sock.cif (upd->socket != sock) {
sock337net/unix/sock.cUN_DATA(sock) = NULL;
sock355net/unix/sock.cunix_proto_bind(struct socket *sock, struct sockaddr *umyaddr,
sock359net/unix/sock.cstruct unix_proto_data *upd = UN_DATA(sock);
sock364net/unix/sock.cdprintf(1, "UNIX: bind: socket 0x%x, len=%d\n", sock, sockaddr_len);
sock411net/unix/sock.cunix_proto_connect(struct socket *sock, struct sockaddr *uservaddr,
sock422net/unix/sock.cdprintf(1, "UNIX: connect: socket 0x%x, servlen=%d\n", sock, sockaddr_len);
sock429net/unix/sock.cif (sock->state == SS_CONNECTING) return(-EINPROGRESS);
sock430net/unix/sock.cif (sock->state == SS_CONNECTED) return(-EISCONN);
sock466net/unix/sock.cif ((i = sock_awaitconn(sock, serv_upd->socket)) < 0) {
sock470net/unix/sock.cif (sock->conn) {
sock471net/unix/sock.cunix_data_ref(UN_DATA(sock->conn));
sock472net/unix/sock.cUN_DATA(sock)->peerupd = UN_DATA(sock->conn); /* ref server */
sock499net/unix/sock.cunix_proto_accept(struct socket *sock, struct socket *newsock, int flags)
sock504net/unix/sock.csock, newsock);
sock510net/unix/sock.cwhile(!(clientsock = sock->iconn)) {
sock512net/unix/sock.cinterruptible_sleep_on(sock->wait);
sock523net/unix/sock.csock->iconn = clientsock->next;
sock531net/unix/sock.cUN_DATA(newsock)->sockaddr_un        = UN_DATA(sock)->sockaddr_un;
sock532net/unix/sock.cUN_DATA(newsock)->sockaddr_len       = UN_DATA(sock)->sockaddr_len;
sock540net/unix/sock.cunix_proto_getname(struct socket *sock, struct sockaddr *usockaddr,
sock547net/unix/sock.cdprintf(1, "UNIX: getname: socket 0x%x for %s\n", sock, peer?"peer":"self");
sock549net/unix/sock.cif (sock->state != SS_CONNECTED) {
sock553net/unix/sock.cupd = UN_DATA(sock->conn);
sock555net/unix/sock.cupd = UN_DATA(sock);
sock575net/unix/sock.cunix_proto_read(struct socket *sock, char *ubuf, int size, int nonblock)
sock582net/unix/sock.cupd = UN_DATA(sock);
sock584net/unix/sock.cif (sock->state != SS_CONNECTED) {
sock586net/unix/sock.creturn((sock->state == SS_DISCONNECTING) ? 0 : -EINVAL);
sock590net/unix/sock.cinterruptible_sleep_on(sock->wait);
sock620net/unix/sock.cif (sock->state == SS_CONNECTED) wake_up(sock->conn->wait);
sock633net/unix/sock.cunix_proto_write(struct socket *sock, char *ubuf, int size, int nonblock)
sock640net/unix/sock.cif (sock->state != SS_CONNECTED) {
sock642net/unix/sock.cif (sock->state == SS_DISCONNECTING) {
sock648net/unix/sock.cpupd = UN_DATA(sock)->peerupd;  /* safer than sock->conn */
sock653net/unix/sock.cinterruptible_sleep_on(sock->wait);
sock658net/unix/sock.cif (sock->state == SS_DISCONNECTING) {
sock682net/unix/sock.cif (sock->state == SS_DISCONNECTING) {
sock697net/unix/sock.cif (sock->state == SS_CONNECTED) wake_up(sock->conn->wait);
sock705net/unix/sock.cunix_proto_select(struct socket *sock, int sel_type, select_table * wait)
sock710net/unix/sock.cif (sock->flags & SO_ACCEPTCON) {
sock713net/unix/sock.csock->iconn ? "" : "no ");
sock714net/unix/sock.cif (sock->iconn) return(1);
sock715net/unix/sock.cselect_wait(sock->wait, wait);
sock716net/unix/sock.creturn(sock->iconn ? 1 : 0);
sock719net/unix/sock.cselect_wait(sock->wait, wait);
sock724net/unix/sock.cupd = UN_DATA(sock);
sock729net/unix/sock.celse if (sock->state != SS_CONNECTED) {
sock733net/unix/sock.cselect_wait(sock->wait,wait);
sock737net/unix/sock.cif (sock->state != SS_CONNECTED) {
sock741net/unix/sock.cpeerupd = UN_DATA(sock->conn);
sock745net/unix/sock.cselect_wait(sock->wait,wait);
sock756net/unix/sock.cunix_proto_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
sock761net/unix/sock.cupd = UN_DATA(sock);
sock762net/unix/sock.cpeerupd = (sock->state == SS_CONNECTED) ? UN_DATA(sock->conn) : NULL;
sock766net/unix/sock.cif (sock->flags & SO_ACCEPTCON) return(-EINVAL);
sock776net/unix/sock.cif (sock->flags & SO_ACCEPTCON) return(-EINVAL);