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);
sk227net/inet/arp.cskb->sk = NULL;
sk320net/inet/arp.cskb->sk = NULL;
sk589net/inet/arp.cskb->sk = NULL;
sk48net/inet/datagram.cstruct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, int *err)
sk54net/inet/datagram.csk->inuse = 1;
sk55net/inet/datagram.cwhile(sk->rqueue == NULL)   /* No data */
sk58net/inet/datagram.cif (sk->shutdown & RCV_SHUTDOWN) 
sk60net/inet/datagram.crelease_sock(sk);
sk65net/inet/datagram.cif(sk->err)
sk67net/inet/datagram.crelease_sock(sk);
sk68net/inet/datagram.c*err=-sk->err;
sk69net/inet/datagram.csk->err=0;
sk74net/inet/datagram.cif(sk->type==SOCK_SEQPACKET && sk->state!=TCP_ESTABLISHED)
sk76net/inet/datagram.crelease_sock(sk);
sk84net/inet/datagram.crelease_sock(sk);
sk88net/inet/datagram.crelease_sock(sk);
sk93net/inet/datagram.cif (sk->rqueue == NULL) 
sk95net/inet/datagram.cinterruptible_sleep_on(sk->sleep);
sk103net/inet/datagram.cif(sk->err != 0)  /* Error while waiting for packet
sk107net/inet/datagram.c*err = -sk->err;
sk109net/inet/datagram.csk->err=0;
sk113net/inet/datagram.csk->inuse = 1;
sk120net/inet/datagram.cskb=skb_dequeue(&sk->rqueue);
sk129net/inet/datagram.cskb=skb_peek(&sk->rqueue);
sk169net/inet/datagram.cint datagram_select(struct sock *sk, int sel_type, select_table *wait)
sk171net/inet/datagram.cselect_wait(sk->sleep, wait);
sk175net/inet/datagram.cif (sk->type==SOCK_SEQPACKET && sk->state==TCP_CLOSE)
sk180net/inet/datagram.cif (sk->rqueue != NULL || sk->err != 0) 
sk188net/inet/datagram.cif (sk->prot->wspace(sk) >= MIN_WRITE_SPACE) 
sk195net/inet/datagram.cif (sk->err)
sk474net/inet/dev.cskb->sk = NULL;
sk665net/inet/dev.cskb->sk = NULL;
sk100net/inet/icmp.cskb->sk = NULL;
sk113net/inet/icmp.cskb->sk = NULL;
sk197net/inet/icmp.cskb->sk = NULL;
sk229net/inet/icmp.cskb->sk = NULL;
sk247net/inet/icmp.cskb->sk = NULL;
sk251net/inet/icmp.cskb2->sk = NULL;
sk262net/inet/icmp.cskb->sk = NULL;
sk281net/inet/icmp.cskb->sk = NULL;
sk293net/inet/icmp.cskb->sk = NULL;
sk311net/inet/icmp.cskb->sk = NULL;
sk315net/inet/icmp.cskb2->sk = NULL;
sk326net/inet/icmp.cskb->sk = NULL;
sk348net/inet/icmp.cskb->sk = NULL;
sk366net/inet/icmp.cskb1->sk = NULL;
sk378net/inet/icmp.cskb1->sk = NULL;
sk398net/inet/icmp.cskb1->sk = NULL;
sk405net/inet/icmp.cskb1->sk = NULL;
sk412net/inet/icmp.cskb1->sk = NULL;
sk419net/inet/icmp.cskb1->sk = NULL;
sk424net/inet/icmp.cskb1->sk = NULL;
sk432net/inet/icmp.cicmp_ioctl(struct sock *sk, int cmd, unsigned long arg)
sk33net/inet/icmp.hextern int  icmp_ioctl(struct sock *sk, int cmd,
sk70net/inet/ip.cextern void sort_send(struct sock *sk);
sk117net/inet/ip.cip_ioctl(struct sock *sk, int cmd, unsigned long arg)
sk248net/inet/ip.cif (skb->sk) skb->sk->saddr = saddr;
sk955net/inet/ip.cvoid ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int is_frag)
sk1026net/inet/ip.cif (sk) 
sk1027net/inet/ip.csk->wmem_alloc += skb2->mem_len;
sk1049net/inet/ip.cip_queue_xmit(sk, dev, skb2, 1);
sk1154net/inet/ip.cskb2->sk = NULL;
sk1202net/inet/ip.cskb->sk = NULL;
sk1228net/inet/ip.cskb->sk = NULL;
sk1251net/inet/ip.cskb->sk = NULL;
sk1263net/inet/ip.cskb->sk=NULL;
sk1322net/inet/ip.cskb->sk = NULL;
sk1338net/inet/ip.cip_queue_xmit(struct sock *sk, struct device *dev, 
sk1344net/inet/ip.cif (sk == NULL) free = 1;
sk1363net/inet/ip.cip_fragment(sk,skb,dev,0);
sk1377net/inet/ip.csk->packets_out++;
sk1379net/inet/ip.cif (sk->send_head == NULL) {
sk1380net/inet/ip.csk->send_tail = skb;
sk1381net/inet/ip.csk->send_head = skb;
sk1384net/inet/ip.cif (sk->send_tail == NULL) {
sk1386net/inet/ip.csort_send(sk);
sk1388net/inet/ip.csk->send_tail->link3 = skb;
sk1389net/inet/ip.csk->send_tail = skb;
sk1393net/inet/ip.creset_timer(sk, TIME_WRITE,
sk1394net/inet/ip.cbackoff(sk->backoff) * (2 * sk->mdev + sk->rtt));
sk1396net/inet/ip.cskb->sk = sk;
sk1401net/inet/ip.cif (sk != NULL) {
sk1402net/inet/ip.cdev->queue_xmit(skb, dev, sk->priority);
sk1414net/inet/ip.cip_retransmit(struct sock *sk, int all)
sk1420net/inet/ip.cprot = sk->prot;
sk1421net/inet/ip.cskb = sk->send_head;
sk1455net/inet/ip.cif (sk) dev->queue_xmit(skb, dev, sk->priority);
sk1459net/inet/ip.coops:  sk->retransmits++;
sk1460net/inet/ip.csk->prot->retransmits ++;
sk1464net/inet/ip.cif (sk->retransmits > sk->cong_window) break;
sk1474net/inet/ip.csk->backoff++;
sk1475net/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));
sk63net/inet/raw.cstruct sock *sk;
sk69net/inet/raw.csk = (struct sock *) protocol->data;
sk70net/inet/raw.cif (sk == NULL) return;
sk74net/inet/raw.cif (sk->cong_window > 1) sk->cong_window = sk->cong_window/2;
sk78net/inet/raw.csk->err = icmp_err_convert[err & 0xff].errno;
sk79net/inet/raw.cwake_up(sk->sleep);
sk94net/inet/raw.cstruct sock *sk;
sk105net/inet/raw.csk = (struct sock *) protocol->data;
sk106net/inet/raw.cif (sk == NULL) {
sk112net/inet/raw.cskb->sk = sk;
sk119net/inet/raw.cif (sk->rmem_alloc + skb->mem_len >= sk->rcvbuf) {
sk120net/inet/raw.cskb->sk = NULL;
sk124net/inet/raw.csk->rmem_alloc += skb->mem_len;
sk125net/inet/raw.cskb_queue_tail(&sk->rqueue,skb);
sk126net/inet/raw.cwake_up(sk->sleep);
sk127net/inet/raw.crelease_sock(sk);
sk134net/inet/raw.craw_sendto(struct sock *sk, unsigned char *from, int len,
sk145net/inet/raw.c"            usin=%X, addr_len = %d)\n", sk, from, len, noblock,
sk164net/inet/raw.cif (sk->state != TCP_ESTABLISHED) return(-EINVAL);
sk166net/inet/raw.csin.sin_port = sk->protocol;
sk167net/inet/raw.csin.sin_addr.s_addr = sk->daddr;
sk169net/inet/raw.cif (sin.sin_port == 0) sin.sin_port = sk->protocol;
sk171net/inet/raw.cif (sk->broadcast == 0 && chk_addr(sin.sin_addr.s_addr)==IS_BROADCAST)
sk174net/inet/raw.csk->inuse = 1;
sk177net/inet/raw.cif(sk->err!=0)
sk179net/inet/raw.cerr= -sk->err;
sk180net/inet/raw.csk->err=0;
sk181net/inet/raw.crelease_sock(sk);
sk185net/inet/raw.cskb = (struct sk_buff *) sk->prot->wmalloc(sk,
sk186net/inet/raw.clen+sizeof(*skb) + sk->prot->max_header,
sk194net/inet/raw.ctmp = sk->wmem_alloc;
sk195net/inet/raw.crelease_sock(sk);
sk197net/inet/raw.cif (tmp <= sk->wmem_alloc) {
sk198net/inet/raw.cinterruptible_sleep_on(sk->sleep);
sk204net/inet/raw.csk->inuse = 1;
sk209net/inet/raw.cskb->mem_len = len + sizeof(*skb) +sk->prot->max_header;
sk210net/inet/raw.cskb->sk = sk;
sk215net/inet/raw.ctmp = sk->prot->build_header(skb, sk->saddr, 
sk217net/inet/raw.csk->protocol, sk->opt, skb->mem_len);
sk221net/inet/raw.crelease_sock(sk);
sk231net/inet/raw.cif(sk->protocol==IPPROTO_RAW) {
sk238net/inet/raw.ciph->saddr = sk->saddr;
sk246net/inet/raw.crelease_sock(sk);
sk250net/inet/raw.csk->prot->queue_xmit(sk, dev, skb, 1);
sk251net/inet/raw.crelease_sock(sk);
sk257net/inet/raw.craw_write(struct sock *sk, unsigned char *buff, int len, int noblock,
sk260net/inet/raw.creturn(raw_sendto(sk, buff, len, noblock, flags, NULL, 0));
sk265net/inet/raw.craw_close(struct sock *sk, int timeout)
sk267net/inet/raw.csk->inuse = 1;
sk268net/inet/raw.csk->state = TCP_CLOSE;
sk271net/inet/raw.c((struct inet_protocol *)sk->pair)->protocol));
sk273net/inet/raw.cif (inet_del_protocol((struct inet_protocol *)sk->pair) < 0)
sk275net/inet/raw.ckfree_s((void *)sk->pair, sizeof (struct inet_protocol));
sk276net/inet/raw.csk->pair = NULL;
sk277net/inet/raw.crelease_sock(sk);
sk282net/inet/raw.craw_init(struct sock *sk)
sk290net/inet/raw.cp->protocol = sk->protocol;
sk291net/inet/raw.cp->data = (void *)sk;
sk298net/inet/raw.csk->pair = (struct sock *)p;
sk300net/inet/raw.cDPRINTF((DBG_RAW, "raw init added protocol %d\n", sk->protocol));
sk311net/inet/raw.craw_recvfrom(struct sock *sk, unsigned char *to, int len,
sk321net/inet/raw.csk, to, len, noblock, flags, sin, addr_len));
sk326net/inet/raw.cif (sk->shutdown & RCV_SHUTDOWN) return(0);
sk337net/inet/raw.cskb=skb_recv_datagram(sk,flags,noblock,&err);
sk356net/inet/raw.crelease_sock(sk);
sk362net/inet/raw.craw_read (struct sock *sk, unsigned char *buff, int len, int noblock,
sk365net/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,
sk345net/inet/skbuff.cnewsk->sk=NULL;
sk363net/inet/skbuff.cnewsk->sk=NULL;
sk389net/inet/skbuff.cif (skb->sk) 
sk391net/inet/skbuff.cif(skb->sk->prot!=NULL)
sk394net/inet/skbuff.cskb->sk->prot->rfree(skb->sk, skb->mem_addr, skb->mem_len);
sk396net/inet/skbuff.cskb->sk->prot->wfree(skb->sk, skb->mem_addr, skb->mem_len);
sk403net/inet/skbuff.cskb->sk->rmem_alloc-=skb->mem_len;
sk405net/inet/skbuff.cskb->sk->wmem_alloc-=skb->mem_len;
sk406net/inet/skbuff.cif(!skb->sk->dead)
sk407net/inet/skbuff.cwake_up(skb->sk->sleep);
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);
sk103net/inet/sock.cprint_sk(struct sock *sk)
sk105net/inet/sock.cif (!sk) {
sk109net/inet/sock.cprintk("  wmem_alloc = %lu\n", sk->wmem_alloc);
sk110net/inet/sock.cprintk("  rmem_alloc = %lu\n", sk->rmem_alloc);
sk111net/inet/sock.cprintk("  send_head = %p\n", sk->send_head);
sk112net/inet/sock.cprintk("  state = %d\n",sk->state);
sk113net/inet/sock.cprintk("  wback = %p, rqueue = %p\n", sk->wback, sk->rqueue);
sk114net/inet/sock.cprintk("  wfront = %p\n", sk->wfront);
sk115net/inet/sock.cprintk("  daddr = %lX, saddr = %lX\n", sk->daddr,sk->saddr);
sk116net/inet/sock.cprintk("  num = %d", sk->num);
sk117net/inet/sock.cprintk(" next = %p\n", sk->next);
sk119net/inet/sock.csk->send_seq, sk->acked_seq, sk->copied_seq);
sk121net/inet/sock.csk->rcv_ack_seq, sk->window_seq, sk->fin_seq);
sk122net/inet/sock.cprintk("  prot = %p\n", sk->prot);
sk123net/inet/sock.cprintk("  pair = %p, back_log = %p\n", sk->pair,sk->back_log);
sk124net/inet/sock.cprintk("  inuse = %d , blog = %d\n", sk->inuse, sk->blog);
sk125net/inet/sock.cprintk("  dead = %d delay_acks=%d\n", sk->dead, sk->delay_acks);
sk126net/inet/sock.cprintk("  retransmits = %ld, timeout = %d\n", sk->retransmits, sk->timeout);
sk127net/inet/sock.cprintk("  cong_window = %d, packets_out = %d\n", sk->cong_window,
sk128net/inet/sock.csk->packets_out);
sk129net/inet/sock.cprintk("  urg = %d shutdown=%d\n", sk->urg, sk->shutdown);
sk141net/inet/sock.cprintk("  sk = %p link3 = %p\n", skb->sk, skb->link3);
sk151net/inet/sock.cstruct sock *sk;
sk153net/inet/sock.cfor(sk = prot->sock_array[num & (SOCK_ARRAY_SIZE -1 )];
sk154net/inet/sock.csk != NULL;
sk155net/inet/sock.csk=sk->next) {
sk156net/inet/sock.cif (sk->num == num) return(1);
sk174net/inet/sock.cstruct sock *sk;
sk184net/inet/sock.csk = prot->sock_array[(i+base+1) &(SOCK_ARRAY_SIZE -1)];
sk185net/inet/sock.cwhile(sk != NULL) {
sk186net/inet/sock.csk = sk->next;
sk212net/inet/sock.cput_sock(unsigned short num, struct sock *sk)
sk218net/inet/sock.cDPRINTF((DBG_INET, "put_sock(num = %d, sk = %X\n", num, sk));
sk219net/inet/sock.csk->num = num;
sk220net/inet/sock.csk->next = NULL;
sk225net/inet/sock.cif (sk->prot->sock_array[num] == NULL) {
sk226net/inet/sock.csk->prot->sock_array[num] = sk;
sk232net/inet/sock.cif ((mask & sk->saddr) &&
sk233net/inet/sock.c(mask & sk->saddr) != (mask & 0xffffffff)) {
sk241net/inet/sock.csk1 = sk->prot->sock_array[num];
sk245net/inet/sock.csk->next = sk->prot->sock_array[num];
sk246net/inet/sock.csk->prot->sock_array[num] = sk;
sk250net/inet/sock.csk->next = sk2;
sk251net/inet/sock.csk1->next= sk;
sk259net/inet/sock.csk->next = NULL;
sk260net/inet/sock.csk1->next = sk;
sk306net/inet/sock.cdestroy_sock(struct sock *sk)
sk310net/inet/sock.cDPRINTF((DBG_INET, "destroying socket %X\n", sk));
sk311net/inet/sock.csk->inuse = 1;      /* just to be safe. */
sk314net/inet/sock.cif (!sk->dead) 
sk315net/inet/sock.cwake_up(sk->sleep);
sk317net/inet/sock.cremove_sock(sk);
sk320net/inet/sock.cdelete_timer(sk);
sk323net/inet/sock.cif (sk->send_tmp != NULL) 
sk325net/inet/sock.cIS_SKB(sk->send_tmp);
sk326net/inet/sock.ckfree_skb(sk->send_tmp, FREE_WRITE);
sk330net/inet/sock.cfor(skb = sk->wfront; skb != NULL; ) 
sk345net/inet/sock.csk->wfront = NULL;
sk346net/inet/sock.csk->wback = NULL;
sk348net/inet/sock.cif (sk->rqueue != NULL) 
sk350net/inet/sock.cwhile((skb=skb_dequeue(&sk->rqueue))!=NULL)
sk356net/inet/sock.cif (skb->sk != NULL && skb->sk != sk) 
sk359net/inet/sock.cskb->sk->dead = 1;
sk360net/inet/sock.cskb->sk->prot->close(skb->sk, 0);
sk366net/inet/sock.csk->rqueue = NULL;
sk369net/inet/sock.cfor(skb = sk->send_head; skb != NULL; ) 
sk392net/inet/sock.csk->send_head = NULL;
sk395net/inet/sock.cif (sk->back_log != NULL) 
sk400net/inet/sock.cskb = (struct sk_buff *)sk->back_log;
sk409net/inet/sock.cwhile(skb != sk->back_log);
sk412net/inet/sock.csk->back_log = NULL;
sk415net/inet/sock.cif (sk->pair) 
sk417net/inet/sock.csk->pair->dead = 1;
sk418net/inet/sock.csk->pair->prot->close(sk->pair, 0);
sk419net/inet/sock.csk->pair = NULL;
sk427net/inet/sock.cif (sk->rmem_alloc == 0 && sk->wmem_alloc == 0) 
sk429net/inet/sock.ckfree_s((void *)sk,sizeof(*sk));
sk435net/inet/sock.cDPRINTF((DBG_INET, "possible memory leak in socket = %X\n", sk));
sk436net/inet/sock.csk->destroy = 1;
sk437net/inet/sock.csk->ack_backlog = 0;
sk438net/inet/sock.csk->inuse = 0;
sk439net/inet/sock.creset_timer(sk, TIME_DESTROY, SOCK_DESTROY_TIME);
sk448net/inet/sock.cstruct sock *sk;
sk450net/inet/sock.csk = (struct sock *) sock->data;
sk451net/inet/sock.cif (sk == NULL) {
sk465net/inet/sock.csk->proc = arg;
sk468net/inet/sock.creturn(sk->proc);
sk479net/inet/sock.cstruct sock *sk;
sk487net/inet/sock.csk = (struct sock *) sock->data;
sk488net/inet/sock.cif (sk == NULL) {
sk505net/inet/sock.csk->debug=val?1:0;
sk509net/inet/sock.csk->broadcast=val?1:0;
sk516net/inet/sock.csk->sndbuf=val;
sk524net/inet/sock.csk->linger=0;
sk527net/inet/sock.csk->lingertime=ling.l_linger;
sk528net/inet/sock.csk->linger=1;
sk536net/inet/sock.csk->rcvbuf=val;
sk540net/inet/sock.cif (val) sk->reuse = 1;
sk541net/inet/sock.celse sk->reuse = 0;
sk545net/inet/sock.cif (val) sk->keepopen = 1;
sk546net/inet/sock.celse sk->keepopen = 0;
sk550net/inet/sock.cif (val) sk->urginline = 1;
sk551net/inet/sock.celse sk->urginline = 0;
sk555net/inet/sock.cif (val) sk->no_check = 1;
sk556net/inet/sock.celse sk->no_check = 0;
sk561net/inet/sock.csk->priority = val;
sk577net/inet/sock.cstruct sock *sk;
sk585net/inet/sock.csk = (struct sock *) sock->data;
sk586net/inet/sock.cif (sk == NULL) {
sk593net/inet/sock.cval = sk->debug;
sk601net/inet/sock.cval= sk->broadcast;
sk613net/inet/sock.cling.l_onoff=sk->linger;
sk614net/inet/sock.cling.l_linger=sk->lingertime;
sk619net/inet/sock.cval=sk->sndbuf;
sk623net/inet/sock.cval =sk->rcvbuf;
sk627net/inet/sock.cval = sk->reuse;
sk631net/inet/sock.cval = sk->keepopen;
sk635net/inet/sock.cif (sk->prot == &tcp_prot) val = SOCK_STREAM;
sk640net/inet/sock.cval = sk->err;
sk641net/inet/sock.csk->err = 0;
sk645net/inet/sock.cval = sk->urginline;
sk649net/inet/sock.cval = sk->no_check;
sk653net/inet/sock.cval = sk->priority;
sk676net/inet/sock.cstruct sock *sk;
sk678net/inet/sock.csk = (struct sock *) sock->data;
sk679net/inet/sock.cif (sk == NULL) {
sk685net/inet/sock.cif (sk->num == 0) {
sk686net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk687net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk688net/inet/sock.cput_sock(sk->num, sk);
sk689net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk693net/inet/sock.csk->max_ack_backlog = backlog;
sk694net/inet/sock.cif (sk->state != TCP_LISTEN) {
sk695net/inet/sock.csk->ack_backlog = 0;
sk696net/inet/sock.csk->state = TCP_LISTEN;
sk705net/inet/sock.cstruct sock *sk;
sk709net/inet/sock.csk = (struct sock *) kmalloc(sizeof(*sk), GFP_KERNEL);
sk710net/inet/sock.cif (sk == NULL) 
sk712net/inet/sock.csk->num = 0;
sk713net/inet/sock.csk->reuse = 0;
sk718net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk722net/inet/sock.csk->no_check = TCP_NO_CHECK;
sk728net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk732net/inet/sock.csk->no_check = UDP_NO_CHECK;
sk738net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk742net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk746net/inet/sock.csk->reuse = 1;
sk747net/inet/sock.csk->no_check = 0;  /*
sk751net/inet/sock.csk->num = protocol;
sk756net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk760net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk764net/inet/sock.csk->reuse = 1;
sk765net/inet/sock.csk->no_check = 0;  /* Doesn't matter no checksum is
sk768net/inet/sock.csk->num = protocol;
sk772net/inet/sock.ckfree_s((void *)sk, sizeof(*sk));
sk775net/inet/sock.csk->socket = sock;
sk776net/inet/sock.csk->protocol = protocol;
sk777net/inet/sock.csk->wmem_alloc = 0;
sk778net/inet/sock.csk->rmem_alloc = 0;
sk779net/inet/sock.csk->sndbuf = SK_WMEM_MAX;
sk780net/inet/sock.csk->rcvbuf = SK_RMEM_MAX;
sk781net/inet/sock.csk->pair = NULL;
sk782net/inet/sock.csk->opt = NULL;
sk783net/inet/sock.csk->send_seq = 0;
sk784net/inet/sock.csk->acked_seq = 0;
sk785net/inet/sock.csk->copied_seq = 0;
sk786net/inet/sock.csk->fin_seq = 0;
sk787net/inet/sock.csk->proc = 0;
sk788net/inet/sock.csk->rtt = TCP_WRITE_TIME;
sk789net/inet/sock.csk->mdev = 0;
sk790net/inet/sock.csk->backoff = 0;
sk791net/inet/sock.csk->packets_out = 0;
sk792net/inet/sock.csk->cong_window = 1; /* start with only sending one packet at a time. */
sk793net/inet/sock.csk->exp_growth = 1;  /* if set cong_window grow exponentially every time
sk795net/inet/sock.csk->urginline = 0;
sk796net/inet/sock.csk->intr = 0;
sk797net/inet/sock.csk->linger = 0;
sk798net/inet/sock.csk->destroy = 0;
sk800net/inet/sock.csk->priority = 1;
sk801net/inet/sock.csk->shutdown = 0;
sk802net/inet/sock.csk->urg = 0;
sk803net/inet/sock.csk->keepopen = 0;
sk804net/inet/sock.csk->zapped = 0;
sk805net/inet/sock.csk->done = 0;
sk806net/inet/sock.csk->ack_backlog = 0;
sk807net/inet/sock.csk->window = 0;
sk808net/inet/sock.csk->bytes_rcv = 0;
sk809net/inet/sock.csk->state = TCP_CLOSE;
sk810net/inet/sock.csk->dead = 0;
sk811net/inet/sock.csk->ack_timed = 0;
sk812net/inet/sock.csk->send_tmp = NULL;
sk813net/inet/sock.csk->mss = 0; /* we will try not to send any packets smaller than this. */
sk814net/inet/sock.csk->debug = 0;
sk817net/inet/sock.csk->max_unacked = 2048; /* needs to be at most 2 full packets. */
sk821net/inet/sock.csk->max_ack_backlog = 0;
sk822net/inet/sock.csk->inuse = 0;
sk823net/inet/sock.csk->delay_acks = 0;
sk824net/inet/sock.csk->wback = NULL;
sk825net/inet/sock.csk->wfront = NULL;
sk826net/inet/sock.csk->rqueue = NULL;
sk827net/inet/sock.csk->mtu = 576;
sk828net/inet/sock.csk->prot = prot;
sk829net/inet/sock.csk->sleep = sock->wait;
sk830net/inet/sock.csk->daddr = 0;
sk831net/inet/sock.csk->saddr = my_addr();
sk832net/inet/sock.csk->err = 0;
sk833net/inet/sock.csk->next = NULL;
sk834net/inet/sock.csk->pair = NULL;
sk835net/inet/sock.csk->send_tail = NULL;
sk836net/inet/sock.csk->send_head = NULL;
sk837net/inet/sock.csk->timeout = 0;
sk838net/inet/sock.csk->broadcast = 0;
sk839net/inet/sock.csk->timer.data = (unsigned long)sk;
sk840net/inet/sock.csk->timer.function = &net_timer;
sk841net/inet/sock.csk->back_log = NULL;
sk842net/inet/sock.csk->blog = 0;
sk843net/inet/sock.csock->data =(void *) sk;
sk844net/inet/sock.csk->dummy_th.doff = sizeof(sk->dummy_th)/4;
sk845net/inet/sock.csk->dummy_th.res1=0;
sk846net/inet/sock.csk->dummy_th.res2=0;
sk847net/inet/sock.csk->dummy_th.urg_ptr = 0;
sk848net/inet/sock.csk->dummy_th.fin = 0;
sk849net/inet/sock.csk->dummy_th.syn = 0;
sk850net/inet/sock.csk->dummy_th.rst = 0;
sk851net/inet/sock.csk->dummy_th.psh = 0;
sk852net/inet/sock.csk->dummy_th.ack = 0;
sk853net/inet/sock.csk->dummy_th.urg = 0;
sk854net/inet/sock.csk->dummy_th.dest = 0;
sk856net/inet/sock.cif (sk->num) {
sk863net/inet/sock.cput_sock(sk->num, sk);
sk864net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk867net/inet/sock.cif (sk->prot->init) {
sk868net/inet/sock.cerr = sk->prot->init(sk);
sk870net/inet/sock.cdestroy_sock(sk);
sk890net/inet/sock.cstruct sock *sk;
sk892net/inet/sock.csk = (struct sock *) sock->data;
sk893net/inet/sock.cif (sk == NULL) return(0);
sk896net/inet/sock.cwake_up(sk->sleep);
sk904net/inet/sock.cif (sk->linger == 0) {
sk905net/inet/sock.csk->prot->close(sk,0);
sk906net/inet/sock.csk->dead = 1;
sk909net/inet/sock.csk->prot->close(sk, 0);
sk911net/inet/sock.cif (sk->lingertime)
sk912net/inet/sock.ccurrent->timeout = jiffies + HZ*sk->lingertime;
sk913net/inet/sock.cwhile(sk->state != TCP_CLOSE && current->timeout>0) {
sk914net/inet/sock.cinterruptible_sleep_on(sk->sleep);
sk923net/inet/sock.csk->dead = 1;
sk925net/inet/sock.csk->inuse = 1;
sk928net/inet/sock.crelease_sock(sk);
sk944net/inet/sock.cstruct sock *sk, *sk2;
sk948net/inet/sock.csk = (struct sock *) sock->data;
sk949net/inet/sock.cif (sk == NULL) {
sk955net/inet/sock.cif (sk->state != TCP_CLOSE) return(-EIO);
sk956net/inet/sock.cif (sk->num != 0) return(-EINVAL);
sk964net/inet/sock.cDPRINTF((DBG_INET, "bind sk =%X to port = %d\n", sk, snum));
sk965net/inet/sock.csk = (struct sock *) sock->data;
sk973net/inet/sock.csnum = get_new_socknum(sk->prot, 0);
sk981net/inet/sock.csk->saddr = addr.sin_addr.s_addr;
sk984net/inet/sock.csk->prot->sock_array[snum &(SOCK_ARRAY_SIZE -1)]));
sk989net/inet/sock.cfor(sk2 = sk->prot->sock_array[snum & (SOCK_ARRAY_SIZE -1)];
sk999net/inet/sock.cif (!sk->reuse) {
sk1004net/inet/sock.cif (sk2->saddr != sk->saddr) continue;  /* socket per slot ! -FB */
sk1012net/inet/sock.cremove_sock(sk);
sk1013net/inet/sock.cput_sock(snum, sk);
sk1014net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1015net/inet/sock.csk->daddr = 0;
sk1016net/inet/sock.csk->dummy_th.dest = 0;
sk1025net/inet/sock.cstruct sock *sk;
sk1029net/inet/sock.csk = (struct sock *) sock->data;
sk1030net/inet/sock.cif (sk == NULL) {
sk1035net/inet/sock.cif (sock->state == SS_CONNECTING && sk->state == TCP_ESTABLISHED)
sk1042net/inet/sock.cif (sock->state == SS_CONNECTING && sk->protocol == IPPROTO_TCP &&
sk1048net/inet/sock.cif (sk->num == 0) {
sk1049net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1050net/inet/sock.cif (sk->num == 0) 
sk1052net/inet/sock.cput_sock(sk->num, sk);
sk1053net/inet/sock.csk->dummy_th.source = htons(sk->num);
sk1056net/inet/sock.cif (sk->prot->connect == NULL) 
sk1059net/inet/sock.cerr = sk->prot->connect(sk, (struct sockaddr_in *)uaddr, addr_len);
sk1065net/inet/sock.cif (sk->state != TCP_ESTABLISHED &&(flags & O_NONBLOCK)) 
sk1069net/inet/sock.cwhile(sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) 
sk1071net/inet/sock.cinterruptible_sleep_on(sk->sleep);
sk1078net/inet/sock.cif(sk->err && sk->protocol == IPPROTO_TCP)
sk1082net/inet/sock.cerr = -sk->err;
sk1083net/inet/sock.csk->err=0;
sk1090net/inet/sock.cif (sk->state != TCP_ESTABLISHED && sk->err) {
sk1092net/inet/sock.cerr=sk->err;
sk1093net/inet/sock.csk->err=0;
sk1179net/inet/sock.cstruct sock *sk;
sk1198net/inet/sock.csk = (struct sock *) sock->data;
sk1199net/inet/sock.cif (sk == NULL) {
sk1204net/inet/sock.cif (!tcp_connected(sk->state)) return(-ENOTCONN);
sk1205net/inet/sock.csin.sin_port = sk->dummy_th.dest;
sk1206net/inet/sock.csin.sin_addr.s_addr = sk->daddr;
sk1208net/inet/sock.csin.sin_port = sk->dummy_th.source;
sk1209net/inet/sock.cif (sk->saddr == 0) sin.sin_addr.s_addr = my_addr();
sk1210net/inet/sock.celse sin.sin_addr.s_addr = sk->saddr;
sk1224net/inet/sock.cstruct sock *sk;
sk1226net/inet/sock.csk = (struct sock *) sock->data;
sk1227net/inet/sock.cif (sk == NULL) {
sk1233net/inet/sock.cif (sk->num == 0) {
sk1234net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1235net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk1236net/inet/sock.cput_sock(sk->num, sk);
sk1237net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1239net/inet/sock.creturn(sk->prot->read(sk, (unsigned char *) ubuf, size, noblock,0));
sk1247net/inet/sock.cstruct sock *sk;
sk1249net/inet/sock.csk = (struct sock *) sock->data;
sk1250net/inet/sock.cif (sk == NULL) {
sk1256net/inet/sock.cif (sk->num == 0) {
sk1257net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1258net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk1259net/inet/sock.cput_sock(sk->num, sk);
sk1260net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1262net/inet/sock.creturn(sk->prot->read(sk, (unsigned char *) ubuf, size, noblock, flags));
sk1269net/inet/sock.cstruct sock *sk;
sk1271net/inet/sock.csk = (struct sock *) sock->data;
sk1272net/inet/sock.cif (sk == NULL) {
sk1276net/inet/sock.cif (sk->shutdown & SEND_SHUTDOWN) {
sk1282net/inet/sock.cif (sk->num == 0) {
sk1283net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1284net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk1285net/inet/sock.cput_sock(sk->num, sk);
sk1286net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1289net/inet/sock.creturn(sk->prot->write(sk, (unsigned char *) ubuf, size, noblock, 0));
sk1297net/inet/sock.cstruct sock *sk;
sk1299net/inet/sock.csk = (struct sock *) sock->data;
sk1300net/inet/sock.cif (sk == NULL) {
sk1304net/inet/sock.cif (sk->shutdown & SEND_SHUTDOWN) {
sk1310net/inet/sock.cif (sk->num == 0) {
sk1311net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1312net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk1313net/inet/sock.cput_sock(sk->num, sk);
sk1314net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1317net/inet/sock.creturn(sk->prot->write(sk, (unsigned char *) ubuf, size, noblock, flags));
sk1325net/inet/sock.cstruct sock *sk;
sk1327net/inet/sock.csk = (struct sock *) sock->data;
sk1328net/inet/sock.cif (sk == NULL) {
sk1332net/inet/sock.cif (sk->shutdown & SEND_SHUTDOWN) {
sk1337net/inet/sock.cif (sk->prot->sendto == NULL) return(-EOPNOTSUPP);
sk1340net/inet/sock.cif (sk->num == 0) {
sk1341net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1342net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk1343net/inet/sock.cput_sock(sk->num, sk);
sk1344net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1347net/inet/sock.creturn(sk->prot->sendto(sk, (unsigned char *) ubuf, size, noblock, flags, 
sk1356net/inet/sock.cstruct sock *sk;
sk1358net/inet/sock.csk = (struct sock *) sock->data;
sk1359net/inet/sock.cif (sk == NULL) {
sk1364net/inet/sock.cif (sk->prot->recvfrom == NULL) return(-EOPNOTSUPP);
sk1367net/inet/sock.cif (sk->num == 0) {
sk1368net/inet/sock.csk->num = get_new_socknum(sk->prot, 0);
sk1369net/inet/sock.cif (sk->num == 0) return(-EAGAIN);
sk1370net/inet/sock.cput_sock(sk->num, sk);
sk1371net/inet/sock.csk->dummy_th.source = ntohs(sk->num);
sk1374net/inet/sock.creturn(sk->prot->recvfrom(sk, (unsigned char *) ubuf, size, noblock, flags,
sk1382net/inet/sock.cstruct sock *sk;
sk1392net/inet/sock.csk = (struct sock *) sock->data;
sk1393net/inet/sock.cif (sk == NULL) {
sk1397net/inet/sock.cif (sock->state == SS_CONNECTING && sk->state == TCP_ESTABLISHED)
sk1400net/inet/sock.cif (!tcp_connected(sk->state)) return(-ENOTCONN);
sk1401net/inet/sock.csk->shutdown |= how;
sk1402net/inet/sock.cif (sk->prot->shutdown) sk->prot->shutdown(sk, how);
sk1410net/inet/sock.cstruct sock *sk;
sk1412net/inet/sock.csk = (struct sock *) sock->data;
sk1413net/inet/sock.cif (sk == NULL) {
sk1418net/inet/sock.cif (sk->prot->select == NULL) {
sk1422net/inet/sock.creturn(sk->prot->select(sk, sel_type, wait));
sk1429net/inet/sock.cstruct sock *sk;
sk1433net/inet/sock.csk = NULL;
sk1434net/inet/sock.cif (sock && (sk = (struct sock *) sock->data) == NULL) {
sk1445net/inet/sock.cif (sk)
sk1446net/inet/sock.csk->proc = get_fs_long((int *) arg);
sk1450net/inet/sock.cif (sk) {
sk1454net/inet/sock.cput_fs_long(sk->proc,(int *)arg);
sk1498net/inet/sock.cif (!sk || !sk->prot->ioctl) return(-EINVAL);
sk1499net/inet/sock.creturn(sk->prot->ioctl(sk, cmd, arg));
sk1507net/inet/sock.csock_wmalloc(struct sock *sk, unsigned long size, int force,
sk1510net/inet/sock.cif (sk) {
sk1511net/inet/sock.cif (sk->wmem_alloc + size < sk->sndbuf || force) {
sk1513net/inet/sock.csk->wmem_alloc+= size;
sk1518net/inet/sock.csk, size, force, priority));
sk1526net/inet/sock.csock_rmalloc(struct sock *sk, unsigned long size, int force, int priority)
sk1528net/inet/sock.cif (sk) {
sk1529net/inet/sock.cif (sk->rmem_alloc + size < sk->rcvbuf || force) {
sk1532net/inet/sock.cif (c) sk->rmem_alloc += size;
sk1537net/inet/sock.csk,size,force, priority));
sk1545net/inet/sock.csock_rspace(struct sock *sk)
sk1549net/inet/sock.cif (sk != NULL) {
sk1550net/inet/sock.cif (sk->rmem_alloc >= sk->rcvbuf-2*MIN_WINDOW) return(0);
sk1551net/inet/sock.camt = min((sk->rcvbuf-sk->rmem_alloc)/2-MIN_WINDOW, MAX_WINDOW);
sk1560net/inet/sock.csock_wspace(struct sock *sk)
sk1562net/inet/sock.cif (sk != NULL) {
sk1563net/inet/sock.cif (sk->shutdown & SEND_SHUTDOWN) return(0);
sk1564net/inet/sock.cif (sk->wmem_alloc >= sk->sndbuf) return(0);
sk1565net/inet/sock.creturn(sk->sndbuf-sk->wmem_alloc );
sk1572net/inet/sock.csock_wfree(struct sock *sk, void *mem, unsigned long size)
sk1574net/inet/sock.cDPRINTF((DBG_INET, "sock_wfree(sk=%X, mem=%X, size=%d)\n", sk, mem, size));
sk1578net/inet/sock.cif (sk) {
sk1579net/inet/sock.csk->wmem_alloc -= size;
sk1582net/inet/sock.cif (!sk->dead) wake_up(sk->sleep);
sk1583net/inet/sock.cif (sk->destroy && sk->wmem_alloc == 0 && sk->rmem_alloc == 0) {
sk1585net/inet/sock.c"recovered lost memory, sock = %X\n", sk));
sk1593net/inet/sock.csock_rfree(struct sock *sk, void *mem, unsigned long size)
sk1595net/inet/sock.cDPRINTF((DBG_INET, "sock_rfree(sk=%X, mem=%X, size=%d)\n", sk, mem, size));
sk1598net/inet/sock.cif (sk) {
sk1599net/inet/sock.csk->rmem_alloc -= size;
sk1600net/inet/sock.cif (sk->destroy && sk->wmem_alloc == 0 && sk->rmem_alloc == 0) {
sk1602net/inet/sock.c"recovered lot memory, sock = %X\n", sk));
sk1652net/inet/sock.cvoid release_sock(struct sock *sk)
sk1654net/inet/sock.cif (!sk) {
sk1658net/inet/sock.cif (!sk->prot) {
sk1663net/inet/sock.cif (sk->blog) return;
sk1667net/inet/sock.csk->inuse = 1;
sk1668net/inet/sock.cwhile(sk->back_log != NULL) {
sk1671net/inet/sock.csk->blog = 1;
sk1672net/inet/sock.cskb =(struct sk_buff *)sk->back_log;
sk1675net/inet/sock.csk->back_log = skb->next;
sk1679net/inet/sock.csk->back_log = NULL;
sk1682net/inet/sock.cDPRINTF((DBG_INET, "sk->back_log = %X\n", sk->back_log));
sk1683net/inet/sock.cif (sk->prot->rcv) sk->prot->rcv(skb, skb->dev, sk->opt,
sk1687net/inet/sock.c(struct inet_protocol *)sk->pair); 
sk1690net/inet/sock.csk->blog = 0;
sk1691net/inet/sock.csk->inuse = 0;
sk1693net/inet/sock.cif (sk->dead && sk->state == TCP_CLOSE) {
sk1695net/inet/sock.creset_timer(sk, TIME_DONE, min(sk->rtt * 2, TCP_DONE_TIME));
sk151net/inet/sock.hvoid      *(*wmalloc)(struct sock *sk,
sk154net/inet/sock.hvoid      *(*rmalloc)(struct sock *sk,
sk157net/inet/sock.hvoid      (*wfree)(struct sock *sk, void *mem,
sk159net/inet/sock.hvoid      (*rfree)(struct sock *sk, void *mem,
sk161net/inet/sock.hunsigned long    (*rspace)(struct sock *sk);
sk162net/inet/sock.hunsigned long    (*wspace)(struct sock *sk);
sk163net/inet/sock.hvoid      (*close)(struct sock *sk, int timeout);
sk164net/inet/sock.hint      (*read)(struct sock *sk, unsigned char *to,
sk166net/inet/sock.hint      (*write)(struct sock *sk, unsigned char *to,
sk168net/inet/sock.hint      (*sendto)(struct sock *sk,
sk172net/inet/sock.hint      (*recvfrom)(struct sock *sk,
sk181net/inet/sock.hint      (*connect)(struct sock *sk,
sk183net/inet/sock.hstruct sock    *(*accept) (struct sock *sk, int flags);
sk184net/inet/sock.hvoid      (*queue_xmit)(struct sock *sk,
sk187net/inet/sock.hvoid      (*retransmit)(struct sock *sk, int all);
sk188net/inet/sock.hvoid      (*write_wakeup)(struct sock *sk);
sk189net/inet/sock.hvoid      (*read_wakeup)(struct sock *sk);
sk194net/inet/sock.hint      (*select)(struct sock *sk, int which,
sk196net/inet/sock.hint      (*ioctl)(struct sock *sk, int cmd,
sk198net/inet/sock.hint      (*init)(struct sock *sk);
sk199net/inet/sock.hvoid      (*shutdown)(struct sock *sk, int how);
sk220net/inet/sock.hextern void      destroy_sock(struct sock *sk);
sk223net/inet/sock.hextern void      release_sock(struct sock *sk);
sk228net/inet/sock.hextern void      *sock_wmalloc(struct sock *sk,
sk231net/inet/sock.hextern void      *sock_rmalloc(struct sock *sk,
sk234net/inet/sock.hextern void      sock_wfree(struct sock *sk, void *mem,
sk236net/inet/sock.hextern void      sock_rfree(struct sock *sk, void *mem,
sk238net/inet/sock.hextern unsigned long    sock_rspace(struct sock *sk);
sk239net/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);