taglinefilesource code
sk216drivers/net/d_link.cstatic unsigned long  d_link_rspace(struct sock *sk);
sk749drivers/net/d_link.cd_link_rspace(struct sock *sk)
sk753drivers/net/d_link.cif (sk != NULL) {
sk758drivers/net/d_link.csk->max_unacked = D_LINK_MAX_WINDOW - D_LINK_TCP_WINDOW_DIFF;
sk760drivers/net/d_link.cif (sk->rmem_alloc >= SK_RMEM_MAX-2*D_LINK_MIN_WINDOW) return(0);
sk761drivers/net/d_link.camt = min((SK_RMEM_MAX-sk->rmem_alloc)/2-D_LINK_MIN_WINDOW, D_LINK_MAX_WINDOW);
sk225net/inet/arp.cskb->sk = NULL;
sk318net/inet/arp.cskb->sk = NULL;
sk587net/inet/arp.cskb->sk = NULL;
sk46net/inet/datagram.cstruct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, int *err)
sk52net/inet/datagram.csk->inuse = 1;
sk53net/inet/datagram.cwhile(sk->rqueue == NULL)   /* No data */
sk56net/inet/datagram.cif (sk->shutdown & RCV_SHUTDOWN) 
sk58net/inet/datagram.crelease_sock(sk);
sk66net/inet/datagram.crelease_sock(sk);
sk70net/inet/datagram.crelease_sock(sk);
sk75net/inet/datagram.cif (sk->rqueue == NULL) 
sk77net/inet/datagram.cinterruptible_sleep_on(sk->sleep);
sk85net/inet/datagram.cif(sk->err != 0)  /* Error while waiting for packet
sk89net/inet/datagram.c*err = -sk->err;
sk91net/inet/datagram.csk->err=0;
sk95net/inet/datagram.csk->inuse = 1;
sk102net/inet/datagram.cskb=skb_dequeue(&sk->rqueue);
sk111net/inet/datagram.cskb=skb_peek(&sk->rqueue);
sk150net/inet/datagram.cint datagram_select(struct sock *sk, int sel_type, select_table *wait)
sk152net/inet/datagram.cselect_wait(sk->sleep, wait);
sk156net/inet/datagram.cif (sk->rqueue != NULL || sk->err != 0) 
sk164net/inet/datagram.cif (sk->prot->wspace(sk) >= MIN_WRITE_SPACE) 
sk171net/inet/datagram.cif (sk->err) 
sk411net/inet/dev.cskb->sk = NULL;
sk602net/inet/dev.cskb->sk = NULL;
sk99net/inet/icmp.cskb->sk = NULL;
sk112net/inet/icmp.cskb->sk = NULL;
sk196net/inet/icmp.cskb->sk = NULL;
sk228net/inet/icmp.cskb->sk = NULL;
sk246net/inet/icmp.cskb->sk = NULL;
sk250net/inet/icmp.cskb2->sk = NULL;
sk261net/inet/icmp.cskb->sk = NULL;
sk280net/inet/icmp.cskb->sk = NULL;
sk292net/inet/icmp.cskb->sk = NULL;
sk310net/inet/icmp.cskb->sk = NULL;
sk314net/inet/icmp.cskb2->sk = NULL;
sk325net/inet/icmp.cskb->sk = NULL;
sk347net/inet/icmp.cskb->sk = NULL;
sk365net/inet/icmp.cskb1->sk = NULL;
sk377net/inet/icmp.cskb1->sk = NULL;
sk397net/inet/icmp.cskb1->sk = NULL;
sk404net/inet/icmp.cskb1->sk = NULL;
sk411net/inet/icmp.cskb1->sk = NULL;
sk418net/inet/icmp.cskb1->sk = NULL;
sk423net/inet/icmp.cskb1->sk = NULL;
sk431net/inet/icmp.cicmp_ioctl(struct sock *sk, int cmd, unsigned long arg)
sk33net/inet/icmp.hextern int  icmp_ioctl(struct sock *sk, int cmd,
sk68net/inet/ip.cextern void sort_send(struct sock *sk);
sk115net/inet/ip.cip_ioctl(struct sock *sk, int cmd, unsigned long arg)
sk246net/inet/ip.cif (skb->sk) skb->sk->saddr = saddr;
sk953net/inet/ip.cvoid ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int is_frag)
sk1024net/inet/ip.cif (sk) 
sk1025net/inet/ip.csk->wmem_alloc += skb2->mem_len;
sk1047net/inet/ip.cip_queue_xmit(sk, dev, skb2, 1);
sk1150net/inet/ip.cskb2->sk = NULL;
sk1198net/inet/ip.cskb->sk = NULL;
sk1224net/inet/ip.cskb->sk = NULL;
sk1247net/inet/ip.cskb->sk = NULL;
sk1259net/inet/ip.cskb->sk=NULL;
sk1318net/inet/ip.cskb->sk = NULL;
sk1334net/inet/ip.cip_queue_xmit(struct sock *sk, struct device *dev, 
sk1340net/inet/ip.cif (sk == NULL) free = 1;
sk1359net/inet/ip.cip_fragment(sk,skb,dev,0);
sk1373net/inet/ip.csk->packets_out++;
sk1375net/inet/ip.cif (sk->send_head == NULL) {
sk1376net/inet/ip.csk->send_tail = skb;
sk1377net/inet/ip.csk->send_head = skb;
sk1380net/inet/ip.cif (sk->send_tail == NULL) {
sk1382net/inet/ip.csort_send(sk);
sk1384net/inet/ip.csk->send_tail->link3 = skb;
sk1385net/inet/ip.csk->send_tail = skb;
sk1389net/inet/ip.creset_timer(sk, TIME_WRITE,
sk1390net/inet/ip.cbackoff(sk->backoff) * (2 * sk->mdev + sk->rtt));
sk1392net/inet/ip.cskb->sk = sk;
sk1397net/inet/ip.cif (sk != NULL) {
sk1398net/inet/ip.cdev->queue_xmit(skb, dev, sk->priority);
sk1410net/inet/ip.cip_retransmit(struct sock *sk, int all)
sk1416net/inet/ip.cprot = sk->prot;
sk1417net/inet/ip.cskb = sk->send_head;
sk1451net/inet/ip.cif (sk) dev->queue_xmit(skb, dev, sk->priority);
sk1455net/inet/ip.coops:  sk->retransmits++;
sk1456net/inet/ip.csk->prot->retransmits ++;
sk1460net/inet/ip.cif (sk->retransmits > sk->cong_window) break;
sk1470net/inet/ip.csk->backoff++;
sk1471net/inet/ip.creset_timer(sk, TIME_WRITE, backoff(sk->backoff) * (2 * sk->mdev + sk->rtt));
sk65net/inet/ip.hextern int    ip_ioctl(struct sock *sk, int cmd,
sk76net/inet/ip.hextern void    ip_queue_xmit(struct sock *sk,
sk79net/inet/ip.hextern void    ip_retransmit(struct sock *sk, int all);
sk60net/inet/packet.cstruct sock *sk;
sk62net/inet/packet.csk = (struct sock *) pt->data;
sk66net/inet/packet.cskb->sk = sk;
sk69net/inet/packet.cif (sk->rmem_alloc + skb->mem_len >= sk->rcvbuf) {
sk70net/inet/packet.cskb->sk = NULL;
sk74net/inet/packet.csk->rmem_alloc += skb->mem_len;
sk75net/inet/packet.cskb_queue_tail(&sk->rqueue,skb);
sk76net/inet/packet.cwake_up(sk->sleep);
sk77net/inet/packet.crelease_sock(sk);
sk84net/inet/packet.cpacket_sendto(struct sock *sk, unsigned char *from, int len,
sk121net/inet/packet.cskb = (struct sk_buff *) sk->prot->wmalloc(sk, len+sizeof(*skb), 0, GFP_KERNEL);
sk131net/inet/packet.cskb->sk = sk;
sk136net/inet/packet.cif (dev->flags & IFF_UP) dev->queue_xmit(skb, dev, sk->priority);
sk143net/inet/packet.cpacket_write(struct sock *sk, unsigned char *buff, 
sk146net/inet/packet.creturn(packet_sendto(sk, buff, len, noblock, flags, NULL, 0));
sk151net/inet/packet.cpacket_close(struct sock *sk, int timeout)
sk153net/inet/packet.csk->inuse = 1;
sk154net/inet/packet.csk->state = TCP_CLOSE;
sk155net/inet/packet.cdev_remove_pack((struct packet_type *)sk->pair);
sk156net/inet/packet.ckfree_s((void *)sk->pair, sizeof(struct packet_type));
sk157net/inet/packet.csk->pair = NULL;
sk158net/inet/packet.crelease_sock(sk);
sk163net/inet/packet.cpacket_init(struct sock *sk)
sk171net/inet/packet.cp->type = sk->num;
sk172net/inet/packet.cp->data = (void *)sk;
sk176net/inet/packet.csk->pair = (struct sock *)p;
sk187net/inet/packet.cpacket_recvfrom(struct sock *sk, unsigned char *to, int len,
sk200net/inet/packet.cif (sk->shutdown & RCV_SHUTDOWN) return(0);
sk211net/inet/packet.cskb=skb_recv_datagram(sk,flags,noblock,&err);
sk230net/inet/packet.crelease_sock(sk);
sk236net/inet/packet.cpacket_read(struct sock *sk, unsigned char *buff,
sk239net/inet/packet.creturn(packet_recvfrom(sk, buff, len, noblock, flags, NULL, NULL));
sk62net/inet/raw.cstruct sock *sk;
sk68net/inet/raw.csk = (struct sock *) protocol->data;
sk69net/inet/raw.cif (sk == NULL) return;
sk73net/inet/raw.cif (sk->cong_window > 1) sk->cong_window = sk->cong_window/2;
sk77net/inet/raw.csk->err = icmp_err_convert[err & 0xff].errno;
sk78net/inet/raw.cwake_up(sk->sleep);
sk93net/inet/raw.cstruct sock *sk;
sk104net/inet/raw.csk = (struct sock *) protocol->data;
sk105net/inet/raw.cif (sk == NULL) {
sk111net/inet/raw.cskb->sk = sk;
sk118net/inet/raw.cif (sk->rmem_alloc + skb->mem_len >= sk->rcvbuf) {
sk119net/inet/raw.cskb->sk = NULL;
sk123net/inet/raw.csk->rmem_alloc += skb->mem_len;
sk124net/inet/raw.cskb_queue_tail(&sk->rqueue,skb);
sk125net/inet/raw.cwake_up(sk->sleep);
sk126net/inet/raw.crelease_sock(sk);
sk133net/inet/raw.craw_sendto(struct sock *sk, unsigned char *from, int len,
sk144net/inet/raw.c"            usin=%X, addr_len = %d)\n", sk, from, len, noblock,
sk163net/inet/raw.cif (sk->state != TCP_ESTABLISHED) return(-EINVAL);
sk165net/inet/raw.csin.sin_port = sk->protocol;
sk166net/inet/raw.csin.sin_addr.s_addr = sk->daddr;
sk168net/inet/raw.cif (sin.sin_port == 0) sin.sin_port = sk->protocol;
sk170net/inet/raw.cif (sk->broadcast == 0 && chk_addr(sin.sin_addr.s_addr)==IS_BROADCAST)
sk173net/inet/raw.csk->inuse = 1;
sk176net/inet/raw.cif(sk->err!=0)
sk178net/inet/raw.cerr= -sk->err;
sk179net/inet/raw.csk->err=0;
sk180net/inet/raw.crelease_sock(sk);
sk184net/inet/raw.cskb = (struct sk_buff *) sk->prot->wmalloc(sk,
sk185net/inet/raw.clen+sizeof(*skb) + sk->prot->max_header,
sk193net/inet/raw.ctmp = sk->wmem_alloc;
sk194net/inet/raw.crelease_sock(sk);
sk196net/inet/raw.cif (tmp <= sk->wmem_alloc) {
sk197net/inet/raw.cinterruptible_sleep_on(sk->sleep);
sk203net/inet/raw.csk->inuse = 1;
sk208net/inet/raw.cskb->mem_len = len + sizeof(*skb) +sk->prot->max_header;
sk209net/inet/raw.cskb->sk = sk;
sk214net/inet/raw.ctmp = sk->prot->build_header(skb, sk->saddr, 
sk216net/inet/raw.csk->protocol, sk->opt, skb->mem_len);
sk220net/inet/raw.crelease_sock(sk);
sk230net/inet/raw.cif(sk->protocol==IPPROTO_RAW) {
sk237net/inet/raw.ciph->saddr = sk->saddr;
sk245net/inet/raw.crelease_sock(sk);
sk249net/inet/raw.csk->prot->queue_xmit(sk, dev, skb, 1);
sk250net/inet/raw.crelease_sock(sk);
sk256net/inet/raw.craw_write(struct sock *sk, unsigned char *buff, int len, int noblock,
sk259net/inet/raw.creturn(raw_sendto(sk, buff, len, noblock, flags, NULL, 0));
sk264net/inet/raw.craw_close(struct sock *sk, int timeout)
sk266net/inet/raw.csk->inuse = 1;
sk267net/inet/raw.csk->state = TCP_CLOSE;
sk270net/inet/raw.c((struct inet_protocol *)sk->pair)->protocol));
sk272net/inet/raw.cif (inet_del_protocol((struct inet_protocol *)sk->pair) < 0)
sk274net/inet/raw.ckfree_s((void *)sk->pair, sizeof (struct inet_protocol));
sk275net/inet/raw.csk->pair = NULL;
sk276net/inet/raw.crelease_sock(sk);
sk281net/inet/raw.craw_init(struct sock *sk)
sk289net/inet/raw.cp->protocol = sk->protocol;
sk290net/inet/raw.cp->data = (void *)sk;
sk297net/inet/raw.csk->pair = (struct sock *)p;
sk299net/inet/raw.cDPRINTF((DBG_RAW, "raw init added protocol %d\n", sk->protocol));
sk310net/inet/raw.craw_recvfrom(struct sock *sk, unsigned char *to, int len,
sk320net/inet/raw.csk, to, len, noblock, flags, sin, addr_len));
sk325net/inet/raw.cif (sk->shutdown & RCV_SHUTDOWN) return(0);
sk336net/inet/raw.cskb=skb_recv_datagram(sk,flags,noblock,&err);
sk355net/inet/raw.crelease_sock(sk);
sk361net/inet/raw.craw_read (struct sock *sk, unsigned char *buff, int len, int noblock,
sk364net/inet/raw.creturn(raw_recvfrom(sk, buff, len, noblock, flags, NULL, NULL));
sk30net/inet/raw.hextern int  raw_recvfrom(struct sock *sk, unsigned char *to,
sk33net/inet/raw.hextern int  raw_read(struct sock *sk, unsigned char *buff,
sk343net/inet/skbuff.cnewsk->sk=NULL;
sk361net/inet/skbuff.cnewsk->sk=NULL;
sk387net/inet/skbuff.cif (skb->sk) {
sk389net/inet/skbuff.cskb->sk->prot->rfree(skb->sk, skb->mem_addr, skb->mem_len);
sk391net/inet/skbuff.cskb->sk->prot->wfree(skb->sk, skb->mem_addr, skb->mem_len);
sk47net/inet/skbuff.hstruct sock      *sk;
sk103net/inet/skbuff.hextern struct sk_buff *    skb_recv_datagram(struct sock *sk,unsigned flags,int noblock, int *err);
sk104net/inet/skbuff.hextern int      datagram_select(struct sock *sk, int sel_type, select_table *wait);
sk101net/inet/sock.cprint_sk(struct sock *sk)
sk103net/inet/sock.cif (!sk) {
sk107net/inet/sock.cprintk("  wmem_alloc = %lu\n", sk->wmem_alloc);
sk108net/inet/sock.cprintk("  rmem_alloc = %lu\n", sk->rmem_alloc);
sk109net/inet/sock.cprintk("  send_head = %p\n", sk->send_head);
sk110net/inet/sock.cprintk("  state = %d\n",sk->state);
sk111net/inet/sock.cprintk("  wback = %p, rqueue = %p\n", sk->wback, sk->rqueue);
sk112net/inet/sock.cprintk("  wfront = %p\n", sk->wfront);
sk113net/inet/sock.cprintk("  daddr = %lX, saddr = %lX\n", sk->daddr,sk->saddr);
sk114net/inet/sock.cprintk("  num = %d", sk->num);
sk115net/inet/sock.cprintk(" next = %p\n", sk->next);
sk117net/inet/sock.csk->send_seq, sk->acked_seq, sk->copied_seq);
sk119net/inet/sock.csk->rcv_ack_seq, sk->window_seq, sk->fin_seq);
sk120net/inet/sock.cprintk("  prot = %p\n", sk->prot);
sk121net/inet/sock.cprintk("  pair = %p, back_log = %p\n", sk->pair,sk->back_log);
sk122net/inet/sock.cprintk("  inuse = %d , blog = %d\n", sk->inuse, sk->blog);
sk123net/inet/sock.cprintk("  dead = %d delay_acks=%d\n", sk->dead, sk->delay_acks);
sk124net/inet/sock.cprintk("  retransmits = %ld, timeout = %d\n", sk->retransmits, sk->timeout);
sk125net/inet/sock.cprintk("  cong_window = %d, packets_out = %d\n", sk->cong_window,
sk126net/inet/sock.csk->packets_out);
sk127net/inet/sock.cprintk("  urg = %d shutdown=%d\n", sk->urg, sk->shutdown);
sk139net/inet/sock.cprintk("  sk = %p link3 = %p\n", skb->sk, skb->link3);
sk149net/inet/sock.cstruct sock *sk;
sk151net/inet/sock.cfor(sk = prot->sock_array[num & (SOCK_ARRAY_SIZE -1 )];
sk152net/inet/sock.csk != NULL;
sk153net/inet/sock.csk=sk->next) {
sk154net/inet/sock.cif (sk->num == num) return(1);
sk172net/inet/sock.cstruct sock *sk;
sk182net/inet/sock.csk = prot->sock_array[(i+base+1) &(SOCK_ARRAY_SIZE -1)];
sk183net/inet/sock.cwhile(sk != NULL) {
sk184net/inet/sock.csk = sk->next;
sk210net/inet/sock.cput_sock(unsigned short num, struct sock *sk)
sk216net/inet/sock.cDPRINTF((DBG_INET, "put_sock(num = %d, sk = %X\n", num, sk));
sk217net/inet/sock.csk->num = num;
sk218net/inet/sock.csk->next = NULL;
sk223net/inet/sock.cif (sk->prot->sock_array[num] == NULL) {
sk224net/inet/sock.csk->prot->sock_array[num] = sk;
sk230net/inet/sock.cif ((mask & sk->saddr) &&
sk231net/inet/sock.c(mask & sk->saddr) != (mask & 0xffffffff)) {
sk239net/inet/sock.csk1 = sk->prot->sock_array[num];
sk243net/inet/sock.csk->next = sk->prot->sock_array[num];
sk244net/inet/sock.csk->prot->sock_array[num] = sk;
sk248net/inet/sock.csk->next = sk2;
sk249net/inet/sock.csk1->next= sk;
sk257net/inet/sock.csk->next = NULL;
sk258net/inet/sock.csk1->next = sk;
sk304net/inet/sock.cdestroy_sock(struct sock *sk)
sk308net/inet/sock.cDPRINTF((DBG_INET, "destroying socket %X\n", sk));
sk309net/inet/sock.csk->inuse = 1;      /* just to be safe. */
sk312net/inet/sock.cif (!sk->dead) 
sk313net/inet/sock.cwake_up(sk->sleep);
sk315net/inet/sock.cremove_sock(sk);
sk318net/inet/sock.cdelete_timer(sk);
sk321net/inet/sock.cif (sk->send_tmp != NULL) 
sk323net/inet/sock.cIS_SKB(sk->send_tmp);
sk324net/inet/sock.ckfree_skb(sk->send_tmp, FREE_WRITE);
sk328net/inet/sock.cfor(skb = sk->wfront; skb != NULL; ) 
sk343net/inet/sock.csk->wfront = NULL;
sk344net/inet/sock.csk->wback = NULL;
sk346net/inet/sock.cif (sk->rqueue != NULL) 
sk348net/inet/sock.cwhile((skb=skb_dequeue(&sk->rqueue))!=NULL)
sk354net/inet/sock.cif (skb->sk != NULL && skb->sk != sk) 
sk357net/inet/sock.cskb->sk->dead = 1;
sk358net/inet/sock.cskb->sk->prot->close(skb->sk, 0);
sk364net/inet/sock.csk->rqueue = NULL;
sk367net/inet/sock.cfor(skb = sk->send_head; skb != NULL; ) 
sk390net/inet/sock.csk->send_head = NULL;
sk393net/inet/sock.cif (sk->back_log != NULL) 
sk398net/inet/sock.cskb = (struct sk_buff *)sk->back_log;
sk407net/inet/sock.cwhile(skb != sk->back_log);
sk410net/inet/sock.csk->back_log = NULL;
sk413net/inet/sock.cif (sk->pair) 
sk415net/inet/sock.csk->pair->dead = 1;
sk416net/inet/sock.csk->pair->prot->close(sk->pair, 0);
sk417net/inet/sock.csk->pair = NULL;
sk425net/inet/sock.cif (sk->rmem_alloc == 0 && sk->wmem_alloc == 0) 
sk427net/inet/sock.ckfree_s((void *)sk,sizeof(*sk));
sk433net/inet/sock.cDPRINTF((DBG_INET, "possible memory leak in socket = %X\n", sk));
sk434net/inet/sock.csk->destroy = 1;
sk435net/inet/sock.csk->ack_backlog = 0;
sk436net/inet/sock.csk->inuse = 0;
sk437net/inet/sock.creset_timer(sk, TIME_DESTROY, SOCK_DESTROY_TIME);
sk446net/inet/sock.cstruct sock *sk;
sk448net/inet/sock.csk = (struct sock *) sock->data;
sk449net/inet/sock.cif (sk == NULL) {
sk463net/inet/sock.csk->proc = arg;
sk466net/inet/sock.creturn(sk->proc);
sk477net/inet/sock.cstruct sock *sk;
sk485net/inet/sock.csk = (struct sock *) sock->data;
sk486net/inet/sock.cif (sk == NULL) {
sk503net/inet/sock.csk->debug=val?1:0;
sk507net/inet/sock.csk->broadcast=val?1:0;
sk514net/inet/sock.csk->sndbuf=val;
sk522net/inet/sock.csk->linger=0;
sk525net/inet/sock.csk->lingertime=ling.l_linger;
sk526net/inet/sock.csk->linger=1;
sk534net/inet/sock.csk->rcvbuf=val;
sk538net/inet/sock.cif (val) sk->reuse = 1;
sk539net/inet/sock.celse sk->reuse = 0;
sk543net/inet/sock.cif (val) sk->keepopen = 1;
sk544net/inet/sock.celse sk->keepopen = 0;
sk548net/inet/sock.cif (val) sk->urginline = 1;
sk549net/inet/sock.celse sk->urginline = 0;
sk553net/inet/sock.cif (val) sk->no_check = 1;
sk554net/inet/sock.celse sk->no_check = 0;
sk559net/inet/sock.csk->priority = val;
sk575net/inet/sock.cstruct sock *sk;
sk583net/inet/sock.csk = (struct sock *) sock->data;
sk584net/inet/sock.cif (sk == NULL) {
sk591net/inet/sock.cval = sk->debug;
sk599net/inet/sock.cval= sk->broadcast;
sk611net/inet/sock.cling.l_onoff=sk->linger;
sk612net/inet/sock.cling.l_linger=sk->lingertime;
sk617net/inet/sock.cval=sk->sndbuf;
sk621net/inet/sock.cval =sk->rcvbuf;
sk625net/inet/sock.cval = sk->reuse;
sk629net/inet/sock.cval = sk->keepopen;
sk633net/inet/sock.cif (sk->prot == &tcp_prot) val = SOCK_STREAM;
sk638net/inet/sock.cval = sk->err;
sk639net/inet/sock.csk->err = 0;
sk643net/inet/sock.cval = sk->urginline;
sk647net/inet/sock.cval = sk->no_check;
sk651net/inet/sock.cval = sk->priority;
sk674net/inet/sock.cstruct sock *sk;
sk676net/inet/sock.csk = (struct sock *) sock->data;
sk677net/inet/sock.cif (sk == NULL) {
sk683net/inet/sock.cif (sk->num == 0) {
sk684net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk685net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk686net/inet/sock.cput_sock(sk->num, sk);
sk687net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk691net/inet/sock.csk->max_ack_backlog = backlog;
sk692net/inet/sock.cif (sk->state != TCP_LISTEN) {
sk693net/inet/sock.csk->ack_backlog = 0;
sk694net/inet/sock.csk->state = TCP_LISTEN;
sk703net/inet/sock.cstruct sock *sk;
sk707net/inet/sock.csk = (struct sock *) kmalloc(sizeof(*sk), GFP_KERNEL);
sk708net/inet/sock.cif (sk == NULL) 
sk710net/inet/sock.csk->num = 0;
sk716net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk720net/inet/sock.csk->no_check = TCP_NO_CHECK;
sk726net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk730net/inet/sock.csk->no_check = UDP_NO_CHECK;
sk736net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk740net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk744net/inet/sock.csk->reuse = 1;
sk745net/inet/sock.csk->no_check = 0;  /*
sk749net/inet/sock.csk->num = protocol;
sk754net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk758net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk762net/inet/sock.csk->reuse = 1;
sk763net/inet/sock.csk->no_check = 0;  /* Doesn't matter no checksum is
sk766net/inet/sock.csk->num = protocol;
sk770net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk773net/inet/sock.csk->socket = sock;
sk774net/inet/sock.csk->protocol = protocol;
sk775net/inet/sock.csk->wmem_alloc = 0;
sk776net/inet/sock.csk->rmem_alloc = 0;
sk777net/inet/sock.csk->sndbuf = SK_WMEM_MAX;
sk778net/inet/sock.csk->rcvbuf = SK_RMEM_MAX;
sk779net/inet/sock.csk->pair = NULL;
sk780net/inet/sock.csk->opt = NULL;
sk781net/inet/sock.csk->send_seq = 0;
sk782net/inet/sock.csk->acked_seq = 0;
sk783net/inet/sock.csk->copied_seq = 0;
sk784net/inet/sock.csk->fin_seq = 0;
sk785net/inet/sock.csk->proc = 0;
sk786net/inet/sock.csk->rtt = TCP_WRITE_TIME;
sk787net/inet/sock.csk->mdev = 0;
sk788net/inet/sock.csk->backoff = 0;
sk789net/inet/sock.csk->packets_out = 0;
sk790net/inet/sock.csk->cong_window = 1; /* start with only sending one packet at a time. */
sk791net/inet/sock.csk->exp_growth = 1;  /* if set cong_window grow exponentially every time
sk793net/inet/sock.csk->urginline = 0;
sk794net/inet/sock.csk->intr = 0;
sk795net/inet/sock.csk->linger = 0;
sk796net/inet/sock.csk->destroy = 0;
sk797net/inet/sock.csk->reuse = 0;
sk798net/inet/sock.csk->priority = 1;
sk799net/inet/sock.csk->shutdown = 0;
sk800net/inet/sock.csk->urg = 0;
sk801net/inet/sock.csk->keepopen = 0;
sk802net/inet/sock.csk->zapped = 0;
sk803net/inet/sock.csk->done = 0;
sk804net/inet/sock.csk->ack_backlog = 0;
sk805net/inet/sock.csk->window = 0;
sk806net/inet/sock.csk->bytes_rcv = 0;
sk807net/inet/sock.csk->state = TCP_CLOSE;
sk808net/inet/sock.csk->dead = 0;
sk809net/inet/sock.csk->ack_timed = 0;
sk810net/inet/sock.csk->send_tmp = NULL;
sk811net/inet/sock.csk->mss = 0; /* we will try not to send any packets smaller than this. */
sk812net/inet/sock.csk->debug = 0;
sk815net/inet/sock.csk->max_unacked = 2048; /* needs to be at most 2 full packets. */
sk819net/inet/sock.csk->max_ack_backlog = 0;
sk820net/inet/sock.csk->inuse = 0;
sk821net/inet/sock.csk->delay_acks = 0;
sk822net/inet/sock.csk->wback = NULL;
sk823net/inet/sock.csk->wfront = NULL;
sk824net/inet/sock.csk->rqueue = NULL;
sk825net/inet/sock.csk->mtu = 576;
sk826net/inet/sock.csk->prot = prot;
sk827net/inet/sock.csk->sleep = sock->wait;
sk828net/inet/sock.csk->daddr = 0;
sk829net/inet/sock.csk->saddr = my_addr();
sk830net/inet/sock.csk->err = 0;
sk831net/inet/sock.csk->next = NULL;
sk832net/inet/sock.csk->pair = NULL;
sk833net/inet/sock.csk->send_tail = NULL;
sk834net/inet/sock.csk->send_head = NULL;
sk835net/inet/sock.csk->timeout = 0;
sk836net/inet/sock.csk->broadcast = 0;
sk837net/inet/sock.csk->timer.data = (unsigned long)sk;
sk838net/inet/sock.csk->timer.function = &net_timer;
sk839net/inet/sock.csk->back_log = NULL;
sk840net/inet/sock.csk->blog = 0;
sk841net/inet/sock.csock->data =(void *) sk;
sk842net/inet/sock.csk->dummy_th.doff = sizeof(sk->dummy_th)/4;
sk843net/inet/sock.csk->dummy_th.res1=0;
sk844net/inet/sock.csk->dummy_th.res2=0;
sk845net/inet/sock.csk->dummy_th.urg_ptr = 0;
sk846net/inet/sock.csk->dummy_th.fin = 0;
sk847net/inet/sock.csk->dummy_th.syn = 0;
sk848net/inet/sock.csk->dummy_th.rst = 0;
sk849net/inet/sock.csk->dummy_th.psh = 0;
sk850net/inet/sock.csk->dummy_th.ack = 0;
sk851net/inet/sock.csk->dummy_th.urg = 0;
sk852net/inet/sock.csk->dummy_th.dest = 0;
sk854net/inet/sock.cif (sk->num) {
sk861net/inet/sock.cput_sock(sk->num, sk);
sk862net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk865net/inet/sock.cif (sk->prot->init) {
sk866net/inet/sock.cerr = sk->prot->init(sk);
sk868net/inet/sock.cdestroy_sock(sk);
sk888net/inet/sock.cstruct sock *sk;
sk890net/inet/sock.csk = (struct sock *) sock->data;
sk891net/inet/sock.cif (sk == NULL) return(0);
sk894net/inet/sock.cwake_up(sk->sleep);
sk902net/inet/sock.cif (sk->linger == 0) {
sk903net/inet/sock.csk->prot->close(sk,0);
sk904net/inet/sock.csk->dead = 1;
sk907net/inet/sock.csk->prot->close(sk, 0);
sk909net/inet/sock.cif (sk->lingertime)
sk910net/inet/sock.ccurrent->timeout = jiffies + HZ*sk->lingertime;
sk911net/inet/sock.cwhile(sk->state != TCP_CLOSE && current->timeout>0) {
sk912net/inet/sock.cinterruptible_sleep_on(sk->sleep);
sk921net/inet/sock.csk->dead = 1;
sk923net/inet/sock.csk->inuse = 1;
sk926net/inet/sock.crelease_sock(sk);
sk942net/inet/sock.cstruct sock *sk, *sk2;
sk946net/inet/sock.csk = (struct sock *) sock->data;
sk947net/inet/sock.cif (sk == NULL) {
sk953net/inet/sock.cif (sk->state != TCP_CLOSE) return(-EIO);
sk954net/inet/sock.cif (sk->num != 0) return(-EINVAL);
sk962net/inet/sock.cDPRINTF((DBG_INET, "bind sk =%X to port = %d\n", sk, snum));
sk963net/inet/sock.csk = (struct sock *) sock->data;
sk971net/inet/sock.csnum = get_new_socknum(sk->prot, 0);
sk979net/inet/sock.csk->saddr = addr.sin_addr.s_addr;
sk982net/inet/sock.csk->prot->sock_array[snum &(SOCK_ARRAY_SIZE -1)]));
sk987net/inet/sock.cfor(sk2 = sk->prot->sock_array[snum & (SOCK_ARRAY_SIZE -1)];
sk997net/inet/sock.cif (!sk->reuse) {
sk1002net/inet/sock.cif (sk2->saddr != sk->saddr) continue;  /* socket per slot ! -FB */
sk1010net/inet/sock.cremove_sock(sk);
sk1011net/inet/sock.cput_sock(snum, sk);
sk1012net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1013net/inet/sock.csk->daddr = 0;
sk1014net/inet/sock.csk->dummy_th.dest = 0;
sk1023net/inet/sock.cstruct sock *sk;
sk1027net/inet/sock.csk = (struct sock *) sock->data;
sk1028net/inet/sock.cif (sk == NULL) {
sk1033net/inet/sock.cif (sock->state == SS_CONNECTING && sk->state == TCP_ESTABLISHED)
sk1040net/inet/sock.cif (sock->state == SS_CONNECTING && sk->protocol == IPPROTO_TCP &&
sk1046net/inet/sock.cif (sk->num == 0) {
sk1047net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1048net/inet/sock.cif (sk->num == 0) 
sk1050net/inet/sock.cput_sock(sk->num, sk);
sk1051net/inet/sock.csk->dummy_th.source = htons(sk->num);
sk1054net/inet/sock.cif (sk->prot->connect == NULL) 
sk1057net/inet/sock.cerr = sk->prot->connect(sk, (struct sockaddr_in *)uaddr, addr_len);
sk1063net/inet/sock.cif (sk->state != TCP_ESTABLISHED &&(flags & O_NONBLOCK)) 
sk1067net/inet/sock.cwhile(sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) 
sk1069net/inet/sock.cinterruptible_sleep_on(sk->sleep);
sk1076net/inet/sock.cif(sk->err && sk->protocol == IPPROTO_TCP)
sk1080net/inet/sock.creturn -sk->err; /* set by tcp_err() */
sk1086net/inet/sock.cif (sk->state != TCP_ESTABLISHED && sk->err) {
sk1088net/inet/sock.creturn(-sk->err);
sk1173net/inet/sock.cstruct sock *sk;
sk1192net/inet/sock.csk = (struct sock *) sock->data;
sk1193net/inet/sock.cif (sk == NULL) {
sk1198net/inet/sock.cif (!tcp_connected(sk->state)) return(-ENOTCONN);
sk1199net/inet/sock.csin.sin_port = sk->dummy_th.dest;
sk1200net/inet/sock.csin.sin_addr.s_addr = sk->daddr;
sk1202net/inet/sock.csin.sin_port = sk->dummy_th.source;
sk1203net/inet/sock.cif (sk->saddr == 0) sin.sin_addr.s_addr = my_addr();
sk1204net/inet/sock.celse sin.sin_addr.s_addr = sk->saddr;
sk1218net/inet/sock.cstruct sock *sk;
sk1220net/inet/sock.csk = (struct sock *) sock->data;
sk1221net/inet/sock.cif (sk == NULL) {
sk1227net/inet/sock.cif (sk->num == 0) {
sk1228net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1229net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk1230net/inet/sock.cput_sock(sk->num, sk);
sk1231net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1233net/inet/sock.creturn(sk->prot->read(sk, (unsigned char *) ubuf, size, noblock,0));
sk1241net/inet/sock.cstruct sock *sk;
sk1243net/inet/sock.csk = (struct sock *) sock->data;
sk1244net/inet/sock.cif (sk == NULL) {
sk1250net/inet/sock.cif (sk->num == 0) {
sk1251net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1252net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk1253net/inet/sock.cput_sock(sk->num, sk);
sk1254net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1256net/inet/sock.creturn(sk->prot->read(sk, (unsigned char *) ubuf, size, noblock, flags));
sk1263net/inet/sock.cstruct sock *sk;
sk1265net/inet/sock.csk = (struct sock *) sock->data;
sk1266net/inet/sock.cif (sk == NULL) {
sk1270net/inet/sock.cif (sk->shutdown & SEND_SHUTDOWN) {
sk1276net/inet/sock.cif (sk->num == 0) {
sk1277net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1278net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk1279net/inet/sock.cput_sock(sk->num, sk);
sk1280net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1283net/inet/sock.creturn(sk->prot->write(sk, (unsigned char *) ubuf, size, noblock, 0));
sk1291net/inet/sock.cstruct sock *sk;
sk1293net/inet/sock.csk = (struct sock *) sock->data;
sk1294net/inet/sock.cif (sk == NULL) {
sk1298net/inet/sock.cif (sk->shutdown & SEND_SHUTDOWN) {
sk1304net/inet/sock.cif (sk->num == 0) {
sk1305net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1306net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk1307net/inet/sock.cput_sock(sk->num, sk);
sk1308net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1311net/inet/sock.creturn(sk->prot->write(sk, (unsigned char *) ubuf, size, noblock, flags));
sk1319net/inet/sock.cstruct sock *sk;
sk1321net/inet/sock.csk = (struct sock *) sock->data;
sk1322net/inet/sock.cif (sk == NULL) {
sk1326net/inet/sock.cif (sk->shutdown & SEND_SHUTDOWN) {
sk1331net/inet/sock.cif (sk->prot->sendto == NULL) return(-EOPNOTSUPP);
sk1334net/inet/sock.cif (sk->num == 0) {
sk1335net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1336net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk1337net/inet/sock.cput_sock(sk->num, sk);
sk1338net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1341net/inet/sock.creturn(sk->prot->sendto(sk, (unsigned char *) ubuf, size, noblock, flags, 
sk1350net/inet/sock.cstruct sock *sk;
sk1352net/inet/sock.csk = (struct sock *) sock->data;
sk1353net/inet/sock.cif (sk == NULL) {
sk1358net/inet/sock.cif (sk->prot->recvfrom == NULL) return(-EOPNOTSUPP);
sk1361net/inet/sock.cif (sk->num == 0) {
sk1362net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1363net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk1364net/inet/sock.cput_sock(sk->num, sk);
sk1365net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1368net/inet/sock.creturn(sk->prot->recvfrom(sk, (unsigned char *) ubuf, size, noblock, flags,
sk1376net/inet/sock.cstruct sock *sk;
sk1386net/inet/sock.csk = (struct sock *) sock->data;
sk1387net/inet/sock.cif (sk == NULL) {
sk1391net/inet/sock.cif (sock->state == SS_CONNECTING && sk->state == TCP_ESTABLISHED)
sk1394net/inet/sock.cif (!tcp_connected(sk->state)) return(-ENOTCONN);
sk1395net/inet/sock.csk->shutdown |= how;
sk1396net/inet/sock.cif (sk->prot->shutdown) sk->prot->shutdown(sk, how);
sk1404net/inet/sock.cstruct sock *sk;
sk1406net/inet/sock.csk = (struct sock *) sock->data;
sk1407net/inet/sock.cif (sk == NULL) {
sk1412net/inet/sock.cif (sk->prot->select == NULL) {
sk1416net/inet/sock.creturn(sk->prot->select(sk, sel_type, wait));
sk1423net/inet/sock.cstruct sock *sk;
sk1427net/inet/sock.csk = NULL;
sk1428net/inet/sock.cif (sock && (sk = (struct sock *) sock->data) == NULL) {
sk1439net/inet/sock.cif (sk)
sk1440net/inet/sock.csk->proc = get_fs_long((int *) arg);
sk1444net/inet/sock.cif (sk) {
sk1448net/inet/sock.cput_fs_long(sk->proc,(int *)arg);
sk1492net/inet/sock.cif (!sk || !sk->prot->ioctl) return(-EINVAL);
sk1493net/inet/sock.creturn(sk->prot->ioctl(sk, cmd, arg));
sk1501net/inet/sock.csock_wmalloc(struct sock *sk, unsigned long size, int force,
sk1504net/inet/sock.cif (sk) {
sk1505net/inet/sock.cif (sk->wmem_alloc + size < sk->sndbuf || force) {
sk1507net/inet/sock.csk->wmem_alloc+= size;
sk1512net/inet/sock.csk, size, force, priority));
sk1520net/inet/sock.csock_rmalloc(struct sock *sk, unsigned long size, int force, int priority)
sk1522net/inet/sock.cif (sk) {
sk1523net/inet/sock.cif (sk->rmem_alloc + size < sk->rcvbuf || force) {
sk1526net/inet/sock.cif (c) sk->rmem_alloc += size;
sk1531net/inet/sock.csk,size,force, priority));
sk1539net/inet/sock.csock_rspace(struct sock *sk)
sk1543net/inet/sock.cif (sk != NULL) {
sk1544net/inet/sock.cif (sk->rmem_alloc >= sk->rcvbuf-2*MIN_WINDOW) return(0);
sk1545net/inet/sock.camt = min((sk->rcvbuf-sk->rmem_alloc)/2-MIN_WINDOW, MAX_WINDOW);
sk1554net/inet/sock.csock_wspace(struct sock *sk)
sk1556net/inet/sock.cif (sk != NULL) {
sk1557net/inet/sock.cif (sk->shutdown & SEND_SHUTDOWN) return(0);
sk1558net/inet/sock.cif (sk->wmem_alloc >= sk->sndbuf) return(0);
sk1559net/inet/sock.creturn(sk->sndbuf-sk->wmem_alloc );
sk1566net/inet/sock.csock_wfree(struct sock *sk, void *mem, unsigned long size)
sk1568net/inet/sock.cDPRINTF((DBG_INET, "sock_wfree(sk=%X, mem=%X, size=%d)\n", sk, mem, size));
sk1572net/inet/sock.cif (sk) {
sk1573net/inet/sock.csk->wmem_alloc -= size;
sk1576net/inet/sock.cif (!sk->dead) wake_up(sk->sleep);
sk1577net/inet/sock.cif (sk->destroy && sk->wmem_alloc == 0 && sk->rmem_alloc == 0) {
sk1579net/inet/sock.c"recovered lost memory, sock = %X\n", sk));
sk1587net/inet/sock.csock_rfree(struct sock *sk, void *mem, unsigned long size)
sk1589net/inet/sock.cDPRINTF((DBG_INET, "sock_rfree(sk=%X, mem=%X, size=%d)\n", sk, mem, size));
sk1592net/inet/sock.cif (sk) {
sk1593net/inet/sock.csk->rmem_alloc -= size;
sk1594net/inet/sock.cif (sk->destroy && sk->wmem_alloc == 0 && sk->rmem_alloc == 0) {
sk1596net/inet/sock.c"recovered lot memory, sock = %X\n", sk));
sk1646net/inet/sock.cvoid release_sock(struct sock *sk)
sk1648net/inet/sock.cif (!sk) {
sk1652net/inet/sock.cif (!sk->prot) {
sk1657net/inet/sock.cif (sk->blog) return;
sk1661net/inet/sock.csk->inuse = 1;
sk1662net/inet/sock.cwhile(sk->back_log != NULL) {
sk1665net/inet/sock.csk->blog = 1;
sk1666net/inet/sock.cskb =(struct sk_buff *)sk->back_log;
sk1669net/inet/sock.csk->back_log = skb->next;
sk1673net/inet/sock.csk->back_log = NULL;
sk1676net/inet/sock.cDPRINTF((DBG_INET, "sk->back_log = %X\n", sk->back_log));
sk1677net/inet/sock.cif (sk->prot->rcv) sk->prot->rcv(skb, skb->dev, sk->opt,
sk1681net/inet/sock.c(struct inet_protocol *)sk->pair); 
sk1684net/inet/sock.csk->blog = 0;
sk1685net/inet/sock.csk->inuse = 0;
sk1687net/inet/sock.cif (sk->dead && sk->state == TCP_CLOSE) {
sk1689net/inet/sock.creset_timer(sk, TIME_DONE, min(sk->rtt * 2, TCP_DONE_TIME));
sk129net/inet/sock.hvoid      *(*wmalloc)(struct sock *sk,
sk132net/inet/sock.hvoid      *(*rmalloc)(struct sock *sk,
sk135net/inet/sock.hvoid      (*wfree)(struct sock *sk, void *mem,
sk137net/inet/sock.hvoid      (*rfree)(struct sock *sk, void *mem,
sk139net/inet/sock.hunsigned long    (*rspace)(struct sock *sk);
sk140net/inet/sock.hunsigned long    (*wspace)(struct sock *sk);
sk141net/inet/sock.hvoid      (*close)(struct sock *sk, int timeout);
sk142net/inet/sock.hint      (*read)(struct sock *sk, unsigned char *to,
sk144net/inet/sock.hint      (*write)(struct sock *sk, unsigned char *to,
sk146net/inet/sock.hint      (*sendto)(struct sock *sk,
sk150net/inet/sock.hint      (*recvfrom)(struct sock *sk,
sk159net/inet/sock.hint      (*connect)(struct sock *sk,
sk161net/inet/sock.hstruct sock    *(*accept) (struct sock *sk, int flags);
sk162net/inet/sock.hvoid      (*queue_xmit)(struct sock *sk,
sk165net/inet/sock.hvoid      (*retransmit)(struct sock *sk, int all);
sk166net/inet/sock.hvoid      (*write_wakeup)(struct sock *sk);
sk167net/inet/sock.hvoid      (*read_wakeup)(struct sock *sk);
sk172net/inet/sock.hint      (*select)(struct sock *sk, int which,
sk174net/inet/sock.hint      (*ioctl)(struct sock *sk, int cmd,
sk176net/inet/sock.hint      (*init)(struct sock *sk);
sk177net/inet/sock.hvoid      (*shutdown)(struct sock *sk, int how);
sk198net/inet/sock.hextern void      destroy_sock(struct sock *sk);
sk201net/inet/sock.hextern void      release_sock(struct sock *sk);
sk206net/inet/sock.hextern void      *sock_wmalloc(struct sock *sk,
sk209net/inet/sock.hextern void      *sock_rmalloc(struct sock *sk,
sk212net/inet/sock.hextern void      sock_wfree(struct sock *sk, void *mem,
sk214net/inet/sock.hextern void      sock_rfree(struct sock *sk, void *mem,
sk216net/inet/sock.hextern unsigned long    sock_rspace(struct sock *sk);
sk217net/inet/sock.hextern unsigned long    sock_wspace(struct sock *sk);
sk129net/inet/tcp.cget_firstr(struct sock *sk)
sk131net/inet/tcp.creturn skb_dequeue(&sk->rqueue);
sk153net/inet/tcp.cstatic void tcp_time_wait(struct sock *sk)
sk155net/inet/tcp.csk->state = TCP_TIME_WAIT;
sk156net/inet/tcp.csk->shutdown = SHUTDOWN_MASK;
sk157net/inet/tcp.cif (!sk->dead)
sk158net/inet/tcp.cwake_up(sk->sleep);
sk159net/inet/tcp.creset_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
sk170net/inet/tcp.ctcp_retransmit(struct sock *sk, int all)
sk173net/inet/tcp.cip_retransmit(sk, all);
sk177net/inet/tcp.cif (sk->cong_window > 4)
sk178net/inet/tcp.csk->cong_window = sk->cong_window / 2;
sk179net/inet/tcp.csk->exp_growth = 0;
sk182net/inet/tcp.cip_retransmit(sk, all);
sk199net/inet/tcp.cstruct sock *sk;
sk208net/inet/tcp.csk = get_sock(&tcp_prot, th->source/*dest*/, daddr, th->dest/*source*/, saddr);
sk211net/inet/tcp.cif (sk == NULL) return;
sk215net/inet/tcp.csk->err = -err;
sk216net/inet/tcp.cwake_up(sk->sleep);
sk226net/inet/tcp.cif (sk->cong_window > 4) sk->cong_window--;
sk231net/inet/tcp.csk->err = icmp_err_convert[err & 0xff].errno;
sk238net/inet/tcp.cif (sk->state == TCP_SYN_SENT) {
sk239net/inet/tcp.csk->state = TCP_CLOSE;
sk240net/inet/tcp.cwake_up(sk->sleep);  /* Wake people up to see the error (see connect in sock.c) */
sk253net/inet/tcp.ctcp_readable(struct sock *sk)
sk262net/inet/tcp.cDPRINTF((DBG_TCP, "tcp_readable(sk=%X)\n", sk));
sk263net/inet/tcp.cif(sk && sk->debug)
sk264net/inet/tcp.cprintk("tcp_readable: %p - ",sk);
sk266net/inet/tcp.cif (sk == NULL || skb_peek(&sk->rqueue) == NULL)   /* Empty sockets are easy! */
sk268net/inet/tcp.cif(sk && sk->debug) 
sk273net/inet/tcp.ccounted = sk->copied_seq+1;  /* Where we are at the moment */
sk278net/inet/tcp.cskb =(struct sk_buff *)sk->rqueue;
sk306net/inet/tcp.c} while(skb != sk->rqueue);
sk309net/inet/tcp.cif(sk->debug)
sk321net/inet/tcp.ctcp_select(struct sock *sk, int sel_type, select_table *wait)
sk324net/inet/tcp.csk, sel_type, wait));
sk326net/inet/tcp.csk->inuse = 1;
sk329net/inet/tcp.cif(sk->debug)
sk331net/inet/tcp.cselect_wait(sk->sleep, wait);
sk332net/inet/tcp.cif(sk->debug)
sk334net/inet/tcp.cif (skb_peek(&sk->rqueue) != NULL) {
sk335net/inet/tcp.cif (sk->state == TCP_LISTEN || tcp_readable(sk)) {
sk336net/inet/tcp.crelease_sock(sk);
sk337net/inet/tcp.cif(sk->debug)
sk342net/inet/tcp.cif (sk->err != 0)  /* Receiver error */
sk344net/inet/tcp.crelease_sock(sk);
sk345net/inet/tcp.cif(sk->debug)
sk349net/inet/tcp.cif (sk->shutdown & RCV_SHUTDOWN) {
sk350net/inet/tcp.crelease_sock(sk);
sk351net/inet/tcp.cif(sk->debug)
sk355net/inet/tcp.crelease_sock(sk);
sk356net/inet/tcp.cif(sk->debug)
sk361net/inet/tcp.cselect_wait(sk->sleep, wait);
sk362net/inet/tcp.cif (sk->shutdown & SEND_SHUTDOWN) {
sk367net/inet/tcp.crelease_sock(sk);
sk376net/inet/tcp.cif (sk->prot->wspace(sk) >= sk->mtu) {
sk377net/inet/tcp.crelease_sock(sk);
sk379net/inet/tcp.cif (sk->state == TCP_SYN_RECV ||
sk380net/inet/tcp.csk->state == TCP_SYN_SENT) return(0);
sk388net/inet/tcp.csk->wmem_alloc, sk->packets_out,
sk389net/inet/tcp.csk->wback, sk->wfront,
sk390net/inet/tcp.csk->send_seq, sk->window_seq));
sk392net/inet/tcp.crelease_sock(sk);
sk395net/inet/tcp.cselect_wait(sk->sleep,wait);
sk396net/inet/tcp.cif (sk->err) {
sk397net/inet/tcp.crelease_sock(sk);
sk400net/inet/tcp.crelease_sock(sk);
sk404net/inet/tcp.crelease_sock(sk);
sk410net/inet/tcp.ctcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
sk413net/inet/tcp.cDPRINTF((DBG_TCP, "tcp_ioctl(sk=%X, cmd = %d, arg=%X)\n", sk, cmd, arg));
sk425net/inet/tcp.cif (sk->state == TCP_LISTEN) return(-EINVAL);
sk427net/inet/tcp.csk->inuse = 1;
sk428net/inet/tcp.camount = tcp_readable(sk);
sk429net/inet/tcp.crelease_sock(sk);
sk447net/inet/tcp.csk->inuse = 1;
sk448net/inet/tcp.cif ((skb=skb_peek(&sk->rqueue)) != NULL) 
sk450net/inet/tcp.cif (sk->copied_seq+1 == skb->h.th->seq && skb->h.th->urg) 
sk453net/inet/tcp.crelease_sock(sk);
sk465net/inet/tcp.cif (sk->state == TCP_LISTEN) return(-EINVAL);
sk466net/inet/tcp.camount = sk->prot->wspace(sk);
sk545net/inet/tcp.cunsigned long daddr, int len, struct sock *sk)
sk554net/inet/tcp.ctcp_send_partial(struct sock *sk)
sk558net/inet/tcp.cif (sk == NULL || sk->send_tmp == NULL) return;
sk560net/inet/tcp.cskb = sk->send_tmp;
sk563net/inet/tcp.ctcp_send_check(skb->h.th, sk->saddr, sk->daddr,
sk565net/inet/tcp.c(unsigned long)(skb+1), sk);
sk567net/inet/tcp.cskb->h.seq = sk->send_seq;
sk568net/inet/tcp.cif (after(sk->send_seq , sk->window_seq) ||
sk569net/inet/tcp.csk->packets_out >= sk->cong_window) {
sk571net/inet/tcp.csk->cong_window, sk->packets_out));
sk573net/inet/tcp.csk->send_seq, sk->window_seq));
sk576net/inet/tcp.cif (sk->wback == NULL) {
sk577net/inet/tcp.csk->wfront=skb;
sk579net/inet/tcp.csk->wback->next = skb;
sk581net/inet/tcp.csk->wback = skb;
sk583net/inet/tcp.csk->prot->queue_xmit(sk, skb->dev, skb,0);
sk585net/inet/tcp.csk->send_tmp = NULL;
sk592net/inet/tcp.cstruct sock *sk,
sk600net/inet/tcp.cif(sk->zapped)
sk606net/inet/tcp.cbuff = (struct sk_buff *) sk->prot->wmalloc(sk, MAX_ACK_SIZE, 1, GFP_ATOMIC);
sk609net/inet/tcp.csk->ack_backlog++;
sk610net/inet/tcp.cif (sk->timeout != TIME_WRITE && tcp_connected(sk->state)) {
sk611net/inet/tcp.creset_timer(sk, TIME_WRITE, 10);
sk620net/inet/tcp.cbuff->sk = sk;
sk624net/inet/tcp.ctmp = sk->prot->build_header(buff, sk->saddr, daddr, &dev,
sk625net/inet/tcp.cIPPROTO_TCP, sk->opt, MAX_ACK_SIZE);
sk628net/inet/tcp.csk->prot->wfree(sk, buff->mem_addr, buff->mem_len);
sk643net/inet/tcp.csk->window = sk->prot->rspace(sk);
sk644net/inet/tcp.ct1->window = ntohs(sk->window);
sk652net/inet/tcp.cif (ack == sk->acked_seq) {
sk653net/inet/tcp.csk->ack_backlog = 0;
sk654net/inet/tcp.csk->bytes_rcv = 0;
sk655net/inet/tcp.csk->ack_timed = 0;
sk656net/inet/tcp.cif (sk->send_head == NULL && sk->wfront == NULL) {
sk662net/inet/tcp.ctcp_send_check(t1, sk->saddr, daddr, sizeof(*t1), sk);
sk663net/inet/tcp.cif (sk->debug)
sk665net/inet/tcp.csk->prot->queue_xmit(sk, dev, buff, 1);
sk671net/inet/tcp.ctcp_build_header(struct tcphdr *th, struct sock *sk, int push)
sk675net/inet/tcp.cmemcpy(th,(void *) &(sk->dummy_th), sizeof(*th));
sk676net/inet/tcp.cth->seq = htonl(sk->send_seq);
sk681net/inet/tcp.csk->ack_backlog = 0;
sk682net/inet/tcp.csk->bytes_rcv = 0;
sk683net/inet/tcp.csk->ack_timed = 0;
sk684net/inet/tcp.cth->ack_seq = htonl(sk->acked_seq);
sk685net/inet/tcp.csk->window = sk->prot->rspace(sk);
sk686net/inet/tcp.cth->window = htons(sk->window);
sk697net/inet/tcp.ctcp_write(struct sock *sk, unsigned char *from,
sk709net/inet/tcp.csk, from, len, nonblock, flags));
sk711net/inet/tcp.csk->inuse=1;
sk712net/inet/tcp.cprot = sk->prot;
sk714net/inet/tcp.cif (sk->err) {      /* Stop on an error */
sk715net/inet/tcp.crelease_sock(sk);
sk717net/inet/tcp.ctmp = -sk->err;
sk718net/inet/tcp.csk->err = 0;
sk723net/inet/tcp.cif (sk->shutdown & SEND_SHUTDOWN) {
sk724net/inet/tcp.crelease_sock(sk);
sk725net/inet/tcp.csk->err = EPIPE;
sk727net/inet/tcp.csk->err = 0;
sk734net/inet/tcp.cwhile(sk->state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT) {
sk735net/inet/tcp.cif (sk->err) {
sk736net/inet/tcp.crelease_sock(sk);
sk738net/inet/tcp.ctmp = -sk->err;
sk739net/inet/tcp.csk->err = 0;
sk743net/inet/tcp.cif (sk->state != TCP_SYN_SENT && sk->state != TCP_SYN_RECV) {
sk744net/inet/tcp.crelease_sock(sk);
sk748net/inet/tcp.cif (sk->err) {
sk749net/inet/tcp.ctmp = -sk->err;
sk750net/inet/tcp.csk->err = 0;
sk754net/inet/tcp.cif (sk->keepopen) {
sk761net/inet/tcp.crelease_sock(sk);
sk767net/inet/tcp.crelease_sock(sk);
sk769net/inet/tcp.cif (sk->state != TCP_ESTABLISHED &&
sk770net/inet/tcp.csk->state != TCP_CLOSE_WAIT && sk->err == 0) {
sk771net/inet/tcp.cinterruptible_sleep_on(sk->sleep);
sk779net/inet/tcp.csk->inuse = 1;
sk784net/inet/tcp.cif (sk->send_tmp != NULL) {
sk788net/inet/tcp.cskb = sk->send_tmp;
sk790net/inet/tcp.ccopy = min(sk->mss - skb->len + 128 +
sk804net/inet/tcp.csk->send_seq += copy;
sk808net/inet/tcp.c(unsigned long)(skb+1) >= sk->mss ||(flags & MSG_OOB)) {
sk809net/inet/tcp.ctcp_send_partial(sk);
sk820net/inet/tcp.ccopy = min(sk->mtu, diff(sk->window_seq, sk->send_seq));
sk823net/inet/tcp.cif (copy < 200 || copy > sk->mtu) copy = sk->mtu;
sk827net/inet/tcp.cif (sk->packets_out && copy < sk->mss && !(flags & MSG_OOB)) {
sk829net/inet/tcp.crelease_sock(sk);
sk830net/inet/tcp.cskb = (struct sk_buff *) prot->wmalloc(sk,
sk831net/inet/tcp.csk->mss + 128 + prot->max_header +
sk833net/inet/tcp.csk->inuse = 1;
sk834net/inet/tcp.csk->send_tmp = skb;
sk836net/inet/tcp.cskb->mem_len = sk->mss + 128 + prot->max_header + sizeof(*skb);
sk839net/inet/tcp.crelease_sock(sk);
sk840net/inet/tcp.cskb = (struct sk_buff *) prot->wmalloc(sk,
sk843net/inet/tcp.csk->inuse = 1;
sk851net/inet/tcp.crelease_sock(sk);
sk858net/inet/tcp.ctmp = sk->wmem_alloc;
sk859net/inet/tcp.crelease_sock(sk);
sk862net/inet/tcp.cif (tmp <= sk->wmem_alloc &&
sk863net/inet/tcp.c(sk->state == TCP_ESTABLISHED||sk->state == TCP_CLOSE_WAIT)
sk864net/inet/tcp.c&& sk->err == 0) {
sk865net/inet/tcp.cinterruptible_sleep_on(sk->sleep);
sk873net/inet/tcp.csk->inuse = 1;
sk880net/inet/tcp.cskb->sk = sk;
sk889net/inet/tcp.ctmp = prot->build_header(skb, sk->saddr, sk->daddr, &dev,
sk890net/inet/tcp.cIPPROTO_TCP, sk->opt, skb->mem_len);
sk892net/inet/tcp.cprot->wfree(sk, skb->mem_addr, skb->mem_len);
sk893net/inet/tcp.crelease_sock(sk);
sk902net/inet/tcp.ctmp = tcp_build_header((struct tcphdr *)buff, sk, len-copy);
sk904net/inet/tcp.cprot->wfree(sk, skb->mem_addr, skb->mem_len);
sk905net/inet/tcp.crelease_sock(sk);
sk923net/inet/tcp.csk->send_seq += copy;
sk925net/inet/tcp.cif (sk->send_tmp != NULL) continue;
sk927net/inet/tcp.ctcp_send_check((struct tcphdr *)buff, sk->saddr, sk->daddr,
sk928net/inet/tcp.ccopy + sizeof(struct tcphdr), sk);
sk930net/inet/tcp.cskb->h.seq = sk->send_seq;
sk931net/inet/tcp.cif (after(sk->send_seq , sk->window_seq) ||
sk932net/inet/tcp.csk->packets_out >= sk->cong_window) {
sk934net/inet/tcp.csk->cong_window, sk->packets_out));
sk936net/inet/tcp.csk->send_seq, sk->window_seq));
sk939net/inet/tcp.cif (sk->wback == NULL) {
sk940net/inet/tcp.csk->wfront = skb;
sk942net/inet/tcp.csk->wback->next = skb;
sk944net/inet/tcp.csk->wback = skb;
sk946net/inet/tcp.cprot->queue_xmit(sk, dev, skb,0);
sk949net/inet/tcp.csk->err = 0;
sk951net/inet/tcp.cif(sk->send_tmp && !sk->packets_out)
sk952net/inet/tcp.ctcp_send_partial(sk);
sk954net/inet/tcp.crelease_sock(sk);
sk961net/inet/tcp.ctcp_sendto(struct sock *sk, unsigned char *from,
sk970net/inet/tcp.cif (sin.sin_port != sk->dummy_th.dest) return(-EINVAL);
sk971net/inet/tcp.cif (sin.sin_addr.s_addr != sk->daddr) return(-EINVAL);
sk972net/inet/tcp.creturn(tcp_write(sk, from, len, nonblock, flags));
sk977net/inet/tcp.ctcp_read_wakeup(struct sock *sk)
sk985net/inet/tcp.cif (!sk->ack_backlog) return;
sk997net/inet/tcp.cbuff = (struct sk_buff *) sk->prot->wmalloc(sk,MAX_ACK_SIZE,1, GFP_ATOMIC);
sk1000net/inet/tcp.creset_timer(sk, TIME_WRITE, 10);
sk1007net/inet/tcp.cbuff->sk = sk;
sk1010net/inet/tcp.ctmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev,
sk1011net/inet/tcp.cIPPROTO_TCP, sk->opt, MAX_ACK_SIZE);
sk1014net/inet/tcp.csk->prot->wfree(sk, buff->mem_addr, buff->mem_len);
sk1021net/inet/tcp.cmemcpy(t1,(void *) &sk->dummy_th, sizeof(*t1));
sk1022net/inet/tcp.ct1->seq = ntohl(sk->send_seq);
sk1030net/inet/tcp.csk->ack_backlog = 0;
sk1031net/inet/tcp.csk->bytes_rcv = 0;
sk1032net/inet/tcp.csk->window = sk->prot->rspace(sk);
sk1033net/inet/tcp.ct1->window = ntohs(sk->window);
sk1034net/inet/tcp.ct1->ack_seq = ntohl(sk->acked_seq);
sk1036net/inet/tcp.ctcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk);
sk1037net/inet/tcp.csk->prot->queue_xmit(sk, dev, buff, 1);
sk1048net/inet/tcp.ccleanup_rbuf(struct sock *sk)
sk1054net/inet/tcp.cif(sk->debug)
sk1055net/inet/tcp.cprintk("cleaning rbuf for sk=%p\n", sk);
sk1060net/inet/tcp.cleft = sk->prot->rspace(sk);
sk1066net/inet/tcp.cwhile((skb=skb_peek(&sk->rqueue)) != NULL ) 
sk1071net/inet/tcp.cskb->sk = sk;
sk1084net/inet/tcp.csk->window - sk->bytes_rcv, sk->prot->rspace(sk)));
sk1086net/inet/tcp.cif(sk->debug)
sk1087net/inet/tcp.cprintk("sk->rspace = %lu, was %d\n", sk->prot->rspace(sk),
sk1089net/inet/tcp.cif (sk->prot->rspace(sk) != left) 
sk1101net/inet/tcp.csk->ack_backlog++;
sk1102net/inet/tcp.cif ((sk->prot->rspace(sk) > (sk->window - sk->bytes_rcv + sk->mtu))) {
sk1104net/inet/tcp.ctcp_read_wakeup(sk);
sk1107net/inet/tcp.cint was_active = del_timer(&sk->timer);
sk1108net/inet/tcp.cif (!was_active || TCP_ACK_TIME < sk->timer.expires) {
sk1109net/inet/tcp.creset_timer(sk, TIME_WRITE, TCP_ACK_TIME);
sk1111net/inet/tcp.cadd_timer(&sk->timer);
sk1119net/inet/tcp.ctcp_read_urg(struct sock * sk, int nonblock,
sk1126net/inet/tcp.csk, to, len, flags));
sk1130net/inet/tcp.csk->inuse = 1;
sk1131net/inet/tcp.cwhile(sk->urg==0 || skb_peek(&sk->rqueue) == NULL) {
sk1132net/inet/tcp.cif (sk->err) {
sk1135net/inet/tcp.crelease_sock(sk);
sk1137net/inet/tcp.ctmp = -sk->err;
sk1138net/inet/tcp.csk->err = 0;
sk1142net/inet/tcp.cif (sk->state == TCP_CLOSE || sk->done) {
sk1143net/inet/tcp.crelease_sock(sk);
sk1145net/inet/tcp.cif (!sk->done) {
sk1146net/inet/tcp.csk->done = 1;
sk1152net/inet/tcp.cif (sk->shutdown & RCV_SHUTDOWN) {
sk1153net/inet/tcp.crelease_sock(sk);
sk1155net/inet/tcp.csk->done = 1;
sk1160net/inet/tcp.crelease_sock(sk);
sk1166net/inet/tcp.crelease_sock(sk);
sk1168net/inet/tcp.cif ((sk->urg == 0 || skb_peek(&sk->rqueue) == NULL) &&
sk1169net/inet/tcp.csk->err == 0 && !(sk->shutdown & RCV_SHUTDOWN)) {
sk1170net/inet/tcp.cinterruptible_sleep_on(sk->sleep);
sk1177net/inet/tcp.csk->inuse = 1;
sk1181net/inet/tcp.cskb = skb_peek(&sk->rqueue);
sk1199net/inet/tcp.csk->urg--;
sk1201net/inet/tcp.crelease_sock(sk);
sk1206net/inet/tcp.c} while(skb != sk->rqueue);
sk1208net/inet/tcp.csk->urg = 0;
sk1209net/inet/tcp.crelease_sock(sk);
sk1216net/inet/tcp.ctcp_read(struct sock *sk, unsigned char *to,
sk1235net/inet/tcp.cif (sk->state == TCP_LISTEN) return(-ENOTCONN);
sk1239net/inet/tcp.creturn(tcp_read_urg(sk, nonblock, to, len, flags));
sk1242net/inet/tcp.csk->inuse = 1;
sk1244net/inet/tcp.cskb=skb_peek(&sk->rqueue);
sk1247net/inet/tcp.csk, to, len, nonblock, flags));
sk1254net/inet/tcp.cbefore(sk->copied_seq+1, skb->h.th->seq) || skb->used) {
sk1256net/inet/tcp.ccleanup_rbuf(sk);
sk1257net/inet/tcp.cif (sk->err) 
sk1261net/inet/tcp.crelease_sock(sk);
sk1268net/inet/tcp.ctmp = -sk->err;
sk1269net/inet/tcp.csk->err = 0;
sk1273net/inet/tcp.cif (sk->state == TCP_CLOSE) 
sk1275net/inet/tcp.crelease_sock(sk);
sk1281net/inet/tcp.cif (!sk->done) {
sk1282net/inet/tcp.csk->done = 1;
sk1288net/inet/tcp.cif (sk->shutdown & RCV_SHUTDOWN) 
sk1290net/inet/tcp.crelease_sock(sk);
sk1291net/inet/tcp.cif (copied == 0) sk->done = 1;
sk1298net/inet/tcp.crelease_sock(sk);
sk1299net/inet/tcp.cif(sk->debug)
sk1312net/inet/tcp.crelease_sock(sk);
sk1318net/inet/tcp.csk->state));
sk1319net/inet/tcp.crelease_sock(sk);
sk1326net/inet/tcp.cif (sk->shutdown & RCV_SHUTDOWN || sk->err != 0) {
sk1327net/inet/tcp.csk->inuse = 1;
sk1332net/inet/tcp.cif (skb_peek(&sk->rqueue) == NULL ||
sk1333net/inet/tcp.cbefore(sk->copied_seq+1, sk->rqueue->h.th->seq)) {
sk1334net/inet/tcp.cif(sk->debug)
sk1336net/inet/tcp.cinterruptible_sleep_on(sk->sleep);
sk1337net/inet/tcp.cif(sk->debug)
sk1349net/inet/tcp.csk->inuse = 1;
sk1354net/inet/tcp.cskb=skb_peek(&sk->rqueue);
sk1362net/inet/tcp.coffset = sk->copied_seq+1 - skb->h.th->seq;
sk1375net/inet/tcp.csk->copied_seq += ntohs(skb->h.th->urg_ptr);
sk1386net/inet/tcp.crelease_sock(sk);
sk1404net/inet/tcp.csk->copied_seq += used;
sk1433net/inet/tcp.ccleanup_rbuf(sk);
sk1434net/inet/tcp.crelease_sock(sk);
sk1447net/inet/tcp.ctcp_shutdown(struct sock *sk, int how)
sk1463net/inet/tcp.cif (sk->state == TCP_FIN_WAIT1 || sk->state == TCP_FIN_WAIT2) return;
sk1465net/inet/tcp.csk->inuse = 1;
sk1468net/inet/tcp.cif (sk->send_tmp) tcp_send_partial(sk);
sk1470net/inet/tcp.cprot =(struct proto *)sk->prot;
sk1471net/inet/tcp.cth =(struct tcphdr *)&sk->dummy_th;
sk1472net/inet/tcp.crelease_sock(sk); /* incase the malloc sleeps. */
sk1473net/inet/tcp.cbuff = (struct sk_buff *) prot->wmalloc(sk, MAX_RESET_SIZE,1 , GFP_KERNEL);
sk1475net/inet/tcp.csk->inuse = 1;
sk1480net/inet/tcp.cbuff->sk = sk;
sk1485net/inet/tcp.ctmp = prot->build_header(buff,sk->saddr, sk->daddr, &dev,
sk1486net/inet/tcp.cIPPROTO_TCP, sk->opt,
sk1490net/inet/tcp.cprot->wfree(sk,buff->mem_addr, buff->mem_len);
sk1491net/inet/tcp.crelease_sock(sk);
sk1500net/inet/tcp.ct1->seq = ntohl(sk->send_seq);
sk1501net/inet/tcp.csk->send_seq++;
sk1502net/inet/tcp.cbuff->h.seq = sk->send_seq;
sk1504net/inet/tcp.ct1->ack_seq = ntohl(sk->acked_seq);
sk1505net/inet/tcp.ct1->window = ntohs(sk->prot->rspace(sk));
sk1509net/inet/tcp.ctcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk);
sk1515net/inet/tcp.cif (sk->wback != NULL) {
sk1518net/inet/tcp.csk->wback->next = buff;
sk1519net/inet/tcp.csk->wback = buff;
sk1522net/inet/tcp.csk->prot->queue_xmit(sk, dev, buff, 0);
sk1525net/inet/tcp.cif (sk->state == TCP_ESTABLISHED) sk->state = TCP_FIN_WAIT1;
sk1526net/inet/tcp.celse sk->state = TCP_FIN_WAIT2;
sk1528net/inet/tcp.crelease_sock(sk);
sk1533net/inet/tcp.ctcp_recvfrom(struct sock *sk, unsigned char *to,
sk1555net/inet/tcp.cresult=tcp_read(sk, to, to_len, nonblock, flags);
sk1560net/inet/tcp.csin.sin_port = sk->dummy_th.dest;
sk1561net/inet/tcp.csin.sin_addr.s_addr = sk->daddr;
sk1590net/inet/tcp.cbuff->sk = NULL;
sk1644net/inet/tcp.ctcp_options(struct sock *sk, struct tcphdr *th)
sk1672net/inet/tcp.csk->mtu=min(sk->mtu,ntohs(*(unsigned short *)ptr));
sk1685net/inet/tcp.csk->mtu = min(sk->mtu, 576 - HEADER_SIZE);
sk1698net/inet/tcp.ctcp_conn_request(struct sock *sk, struct sk_buff *skb,
sk1711net/inet/tcp.csk, skb, daddr, saddr, opt, dev));
sk1716net/inet/tcp.cif (!sk->dead) {
sk1717net/inet/tcp.cwake_up(sk->sleep);
sk1720net/inet/tcp.ctcp_reset(daddr, saddr, th, sk->prot, opt, dev);
sk1729net/inet/tcp.cif (sk->ack_backlog >= sk->max_ack_backlog) {
sk1749net/inet/tcp.cmemcpy((void *)newsk,(void *)sk, sizeof(*newsk));
sk1822net/inet/tcp.csk->err = -ENOMEM;
sk1832net/inet/tcp.cbuff->sk = newsk;
sk1837net/inet/tcp.ctmp = sk->prot->build_header(buff, newsk->saddr, newsk->daddr, &dev,
sk1842net/inet/tcp.csk->err = tmp;
sk1847net/inet/tcp.cskb->sk = sk;
sk1884net/inet/tcp.cskb->sk = newsk;
sk1887net/inet/tcp.csk->rmem_alloc -= skb->mem_len;
sk1890net/inet/tcp.cskb_queue_tail(&sk->rqueue,skb);
sk1891net/inet/tcp.csk->ack_backlog++;
sk1897net/inet/tcp.ctcp_close(struct sock *sk, int timeout)
sk1910net/inet/tcp.cDPRINTF((DBG_TCP, "tcp_close((struct sock *)%X, %d)\n",sk, timeout));
sk1911net/inet/tcp.csk->inuse = 1;
sk1912net/inet/tcp.csk->keepopen = 1;
sk1913net/inet/tcp.csk->shutdown = SHUTDOWN_MASK;
sk1915net/inet/tcp.cif (!sk->dead) wake_up(sk->sleep);
sk1918net/inet/tcp.cif (skb_peek(&sk->rqueue) != NULL) 
sk1923net/inet/tcp.cskb = skb_peek(&sk->rqueue);
sk1928net/inet/tcp.cafter(skb->h.th->seq + skb->len + 1, sk->copied_seq))
sk1932net/inet/tcp.c} while(skb != sk->rqueue);
sk1934net/inet/tcp.cif(sk->debug)
sk1936net/inet/tcp.cwhile((skb=skb_dequeue(&sk->rqueue))!=NULL)
sk1938net/inet/tcp.cif(skb->len > 0 && after(skb->h.th->seq + skb->len + 1 , sk->copied_seq))
sk1942net/inet/tcp.cif(sk->debug)
sk1946net/inet/tcp.csk->rqueue = NULL;
sk1949net/inet/tcp.cif (sk->send_tmp) {
sk1950net/inet/tcp.ctcp_send_partial(sk);
sk1953net/inet/tcp.cswitch(sk->state) {
sk1958net/inet/tcp.creset_timer(sk, TIME_CLOSE, 4 * sk->rtt);
sk1959net/inet/tcp.cif (timeout) tcp_time_wait(sk);
sk1960net/inet/tcp.crelease_sock(sk);
sk1964net/inet/tcp.csk->state = TCP_CLOSE;
sk1966net/inet/tcp.crelease_sock(sk);
sk1969net/inet/tcp.csk->state = TCP_CLOSE;
sk1970net/inet/tcp.crelease_sock(sk);
sk1973net/inet/tcp.crelease_sock(sk);
sk1979net/inet/tcp.cprot =(struct proto *)sk->prot;
sk1980net/inet/tcp.cth =(struct tcphdr *)&sk->dummy_th;
sk1981net/inet/tcp.cbuff = (struct sk_buff *) prot->wmalloc(sk, MAX_FIN_SIZE, 1, GFP_ATOMIC);
sk1986net/inet/tcp.crelease_sock(sk);
sk1987net/inet/tcp.cif (sk->state != TCP_CLOSE_WAIT)
sk1988net/inet/tcp.csk->state = TCP_ESTABLISHED;
sk1989net/inet/tcp.creset_timer(sk, TIME_CLOSE, 100);
sk1994net/inet/tcp.cbuff->sk = sk;
sk2000net/inet/tcp.ctmp = prot->build_header(buff,sk->saddr, sk->daddr, &dev,
sk2001net/inet/tcp.cIPPROTO_TCP, sk->opt,
sk2006net/inet/tcp.crelease_sock(sk);
sk2014net/inet/tcp.ct1->seq = ntohl(sk->send_seq);
sk2015net/inet/tcp.csk->send_seq++;
sk2016net/inet/tcp.cbuff->h.seq = sk->send_seq;
sk2020net/inet/tcp.csk->delay_acks = 0;
sk2021net/inet/tcp.ct1->ack_seq = ntohl(sk->acked_seq);
sk2022net/inet/tcp.ct1->window = ntohs(sk->prot->rspace(sk));
sk2026net/inet/tcp.ctcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk);
sk2028net/inet/tcp.cif (sk->wfront == NULL) {
sk2029net/inet/tcp.cprot->queue_xmit(sk, dev, buff, 0);
sk2031net/inet/tcp.creset_timer(sk, TIME_WRITE,
sk2032net/inet/tcp.cbackoff(sk->backoff) * (2 * sk->mdev + sk->rtt));
sk2034net/inet/tcp.cif (sk->wback == NULL) {
sk2035net/inet/tcp.csk->wfront=buff;
sk2037net/inet/tcp.csk->wback->next = buff;
sk2039net/inet/tcp.csk->wback = buff;
sk2043net/inet/tcp.cif (sk->state == TCP_CLOSE_WAIT) {
sk2044net/inet/tcp.csk->state = TCP_FIN_WAIT2;
sk2046net/inet/tcp.csk->state = TCP_FIN_WAIT1;
sk2049net/inet/tcp.crelease_sock(sk);
sk2058net/inet/tcp.ctcp_write_xmit(struct sock *sk)
sk2062net/inet/tcp.cDPRINTF((DBG_TCP, "tcp_write_xmit(sk=%X)\n", sk));
sk2066net/inet/tcp.cif(sk->zapped)
sk2069net/inet/tcp.cwhile(sk->wfront != NULL &&
sk2070net/inet/tcp.cbefore(sk->wfront->h.seq, sk->window_seq) &&
sk2071net/inet/tcp.csk->packets_out < sk->cong_window) {
sk2072net/inet/tcp.cskb = sk->wfront;
sk2074net/inet/tcp.csk->wfront =(struct sk_buff *)skb->next;
sk2075net/inet/tcp.cif (sk->wfront == NULL) sk->wback = NULL;
sk2080net/inet/tcp.csk->wfront = NULL;
sk2081net/inet/tcp.csk->wback = NULL;
sk2088net/inet/tcp.cif (before(skb->h.seq, sk->rcv_ack_seq +1)) {
sk2089net/inet/tcp.csk->retransmits = 0;
sk2091net/inet/tcp.cif (!sk->dead) wake_up(sk->sleep);
sk2093net/inet/tcp.csk->prot->queue_xmit(sk, skb->dev, skb, skb->free);
sk2104net/inet/tcp.csort_send(struct sock *sk)
sk2109net/inet/tcp.cfor (skb = sk->send_head; skb != NULL; skb = skb2) {
sk2113net/inet/tcp.csk->send_tail = skb;
sk2121net/inet/tcp.cif (skb->link3 == NULL) sk->send_tail = skb;
sk2127net/inet/tcp.csk->send_head = list;
sk2133net/inet/tcp.ctcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len)
sk2138net/inet/tcp.cif(sk->zapped)
sk2144net/inet/tcp.cack, ntohs(th->window), sk->rcv_ack_seq, sk->window_seq));
sk2146net/inet/tcp.cif (after(ack, sk->send_seq+1) || before(ack, sk->rcv_ack_seq-1)) {
sk2147net/inet/tcp.cif (after(ack, sk->send_seq) ||
sk2148net/inet/tcp.c(sk->state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT)) {
sk2151net/inet/tcp.cif (sk->keepopen) {
sk2152net/inet/tcp.creset_timer(sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN);
sk2160net/inet/tcp.cif (after(sk->window_seq, ack+ntohs(th->window))) {
sk2172net/inet/tcp.cskb2 = sk->send_head;
sk2173net/inet/tcp.csk->send_head = NULL;
sk2174net/inet/tcp.csk->send_tail = NULL;
sk2178net/inet/tcp.csk->window_seq = ack + ntohs(th->window);
sk2184net/inet/tcp.cif (after(skb->h.seq, sk->window_seq)) {
sk2185net/inet/tcp.cif (sk->packets_out > 0) sk->packets_out--;
sk2216net/inet/tcp.cskb->next = sk->wfront;
sk2217net/inet/tcp.csk->wfront = skb;
sk2222net/inet/tcp.cif (sk->wback == wskb) sk->wback = skb;
sk2225net/inet/tcp.cif (sk->send_head == NULL) {
sk2226net/inet/tcp.csk->send_head = skb;
sk2227net/inet/tcp.csk->send_tail = skb;
sk2229net/inet/tcp.csk->send_tail->link3 = skb;
sk2230net/inet/tcp.csk->send_tail = skb;
sk2238net/inet/tcp.cif (sk->send_tail == NULL || sk->send_head == NULL) {
sk2239net/inet/tcp.csk->send_head = NULL;
sk2240net/inet/tcp.csk->send_tail = NULL;
sk2241net/inet/tcp.csk->packets_out= 0;
sk2244net/inet/tcp.csk->window_seq = ack + ntohs(th->window);
sk2247net/inet/tcp.cif (sk->cong_window < 2048 && ack != sk->rcv_ack_seq) {
sk2248net/inet/tcp.cif (sk->exp_growth) sk->cong_window *= 2;
sk2249net/inet/tcp.celse sk->cong_window++;
sk2253net/inet/tcp.csk->rcv_ack_seq = ack;
sk2256net/inet/tcp.cwhile(sk->send_head != NULL) {
sk2258net/inet/tcp.cif (sk->send_head->link3 &&
sk2259net/inet/tcp.cafter(sk->send_head->h.seq, sk->send_head->link3->h.seq)) {
sk2261net/inet/tcp.csort_send(sk);
sk2264net/inet/tcp.cif (before(sk->send_head->h.seq, ack+1)) {
sk2267net/inet/tcp.csk->retransmits = 0;
sk2270net/inet/tcp.cif (sk->packets_out > 0) sk->packets_out --;
sk2272net/inet/tcp.csk->send_head, sk->send_head->h.seq, ack));
sk2275net/inet/tcp.cif (!sk->dead) wake_up(sk->sleep);
sk2277net/inet/tcp.coskb = sk->send_head;
sk2280net/inet/tcp.cif (sk->retransmits == 0 && !(flag&2)) {
sk2283net/inet/tcp.cif (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV)
sk2285net/inet/tcp.csk->rtt = rtt;
sk2287net/inet/tcp.cabserr = (rtt > sk->rtt) ? rtt - sk->rtt : sk->rtt - rtt;
sk2288net/inet/tcp.csk->rtt = (7 * sk->rtt + rtt) >> 3;
sk2289net/inet/tcp.csk->mdev = (3 * sk->mdev + abserr) >> 2;
sk2291net/inet/tcp.csk->backoff = 0;
sk2296net/inet/tcp.cif (sk->rtt < 10) sk->rtt = 10;
sk2297net/inet/tcp.cif (sk->rtt > 12000) sk->rtt = 12000;
sk2301net/inet/tcp.coskb = sk->send_head;
sk2303net/inet/tcp.csk->send_head =(struct sk_buff *)oskb->link3;
sk2304net/inet/tcp.cif (sk->send_head == NULL) {
sk2305net/inet/tcp.csk->send_tail = NULL;
sk2313net/inet/tcp.cif (!sk->dead) wake_up(sk->sleep);
sk2323net/inet/tcp.cif (sk->wfront != NULL) {
sk2324net/inet/tcp.cif (after (sk->window_seq, sk->wfront->h.seq) &&
sk2325net/inet/tcp.csk->packets_out < sk->cong_window) {
sk2327net/inet/tcp.ctcp_write_xmit(sk);
sk2330net/inet/tcp.cif (sk->send_head == NULL && sk->ack_backlog == 0 &&
sk2331net/inet/tcp.csk->state != TCP_TIME_WAIT && !sk->keepopen) {
sk2333net/inet/tcp.cif (!sk->dead) wake_up(sk->sleep);
sk2335net/inet/tcp.cif (sk->keepopen)
sk2336net/inet/tcp.creset_timer(sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN);
sk2338net/inet/tcp.cdelete_timer(sk);
sk2340net/inet/tcp.cif (sk->state != (unsigned char) sk->keepopen) {
sk2341net/inet/tcp.creset_timer(sk, TIME_WRITE,
sk2342net/inet/tcp.cbackoff(sk->backoff) * (2 * sk->mdev + sk->rtt));
sk2344net/inet/tcp.cif (sk->state == TCP_TIME_WAIT) {
sk2345net/inet/tcp.creset_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
sk2350net/inet/tcp.cif (sk->packets_out == 0 && sk->send_tmp != NULL &&
sk2351net/inet/tcp.csk->wfront == NULL && sk->send_head == NULL) {
sk2353net/inet/tcp.ctcp_send_partial(sk);
sk2357net/inet/tcp.cif (sk->state == TCP_TIME_WAIT) {
sk2358net/inet/tcp.cif (!sk->dead) wake_up(sk->sleep);
sk2359net/inet/tcp.cif (sk->rcv_ack_seq == sk->send_seq && sk->acked_seq == sk->fin_seq) {
sk2361net/inet/tcp.csk->state = TCP_CLOSE;
sk2362net/inet/tcp.csk->shutdown = SHUTDOWN_MASK;
sk2366net/inet/tcp.cif (sk->state == TCP_LAST_ACK || sk->state == TCP_FIN_WAIT2) {
sk2367net/inet/tcp.cif (!sk->dead) wake_up(sk->sleep);
sk2368net/inet/tcp.cif (sk->rcv_ack_seq == sk->send_seq) {
sk2370net/inet/tcp.cif (sk->acked_seq != sk->fin_seq) {
sk2371net/inet/tcp.ctcp_time_wait(sk);
sk2373net/inet/tcp.cDPRINTF((DBG_TCP, "tcp_ack closing socket - %X\n", sk));
sk2374net/inet/tcp.ctcp_send_ack(sk->send_seq, sk->acked_seq, sk,
sk2375net/inet/tcp.cth, sk->daddr);
sk2376net/inet/tcp.csk->shutdown = SHUTDOWN_MASK;
sk2377net/inet/tcp.csk->state = TCP_CLOSE;
sk2382net/inet/tcp.cif (((!flag) || (flag&4)) && sk->send_head != NULL &&
sk2383net/inet/tcp.c(sk->send_head->when + backoff(sk->backoff) * (2 * sk->mdev + sk->rtt)
sk2385net/inet/tcp.csk->exp_growth = 0;
sk2386net/inet/tcp.cip_retransmit(sk, 0);
sk2400net/inet/tcp.ctcp_data(struct sk_buff *skb, struct sock *sk, 
sk2411net/inet/tcp.cDPRINTF((DBG_TCP, "tcp_data len = %d sk = %X:\n", skb->len, sk));
sk2413net/inet/tcp.csk->bytes_rcv += skb->len;
sk2416net/inet/tcp.cif (!th->ack) tcp_send_ack(sk->send_seq, sk->acked_seq,sk, th, saddr);
sk2421net/inet/tcp.cif (sk->shutdown & RCV_SHUTDOWN) {
sk2422net/inet/tcp.csk->acked_seq = th->seq + skb->len + th->syn + th->fin;
sk2423net/inet/tcp.ctcp_reset(sk->saddr, sk->daddr, skb->h.th,
sk2424net/inet/tcp.csk->prot, NULL, skb->dev);
sk2425net/inet/tcp.csk->state = TCP_CLOSE;
sk2426net/inet/tcp.csk->err = EPIPE;
sk2427net/inet/tcp.csk->shutdown = SHUTDOWN_MASK;
sk2428net/inet/tcp.cDPRINTF((DBG_TCP, "tcp_data: closing socket - %X\n", sk));
sk2430net/inet/tcp.cif (!sk->dead) wake_up(sk->sleep);
sk2443net/inet/tcp.cif (sk->rqueue == NULL) {
sk2446net/inet/tcp.csk->rqueue = skb;
sk2449net/inet/tcp.cskb->list = &sk->rqueue;
sk2451net/inet/tcp.cskb_queue_head(&sk->rqueue,skb);
sk2455net/inet/tcp.cDPRINTF((DBG_TCP, "tcp_data adding to chain sk = %X:\n", sk));
sk2456net/inet/tcp.cfor(skb1=sk->rqueue->prev; ; skb1 =(struct sk_buff *)skb1->prev) {
sk2457net/inet/tcp.cif(sk->debug)
sk2462net/inet/tcp.cprintk("copied_seq = %ld acked_seq = %ld\n", sk->copied_seq,
sk2463net/inet/tcp.csk->acked_seq);
sk2471net/inet/tcp.cif (skb1 == sk->rqueue) sk->rqueue = skb;
sk2474net/inet/tcp.cif (skb1->prev == sk->rqueue) {
sk2498net/inet/tcp.cif (skb1 == sk->rqueue)
sk2500net/inet/tcp.cskb_queue_head(&sk->rqueue, skb);    
sk2512net/inet/tcp.cif (before(sk->acked_seq, sk->copied_seq)) {
sk2514net/inet/tcp.csk->acked_seq = sk->copied_seq;
sk2518net/inet/tcp.cif ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) {
sk2519net/inet/tcp.cif (before(th->seq, sk->acked_seq+1)) {
sk2520net/inet/tcp.cif (after(th->ack_seq, sk->acked_seq))
sk2521net/inet/tcp.csk->acked_seq = th->ack_seq;
sk2526net/inet/tcp.cif (!sk->dead) wake_up(sk->sleep);
sk2527net/inet/tcp.csk->shutdown |= RCV_SHUTDOWN;
sk2531net/inet/tcp.cskb2 !=(struct sk_buff *) sk->rqueue;
sk2533net/inet/tcp.cif (before(skb2->h.th->seq, sk->acked_seq+1)) {
sk2534net/inet/tcp.cif (after(skb2->h.th->ack_seq, sk->acked_seq))
sk2535net/inet/tcp.csk->acked_seq = skb2->h.th->ack_seq;
sk2543net/inet/tcp.csk->shutdown |= RCV_SHUTDOWN;
sk2544net/inet/tcp.cif (!sk->dead) wake_up(sk->sleep);
sk2548net/inet/tcp.csk->ack_backlog = sk->max_ack_backlog;
sk2558net/inet/tcp.cif (!sk->delay_acks ||
sk2559net/inet/tcp.csk->ack_backlog >= sk->max_ack_backlog || 
sk2560net/inet/tcp.csk->bytes_rcv > sk->max_unacked || th->fin) {
sk2563net/inet/tcp.csk->ack_backlog++;
sk2564net/inet/tcp.cif(sk->debug)
sk2566net/inet/tcp.creset_timer(sk, TIME_WRITE, TCP_ACK_TIME);
sk2581net/inet/tcp.cwhile (sk->prot->rspace(sk) < sk->mtu) {
sk2582net/inet/tcp.cskb1 = skb_peek(&sk->rqueue);
sk2596net/inet/tcp.csk->rqueue = NULL;
sk2598net/inet/tcp.csk->rqueue = (struct sk_buff *)skb1->prev;
sk2605net/inet/tcp.ctcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr);
sk2606net/inet/tcp.csk->ack_backlog++;
sk2607net/inet/tcp.creset_timer(sk, TIME_WRITE, TCP_ACK_TIME);
sk2610net/inet/tcp.ctcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr);
sk2614net/inet/tcp.cif (!sk->dead) {
sk2615net/inet/tcp.cif(sk->debug)
sk2617net/inet/tcp.cwake_up(sk->sleep);
sk2622net/inet/tcp.cif (sk->state == TCP_FIN_WAIT2 &&
sk2623net/inet/tcp.csk->acked_seq == sk->fin_seq && sk->rcv_ack_seq == sk->send_seq) {
sk2624net/inet/tcp.cDPRINTF((DBG_TCP, "tcp_data: entering last_ack state sk = %X\n", sk));
sk2627net/inet/tcp.csk->shutdown = SHUTDOWN_MASK;
sk2628net/inet/tcp.csk->state = TCP_LAST_ACK;
sk2629net/inet/tcp.cif (!sk->dead) wake_up(sk->sleep);
sk2637net/inet/tcp.ctcp_urg(struct sock *sk, struct tcphdr *th, unsigned long saddr)
sk2642net/inet/tcp.cif (!sk->dead) wake_up(sk->sleep);
sk2644net/inet/tcp.cif (sk->urginline) {
sk2650net/inet/tcp.cif (!sk->urg) {
sk2652net/inet/tcp.cif (sk->proc != 0) {
sk2653net/inet/tcp.cif (sk->proc > 0) {
sk2654net/inet/tcp.ckill_proc(sk->proc, SIGURG, 1);
sk2656net/inet/tcp.ckill_pg(-sk->proc, SIGURG, 1);
sk2660net/inet/tcp.csk->urg++;
sk2667net/inet/tcp.ctcp_fin(struct sock *sk, struct tcphdr *th, 
sk2671net/inet/tcp.csk, th, saddr, dev));
sk2673net/inet/tcp.cif (!sk->dead) {
sk2674net/inet/tcp.cwake_up(sk->sleep);
sk2677net/inet/tcp.cswitch(sk->state) {
sk2682net/inet/tcp.csk->fin_seq = th->seq+1;
sk2683net/inet/tcp.csk->state = TCP_CLOSE_WAIT;
sk2684net/inet/tcp.cif (th->rst) sk->shutdown = SHUTDOWN_MASK;
sk2693net/inet/tcp.csk->fin_seq = th->seq+1;
sk2694net/inet/tcp.csk->state = TCP_FIN_WAIT2;
sk2699net/inet/tcp.csk->state = TCP_LAST_ACK;
sk2702net/inet/tcp.creset_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
sk2705net/inet/tcp.csk->ack_backlog++;
sk2713net/inet/tcp.ctcp_accept(struct sock *sk, int flags)
sk2719net/inet/tcp.csk, flags, in_ntoa(sk->saddr)));
sk2725net/inet/tcp.cif (sk->state != TCP_LISTEN) {
sk2726net/inet/tcp.csk->err = EINVAL;
sk2732net/inet/tcp.csk->inuse = 1;
sk2733net/inet/tcp.cwhile((skb = get_firstr(sk)) == NULL) {
sk2736net/inet/tcp.crelease_sock(sk);
sk2737net/inet/tcp.csk->err = EAGAIN;
sk2741net/inet/tcp.crelease_sock(sk);
sk2742net/inet/tcp.cinterruptible_sleep_on(sk->sleep);
sk2745net/inet/tcp.csk->err = ERESTARTSYS;
sk2748net/inet/tcp.csk->inuse = 1;
sk2753net/inet/tcp.cnewsk = skb->sk;
sk2756net/inet/tcp.csk->ack_backlog--;
sk2757net/inet/tcp.crelease_sock(sk);
sk2764net/inet/tcp.ctcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
sk2774net/inet/tcp.cif (sk->state != TCP_CLOSE) return(-EISCONN);
sk2793net/inet/tcp.csk->inuse = 1;
sk2794net/inet/tcp.csk->daddr = sin.sin_addr.s_addr;
sk2795net/inet/tcp.csk->send_seq = jiffies * SEQ_TICK - seq_offset;
sk2796net/inet/tcp.csk->rcv_ack_seq = sk->send_seq -1;
sk2797net/inet/tcp.csk->err = 0;
sk2798net/inet/tcp.csk->dummy_th.dest = sin.sin_port;
sk2799net/inet/tcp.crelease_sock(sk);
sk2801net/inet/tcp.cbuff = (struct sk_buff *) sk->prot->wmalloc(sk,MAX_SYN_SIZE,0, GFP_KERNEL);
sk2805net/inet/tcp.csk->inuse = 1;
sk2809net/inet/tcp.cbuff->sk = sk;
sk2815net/inet/tcp.ctmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev,
sk2818net/inet/tcp.csk->prot->wfree(sk, buff->mem_addr, buff->mem_len);
sk2819net/inet/tcp.crelease_sock(sk);
sk2825net/inet/tcp.cmemcpy(t1,(void *)&(sk->dummy_th), sizeof(*t1));
sk2826net/inet/tcp.ct1->seq = ntohl(sk->send_seq++);
sk2827net/inet/tcp.cbuff->h.seq = sk->send_seq;
sk2845net/inet/tcp.csk->mtu = dev->mtu - HEADER_SIZE;
sk2846net/inet/tcp.ctcp_send_check(t1, sk->saddr, sk->daddr,
sk2847net/inet/tcp.csizeof(struct tcphdr) + 4, sk);
sk2850net/inet/tcp.csk->state = TCP_SYN_SENT;
sk2851net/inet/tcp.csk->rtt = TCP_CONNECT_TIME;
sk2852net/inet/tcp.creset_timer(sk, TIME_WRITE, TCP_CONNECT_TIME);  /* Timer for repeating the SYN until an answer */
sk2853net/inet/tcp.csk->retransmits = TCP_RETR2 - TCP_SYN_RETRIES;
sk2855net/inet/tcp.csk->prot->queue_xmit(sk, dev, buff, 0);  
sk2857net/inet/tcp.crelease_sock(sk);
sk2864net/inet/tcp.ctcp_sequence(struct sock *sk, struct tcphdr *th, short len,
sk2874net/inet/tcp.csk, th, len, opt, saddr));
sk2876net/inet/tcp.cif (between(th->seq, sk->acked_seq, sk->acked_seq + sk->window)||
sk2877net/inet/tcp.cbetween(th->seq + len-(th->doff*4), sk->acked_seq + 1,
sk2878net/inet/tcp.csk->acked_seq + sk->window) ||
sk2879net/inet/tcp.c(before(th->seq, sk->acked_seq) &&
sk2880net/inet/tcp.cafter(th->seq + len -(th->doff*4), sk->acked_seq + sk->window))) {
sk2889net/inet/tcp.cif (after(th->seq, sk->acked_seq + sk->window)) {
sk2891net/inet/tcp.ctcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr);
sk2897net/inet/tcp.cafter(th->seq, sk->acked_seq - 32767) &&
sk2902net/inet/tcp.ctcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr);
sk2917net/inet/tcp.cstruct sock *sk;
sk2940net/inet/tcp.csk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr);
sk2946net/inet/tcp.cif (sk!=NULL && sk->zapped)
sk2947net/inet/tcp.csk=NULL;
sk2949net/inet/tcp.cif (sk) {
sk2950net/inet/tcp.cDPRINTF((DBG_TCP, "sk = %X:\n", sk));
sk2955net/inet/tcp.cskb->sk = NULL;
sk2967net/inet/tcp.cif (sk == NULL) {
sk2974net/inet/tcp.cskb->sk = NULL;
sk2980net/inet/tcp.cskb->sk = sk;
sk2992net/inet/tcp.cif (sk->inuse) {
sk2993net/inet/tcp.cif (sk->back_log == NULL) {
sk2994net/inet/tcp.csk->back_log = skb;
sk2998net/inet/tcp.cskb->next = sk->back_log;
sk2999net/inet/tcp.cskb->prev = sk->back_log->prev;
sk3006net/inet/tcp.csk->inuse = 1;
sk3009net/inet/tcp.cif (!sk) {
sk3015net/inet/tcp.cif (!sk->prot) {
sk3021net/inet/tcp.cif (sk->rmem_alloc + skb->mem_len >= sk->rcvbuf) {
sk3022net/inet/tcp.cskb->sk = NULL;
sk3025net/inet/tcp.crelease_sock(sk);
sk3028net/inet/tcp.csk->rmem_alloc += skb->mem_len;
sk3033net/inet/tcp.cswitch(sk->state) {
sk3040net/inet/tcp.csk->zapped=1;
sk3041net/inet/tcp.csk->err = ECONNRESET;
sk3042net/inet/tcp.csk->state = TCP_CLOSE;
sk3043net/inet/tcp.csk->shutdown = SHUTDOWN_MASK;
sk3044net/inet/tcp.cif (!sk->dead) {
sk3045net/inet/tcp.cwake_up(sk->sleep);
sk3048net/inet/tcp.crelease_sock(sk);
sk3057net/inet/tcp.cif (!tcp_sequence(sk, th, len, opt, saddr)) {
sk3060net/inet/tcp.ctcp_send_ack(sk->send_seq, sk->acked_seq, 
sk3061net/inet/tcp.csk, th, saddr);
sk3063net/inet/tcp.crelease_sock(sk);
sk3068net/inet/tcp.csk->zapped=1;
sk3070net/inet/tcp.csk->err = ECONNRESET;
sk3072net/inet/tcp.cif (sk->state == TCP_CLOSE_WAIT) {
sk3073net/inet/tcp.csk->err = EPIPE;
sk3082net/inet/tcp.csk->state = TCP_CLOSE;
sk3083net/inet/tcp.csk->shutdown = SHUTDOWN_MASK;
sk3084net/inet/tcp.cif (!sk->dead) {
sk3085net/inet/tcp.cwake_up(sk->sleep);
sk3088net/inet/tcp.crelease_sock(sk);
sk3095net/inet/tcp.csk->err = ECONNRESET;
sk3096net/inet/tcp.csk->state = TCP_CLOSE;
sk3097net/inet/tcp.csk->shutdown = SHUTDOWN_MASK;
sk3098net/inet/tcp.ctcp_reset(daddr, saddr,  th, sk->prot, opt,dev);
sk3099net/inet/tcp.cif (!sk->dead) {
sk3100net/inet/tcp.cwake_up(sk->sleep);
sk3103net/inet/tcp.crelease_sock(sk);
sk3108net/inet/tcp.cif (!tcp_ack(sk, th, saddr, len)) {
sk3110net/inet/tcp.crelease_sock(sk);
sk3115net/inet/tcp.cif (tcp_urg(sk, th, saddr)) {
sk3117net/inet/tcp.crelease_sock(sk);
sk3122net/inet/tcp.cif (th->fin && tcp_fin(sk, th, saddr, dev)) {
sk3124net/inet/tcp.crelease_sock(sk);
sk3128net/inet/tcp.cif (tcp_data(skb, sk, saddr, len)) {
sk3130net/inet/tcp.crelease_sock(sk);
sk3134net/inet/tcp.crelease_sock(sk);
sk3138net/inet/tcp.cif (sk->dead || sk->daddr) {
sk3141net/inet/tcp.crelease_sock(sk);
sk3148net/inet/tcp.ctcp_reset(daddr, saddr, th, sk->prot, opt,dev);
sk3151net/inet/tcp.crelease_sock(sk);
sk3157net/inet/tcp.crelease_sock(sk);
sk3161net/inet/tcp.ctcp_reset(daddr, saddr, th, sk->prot, opt,dev);
sk3163net/inet/tcp.crelease_sock(sk);
sk3171net/inet/tcp.crelease_sock(sk);
sk3182net/inet/tcp.ctcp_conn_request(sk, skb, daddr, saddr, opt, dev);
sk3183net/inet/tcp.crelease_sock(sk);
sk3188net/inet/tcp.crelease_sock(sk);
sk3192net/inet/tcp.cif (!tcp_sequence(sk, th, len, opt, saddr)) {
sk3194net/inet/tcp.crelease_sock(sk);
sk3200net/inet/tcp.csk->err = ECONNREFUSED;
sk3201net/inet/tcp.csk->state = TCP_CLOSE;
sk3202net/inet/tcp.csk->shutdown = SHUTDOWN_MASK;
sk3203net/inet/tcp.csk->zapped = 1;
sk3204net/inet/tcp.cif (!sk->dead) {
sk3205net/inet/tcp.cwake_up(sk->sleep);
sk3208net/inet/tcp.crelease_sock(sk);
sk3213net/inet/tcp.csk->err = ECONNRESET;
sk3214net/inet/tcp.csk->state = TCP_CLOSE;
sk3215net/inet/tcp.csk->shutdown = SHUTDOWN_MASK;
sk3216net/inet/tcp.ctcp_reset(daddr, saddr,  th, sk->prot, opt, dev);
sk3217net/inet/tcp.cif (!sk->dead) {
sk3218net/inet/tcp.cwake_up(sk->sleep);
sk3221net/inet/tcp.crelease_sock(sk);
sk3227net/inet/tcp.csk->state = TCP_SYN_RECV;
sk3231net/inet/tcp.crelease_sock(sk);
sk3235net/inet/tcp.cswitch(sk->state) {
sk3237net/inet/tcp.cif (!tcp_ack(sk, th, saddr, len)) {
sk3239net/inet/tcp.csk->prot, opt,dev);
sk3241net/inet/tcp.crelease_sock(sk);
sk3251net/inet/tcp.crelease_sock(sk);
sk3256net/inet/tcp.csk->acked_seq = th->seq+1;
sk3257net/inet/tcp.csk->fin_seq = th->seq;
sk3258net/inet/tcp.ctcp_send_ack(sk->send_seq, th->seq+1,
sk3259net/inet/tcp.csk, th, sk->daddr);
sk3262net/inet/tcp.cif (!tcp_ack(sk, th, saddr, len)) {
sk3264net/inet/tcp.csk->prot, opt, dev);
sk3266net/inet/tcp.crelease_sock(sk);
sk3269net/inet/tcp.csk->state = TCP_ESTABLISHED;
sk3276net/inet/tcp.ctcp_options(sk, th);
sk3277net/inet/tcp.csk->dummy_th.dest = th->source;
sk3278net/inet/tcp.csk->copied_seq = sk->acked_seq-1;
sk3279net/inet/tcp.cif (!sk->dead) {
sk3280net/inet/tcp.cwake_up(sk->sleep);
sk3288net/inet/tcp.cif (tcp_urg(sk, th, saddr)) { 
sk3290net/inet/tcp.crelease_sock(sk);
sk3294net/inet/tcp.cif (tcp_data(skb, sk, saddr, len))
sk3297net/inet/tcp.cif (th->fin) tcp_fin(sk, th, saddr, dev);
sk3298net/inet/tcp.crelease_sock(sk);
sk3303net/inet/tcp.cif (tcp_urg(sk, th, saddr)) {
sk3305net/inet/tcp.crelease_sock(sk);
sk3310net/inet/tcp.cif (tcp_data(skb, sk, saddr, len)) {
sk3312net/inet/tcp.crelease_sock(sk);
sk3317net/inet/tcp.crelease_sock(sk);
sk3320net/inet/tcp.ctcp_fin(sk, th, saddr, dev);
sk3321net/inet/tcp.crelease_sock(sk);
sk3332net/inet/tcp.ctcp_write_wakeup(struct sock *sk)
sk3339net/inet/tcp.cif (sk->zapped)
sk3342net/inet/tcp.cif (sk -> state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT) return;
sk3344net/inet/tcp.cbuff = (struct sk_buff *) sk->prot->wmalloc(sk,MAX_ACK_SIZE,1, GFP_ATOMIC);
sk3351net/inet/tcp.cbuff->sk = sk;
sk3356net/inet/tcp.ctmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev,
sk3357net/inet/tcp.cIPPROTO_TCP, sk->opt, MAX_ACK_SIZE);
sk3359net/inet/tcp.csk->prot->wfree(sk, buff->mem_addr, buff->mem_len);
sk3366net/inet/tcp.cmemcpy(t1,(void *) &sk->dummy_th, sizeof(*t1));
sk3372net/inet/tcp.ct1->seq = ntohl(sk->send_seq-1);
sk3381net/inet/tcp.ct1->ack_seq = ntohl(sk->acked_seq);
sk3382net/inet/tcp.ct1->window = ntohs(sk->prot->rspace(sk));
sk3384net/inet/tcp.ctcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk);
sk3389net/inet/tcp.csk->prot->queue_xmit(sk, dev, buff, 1);
sk139net/inet/tcp.hextern void  tcp_shutdown (struct sock *sk, int how);
sk145net/inet/tcp.hextern int  tcp_ioctl(struct sock *sk, int cmd, unsigned long arg);
sk92net/inet/timer.cstruct sock *sk = (struct sock*)data;
sk93net/inet/timer.cint why = sk->timeout;
sk96net/inet/timer.cif (sk->inuse || in_inet_bh()) {
sk97net/inet/timer.csk->timer.expires = 10;
sk98net/inet/timer.cadd_timer(&sk->timer);
sk101net/inet/timer.csk->inuse = 1;
sk103net/inet/timer.cDPRINTF ((DBG_TMR, "net_timer: found sk=%X why = %d\n", sk, why));
sk104net/inet/timer.cif (sk->keepopen)
sk105net/inet/timer.creset_timer (sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN);
sk108net/inet/timer.cif (sk->ack_backlog) {
sk109net/inet/timer.csk->prot->read_wakeup (sk);
sk110net/inet/timer.cif (! sk->dead)
sk111net/inet/timer.cwake_up (sk->sleep);
sk117net/inet/timer.cif (! sk->dead || sk->state != TCP_CLOSE) {
sk119net/inet/timer.crelease_sock (sk);
sk122net/inet/timer.cdestroy_sock (sk);
sk128net/inet/timer.cif(sk->wmem_alloc!=0 || sk->rmem_alloc!=0)
sk130net/inet/timer.cDPRINTF ((DBG_TMR, "possible memory leak.  sk = %X\n", sk));
sk131net/inet/timer.csk->wmem_alloc++;  /* So it DOESNT go away */
sk132net/inet/timer.cdestroy_sock (sk);
sk133net/inet/timer.csk->wmem_alloc--;  /* Might now have hit 0 - fall through and do it again if so */
sk134net/inet/timer.csk->inuse = 0;  /* This will be ok, the destroy won't totally work */
sk136net/inet/timer.cif(sk->wmem_alloc==0 && sk->rmem_alloc==0)
sk137net/inet/timer.cdestroy_sock(sk);  /* Socket gone, DONT update sk->inuse! */
sk141net/inet/timer.csk->state = TCP_CLOSE;
sk142net/inet/timer.cdelete_timer (sk);
sk144net/inet/timer.carp_destroy (sk->daddr);
sk145net/inet/timer.cif (!sk->dead)
sk146net/inet/timer.cwake_up (sk->sleep);
sk147net/inet/timer.csk->shutdown = SHUTDOWN_MASK;
sk148net/inet/timer.creset_timer (sk, TIME_DESTROY, TCP_DONE_TIME);
sk149net/inet/timer.crelease_sock (sk);
sk155net/inet/timer.cif (sk->send_head) {
sk156net/inet/timer.cif (jiffies < (sk->send_head->when + backoff (sk->backoff)
sk157net/inet/timer.c* (2 * sk->mdev + sk->rtt))) {
sk158net/inet/timer.creset_timer (sk, TIME_WRITE, (sk->send_head->when
sk159net/inet/timer.c+ backoff (sk->backoff) * (2 * sk->mdev + sk->rtt)) - jiffies);
sk160net/inet/timer.crelease_sock (sk);
sk166net/inet/timer.csk->prot->retransmit (sk, 0);
sk167net/inet/timer.cif ((sk->state == TCP_ESTABLISHED && sk->retransmits && !(sk->retransmits & 7))
sk168net/inet/timer.c|| (sk->state != TCP_ESTABLISHED && sk->retransmits > TCP_RETR1)) {
sk170net/inet/timer.carp_destroy (sk->daddr);
sk171net/inet/timer.cip_route_check (sk->daddr);
sk173net/inet/timer.cif (sk->state != TCP_ESTABLISHED && sk->retransmits > TCP_RETR2) {
sk175net/inet/timer.csk->err = ETIMEDOUT;
sk176net/inet/timer.cif (sk->state == TCP_FIN_WAIT1 || sk->state == TCP_FIN_WAIT2
sk177net/inet/timer.c|| sk->state == TCP_LAST_ACK) {
sk178net/inet/timer.csk->state = TCP_TIME_WAIT;
sk179net/inet/timer.creset_timer (sk, TIME_CLOSE, TCP_TIMEWAIT_LEN);
sk181net/inet/timer.csk->prot->close (sk, 1);
sk186net/inet/timer.crelease_sock (sk);
sk190net/inet/timer.cif (sk->prot->write_wakeup)
sk191net/inet/timer.csk->prot->write_wakeup (sk);
sk192net/inet/timer.csk->retransmits++;
sk193net/inet/timer.cif (sk->shutdown == SHUTDOWN_MASK) {
sk194net/inet/timer.csk->prot->close (sk, 1);
sk195net/inet/timer.csk->state = TCP_CLOSE;
sk198net/inet/timer.cif ((sk->state == TCP_ESTABLISHED && sk->retransmits && !(sk->retransmits & 7))
sk199net/inet/timer.c|| (sk->state != TCP_ESTABLISHED && sk->retransmits > TCP_RETR1)) {
sk201net/inet/timer.carp_destroy (sk->daddr);
sk202net/inet/timer.cip_route_check (sk->daddr);
sk203net/inet/timer.crelease_sock (sk);
sk206net/inet/timer.cif (sk->state != TCP_ESTABLISHED && sk->retransmits > TCP_RETR2) {
sk208net/inet/timer.carp_destroy (sk->daddr);
sk209net/inet/timer.csk->err = ETIMEDOUT;
sk210net/inet/timer.cif (sk->state == TCP_FIN_WAIT1 || sk->state == TCP_FIN_WAIT2) {
sk211net/inet/timer.csk->state = TCP_TIME_WAIT;
sk212net/inet/timer.cif (!sk->dead)
sk213net/inet/timer.cwake_up (sk->sleep);
sk214net/inet/timer.crelease_sock (sk);
sk216net/inet/timer.csk->prot->close (sk, 1);
sk220net/inet/timer.crelease_sock (sk);
sk223net/inet/timer.cprintk ("net timer expired - reason unknown, sk=%08X\n", (int)sk);
sk224net/inet/timer.crelease_sock (sk);
sk99net/inet/udp.cstruct sock *sk;
sk109net/inet/udp.csk = get_sock(&udp_prot, th->source, daddr, th->dest, saddr);
sk111net/inet/udp.cif (sk == NULL) 
sk116net/inet/udp.csk->err = -err;
sk117net/inet/udp.cwake_up(sk->sleep);  /* User process wakes to see error */
sk122net/inet/udp.cif (sk->cong_window > 1) 
sk123net/inet/udp.csk->cong_window = sk->cong_window/2;
sk127net/inet/udp.csk->err = icmp_err_convert[err & 0xff].errno;
sk130net/inet/udp.cif (icmp_err_convert[err & 0xff].fatal && sk->state == TCP_ESTABLISHED) {
sk131net/inet/udp.csk->err=ECONNREFUSED;
sk133net/inet/udp.cwake_up(sk->sleep);
sk204net/inet/udp.cunsigned long daddr, int len, struct sock *sk)
sk207net/inet/udp.cif (sk && sk->no_check) 
sk215net/inet/udp.cudp_send(struct sock *sk, struct sockaddr_in *sin,
sk235net/inet/udp.csize = sizeof(struct sk_buff) + sk->prot->max_header + len;
sk236net/inet/udp.cskb = (struct sk_buff *) sk->prot->wmalloc(sk, size, 0, GFP_KERNEL);
sk241net/inet/udp.cskb->sk       = NULL;  /* to avoid changing sk->saddr */
sk251net/inet/udp.ctmp = sk->prot->build_header(skb, saddr, sin->sin_addr.s_addr,
sk252net/inet/udp.c&dev, IPPROTO_UDP, sk->opt, skb->mem_len);
sk253net/inet/udp.cskb->sk=sk;  /* So memory is freed correctly */
sk256net/inet/udp.csk->prot->wfree(sk, skb->mem_addr, skb->mem_len);
sk277net/inet/udp.csk->prot->wfree(sk, skb->mem_addr, skb->mem_len);
sk284net/inet/udp.cuh->source = sk->dummy_th.source;
sk292net/inet/udp.cudp_send_check(uh, saddr, sin->sin_addr.s_addr, skb->len - tmp, sk);
sk295net/inet/udp.csk->prot->queue_xmit(sk, dev, skb, 1);
sk302net/inet/udp.cudp_sendto(struct sock *sk, unsigned char *from, int len, int noblock,
sk331net/inet/udp.cif (sk->state != TCP_ESTABLISHED) return(-EINVAL);
sk333net/inet/udp.csin.sin_port = sk->dummy_th.dest;
sk334net/inet/udp.csin.sin_addr.s_addr = sk->daddr;
sk337net/inet/udp.cif(!sk->broadcast && chk_addr(sin.sin_addr.s_addr)==IS_BROADCAST)
sk339net/inet/udp.csk->inuse = 1;
sk342net/inet/udp.ctmp = udp_send(sk, &sin, from, len);
sk345net/inet/udp.crelease_sock(sk);
sk351net/inet/udp.cudp_write(struct sock *sk, unsigned char *buff, int len, int noblock,
sk354net/inet/udp.creturn(udp_sendto(sk, buff, len, noblock, flags, NULL, 0));
sk359net/inet/udp.cudp_ioctl(struct sock *sk, int cmd, unsigned long arg)
sk388net/inet/udp.cif (sk->state == TCP_LISTEN) return(-EINVAL);
sk389net/inet/udp.camount = sk->prot->wspace(sk)/*/2*/;
sk403net/inet/udp.cif (sk->state == TCP_LISTEN) return(-EINVAL);
sk405net/inet/udp.cskb = sk->rqueue;
sk434net/inet/udp.cudp_recvfrom(struct sock *sk, unsigned char *to, int len,
sk447net/inet/udp.cif (sk->err) {
sk450net/inet/udp.cerr = -sk->err;
sk451net/inet/udp.csk->err = 0;
sk475net/inet/udp.cskb=skb_recv_datagram(sk,flags,noblock,&er);
sk494net/inet/udp.crelease_sock(sk);
sk500net/inet/udp.cudp_read(struct sock *sk, unsigned char *buff, int len, int noblock,
sk503net/inet/udp.creturn(udp_recvfrom(sk, buff, len, noblock, flags, NULL, NULL));
sk508net/inet/udp.cudp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len)
sk524net/inet/udp.cif(!sk->broadcast && chk_addr(sin.sin_addr.s_addr)==IS_BROADCAST)
sk527net/inet/udp.csk->daddr = sin.sin_addr.s_addr;
sk528net/inet/udp.csk->dummy_th.dest = sin.sin_port;
sk529net/inet/udp.csk->state = TCP_ESTABLISHED;
sk535net/inet/udp.cudp_close(struct sock *sk, int timeout)
sk537net/inet/udp.csk->inuse = 1;
sk538net/inet/udp.csk->state = TCP_CLOSE;
sk539net/inet/udp.cif (sk->dead) destroy_sock(sk);
sk540net/inet/udp.celse release_sock(sk);
sk550net/inet/udp.cstruct sock *sk;
sk554net/inet/udp.csk = get_sock(&udp_prot, uh->dest, saddr, uh->source, daddr);
sk555net/inet/udp.cif (sk == NULL) 
sk566net/inet/udp.cskb->sk = NULL;
sk573net/inet/udp.cskb->sk = NULL;
sk578net/inet/udp.cskb->sk = sk;
sk588net/inet/udp.cif (sk->rmem_alloc + skb->mem_len >= sk->rcvbuf) 
sk590net/inet/udp.cskb->sk = NULL;
sk592net/inet/udp.crelease_sock(sk);
sk595net/inet/udp.csk->rmem_alloc += skb->mem_len;
sk603net/inet/udp.cskb_queue_tail(&sk->rqueue,skb);
sk607net/inet/udp.cif (!sk->dead) wake_up(sk->sleep);
sk609net/inet/udp.crelease_sock(sk);
sk36net/inet/udp.hextern int  udp_recvfrom(struct sock *sk, unsigned char *to,
sk39net/inet/udp.hextern int  udp_read(struct sock *sk, unsigned char *buff,
sk41net/inet/udp.hextern int  udp_connect(struct sock *sk,
sk47net/inet/udp.hextern int  udp_ioctl(struct sock *sk, int cmd, unsigned long arg);