tag | line | file | source code |
sk | 216 | drivers/net/d_link.c | static unsigned long d_link_rspace(struct sock *sk); |
sk | 749 | drivers/net/d_link.c | d_link_rspace(struct sock *sk) |
sk | 753 | drivers/net/d_link.c | if (sk != NULL) { |
sk | 758 | drivers/net/d_link.c | sk->max_unacked = D_LINK_MAX_WINDOW - D_LINK_TCP_WINDOW_DIFF; |
sk | 760 | drivers/net/d_link.c | if (sk->rmem_alloc >= SK_RMEM_MAX-2*D_LINK_MIN_WINDOW) return(0); |
sk | 761 | drivers/net/d_link.c | amt = min((SK_RMEM_MAX-sk->rmem_alloc)/2-D_LINK_MIN_WINDOW, D_LINK_MAX_WINDOW); |
sk | 225 | net/inet/arp.c | skb->sk = NULL; |
sk | 318 | net/inet/arp.c | skb->sk = NULL; |
sk | 587 | net/inet/arp.c | skb->sk = NULL; |
sk | 46 | net/inet/datagram.c | struct sk_buff *skb_recv_datagram(struct sock *sk, unsigned flags, int noblock, int *err) |
sk | 52 | net/inet/datagram.c | sk->inuse = 1; |
sk | 53 | net/inet/datagram.c | while(sk->rqueue == NULL) /* No data */ |
sk | 56 | net/inet/datagram.c | if (sk->shutdown & RCV_SHUTDOWN) |
sk | 58 | net/inet/datagram.c | release_sock(sk); |
sk | 66 | net/inet/datagram.c | release_sock(sk); |
sk | 70 | net/inet/datagram.c | release_sock(sk); |
sk | 75 | net/inet/datagram.c | if (sk->rqueue == NULL) |
sk | 77 | net/inet/datagram.c | interruptible_sleep_on(sk->sleep); |
sk | 85 | net/inet/datagram.c | if(sk->err != 0) /* Error while waiting for packet |
sk | 89 | net/inet/datagram.c | *err = -sk->err; |
sk | 91 | net/inet/datagram.c | sk->err=0; |
sk | 95 | net/inet/datagram.c | sk->inuse = 1; |
sk | 102 | net/inet/datagram.c | skb=skb_dequeue(&sk->rqueue); |
sk | 111 | net/inet/datagram.c | skb=skb_peek(&sk->rqueue); |
sk | 150 | net/inet/datagram.c | int datagram_select(struct sock *sk, int sel_type, select_table *wait) |
sk | 152 | net/inet/datagram.c | select_wait(sk->sleep, wait); |
sk | 156 | net/inet/datagram.c | if (sk->rqueue != NULL || sk->err != 0) |
sk | 164 | net/inet/datagram.c | if (sk->prot->wspace(sk) >= MIN_WRITE_SPACE) |
sk | 171 | net/inet/datagram.c | if (sk->err) |
sk | 411 | net/inet/dev.c | skb->sk = NULL; |
sk | 602 | net/inet/dev.c | skb->sk = NULL; |
sk | 99 | net/inet/icmp.c | skb->sk = NULL; |
sk | 112 | net/inet/icmp.c | skb->sk = NULL; |
sk | 196 | net/inet/icmp.c | skb->sk = NULL; |
sk | 228 | net/inet/icmp.c | skb->sk = NULL; |
sk | 246 | net/inet/icmp.c | skb->sk = NULL; |
sk | 250 | net/inet/icmp.c | skb2->sk = NULL; |
sk | 261 | net/inet/icmp.c | skb->sk = NULL; |
sk | 280 | net/inet/icmp.c | skb->sk = NULL; |
sk | 292 | net/inet/icmp.c | skb->sk = NULL; |
sk | 310 | net/inet/icmp.c | skb->sk = NULL; |
sk | 314 | net/inet/icmp.c | skb2->sk = NULL; |
sk | 325 | net/inet/icmp.c | skb->sk = NULL; |
sk | 347 | net/inet/icmp.c | skb->sk = NULL; |
sk | 365 | net/inet/icmp.c | skb1->sk = NULL; |
sk | 377 | net/inet/icmp.c | skb1->sk = NULL; |
sk | 397 | net/inet/icmp.c | skb1->sk = NULL; |
sk | 404 | net/inet/icmp.c | skb1->sk = NULL; |
sk | 411 | net/inet/icmp.c | skb1->sk = NULL; |
sk | 418 | net/inet/icmp.c | skb1->sk = NULL; |
sk | 423 | net/inet/icmp.c | skb1->sk = NULL; |
sk | 431 | net/inet/icmp.c | icmp_ioctl(struct sock *sk, int cmd, unsigned long arg) |
sk | 33 | net/inet/icmp.h | extern int icmp_ioctl(struct sock *sk, int cmd, |
sk | 68 | net/inet/ip.c | extern void sort_send(struct sock *sk); |
sk | 115 | net/inet/ip.c | ip_ioctl(struct sock *sk, int cmd, unsigned long arg) |
sk | 246 | net/inet/ip.c | if (skb->sk) skb->sk->saddr = saddr; |
sk | 953 | net/inet/ip.c | void ip_fragment(struct sock *sk, struct sk_buff *skb, struct device *dev, int is_frag) |
sk | 1024 | net/inet/ip.c | if (sk) |
sk | 1025 | net/inet/ip.c | sk->wmem_alloc += skb2->mem_len; |
sk | 1047 | net/inet/ip.c | ip_queue_xmit(sk, dev, skb2, 1); |
sk | 1150 | net/inet/ip.c | skb2->sk = NULL; |
sk | 1198 | net/inet/ip.c | skb->sk = NULL; |
sk | 1224 | net/inet/ip.c | skb->sk = NULL; |
sk | 1247 | net/inet/ip.c | skb->sk = NULL; |
sk | 1259 | net/inet/ip.c | skb->sk=NULL; |
sk | 1318 | net/inet/ip.c | skb->sk = NULL; |
sk | 1334 | net/inet/ip.c | ip_queue_xmit(struct sock *sk, struct device *dev, |
sk | 1340 | net/inet/ip.c | if (sk == NULL) free = 1; |
sk | 1359 | net/inet/ip.c | ip_fragment(sk,skb,dev,0); |
sk | 1373 | net/inet/ip.c | sk->packets_out++; |
sk | 1375 | net/inet/ip.c | if (sk->send_head == NULL) { |
sk | 1376 | net/inet/ip.c | sk->send_tail = skb; |
sk | 1377 | net/inet/ip.c | sk->send_head = skb; |
sk | 1380 | net/inet/ip.c | if (sk->send_tail == NULL) { |
sk | 1382 | net/inet/ip.c | sort_send(sk); |
sk | 1384 | net/inet/ip.c | sk->send_tail->link3 = skb; |
sk | 1385 | net/inet/ip.c | sk->send_tail = skb; |
sk | 1389 | net/inet/ip.c | reset_timer(sk, TIME_WRITE, |
sk | 1390 | net/inet/ip.c | backoff(sk->backoff) * (2 * sk->mdev + sk->rtt)); |
sk | 1392 | net/inet/ip.c | skb->sk = sk; |
sk | 1397 | net/inet/ip.c | if (sk != NULL) { |
sk | 1398 | net/inet/ip.c | dev->queue_xmit(skb, dev, sk->priority); |
sk | 1410 | net/inet/ip.c | ip_retransmit(struct sock *sk, int all) |
sk | 1416 | net/inet/ip.c | prot = sk->prot; |
sk | 1417 | net/inet/ip.c | skb = sk->send_head; |
sk | 1451 | net/inet/ip.c | if (sk) dev->queue_xmit(skb, dev, sk->priority); |
sk | 1455 | net/inet/ip.c | oops: sk->retransmits++; |
sk | 1456 | net/inet/ip.c | sk->prot->retransmits ++; |
sk | 1460 | net/inet/ip.c | if (sk->retransmits > sk->cong_window) break; |
sk | 1470 | net/inet/ip.c | sk->backoff++; |
sk | 1471 | net/inet/ip.c | reset_timer(sk, TIME_WRITE, backoff(sk->backoff) * (2 * sk->mdev + sk->rtt)); |
sk | 65 | net/inet/ip.h | extern int ip_ioctl(struct sock *sk, int cmd, |
sk | 76 | net/inet/ip.h | extern void ip_queue_xmit(struct sock *sk, |
sk | 79 | net/inet/ip.h | extern void ip_retransmit(struct sock *sk, int all); |
sk | 60 | net/inet/packet.c | struct sock *sk; |
sk | 62 | net/inet/packet.c | sk = (struct sock *) pt->data; |
sk | 66 | net/inet/packet.c | skb->sk = sk; |
sk | 69 | net/inet/packet.c | if (sk->rmem_alloc + skb->mem_len >= sk->rcvbuf) { |
sk | 70 | net/inet/packet.c | skb->sk = NULL; |
sk | 74 | net/inet/packet.c | sk->rmem_alloc += skb->mem_len; |
sk | 75 | net/inet/packet.c | skb_queue_tail(&sk->rqueue,skb); |
sk | 76 | net/inet/packet.c | wake_up(sk->sleep); |
sk | 77 | net/inet/packet.c | release_sock(sk); |
sk | 84 | net/inet/packet.c | packet_sendto(struct sock *sk, unsigned char *from, int len, |
sk | 121 | net/inet/packet.c | skb = (struct sk_buff *) sk->prot->wmalloc(sk, len+sizeof(*skb), 0, GFP_KERNEL); |
sk | 131 | net/inet/packet.c | skb->sk = sk; |
sk | 136 | net/inet/packet.c | if (dev->flags & IFF_UP) dev->queue_xmit(skb, dev, sk->priority); |
sk | 143 | net/inet/packet.c | packet_write(struct sock *sk, unsigned char *buff, |
sk | 146 | net/inet/packet.c | return(packet_sendto(sk, buff, len, noblock, flags, NULL, 0)); |
sk | 151 | net/inet/packet.c | packet_close(struct sock *sk, int timeout) |
sk | 153 | net/inet/packet.c | sk->inuse = 1; |
sk | 154 | net/inet/packet.c | sk->state = TCP_CLOSE; |
sk | 155 | net/inet/packet.c | dev_remove_pack((struct packet_type *)sk->pair); |
sk | 156 | net/inet/packet.c | kfree_s((void *)sk->pair, sizeof(struct packet_type)); |
sk | 157 | net/inet/packet.c | sk->pair = NULL; |
sk | 158 | net/inet/packet.c | release_sock(sk); |
sk | 163 | net/inet/packet.c | packet_init(struct sock *sk) |
sk | 171 | net/inet/packet.c | p->type = sk->num; |
sk | 172 | net/inet/packet.c | p->data = (void *)sk; |
sk | 176 | net/inet/packet.c | sk->pair = (struct sock *)p; |
sk | 187 | net/inet/packet.c | packet_recvfrom(struct sock *sk, unsigned char *to, int len, |
sk | 200 | net/inet/packet.c | if (sk->shutdown & RCV_SHUTDOWN) return(0); |
sk | 211 | net/inet/packet.c | skb=skb_recv_datagram(sk,flags,noblock,&err); |
sk | 230 | net/inet/packet.c | release_sock(sk); |
sk | 236 | net/inet/packet.c | packet_read(struct sock *sk, unsigned char *buff, |
sk | 239 | net/inet/packet.c | return(packet_recvfrom(sk, buff, len, noblock, flags, NULL, NULL)); |
sk | 62 | net/inet/raw.c | struct sock *sk; |
sk | 68 | net/inet/raw.c | sk = (struct sock *) protocol->data; |
sk | 69 | net/inet/raw.c | if (sk == NULL) return; |
sk | 73 | net/inet/raw.c | if (sk->cong_window > 1) sk->cong_window = sk->cong_window/2; |
sk | 77 | net/inet/raw.c | sk->err = icmp_err_convert[err & 0xff].errno; |
sk | 78 | net/inet/raw.c | wake_up(sk->sleep); |
sk | 93 | net/inet/raw.c | struct sock *sk; |
sk | 104 | net/inet/raw.c | sk = (struct sock *) protocol->data; |
sk | 105 | net/inet/raw.c | if (sk == NULL) { |
sk | 111 | net/inet/raw.c | skb->sk = sk; |
sk | 118 | net/inet/raw.c | if (sk->rmem_alloc + skb->mem_len >= sk->rcvbuf) { |
sk | 119 | net/inet/raw.c | skb->sk = NULL; |
sk | 123 | net/inet/raw.c | sk->rmem_alloc += skb->mem_len; |
sk | 124 | net/inet/raw.c | skb_queue_tail(&sk->rqueue,skb); |
sk | 125 | net/inet/raw.c | wake_up(sk->sleep); |
sk | 126 | net/inet/raw.c | release_sock(sk); |
sk | 133 | net/inet/raw.c | raw_sendto(struct sock *sk, unsigned char *from, int len, |
sk | 144 | net/inet/raw.c | " usin=%X, addr_len = %d)\n", sk, from, len, noblock, |
sk | 163 | net/inet/raw.c | if (sk->state != TCP_ESTABLISHED) return(-EINVAL); |
sk | 165 | net/inet/raw.c | sin.sin_port = sk->protocol; |
sk | 166 | net/inet/raw.c | sin.sin_addr.s_addr = sk->daddr; |
sk | 168 | net/inet/raw.c | if (sin.sin_port == 0) sin.sin_port = sk->protocol; |
sk | 170 | net/inet/raw.c | if (sk->broadcast == 0 && chk_addr(sin.sin_addr.s_addr)==IS_BROADCAST) |
sk | 173 | net/inet/raw.c | sk->inuse = 1; |
sk | 176 | net/inet/raw.c | if(sk->err!=0) |
sk | 178 | net/inet/raw.c | err= -sk->err; |
sk | 179 | net/inet/raw.c | sk->err=0; |
sk | 180 | net/inet/raw.c | release_sock(sk); |
sk | 184 | net/inet/raw.c | skb = (struct sk_buff *) sk->prot->wmalloc(sk, |
sk | 185 | net/inet/raw.c | len+sizeof(*skb) + sk->prot->max_header, |
sk | 193 | net/inet/raw.c | tmp = sk->wmem_alloc; |
sk | 194 | net/inet/raw.c | release_sock(sk); |
sk | 196 | net/inet/raw.c | if (tmp <= sk->wmem_alloc) { |
sk | 197 | net/inet/raw.c | interruptible_sleep_on(sk->sleep); |
sk | 203 | net/inet/raw.c | sk->inuse = 1; |
sk | 208 | net/inet/raw.c | skb->mem_len = len + sizeof(*skb) +sk->prot->max_header; |
sk | 209 | net/inet/raw.c | skb->sk = sk; |
sk | 214 | net/inet/raw.c | tmp = sk->prot->build_header(skb, sk->saddr, |
sk | 216 | net/inet/raw.c | sk->protocol, sk->opt, skb->mem_len); |
sk | 220 | net/inet/raw.c | release_sock(sk); |
sk | 230 | net/inet/raw.c | if(sk->protocol==IPPROTO_RAW) { |
sk | 237 | net/inet/raw.c | iph->saddr = sk->saddr; |
sk | 245 | net/inet/raw.c | release_sock(sk); |
sk | 249 | net/inet/raw.c | sk->prot->queue_xmit(sk, dev, skb, 1); |
sk | 250 | net/inet/raw.c | release_sock(sk); |
sk | 256 | net/inet/raw.c | raw_write(struct sock *sk, unsigned char *buff, int len, int noblock, |
sk | 259 | net/inet/raw.c | return(raw_sendto(sk, buff, len, noblock, flags, NULL, 0)); |
sk | 264 | net/inet/raw.c | raw_close(struct sock *sk, int timeout) |
sk | 266 | net/inet/raw.c | sk->inuse = 1; |
sk | 267 | net/inet/raw.c | sk->state = TCP_CLOSE; |
sk | 270 | net/inet/raw.c | ((struct inet_protocol *)sk->pair)->protocol)); |
sk | 272 | net/inet/raw.c | if (inet_del_protocol((struct inet_protocol *)sk->pair) < 0) |
sk | 274 | net/inet/raw.c | kfree_s((void *)sk->pair, sizeof (struct inet_protocol)); |
sk | 275 | net/inet/raw.c | sk->pair = NULL; |
sk | 276 | net/inet/raw.c | release_sock(sk); |
sk | 281 | net/inet/raw.c | raw_init(struct sock *sk) |
sk | 289 | net/inet/raw.c | p->protocol = sk->protocol; |
sk | 290 | net/inet/raw.c | p->data = (void *)sk; |
sk | 297 | net/inet/raw.c | sk->pair = (struct sock *)p; |
sk | 299 | net/inet/raw.c | DPRINTF((DBG_RAW, "raw init added protocol %d\n", sk->protocol)); |
sk | 310 | net/inet/raw.c | raw_recvfrom(struct sock *sk, unsigned char *to, int len, |
sk | 320 | net/inet/raw.c | sk, to, len, noblock, flags, sin, addr_len)); |
sk | 325 | net/inet/raw.c | if (sk->shutdown & RCV_SHUTDOWN) return(0); |
sk | 336 | net/inet/raw.c | skb=skb_recv_datagram(sk,flags,noblock,&err); |
sk | 355 | net/inet/raw.c | release_sock(sk); |
sk | 361 | net/inet/raw.c | raw_read (struct sock *sk, unsigned char *buff, int len, int noblock, |
sk | 364 | net/inet/raw.c | return(raw_recvfrom(sk, buff, len, noblock, flags, NULL, NULL)); |
sk | 30 | net/inet/raw.h | extern int raw_recvfrom(struct sock *sk, unsigned char *to, |
sk | 33 | net/inet/raw.h | extern int raw_read(struct sock *sk, unsigned char *buff, |
sk | 343 | net/inet/skbuff.c | newsk->sk=NULL; |
sk | 361 | net/inet/skbuff.c | newsk->sk=NULL; |
sk | 387 | net/inet/skbuff.c | if (skb->sk) { |
sk | 389 | net/inet/skbuff.c | skb->sk->prot->rfree(skb->sk, skb->mem_addr, skb->mem_len); |
sk | 391 | net/inet/skbuff.c | skb->sk->prot->wfree(skb->sk, skb->mem_addr, skb->mem_len); |
sk | 47 | net/inet/skbuff.h | struct sock *sk; |
sk | 103 | net/inet/skbuff.h | extern struct sk_buff * skb_recv_datagram(struct sock *sk,unsigned flags,int noblock, int *err); |
sk | 104 | net/inet/skbuff.h | extern int datagram_select(struct sock *sk, int sel_type, select_table *wait); |
sk | 101 | net/inet/sock.c | print_sk(struct sock *sk) |
sk | 103 | net/inet/sock.c | if (!sk) { |
sk | 107 | net/inet/sock.c | printk(" wmem_alloc = %lu\n", sk->wmem_alloc); |
sk | 108 | net/inet/sock.c | printk(" rmem_alloc = %lu\n", sk->rmem_alloc); |
sk | 109 | net/inet/sock.c | printk(" send_head = %p\n", sk->send_head); |
sk | 110 | net/inet/sock.c | printk(" state = %d\n",sk->state); |
sk | 111 | net/inet/sock.c | printk(" wback = %p, rqueue = %p\n", sk->wback, sk->rqueue); |
sk | 112 | net/inet/sock.c | printk(" wfront = %p\n", sk->wfront); |
sk | 113 | net/inet/sock.c | printk(" daddr = %lX, saddr = %lX\n", sk->daddr,sk->saddr); |
sk | 114 | net/inet/sock.c | printk(" num = %d", sk->num); |
sk | 115 | net/inet/sock.c | printk(" next = %p\n", sk->next); |
sk | 117 | net/inet/sock.c | sk->send_seq, sk->acked_seq, sk->copied_seq); |
sk | 119 | net/inet/sock.c | sk->rcv_ack_seq, sk->window_seq, sk->fin_seq); |
sk | 120 | net/inet/sock.c | printk(" prot = %p\n", sk->prot); |
sk | 121 | net/inet/sock.c | printk(" pair = %p, back_log = %p\n", sk->pair,sk->back_log); |
sk | 122 | net/inet/sock.c | printk(" inuse = %d , blog = %d\n", sk->inuse, sk->blog); |
sk | 123 | net/inet/sock.c | printk(" dead = %d delay_acks=%d\n", sk->dead, sk->delay_acks); |
sk | 124 | net/inet/sock.c | printk(" retransmits = %ld, timeout = %d\n", sk->retransmits, sk->timeout); |
sk | 125 | net/inet/sock.c | printk(" cong_window = %d, packets_out = %d\n", sk->cong_window, |
sk | 126 | net/inet/sock.c | sk->packets_out); |
sk | 127 | net/inet/sock.c | printk(" urg = %d shutdown=%d\n", sk->urg, sk->shutdown); |
sk | 139 | net/inet/sock.c | printk(" sk = %p link3 = %p\n", skb->sk, skb->link3); |
sk | 149 | net/inet/sock.c | struct sock *sk; |
sk | 151 | net/inet/sock.c | for(sk = prot->sock_array[num & (SOCK_ARRAY_SIZE -1 )]; |
sk | 152 | net/inet/sock.c | sk != NULL; |
sk | 153 | net/inet/sock.c | sk=sk->next) { |
sk | 154 | net/inet/sock.c | if (sk->num == num) return(1); |
sk | 172 | net/inet/sock.c | struct sock *sk; |
sk | 182 | net/inet/sock.c | sk = prot->sock_array[(i+base+1) &(SOCK_ARRAY_SIZE -1)]; |
sk | 183 | net/inet/sock.c | while(sk != NULL) { |
sk | 184 | net/inet/sock.c | sk = sk->next; |
sk | 210 | net/inet/sock.c | put_sock(unsigned short num, struct sock *sk) |
sk | 216 | net/inet/sock.c | DPRINTF((DBG_INET, "put_sock(num = %d, sk = %X\n", num, sk)); |
sk | 217 | net/inet/sock.c | sk->num = num; |
sk | 218 | net/inet/sock.c | sk->next = NULL; |
sk | 223 | net/inet/sock.c | if (sk->prot->sock_array[num] == NULL) { |
sk | 224 | net/inet/sock.c | sk->prot->sock_array[num] = sk; |
sk | 230 | net/inet/sock.c | if ((mask & sk->saddr) && |
sk | 231 | net/inet/sock.c | (mask & sk->saddr) != (mask & 0xffffffff)) { |
sk | 239 | net/inet/sock.c | sk1 = sk->prot->sock_array[num]; |
sk | 243 | net/inet/sock.c | sk->next = sk->prot->sock_array[num]; |
sk | 244 | net/inet/sock.c | sk->prot->sock_array[num] = sk; |
sk | 248 | net/inet/sock.c | sk->next = sk2; |
sk | 249 | net/inet/sock.c | sk1->next= sk; |
sk | 257 | net/inet/sock.c | sk->next = NULL; |
sk | 258 | net/inet/sock.c | sk1->next = sk; |
sk | 304 | net/inet/sock.c | destroy_sock(struct sock *sk) |
sk | 308 | net/inet/sock.c | DPRINTF((DBG_INET, "destroying socket %X\n", sk)); |
sk | 309 | net/inet/sock.c | sk->inuse = 1; /* just to be safe. */ |
sk | 312 | net/inet/sock.c | if (!sk->dead) |
sk | 313 | net/inet/sock.c | wake_up(sk->sleep); |
sk | 315 | net/inet/sock.c | remove_sock(sk); |
sk | 318 | net/inet/sock.c | delete_timer(sk); |
sk | 321 | net/inet/sock.c | if (sk->send_tmp != NULL) |
sk | 323 | net/inet/sock.c | IS_SKB(sk->send_tmp); |
sk | 324 | net/inet/sock.c | kfree_skb(sk->send_tmp, FREE_WRITE); |
sk | 328 | net/inet/sock.c | for(skb = sk->wfront; skb != NULL; ) |
sk | 343 | net/inet/sock.c | sk->wfront = NULL; |
sk | 344 | net/inet/sock.c | sk->wback = NULL; |
sk | 346 | net/inet/sock.c | if (sk->rqueue != NULL) |
sk | 348 | net/inet/sock.c | while((skb=skb_dequeue(&sk->rqueue))!=NULL) |
sk | 354 | net/inet/sock.c | if (skb->sk != NULL && skb->sk != sk) |
sk | 357 | net/inet/sock.c | skb->sk->dead = 1; |
sk | 358 | net/inet/sock.c | skb->sk->prot->close(skb->sk, 0); |
sk | 364 | net/inet/sock.c | sk->rqueue = NULL; |
sk | 367 | net/inet/sock.c | for(skb = sk->send_head; skb != NULL; ) |
sk | 390 | net/inet/sock.c | sk->send_head = NULL; |
sk | 393 | net/inet/sock.c | if (sk->back_log != NULL) |
sk | 398 | net/inet/sock.c | skb = (struct sk_buff *)sk->back_log; |
sk | 407 | net/inet/sock.c | while(skb != sk->back_log); |
sk | 410 | net/inet/sock.c | sk->back_log = NULL; |
sk | 413 | net/inet/sock.c | if (sk->pair) |
sk | 415 | net/inet/sock.c | sk->pair->dead = 1; |
sk | 416 | net/inet/sock.c | sk->pair->prot->close(sk->pair, 0); |
sk | 417 | net/inet/sock.c | sk->pair = NULL; |
sk | 425 | net/inet/sock.c | if (sk->rmem_alloc == 0 && sk->wmem_alloc == 0) |
sk | 427 | net/inet/sock.c | kfree_s((void *)sk,sizeof(*sk)); |
sk | 433 | net/inet/sock.c | DPRINTF((DBG_INET, "possible memory leak in socket = %X\n", sk)); |
sk | 434 | net/inet/sock.c | sk->destroy = 1; |
sk | 435 | net/inet/sock.c | sk->ack_backlog = 0; |
sk | 436 | net/inet/sock.c | sk->inuse = 0; |
sk | 437 | net/inet/sock.c | reset_timer(sk, TIME_DESTROY, SOCK_DESTROY_TIME); |
sk | 446 | net/inet/sock.c | struct sock *sk; |
sk | 448 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 449 | net/inet/sock.c | if (sk == NULL) { |
sk | 463 | net/inet/sock.c | sk->proc = arg; |
sk | 466 | net/inet/sock.c | return(sk->proc); |
sk | 477 | net/inet/sock.c | struct sock *sk; |
sk | 485 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 486 | net/inet/sock.c | if (sk == NULL) { |
sk | 503 | net/inet/sock.c | sk->debug=val?1:0; |
sk | 507 | net/inet/sock.c | sk->broadcast=val?1:0; |
sk | 514 | net/inet/sock.c | sk->sndbuf=val; |
sk | 522 | net/inet/sock.c | sk->linger=0; |
sk | 525 | net/inet/sock.c | sk->lingertime=ling.l_linger; |
sk | 526 | net/inet/sock.c | sk->linger=1; |
sk | 534 | net/inet/sock.c | sk->rcvbuf=val; |
sk | 538 | net/inet/sock.c | if (val) sk->reuse = 1; |
sk | 539 | net/inet/sock.c | else sk->reuse = 0; |
sk | 543 | net/inet/sock.c | if (val) sk->keepopen = 1; |
sk | 544 | net/inet/sock.c | else sk->keepopen = 0; |
sk | 548 | net/inet/sock.c | if (val) sk->urginline = 1; |
sk | 549 | net/inet/sock.c | else sk->urginline = 0; |
sk | 553 | net/inet/sock.c | if (val) sk->no_check = 1; |
sk | 554 | net/inet/sock.c | else sk->no_check = 0; |
sk | 559 | net/inet/sock.c | sk->priority = val; |
sk | 575 | net/inet/sock.c | struct sock *sk; |
sk | 583 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 584 | net/inet/sock.c | if (sk == NULL) { |
sk | 591 | net/inet/sock.c | val = sk->debug; |
sk | 599 | net/inet/sock.c | val= sk->broadcast; |
sk | 611 | net/inet/sock.c | ling.l_onoff=sk->linger; |
sk | 612 | net/inet/sock.c | ling.l_linger=sk->lingertime; |
sk | 617 | net/inet/sock.c | val=sk->sndbuf; |
sk | 621 | net/inet/sock.c | val =sk->rcvbuf; |
sk | 625 | net/inet/sock.c | val = sk->reuse; |
sk | 629 | net/inet/sock.c | val = sk->keepopen; |
sk | 633 | net/inet/sock.c | if (sk->prot == &tcp_prot) val = SOCK_STREAM; |
sk | 638 | net/inet/sock.c | val = sk->err; |
sk | 639 | net/inet/sock.c | sk->err = 0; |
sk | 643 | net/inet/sock.c | val = sk->urginline; |
sk | 647 | net/inet/sock.c | val = sk->no_check; |
sk | 651 | net/inet/sock.c | val = sk->priority; |
sk | 674 | net/inet/sock.c | struct sock *sk; |
sk | 676 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 677 | net/inet/sock.c | if (sk == NULL) { |
sk | 683 | net/inet/sock.c | if (sk->num == 0) { |
sk | 684 | net/inet/sock.c | sk->num = get_new_socknum(sk->prot, 0); |
sk | 685 | net/inet/sock.c | if (sk->num == 0) return(-EAGAIN); |
sk | 686 | net/inet/sock.c | put_sock(sk->num, sk); |
sk | 687 | net/inet/sock.c | sk->dummy_th.source = ntohs(sk->num); |
sk | 691 | net/inet/sock.c | sk->max_ack_backlog = backlog; |
sk | 692 | net/inet/sock.c | if (sk->state != TCP_LISTEN) { |
sk | 693 | net/inet/sock.c | sk->ack_backlog = 0; |
sk | 694 | net/inet/sock.c | sk->state = TCP_LISTEN; |
sk | 703 | net/inet/sock.c | struct sock *sk; |
sk | 707 | net/inet/sock.c | sk = (struct sock *) kmalloc(sizeof(*sk), GFP_KERNEL); |
sk | 708 | net/inet/sock.c | if (sk == NULL) |
sk | 710 | net/inet/sock.c | sk->num = 0; |
sk | 716 | net/inet/sock.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 720 | net/inet/sock.c | sk->no_check = TCP_NO_CHECK; |
sk | 726 | net/inet/sock.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 730 | net/inet/sock.c | sk->no_check = UDP_NO_CHECK; |
sk | 736 | net/inet/sock.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 740 | net/inet/sock.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 744 | net/inet/sock.c | sk->reuse = 1; |
sk | 745 | net/inet/sock.c | sk->no_check = 0; /* |
sk | 749 | net/inet/sock.c | sk->num = protocol; |
sk | 754 | net/inet/sock.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 758 | net/inet/sock.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 762 | net/inet/sock.c | sk->reuse = 1; |
sk | 763 | net/inet/sock.c | sk->no_check = 0; /* Doesn't matter no checksum is |
sk | 766 | net/inet/sock.c | sk->num = protocol; |
sk | 770 | net/inet/sock.c | kfree_s((void *)sk, sizeof(*sk)); |
sk | 773 | net/inet/sock.c | sk->socket = sock; |
sk | 774 | net/inet/sock.c | sk->protocol = protocol; |
sk | 775 | net/inet/sock.c | sk->wmem_alloc = 0; |
sk | 776 | net/inet/sock.c | sk->rmem_alloc = 0; |
sk | 777 | net/inet/sock.c | sk->sndbuf = SK_WMEM_MAX; |
sk | 778 | net/inet/sock.c | sk->rcvbuf = SK_RMEM_MAX; |
sk | 779 | net/inet/sock.c | sk->pair = NULL; |
sk | 780 | net/inet/sock.c | sk->opt = NULL; |
sk | 781 | net/inet/sock.c | sk->send_seq = 0; |
sk | 782 | net/inet/sock.c | sk->acked_seq = 0; |
sk | 783 | net/inet/sock.c | sk->copied_seq = 0; |
sk | 784 | net/inet/sock.c | sk->fin_seq = 0; |
sk | 785 | net/inet/sock.c | sk->proc = 0; |
sk | 786 | net/inet/sock.c | sk->rtt = TCP_WRITE_TIME; |
sk | 787 | net/inet/sock.c | sk->mdev = 0; |
sk | 788 | net/inet/sock.c | sk->backoff = 0; |
sk | 789 | net/inet/sock.c | sk->packets_out = 0; |
sk | 790 | net/inet/sock.c | sk->cong_window = 1; /* start with only sending one packet at a time. */ |
sk | 791 | net/inet/sock.c | sk->exp_growth = 1; /* if set cong_window grow exponentially every time |
sk | 793 | net/inet/sock.c | sk->urginline = 0; |
sk | 794 | net/inet/sock.c | sk->intr = 0; |
sk | 795 | net/inet/sock.c | sk->linger = 0; |
sk | 796 | net/inet/sock.c | sk->destroy = 0; |
sk | 797 | net/inet/sock.c | sk->reuse = 0; |
sk | 798 | net/inet/sock.c | sk->priority = 1; |
sk | 799 | net/inet/sock.c | sk->shutdown = 0; |
sk | 800 | net/inet/sock.c | sk->urg = 0; |
sk | 801 | net/inet/sock.c | sk->keepopen = 0; |
sk | 802 | net/inet/sock.c | sk->zapped = 0; |
sk | 803 | net/inet/sock.c | sk->done = 0; |
sk | 804 | net/inet/sock.c | sk->ack_backlog = 0; |
sk | 805 | net/inet/sock.c | sk->window = 0; |
sk | 806 | net/inet/sock.c | sk->bytes_rcv = 0; |
sk | 807 | net/inet/sock.c | sk->state = TCP_CLOSE; |
sk | 808 | net/inet/sock.c | sk->dead = 0; |
sk | 809 | net/inet/sock.c | sk->ack_timed = 0; |
sk | 810 | net/inet/sock.c | sk->send_tmp = NULL; |
sk | 811 | net/inet/sock.c | sk->mss = 0; /* we will try not to send any packets smaller than this. */ |
sk | 812 | net/inet/sock.c | sk->debug = 0; |
sk | 815 | net/inet/sock.c | sk->max_unacked = 2048; /* needs to be at most 2 full packets. */ |
sk | 819 | net/inet/sock.c | sk->max_ack_backlog = 0; |
sk | 820 | net/inet/sock.c | sk->inuse = 0; |
sk | 821 | net/inet/sock.c | sk->delay_acks = 0; |
sk | 822 | net/inet/sock.c | sk->wback = NULL; |
sk | 823 | net/inet/sock.c | sk->wfront = NULL; |
sk | 824 | net/inet/sock.c | sk->rqueue = NULL; |
sk | 825 | net/inet/sock.c | sk->mtu = 576; |
sk | 826 | net/inet/sock.c | sk->prot = prot; |
sk | 827 | net/inet/sock.c | sk->sleep = sock->wait; |
sk | 828 | net/inet/sock.c | sk->daddr = 0; |
sk | 829 | net/inet/sock.c | sk->saddr = my_addr(); |
sk | 830 | net/inet/sock.c | sk->err = 0; |
sk | 831 | net/inet/sock.c | sk->next = NULL; |
sk | 832 | net/inet/sock.c | sk->pair = NULL; |
sk | 833 | net/inet/sock.c | sk->send_tail = NULL; |
sk | 834 | net/inet/sock.c | sk->send_head = NULL; |
sk | 835 | net/inet/sock.c | sk->timeout = 0; |
sk | 836 | net/inet/sock.c | sk->broadcast = 0; |
sk | 837 | net/inet/sock.c | sk->timer.data = (unsigned long)sk; |
sk | 838 | net/inet/sock.c | sk->timer.function = &net_timer; |
sk | 839 | net/inet/sock.c | sk->back_log = NULL; |
sk | 840 | net/inet/sock.c | sk->blog = 0; |
sk | 841 | net/inet/sock.c | sock->data =(void *) sk; |
sk | 842 | net/inet/sock.c | sk->dummy_th.doff = sizeof(sk->dummy_th)/4; |
sk | 843 | net/inet/sock.c | sk->dummy_th.res1=0; |
sk | 844 | net/inet/sock.c | sk->dummy_th.res2=0; |
sk | 845 | net/inet/sock.c | sk->dummy_th.urg_ptr = 0; |
sk | 846 | net/inet/sock.c | sk->dummy_th.fin = 0; |
sk | 847 | net/inet/sock.c | sk->dummy_th.syn = 0; |
sk | 848 | net/inet/sock.c | sk->dummy_th.rst = 0; |
sk | 849 | net/inet/sock.c | sk->dummy_th.psh = 0; |
sk | 850 | net/inet/sock.c | sk->dummy_th.ack = 0; |
sk | 851 | net/inet/sock.c | sk->dummy_th.urg = 0; |
sk | 852 | net/inet/sock.c | sk->dummy_th.dest = 0; |
sk | 854 | net/inet/sock.c | if (sk->num) { |
sk | 861 | net/inet/sock.c | put_sock(sk->num, sk); |
sk | 862 | net/inet/sock.c | sk->dummy_th.source = ntohs(sk->num); |
sk | 865 | net/inet/sock.c | if (sk->prot->init) { |
sk | 866 | net/inet/sock.c | err = sk->prot->init(sk); |
sk | 868 | net/inet/sock.c | destroy_sock(sk); |
sk | 888 | net/inet/sock.c | struct sock *sk; |
sk | 890 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 891 | net/inet/sock.c | if (sk == NULL) return(0); |
sk | 894 | net/inet/sock.c | wake_up(sk->sleep); |
sk | 902 | net/inet/sock.c | if (sk->linger == 0) { |
sk | 903 | net/inet/sock.c | sk->prot->close(sk,0); |
sk | 904 | net/inet/sock.c | sk->dead = 1; |
sk | 907 | net/inet/sock.c | sk->prot->close(sk, 0); |
sk | 909 | net/inet/sock.c | if (sk->lingertime) |
sk | 910 | net/inet/sock.c | current->timeout = jiffies + HZ*sk->lingertime; |
sk | 911 | net/inet/sock.c | while(sk->state != TCP_CLOSE && current->timeout>0) { |
sk | 912 | net/inet/sock.c | interruptible_sleep_on(sk->sleep); |
sk | 921 | net/inet/sock.c | sk->dead = 1; |
sk | 923 | net/inet/sock.c | sk->inuse = 1; |
sk | 926 | net/inet/sock.c | release_sock(sk); |
sk | 942 | net/inet/sock.c | struct sock *sk, *sk2; |
sk | 946 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 947 | net/inet/sock.c | if (sk == NULL) { |
sk | 953 | net/inet/sock.c | if (sk->state != TCP_CLOSE) return(-EIO); |
sk | 954 | net/inet/sock.c | if (sk->num != 0) return(-EINVAL); |
sk | 962 | net/inet/sock.c | DPRINTF((DBG_INET, "bind sk =%X to port = %d\n", sk, snum)); |
sk | 963 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 971 | net/inet/sock.c | snum = get_new_socknum(sk->prot, 0); |
sk | 979 | net/inet/sock.c | sk->saddr = addr.sin_addr.s_addr; |
sk | 982 | net/inet/sock.c | sk->prot->sock_array[snum &(SOCK_ARRAY_SIZE -1)])); |
sk | 987 | net/inet/sock.c | for(sk2 = sk->prot->sock_array[snum & (SOCK_ARRAY_SIZE -1)]; |
sk | 997 | net/inet/sock.c | if (!sk->reuse) { |
sk | 1002 | net/inet/sock.c | if (sk2->saddr != sk->saddr) continue; /* socket per slot ! -FB */ |
sk | 1010 | net/inet/sock.c | remove_sock(sk); |
sk | 1011 | net/inet/sock.c | put_sock(snum, sk); |
sk | 1012 | net/inet/sock.c | sk->dummy_th.source = ntohs(sk->num); |
sk | 1013 | net/inet/sock.c | sk->daddr = 0; |
sk | 1014 | net/inet/sock.c | sk->dummy_th.dest = 0; |
sk | 1023 | net/inet/sock.c | struct sock *sk; |
sk | 1027 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 1028 | net/inet/sock.c | if (sk == NULL) { |
sk | 1033 | net/inet/sock.c | if (sock->state == SS_CONNECTING && sk->state == TCP_ESTABLISHED) |
sk | 1040 | net/inet/sock.c | if (sock->state == SS_CONNECTING && sk->protocol == IPPROTO_TCP && |
sk | 1046 | net/inet/sock.c | if (sk->num == 0) { |
sk | 1047 | net/inet/sock.c | sk->num = get_new_socknum(sk->prot, 0); |
sk | 1048 | net/inet/sock.c | if (sk->num == 0) |
sk | 1050 | net/inet/sock.c | put_sock(sk->num, sk); |
sk | 1051 | net/inet/sock.c | sk->dummy_th.source = htons(sk->num); |
sk | 1054 | net/inet/sock.c | if (sk->prot->connect == NULL) |
sk | 1057 | net/inet/sock.c | err = sk->prot->connect(sk, (struct sockaddr_in *)uaddr, addr_len); |
sk | 1063 | net/inet/sock.c | if (sk->state != TCP_ESTABLISHED &&(flags & O_NONBLOCK)) |
sk | 1067 | net/inet/sock.c | while(sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) |
sk | 1069 | net/inet/sock.c | interruptible_sleep_on(sk->sleep); |
sk | 1076 | net/inet/sock.c | if(sk->err && sk->protocol == IPPROTO_TCP) |
sk | 1080 | net/inet/sock.c | return -sk->err; /* set by tcp_err() */ |
sk | 1086 | net/inet/sock.c | if (sk->state != TCP_ESTABLISHED && sk->err) { |
sk | 1088 | net/inet/sock.c | return(-sk->err); |
sk | 1173 | net/inet/sock.c | struct sock *sk; |
sk | 1192 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 1193 | net/inet/sock.c | if (sk == NULL) { |
sk | 1198 | net/inet/sock.c | if (!tcp_connected(sk->state)) return(-ENOTCONN); |
sk | 1199 | net/inet/sock.c | sin.sin_port = sk->dummy_th.dest; |
sk | 1200 | net/inet/sock.c | sin.sin_addr.s_addr = sk->daddr; |
sk | 1202 | net/inet/sock.c | sin.sin_port = sk->dummy_th.source; |
sk | 1203 | net/inet/sock.c | if (sk->saddr == 0) sin.sin_addr.s_addr = my_addr(); |
sk | 1204 | net/inet/sock.c | else sin.sin_addr.s_addr = sk->saddr; |
sk | 1218 | net/inet/sock.c | struct sock *sk; |
sk | 1220 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 1221 | net/inet/sock.c | if (sk == NULL) { |
sk | 1227 | net/inet/sock.c | if (sk->num == 0) { |
sk | 1228 | net/inet/sock.c | sk->num = get_new_socknum(sk->prot, 0); |
sk | 1229 | net/inet/sock.c | if (sk->num == 0) return(-EAGAIN); |
sk | 1230 | net/inet/sock.c | put_sock(sk->num, sk); |
sk | 1231 | net/inet/sock.c | sk->dummy_th.source = ntohs(sk->num); |
sk | 1233 | net/inet/sock.c | return(sk->prot->read(sk, (unsigned char *) ubuf, size, noblock,0)); |
sk | 1241 | net/inet/sock.c | struct sock *sk; |
sk | 1243 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 1244 | net/inet/sock.c | if (sk == NULL) { |
sk | 1250 | net/inet/sock.c | if (sk->num == 0) { |
sk | 1251 | net/inet/sock.c | sk->num = get_new_socknum(sk->prot, 0); |
sk | 1252 | net/inet/sock.c | if (sk->num == 0) return(-EAGAIN); |
sk | 1253 | net/inet/sock.c | put_sock(sk->num, sk); |
sk | 1254 | net/inet/sock.c | sk->dummy_th.source = ntohs(sk->num); |
sk | 1256 | net/inet/sock.c | return(sk->prot->read(sk, (unsigned char *) ubuf, size, noblock, flags)); |
sk | 1263 | net/inet/sock.c | struct sock *sk; |
sk | 1265 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 1266 | net/inet/sock.c | if (sk == NULL) { |
sk | 1270 | net/inet/sock.c | if (sk->shutdown & SEND_SHUTDOWN) { |
sk | 1276 | net/inet/sock.c | if (sk->num == 0) { |
sk | 1277 | net/inet/sock.c | sk->num = get_new_socknum(sk->prot, 0); |
sk | 1278 | net/inet/sock.c | if (sk->num == 0) return(-EAGAIN); |
sk | 1279 | net/inet/sock.c | put_sock(sk->num, sk); |
sk | 1280 | net/inet/sock.c | sk->dummy_th.source = ntohs(sk->num); |
sk | 1283 | net/inet/sock.c | return(sk->prot->write(sk, (unsigned char *) ubuf, size, noblock, 0)); |
sk | 1291 | net/inet/sock.c | struct sock *sk; |
sk | 1293 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 1294 | net/inet/sock.c | if (sk == NULL) { |
sk | 1298 | net/inet/sock.c | if (sk->shutdown & SEND_SHUTDOWN) { |
sk | 1304 | net/inet/sock.c | if (sk->num == 0) { |
sk | 1305 | net/inet/sock.c | sk->num = get_new_socknum(sk->prot, 0); |
sk | 1306 | net/inet/sock.c | if (sk->num == 0) return(-EAGAIN); |
sk | 1307 | net/inet/sock.c | put_sock(sk->num, sk); |
sk | 1308 | net/inet/sock.c | sk->dummy_th.source = ntohs(sk->num); |
sk | 1311 | net/inet/sock.c | return(sk->prot->write(sk, (unsigned char *) ubuf, size, noblock, flags)); |
sk | 1319 | net/inet/sock.c | struct sock *sk; |
sk | 1321 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 1322 | net/inet/sock.c | if (sk == NULL) { |
sk | 1326 | net/inet/sock.c | if (sk->shutdown & SEND_SHUTDOWN) { |
sk | 1331 | net/inet/sock.c | if (sk->prot->sendto == NULL) return(-EOPNOTSUPP); |
sk | 1334 | net/inet/sock.c | if (sk->num == 0) { |
sk | 1335 | net/inet/sock.c | sk->num = get_new_socknum(sk->prot, 0); |
sk | 1336 | net/inet/sock.c | if (sk->num == 0) return(-EAGAIN); |
sk | 1337 | net/inet/sock.c | put_sock(sk->num, sk); |
sk | 1338 | net/inet/sock.c | sk->dummy_th.source = ntohs(sk->num); |
sk | 1341 | net/inet/sock.c | return(sk->prot->sendto(sk, (unsigned char *) ubuf, size, noblock, flags, |
sk | 1350 | net/inet/sock.c | struct sock *sk; |
sk | 1352 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 1353 | net/inet/sock.c | if (sk == NULL) { |
sk | 1358 | net/inet/sock.c | if (sk->prot->recvfrom == NULL) return(-EOPNOTSUPP); |
sk | 1361 | net/inet/sock.c | if (sk->num == 0) { |
sk | 1362 | net/inet/sock.c | sk->num = get_new_socknum(sk->prot, 0); |
sk | 1363 | net/inet/sock.c | if (sk->num == 0) return(-EAGAIN); |
sk | 1364 | net/inet/sock.c | put_sock(sk->num, sk); |
sk | 1365 | net/inet/sock.c | sk->dummy_th.source = ntohs(sk->num); |
sk | 1368 | net/inet/sock.c | return(sk->prot->recvfrom(sk, (unsigned char *) ubuf, size, noblock, flags, |
sk | 1376 | net/inet/sock.c | struct sock *sk; |
sk | 1386 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 1387 | net/inet/sock.c | if (sk == NULL) { |
sk | 1391 | net/inet/sock.c | if (sock->state == SS_CONNECTING && sk->state == TCP_ESTABLISHED) |
sk | 1394 | net/inet/sock.c | if (!tcp_connected(sk->state)) return(-ENOTCONN); |
sk | 1395 | net/inet/sock.c | sk->shutdown |= how; |
sk | 1396 | net/inet/sock.c | if (sk->prot->shutdown) sk->prot->shutdown(sk, how); |
sk | 1404 | net/inet/sock.c | struct sock *sk; |
sk | 1406 | net/inet/sock.c | sk = (struct sock *) sock->data; |
sk | 1407 | net/inet/sock.c | if (sk == NULL) { |
sk | 1412 | net/inet/sock.c | if (sk->prot->select == NULL) { |
sk | 1416 | net/inet/sock.c | return(sk->prot->select(sk, sel_type, wait)); |
sk | 1423 | net/inet/sock.c | struct sock *sk; |
sk | 1427 | net/inet/sock.c | sk = NULL; |
sk | 1428 | net/inet/sock.c | if (sock && (sk = (struct sock *) sock->data) == NULL) { |
sk | 1439 | net/inet/sock.c | if (sk) |
sk | 1440 | net/inet/sock.c | sk->proc = get_fs_long((int *) arg); |
sk | 1444 | net/inet/sock.c | if (sk) { |
sk | 1448 | net/inet/sock.c | put_fs_long(sk->proc,(int *)arg); |
sk | 1492 | net/inet/sock.c | if (!sk || !sk->prot->ioctl) return(-EINVAL); |
sk | 1493 | net/inet/sock.c | return(sk->prot->ioctl(sk, cmd, arg)); |
sk | 1501 | net/inet/sock.c | sock_wmalloc(struct sock *sk, unsigned long size, int force, |
sk | 1504 | net/inet/sock.c | if (sk) { |
sk | 1505 | net/inet/sock.c | if (sk->wmem_alloc + size < sk->sndbuf || force) { |
sk | 1507 | net/inet/sock.c | sk->wmem_alloc+= size; |
sk | 1512 | net/inet/sock.c | sk, size, force, priority)); |
sk | 1520 | net/inet/sock.c | sock_rmalloc(struct sock *sk, unsigned long size, int force, int priority) |
sk | 1522 | net/inet/sock.c | if (sk) { |
sk | 1523 | net/inet/sock.c | if (sk->rmem_alloc + size < sk->rcvbuf || force) { |
sk | 1526 | net/inet/sock.c | if (c) sk->rmem_alloc += size; |
sk | 1531 | net/inet/sock.c | sk,size,force, priority)); |
sk | 1539 | net/inet/sock.c | sock_rspace(struct sock *sk) |
sk | 1543 | net/inet/sock.c | if (sk != NULL) { |
sk | 1544 | net/inet/sock.c | if (sk->rmem_alloc >= sk->rcvbuf-2*MIN_WINDOW) return(0); |
sk | 1545 | net/inet/sock.c | amt = min((sk->rcvbuf-sk->rmem_alloc)/2-MIN_WINDOW, MAX_WINDOW); |
sk | 1554 | net/inet/sock.c | sock_wspace(struct sock *sk) |
sk | 1556 | net/inet/sock.c | if (sk != NULL) { |
sk | 1557 | net/inet/sock.c | if (sk->shutdown & SEND_SHUTDOWN) return(0); |
sk | 1558 | net/inet/sock.c | if (sk->wmem_alloc >= sk->sndbuf) return(0); |
sk | 1559 | net/inet/sock.c | return(sk->sndbuf-sk->wmem_alloc ); |
sk | 1566 | net/inet/sock.c | sock_wfree(struct sock *sk, void *mem, unsigned long size) |
sk | 1568 | net/inet/sock.c | DPRINTF((DBG_INET, "sock_wfree(sk=%X, mem=%X, size=%d)\n", sk, mem, size)); |
sk | 1572 | net/inet/sock.c | if (sk) { |
sk | 1573 | net/inet/sock.c | sk->wmem_alloc -= size; |
sk | 1576 | net/inet/sock.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 1577 | net/inet/sock.c | if (sk->destroy && sk->wmem_alloc == 0 && sk->rmem_alloc == 0) { |
sk | 1579 | net/inet/sock.c | "recovered lost memory, sock = %X\n", sk)); |
sk | 1587 | net/inet/sock.c | sock_rfree(struct sock *sk, void *mem, unsigned long size) |
sk | 1589 | net/inet/sock.c | DPRINTF((DBG_INET, "sock_rfree(sk=%X, mem=%X, size=%d)\n", sk, mem, size)); |
sk | 1592 | net/inet/sock.c | if (sk) { |
sk | 1593 | net/inet/sock.c | sk->rmem_alloc -= size; |
sk | 1594 | net/inet/sock.c | if (sk->destroy && sk->wmem_alloc == 0 && sk->rmem_alloc == 0) { |
sk | 1596 | net/inet/sock.c | "recovered lot memory, sock = %X\n", sk)); |
sk | 1646 | net/inet/sock.c | void release_sock(struct sock *sk) |
sk | 1648 | net/inet/sock.c | if (!sk) { |
sk | 1652 | net/inet/sock.c | if (!sk->prot) { |
sk | 1657 | net/inet/sock.c | if (sk->blog) return; |
sk | 1661 | net/inet/sock.c | sk->inuse = 1; |
sk | 1662 | net/inet/sock.c | while(sk->back_log != NULL) { |
sk | 1665 | net/inet/sock.c | sk->blog = 1; |
sk | 1666 | net/inet/sock.c | skb =(struct sk_buff *)sk->back_log; |
sk | 1669 | net/inet/sock.c | sk->back_log = skb->next; |
sk | 1673 | net/inet/sock.c | sk->back_log = NULL; |
sk | 1676 | net/inet/sock.c | DPRINTF((DBG_INET, "sk->back_log = %X\n", sk->back_log)); |
sk | 1677 | net/inet/sock.c | if (sk->prot->rcv) sk->prot->rcv(skb, skb->dev, sk->opt, |
sk | 1681 | net/inet/sock.c | (struct inet_protocol *)sk->pair); |
sk | 1684 | net/inet/sock.c | sk->blog = 0; |
sk | 1685 | net/inet/sock.c | sk->inuse = 0; |
sk | 1687 | net/inet/sock.c | if (sk->dead && sk->state == TCP_CLOSE) { |
sk | 1689 | net/inet/sock.c | reset_timer(sk, TIME_DONE, min(sk->rtt * 2, TCP_DONE_TIME)); |
sk | 129 | net/inet/sock.h | void *(*wmalloc)(struct sock *sk, |
sk | 132 | net/inet/sock.h | void *(*rmalloc)(struct sock *sk, |
sk | 135 | net/inet/sock.h | void (*wfree)(struct sock *sk, void *mem, |
sk | 137 | net/inet/sock.h | void (*rfree)(struct sock *sk, void *mem, |
sk | 139 | net/inet/sock.h | unsigned long (*rspace)(struct sock *sk); |
sk | 140 | net/inet/sock.h | unsigned long (*wspace)(struct sock *sk); |
sk | 141 | net/inet/sock.h | void (*close)(struct sock *sk, int timeout); |
sk | 142 | net/inet/sock.h | int (*read)(struct sock *sk, unsigned char *to, |
sk | 144 | net/inet/sock.h | int (*write)(struct sock *sk, unsigned char *to, |
sk | 146 | net/inet/sock.h | int (*sendto)(struct sock *sk, |
sk | 150 | net/inet/sock.h | int (*recvfrom)(struct sock *sk, |
sk | 159 | net/inet/sock.h | int (*connect)(struct sock *sk, |
sk | 161 | net/inet/sock.h | struct sock *(*accept) (struct sock *sk, int flags); |
sk | 162 | net/inet/sock.h | void (*queue_xmit)(struct sock *sk, |
sk | 165 | net/inet/sock.h | void (*retransmit)(struct sock *sk, int all); |
sk | 166 | net/inet/sock.h | void (*write_wakeup)(struct sock *sk); |
sk | 167 | net/inet/sock.h | void (*read_wakeup)(struct sock *sk); |
sk | 172 | net/inet/sock.h | int (*select)(struct sock *sk, int which, |
sk | 174 | net/inet/sock.h | int (*ioctl)(struct sock *sk, int cmd, |
sk | 176 | net/inet/sock.h | int (*init)(struct sock *sk); |
sk | 177 | net/inet/sock.h | void (*shutdown)(struct sock *sk, int how); |
sk | 198 | net/inet/sock.h | extern void destroy_sock(struct sock *sk); |
sk | 201 | net/inet/sock.h | extern void release_sock(struct sock *sk); |
sk | 206 | net/inet/sock.h | extern void *sock_wmalloc(struct sock *sk, |
sk | 209 | net/inet/sock.h | extern void *sock_rmalloc(struct sock *sk, |
sk | 212 | net/inet/sock.h | extern void sock_wfree(struct sock *sk, void *mem, |
sk | 214 | net/inet/sock.h | extern void sock_rfree(struct sock *sk, void *mem, |
sk | 216 | net/inet/sock.h | extern unsigned long sock_rspace(struct sock *sk); |
sk | 217 | net/inet/sock.h | extern unsigned long sock_wspace(struct sock *sk); |
sk | 129 | net/inet/tcp.c | get_firstr(struct sock *sk) |
sk | 131 | net/inet/tcp.c | return skb_dequeue(&sk->rqueue); |
sk | 153 | net/inet/tcp.c | static void tcp_time_wait(struct sock *sk) |
sk | 155 | net/inet/tcp.c | sk->state = TCP_TIME_WAIT; |
sk | 156 | net/inet/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 157 | net/inet/tcp.c | if (!sk->dead) |
sk | 158 | net/inet/tcp.c | wake_up(sk->sleep); |
sk | 159 | net/inet/tcp.c | reset_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN); |
sk | 170 | net/inet/tcp.c | tcp_retransmit(struct sock *sk, int all) |
sk | 173 | net/inet/tcp.c | ip_retransmit(sk, all); |
sk | 177 | net/inet/tcp.c | if (sk->cong_window > 4) |
sk | 178 | net/inet/tcp.c | sk->cong_window = sk->cong_window / 2; |
sk | 179 | net/inet/tcp.c | sk->exp_growth = 0; |
sk | 182 | net/inet/tcp.c | ip_retransmit(sk, all); |
sk | 199 | net/inet/tcp.c | struct sock *sk; |
sk | 208 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->source/*dest*/, daddr, th->dest/*source*/, saddr); |
sk | 211 | net/inet/tcp.c | if (sk == NULL) return; |
sk | 215 | net/inet/tcp.c | sk->err = -err; |
sk | 216 | net/inet/tcp.c | wake_up(sk->sleep); |
sk | 226 | net/inet/tcp.c | if (sk->cong_window > 4) sk->cong_window--; |
sk | 231 | net/inet/tcp.c | sk->err = icmp_err_convert[err & 0xff].errno; |
sk | 238 | net/inet/tcp.c | if (sk->state == TCP_SYN_SENT) { |
sk | 239 | net/inet/tcp.c | sk->state = TCP_CLOSE; |
sk | 240 | net/inet/tcp.c | wake_up(sk->sleep); /* Wake people up to see the error (see connect in sock.c) */ |
sk | 253 | net/inet/tcp.c | tcp_readable(struct sock *sk) |
sk | 262 | net/inet/tcp.c | DPRINTF((DBG_TCP, "tcp_readable(sk=%X)\n", sk)); |
sk | 263 | net/inet/tcp.c | if(sk && sk->debug) |
sk | 264 | net/inet/tcp.c | printk("tcp_readable: %p - ",sk); |
sk | 266 | net/inet/tcp.c | if (sk == NULL || skb_peek(&sk->rqueue) == NULL) /* Empty sockets are easy! */ |
sk | 268 | net/inet/tcp.c | if(sk && sk->debug) |
sk | 273 | net/inet/tcp.c | counted = sk->copied_seq+1; /* Where we are at the moment */ |
sk | 278 | net/inet/tcp.c | skb =(struct sk_buff *)sk->rqueue; |
sk | 306 | net/inet/tcp.c | } while(skb != sk->rqueue); |
sk | 309 | net/inet/tcp.c | if(sk->debug) |
sk | 321 | net/inet/tcp.c | tcp_select(struct sock *sk, int sel_type, select_table *wait) |
sk | 324 | net/inet/tcp.c | sk, sel_type, wait)); |
sk | 326 | net/inet/tcp.c | sk->inuse = 1; |
sk | 329 | net/inet/tcp.c | if(sk->debug) |
sk | 331 | net/inet/tcp.c | select_wait(sk->sleep, wait); |
sk | 332 | net/inet/tcp.c | if(sk->debug) |
sk | 334 | net/inet/tcp.c | if (skb_peek(&sk->rqueue) != NULL) { |
sk | 335 | net/inet/tcp.c | if (sk->state == TCP_LISTEN || tcp_readable(sk)) { |
sk | 336 | net/inet/tcp.c | release_sock(sk); |
sk | 337 | net/inet/tcp.c | if(sk->debug) |
sk | 342 | net/inet/tcp.c | if (sk->err != 0) /* Receiver error */ |
sk | 344 | net/inet/tcp.c | release_sock(sk); |
sk | 345 | net/inet/tcp.c | if(sk->debug) |
sk | 349 | net/inet/tcp.c | if (sk->shutdown & RCV_SHUTDOWN) { |
sk | 350 | net/inet/tcp.c | release_sock(sk); |
sk | 351 | net/inet/tcp.c | if(sk->debug) |
sk | 355 | net/inet/tcp.c | release_sock(sk); |
sk | 356 | net/inet/tcp.c | if(sk->debug) |
sk | 361 | net/inet/tcp.c | select_wait(sk->sleep, wait); |
sk | 362 | net/inet/tcp.c | if (sk->shutdown & SEND_SHUTDOWN) { |
sk | 367 | net/inet/tcp.c | release_sock(sk); |
sk | 376 | net/inet/tcp.c | if (sk->prot->wspace(sk) >= sk->mtu) { |
sk | 377 | net/inet/tcp.c | release_sock(sk); |
sk | 379 | net/inet/tcp.c | if (sk->state == TCP_SYN_RECV || |
sk | 380 | net/inet/tcp.c | sk->state == TCP_SYN_SENT) return(0); |
sk | 388 | net/inet/tcp.c | sk->wmem_alloc, sk->packets_out, |
sk | 389 | net/inet/tcp.c | sk->wback, sk->wfront, |
sk | 390 | net/inet/tcp.c | sk->send_seq, sk->window_seq)); |
sk | 392 | net/inet/tcp.c | release_sock(sk); |
sk | 395 | net/inet/tcp.c | select_wait(sk->sleep,wait); |
sk | 396 | net/inet/tcp.c | if (sk->err) { |
sk | 397 | net/inet/tcp.c | release_sock(sk); |
sk | 400 | net/inet/tcp.c | release_sock(sk); |
sk | 404 | net/inet/tcp.c | release_sock(sk); |
sk | 410 | net/inet/tcp.c | tcp_ioctl(struct sock *sk, int cmd, unsigned long arg) |
sk | 413 | net/inet/tcp.c | DPRINTF((DBG_TCP, "tcp_ioctl(sk=%X, cmd = %d, arg=%X)\n", sk, cmd, arg)); |
sk | 425 | net/inet/tcp.c | if (sk->state == TCP_LISTEN) return(-EINVAL); |
sk | 427 | net/inet/tcp.c | sk->inuse = 1; |
sk | 428 | net/inet/tcp.c | amount = tcp_readable(sk); |
sk | 429 | net/inet/tcp.c | release_sock(sk); |
sk | 447 | net/inet/tcp.c | sk->inuse = 1; |
sk | 448 | net/inet/tcp.c | if ((skb=skb_peek(&sk->rqueue)) != NULL) |
sk | 450 | net/inet/tcp.c | if (sk->copied_seq+1 == skb->h.th->seq && skb->h.th->urg) |
sk | 453 | net/inet/tcp.c | release_sock(sk); |
sk | 465 | net/inet/tcp.c | if (sk->state == TCP_LISTEN) return(-EINVAL); |
sk | 466 | net/inet/tcp.c | amount = sk->prot->wspace(sk); |
sk | 545 | net/inet/tcp.c | unsigned long daddr, int len, struct sock *sk) |
sk | 554 | net/inet/tcp.c | tcp_send_partial(struct sock *sk) |
sk | 558 | net/inet/tcp.c | if (sk == NULL || sk->send_tmp == NULL) return; |
sk | 560 | net/inet/tcp.c | skb = sk->send_tmp; |
sk | 563 | net/inet/tcp.c | tcp_send_check(skb->h.th, sk->saddr, sk->daddr, |
sk | 565 | net/inet/tcp.c | (unsigned long)(skb+1), sk); |
sk | 567 | net/inet/tcp.c | skb->h.seq = sk->send_seq; |
sk | 568 | net/inet/tcp.c | if (after(sk->send_seq , sk->window_seq) || |
sk | 569 | net/inet/tcp.c | sk->packets_out >= sk->cong_window) { |
sk | 571 | net/inet/tcp.c | sk->cong_window, sk->packets_out)); |
sk | 573 | net/inet/tcp.c | sk->send_seq, sk->window_seq)); |
sk | 576 | net/inet/tcp.c | if (sk->wback == NULL) { |
sk | 577 | net/inet/tcp.c | sk->wfront=skb; |
sk | 579 | net/inet/tcp.c | sk->wback->next = skb; |
sk | 581 | net/inet/tcp.c | sk->wback = skb; |
sk | 583 | net/inet/tcp.c | sk->prot->queue_xmit(sk, skb->dev, skb,0); |
sk | 585 | net/inet/tcp.c | sk->send_tmp = NULL; |
sk | 592 | net/inet/tcp.c | struct sock *sk, |
sk | 600 | net/inet/tcp.c | if(sk->zapped) |
sk | 606 | net/inet/tcp.c | buff = (struct sk_buff *) sk->prot->wmalloc(sk, MAX_ACK_SIZE, 1, GFP_ATOMIC); |
sk | 609 | net/inet/tcp.c | sk->ack_backlog++; |
sk | 610 | net/inet/tcp.c | if (sk->timeout != TIME_WRITE && tcp_connected(sk->state)) { |
sk | 611 | net/inet/tcp.c | reset_timer(sk, TIME_WRITE, 10); |
sk | 620 | net/inet/tcp.c | buff->sk = sk; |
sk | 624 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, daddr, &dev, |
sk | 625 | net/inet/tcp.c | IPPROTO_TCP, sk->opt, MAX_ACK_SIZE); |
sk | 628 | net/inet/tcp.c | sk->prot->wfree(sk, buff->mem_addr, buff->mem_len); |
sk | 643 | net/inet/tcp.c | sk->window = sk->prot->rspace(sk); |
sk | 644 | net/inet/tcp.c | t1->window = ntohs(sk->window); |
sk | 652 | net/inet/tcp.c | if (ack == sk->acked_seq) { |
sk | 653 | net/inet/tcp.c | sk->ack_backlog = 0; |
sk | 654 | net/inet/tcp.c | sk->bytes_rcv = 0; |
sk | 655 | net/inet/tcp.c | sk->ack_timed = 0; |
sk | 656 | net/inet/tcp.c | if (sk->send_head == NULL && sk->wfront == NULL) { |
sk | 662 | net/inet/tcp.c | tcp_send_check(t1, sk->saddr, daddr, sizeof(*t1), sk); |
sk | 663 | net/inet/tcp.c | if (sk->debug) |
sk | 665 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
sk | 671 | net/inet/tcp.c | tcp_build_header(struct tcphdr *th, struct sock *sk, int push) |
sk | 675 | net/inet/tcp.c | memcpy(th,(void *) &(sk->dummy_th), sizeof(*th)); |
sk | 676 | net/inet/tcp.c | th->seq = htonl(sk->send_seq); |
sk | 681 | net/inet/tcp.c | sk->ack_backlog = 0; |
sk | 682 | net/inet/tcp.c | sk->bytes_rcv = 0; |
sk | 683 | net/inet/tcp.c | sk->ack_timed = 0; |
sk | 684 | net/inet/tcp.c | th->ack_seq = htonl(sk->acked_seq); |
sk | 685 | net/inet/tcp.c | sk->window = sk->prot->rspace(sk); |
sk | 686 | net/inet/tcp.c | th->window = htons(sk->window); |
sk | 697 | net/inet/tcp.c | tcp_write(struct sock *sk, unsigned char *from, |
sk | 709 | net/inet/tcp.c | sk, from, len, nonblock, flags)); |
sk | 711 | net/inet/tcp.c | sk->inuse=1; |
sk | 712 | net/inet/tcp.c | prot = sk->prot; |
sk | 714 | net/inet/tcp.c | if (sk->err) { /* Stop on an error */ |
sk | 715 | net/inet/tcp.c | release_sock(sk); |
sk | 717 | net/inet/tcp.c | tmp = -sk->err; |
sk | 718 | net/inet/tcp.c | sk->err = 0; |
sk | 723 | net/inet/tcp.c | if (sk->shutdown & SEND_SHUTDOWN) { |
sk | 724 | net/inet/tcp.c | release_sock(sk); |
sk | 725 | net/inet/tcp.c | sk->err = EPIPE; |
sk | 727 | net/inet/tcp.c | sk->err = 0; |
sk | 734 | net/inet/tcp.c | while(sk->state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT) { |
sk | 735 | net/inet/tcp.c | if (sk->err) { |
sk | 736 | net/inet/tcp.c | release_sock(sk); |
sk | 738 | net/inet/tcp.c | tmp = -sk->err; |
sk | 739 | net/inet/tcp.c | sk->err = 0; |
sk | 743 | net/inet/tcp.c | if (sk->state != TCP_SYN_SENT && sk->state != TCP_SYN_RECV) { |
sk | 744 | net/inet/tcp.c | release_sock(sk); |
sk | 748 | net/inet/tcp.c | if (sk->err) { |
sk | 749 | net/inet/tcp.c | tmp = -sk->err; |
sk | 750 | net/inet/tcp.c | sk->err = 0; |
sk | 754 | net/inet/tcp.c | if (sk->keepopen) { |
sk | 761 | net/inet/tcp.c | release_sock(sk); |
sk | 767 | net/inet/tcp.c | release_sock(sk); |
sk | 769 | net/inet/tcp.c | if (sk->state != TCP_ESTABLISHED && |
sk | 770 | net/inet/tcp.c | sk->state != TCP_CLOSE_WAIT && sk->err == 0) { |
sk | 771 | net/inet/tcp.c | interruptible_sleep_on(sk->sleep); |
sk | 779 | net/inet/tcp.c | sk->inuse = 1; |
sk | 784 | net/inet/tcp.c | if (sk->send_tmp != NULL) { |
sk | 788 | net/inet/tcp.c | skb = sk->send_tmp; |
sk | 790 | net/inet/tcp.c | copy = min(sk->mss - skb->len + 128 + |
sk | 804 | net/inet/tcp.c | sk->send_seq += copy; |
sk | 808 | net/inet/tcp.c | (unsigned long)(skb+1) >= sk->mss ||(flags & MSG_OOB)) { |
sk | 809 | net/inet/tcp.c | tcp_send_partial(sk); |
sk | 820 | net/inet/tcp.c | copy = min(sk->mtu, diff(sk->window_seq, sk->send_seq)); |
sk | 823 | net/inet/tcp.c | if (copy < 200 || copy > sk->mtu) copy = sk->mtu; |
sk | 827 | net/inet/tcp.c | if (sk->packets_out && copy < sk->mss && !(flags & MSG_OOB)) { |
sk | 829 | net/inet/tcp.c | release_sock(sk); |
sk | 830 | net/inet/tcp.c | skb = (struct sk_buff *) prot->wmalloc(sk, |
sk | 831 | net/inet/tcp.c | sk->mss + 128 + prot->max_header + |
sk | 833 | net/inet/tcp.c | sk->inuse = 1; |
sk | 834 | net/inet/tcp.c | sk->send_tmp = skb; |
sk | 836 | net/inet/tcp.c | skb->mem_len = sk->mss + 128 + prot->max_header + sizeof(*skb); |
sk | 839 | net/inet/tcp.c | release_sock(sk); |
sk | 840 | net/inet/tcp.c | skb = (struct sk_buff *) prot->wmalloc(sk, |
sk | 843 | net/inet/tcp.c | sk->inuse = 1; |
sk | 851 | net/inet/tcp.c | release_sock(sk); |
sk | 858 | net/inet/tcp.c | tmp = sk->wmem_alloc; |
sk | 859 | net/inet/tcp.c | release_sock(sk); |
sk | 862 | net/inet/tcp.c | if (tmp <= sk->wmem_alloc && |
sk | 863 | net/inet/tcp.c | (sk->state == TCP_ESTABLISHED||sk->state == TCP_CLOSE_WAIT) |
sk | 864 | net/inet/tcp.c | && sk->err == 0) { |
sk | 865 | net/inet/tcp.c | interruptible_sleep_on(sk->sleep); |
sk | 873 | net/inet/tcp.c | sk->inuse = 1; |
sk | 880 | net/inet/tcp.c | skb->sk = sk; |
sk | 889 | net/inet/tcp.c | tmp = prot->build_header(skb, sk->saddr, sk->daddr, &dev, |
sk | 890 | net/inet/tcp.c | IPPROTO_TCP, sk->opt, skb->mem_len); |
sk | 892 | net/inet/tcp.c | prot->wfree(sk, skb->mem_addr, skb->mem_len); |
sk | 893 | net/inet/tcp.c | release_sock(sk); |
sk | 902 | net/inet/tcp.c | tmp = tcp_build_header((struct tcphdr *)buff, sk, len-copy); |
sk | 904 | net/inet/tcp.c | prot->wfree(sk, skb->mem_addr, skb->mem_len); |
sk | 905 | net/inet/tcp.c | release_sock(sk); |
sk | 923 | net/inet/tcp.c | sk->send_seq += copy; |
sk | 925 | net/inet/tcp.c | if (sk->send_tmp != NULL) continue; |
sk | 927 | net/inet/tcp.c | tcp_send_check((struct tcphdr *)buff, sk->saddr, sk->daddr, |
sk | 928 | net/inet/tcp.c | copy + sizeof(struct tcphdr), sk); |
sk | 930 | net/inet/tcp.c | skb->h.seq = sk->send_seq; |
sk | 931 | net/inet/tcp.c | if (after(sk->send_seq , sk->window_seq) || |
sk | 932 | net/inet/tcp.c | sk->packets_out >= sk->cong_window) { |
sk | 934 | net/inet/tcp.c | sk->cong_window, sk->packets_out)); |
sk | 936 | net/inet/tcp.c | sk->send_seq, sk->window_seq)); |
sk | 939 | net/inet/tcp.c | if (sk->wback == NULL) { |
sk | 940 | net/inet/tcp.c | sk->wfront = skb; |
sk | 942 | net/inet/tcp.c | sk->wback->next = skb; |
sk | 944 | net/inet/tcp.c | sk->wback = skb; |
sk | 946 | net/inet/tcp.c | prot->queue_xmit(sk, dev, skb,0); |
sk | 949 | net/inet/tcp.c | sk->err = 0; |
sk | 951 | net/inet/tcp.c | if(sk->send_tmp && !sk->packets_out) |
sk | 952 | net/inet/tcp.c | tcp_send_partial(sk); |
sk | 954 | net/inet/tcp.c | release_sock(sk); |
sk | 961 | net/inet/tcp.c | tcp_sendto(struct sock *sk, unsigned char *from, |
sk | 970 | net/inet/tcp.c | if (sin.sin_port != sk->dummy_th.dest) return(-EINVAL); |
sk | 971 | net/inet/tcp.c | if (sin.sin_addr.s_addr != sk->daddr) return(-EINVAL); |
sk | 972 | net/inet/tcp.c | return(tcp_write(sk, from, len, nonblock, flags)); |
sk | 977 | net/inet/tcp.c | tcp_read_wakeup(struct sock *sk) |
sk | 985 | net/inet/tcp.c | if (!sk->ack_backlog) return; |
sk | 997 | net/inet/tcp.c | buff = (struct sk_buff *) sk->prot->wmalloc(sk,MAX_ACK_SIZE,1, GFP_ATOMIC); |
sk | 1000 | net/inet/tcp.c | reset_timer(sk, TIME_WRITE, 10); |
sk | 1007 | net/inet/tcp.c | buff->sk = sk; |
sk | 1010 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
sk | 1011 | net/inet/tcp.c | IPPROTO_TCP, sk->opt, MAX_ACK_SIZE); |
sk | 1014 | net/inet/tcp.c | sk->prot->wfree(sk, buff->mem_addr, buff->mem_len); |
sk | 1021 | net/inet/tcp.c | memcpy(t1,(void *) &sk->dummy_th, sizeof(*t1)); |
sk | 1022 | net/inet/tcp.c | t1->seq = ntohl(sk->send_seq); |
sk | 1030 | net/inet/tcp.c | sk->ack_backlog = 0; |
sk | 1031 | net/inet/tcp.c | sk->bytes_rcv = 0; |
sk | 1032 | net/inet/tcp.c | sk->window = sk->prot->rspace(sk); |
sk | 1033 | net/inet/tcp.c | t1->window = ntohs(sk->window); |
sk | 1034 | net/inet/tcp.c | t1->ack_seq = ntohl(sk->acked_seq); |
sk | 1036 | net/inet/tcp.c | tcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk); |
sk | 1037 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
sk | 1048 | net/inet/tcp.c | cleanup_rbuf(struct sock *sk) |
sk | 1054 | net/inet/tcp.c | if(sk->debug) |
sk | 1055 | net/inet/tcp.c | printk("cleaning rbuf for sk=%p\n", sk); |
sk | 1060 | net/inet/tcp.c | left = sk->prot->rspace(sk); |
sk | 1066 | net/inet/tcp.c | while((skb=skb_peek(&sk->rqueue)) != NULL ) |
sk | 1071 | net/inet/tcp.c | skb->sk = sk; |
sk | 1084 | net/inet/tcp.c | sk->window - sk->bytes_rcv, sk->prot->rspace(sk))); |
sk | 1086 | net/inet/tcp.c | if(sk->debug) |
sk | 1087 | net/inet/tcp.c | printk("sk->rspace = %lu, was %d\n", sk->prot->rspace(sk), |
sk | 1089 | net/inet/tcp.c | if (sk->prot->rspace(sk) != left) |
sk | 1101 | net/inet/tcp.c | sk->ack_backlog++; |
sk | 1102 | net/inet/tcp.c | if ((sk->prot->rspace(sk) > (sk->window - sk->bytes_rcv + sk->mtu))) { |
sk | 1104 | net/inet/tcp.c | tcp_read_wakeup(sk); |
sk | 1107 | net/inet/tcp.c | int was_active = del_timer(&sk->timer); |
sk | 1108 | net/inet/tcp.c | if (!was_active || TCP_ACK_TIME < sk->timer.expires) { |
sk | 1109 | net/inet/tcp.c | reset_timer(sk, TIME_WRITE, TCP_ACK_TIME); |
sk | 1111 | net/inet/tcp.c | add_timer(&sk->timer); |
sk | 1119 | net/inet/tcp.c | tcp_read_urg(struct sock * sk, int nonblock, |
sk | 1126 | net/inet/tcp.c | sk, to, len, flags)); |
sk | 1130 | net/inet/tcp.c | sk->inuse = 1; |
sk | 1131 | net/inet/tcp.c | while(sk->urg==0 || skb_peek(&sk->rqueue) == NULL) { |
sk | 1132 | net/inet/tcp.c | if (sk->err) { |
sk | 1135 | net/inet/tcp.c | release_sock(sk); |
sk | 1137 | net/inet/tcp.c | tmp = -sk->err; |
sk | 1138 | net/inet/tcp.c | sk->err = 0; |
sk | 1142 | net/inet/tcp.c | if (sk->state == TCP_CLOSE || sk->done) { |
sk | 1143 | net/inet/tcp.c | release_sock(sk); |
sk | 1145 | net/inet/tcp.c | if (!sk->done) { |
sk | 1146 | net/inet/tcp.c | sk->done = 1; |
sk | 1152 | net/inet/tcp.c | if (sk->shutdown & RCV_SHUTDOWN) { |
sk | 1153 | net/inet/tcp.c | release_sock(sk); |
sk | 1155 | net/inet/tcp.c | sk->done = 1; |
sk | 1160 | net/inet/tcp.c | release_sock(sk); |
sk | 1166 | net/inet/tcp.c | release_sock(sk); |
sk | 1168 | net/inet/tcp.c | if ((sk->urg == 0 || skb_peek(&sk->rqueue) == NULL) && |
sk | 1169 | net/inet/tcp.c | sk->err == 0 && !(sk->shutdown & RCV_SHUTDOWN)) { |
sk | 1170 | net/inet/tcp.c | interruptible_sleep_on(sk->sleep); |
sk | 1177 | net/inet/tcp.c | sk->inuse = 1; |
sk | 1181 | net/inet/tcp.c | skb = skb_peek(&sk->rqueue); |
sk | 1199 | net/inet/tcp.c | sk->urg--; |
sk | 1201 | net/inet/tcp.c | release_sock(sk); |
sk | 1206 | net/inet/tcp.c | } while(skb != sk->rqueue); |
sk | 1208 | net/inet/tcp.c | sk->urg = 0; |
sk | 1209 | net/inet/tcp.c | release_sock(sk); |
sk | 1216 | net/inet/tcp.c | tcp_read(struct sock *sk, unsigned char *to, |
sk | 1235 | net/inet/tcp.c | if (sk->state == TCP_LISTEN) return(-ENOTCONN); |
sk | 1239 | net/inet/tcp.c | return(tcp_read_urg(sk, nonblock, to, len, flags)); |
sk | 1242 | net/inet/tcp.c | sk->inuse = 1; |
sk | 1244 | net/inet/tcp.c | skb=skb_peek(&sk->rqueue); |
sk | 1247 | net/inet/tcp.c | sk, to, len, nonblock, flags)); |
sk | 1254 | net/inet/tcp.c | before(sk->copied_seq+1, skb->h.th->seq) || skb->used) { |
sk | 1256 | net/inet/tcp.c | cleanup_rbuf(sk); |
sk | 1257 | net/inet/tcp.c | if (sk->err) |
sk | 1261 | net/inet/tcp.c | release_sock(sk); |
sk | 1268 | net/inet/tcp.c | tmp = -sk->err; |
sk | 1269 | net/inet/tcp.c | sk->err = 0; |
sk | 1273 | net/inet/tcp.c | if (sk->state == TCP_CLOSE) |
sk | 1275 | net/inet/tcp.c | release_sock(sk); |
sk | 1281 | net/inet/tcp.c | if (!sk->done) { |
sk | 1282 | net/inet/tcp.c | sk->done = 1; |
sk | 1288 | net/inet/tcp.c | if (sk->shutdown & RCV_SHUTDOWN) |
sk | 1290 | net/inet/tcp.c | release_sock(sk); |
sk | 1291 | net/inet/tcp.c | if (copied == 0) sk->done = 1; |
sk | 1298 | net/inet/tcp.c | release_sock(sk); |
sk | 1299 | net/inet/tcp.c | if(sk->debug) |
sk | 1312 | net/inet/tcp.c | release_sock(sk); |
sk | 1318 | net/inet/tcp.c | sk->state)); |
sk | 1319 | net/inet/tcp.c | release_sock(sk); |
sk | 1326 | net/inet/tcp.c | if (sk->shutdown & RCV_SHUTDOWN || sk->err != 0) { |
sk | 1327 | net/inet/tcp.c | sk->inuse = 1; |
sk | 1332 | net/inet/tcp.c | if (skb_peek(&sk->rqueue) == NULL || |
sk | 1333 | net/inet/tcp.c | before(sk->copied_seq+1, sk->rqueue->h.th->seq)) { |
sk | 1334 | net/inet/tcp.c | if(sk->debug) |
sk | 1336 | net/inet/tcp.c | interruptible_sleep_on(sk->sleep); |
sk | 1337 | net/inet/tcp.c | if(sk->debug) |
sk | 1349 | net/inet/tcp.c | sk->inuse = 1; |
sk | 1354 | net/inet/tcp.c | skb=skb_peek(&sk->rqueue); |
sk | 1362 | net/inet/tcp.c | offset = sk->copied_seq+1 - skb->h.th->seq; |
sk | 1375 | net/inet/tcp.c | sk->copied_seq += ntohs(skb->h.th->urg_ptr); |
sk | 1386 | net/inet/tcp.c | release_sock(sk); |
sk | 1404 | net/inet/tcp.c | sk->copied_seq += used; |
sk | 1433 | net/inet/tcp.c | cleanup_rbuf(sk); |
sk | 1434 | net/inet/tcp.c | release_sock(sk); |
sk | 1447 | net/inet/tcp.c | tcp_shutdown(struct sock *sk, int how) |
sk | 1463 | net/inet/tcp.c | if (sk->state == TCP_FIN_WAIT1 || sk->state == TCP_FIN_WAIT2) return; |
sk | 1465 | net/inet/tcp.c | sk->inuse = 1; |
sk | 1468 | net/inet/tcp.c | if (sk->send_tmp) tcp_send_partial(sk); |
sk | 1470 | net/inet/tcp.c | prot =(struct proto *)sk->prot; |
sk | 1471 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
sk | 1472 | net/inet/tcp.c | release_sock(sk); /* incase the malloc sleeps. */ |
sk | 1473 | net/inet/tcp.c | buff = (struct sk_buff *) prot->wmalloc(sk, MAX_RESET_SIZE,1 , GFP_KERNEL); |
sk | 1475 | net/inet/tcp.c | sk->inuse = 1; |
sk | 1480 | net/inet/tcp.c | buff->sk = sk; |
sk | 1485 | net/inet/tcp.c | tmp = prot->build_header(buff,sk->saddr, sk->daddr, &dev, |
sk | 1486 | net/inet/tcp.c | IPPROTO_TCP, sk->opt, |
sk | 1490 | net/inet/tcp.c | prot->wfree(sk,buff->mem_addr, buff->mem_len); |
sk | 1491 | net/inet/tcp.c | release_sock(sk); |
sk | 1500 | net/inet/tcp.c | t1->seq = ntohl(sk->send_seq); |
sk | 1501 | net/inet/tcp.c | sk->send_seq++; |
sk | 1502 | net/inet/tcp.c | buff->h.seq = sk->send_seq; |
sk | 1504 | net/inet/tcp.c | t1->ack_seq = ntohl(sk->acked_seq); |
sk | 1505 | net/inet/tcp.c | t1->window = ntohs(sk->prot->rspace(sk)); |
sk | 1509 | net/inet/tcp.c | tcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk); |
sk | 1515 | net/inet/tcp.c | if (sk->wback != NULL) { |
sk | 1518 | net/inet/tcp.c | sk->wback->next = buff; |
sk | 1519 | net/inet/tcp.c | sk->wback = buff; |
sk | 1522 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 0); |
sk | 1525 | net/inet/tcp.c | if (sk->state == TCP_ESTABLISHED) sk->state = TCP_FIN_WAIT1; |
sk | 1526 | net/inet/tcp.c | else sk->state = TCP_FIN_WAIT2; |
sk | 1528 | net/inet/tcp.c | release_sock(sk); |
sk | 1533 | net/inet/tcp.c | tcp_recvfrom(struct sock *sk, unsigned char *to, |
sk | 1555 | net/inet/tcp.c | result=tcp_read(sk, to, to_len, nonblock, flags); |
sk | 1560 | net/inet/tcp.c | sin.sin_port = sk->dummy_th.dest; |
sk | 1561 | net/inet/tcp.c | sin.sin_addr.s_addr = sk->daddr; |
sk | 1590 | net/inet/tcp.c | buff->sk = NULL; |
sk | 1644 | net/inet/tcp.c | tcp_options(struct sock *sk, struct tcphdr *th) |
sk | 1672 | net/inet/tcp.c | sk->mtu=min(sk->mtu,ntohs(*(unsigned short *)ptr)); |
sk | 1685 | net/inet/tcp.c | sk->mtu = min(sk->mtu, 576 - HEADER_SIZE); |
sk | 1698 | net/inet/tcp.c | tcp_conn_request(struct sock *sk, struct sk_buff *skb, |
sk | 1711 | net/inet/tcp.c | sk, skb, daddr, saddr, opt, dev)); |
sk | 1716 | net/inet/tcp.c | if (!sk->dead) { |
sk | 1717 | net/inet/tcp.c | wake_up(sk->sleep); |
sk | 1720 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
sk | 1729 | net/inet/tcp.c | if (sk->ack_backlog >= sk->max_ack_backlog) { |
sk | 1749 | net/inet/tcp.c | memcpy((void *)newsk,(void *)sk, sizeof(*newsk)); |
sk | 1822 | net/inet/tcp.c | sk->err = -ENOMEM; |
sk | 1832 | net/inet/tcp.c | buff->sk = newsk; |
sk | 1837 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, newsk->saddr, newsk->daddr, &dev, |
sk | 1842 | net/inet/tcp.c | sk->err = tmp; |
sk | 1847 | net/inet/tcp.c | skb->sk = sk; |
sk | 1884 | net/inet/tcp.c | skb->sk = newsk; |
sk | 1887 | net/inet/tcp.c | sk->rmem_alloc -= skb->mem_len; |
sk | 1890 | net/inet/tcp.c | skb_queue_tail(&sk->rqueue,skb); |
sk | 1891 | net/inet/tcp.c | sk->ack_backlog++; |
sk | 1897 | net/inet/tcp.c | tcp_close(struct sock *sk, int timeout) |
sk | 1910 | net/inet/tcp.c | DPRINTF((DBG_TCP, "tcp_close((struct sock *)%X, %d)\n",sk, timeout)); |
sk | 1911 | net/inet/tcp.c | sk->inuse = 1; |
sk | 1912 | net/inet/tcp.c | sk->keepopen = 1; |
sk | 1913 | net/inet/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 1915 | net/inet/tcp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 1918 | net/inet/tcp.c | if (skb_peek(&sk->rqueue) != NULL) |
sk | 1923 | net/inet/tcp.c | skb = skb_peek(&sk->rqueue); |
sk | 1928 | net/inet/tcp.c | after(skb->h.th->seq + skb->len + 1, sk->copied_seq)) |
sk | 1932 | net/inet/tcp.c | } while(skb != sk->rqueue); |
sk | 1934 | net/inet/tcp.c | if(sk->debug) |
sk | 1936 | net/inet/tcp.c | while((skb=skb_dequeue(&sk->rqueue))!=NULL) |
sk | 1938 | net/inet/tcp.c | if(skb->len > 0 && after(skb->h.th->seq + skb->len + 1 , sk->copied_seq)) |
sk | 1942 | net/inet/tcp.c | if(sk->debug) |
sk | 1946 | net/inet/tcp.c | sk->rqueue = NULL; |
sk | 1949 | net/inet/tcp.c | if (sk->send_tmp) { |
sk | 1950 | net/inet/tcp.c | tcp_send_partial(sk); |
sk | 1953 | net/inet/tcp.c | switch(sk->state) { |
sk | 1958 | net/inet/tcp.c | reset_timer(sk, TIME_CLOSE, 4 * sk->rtt); |
sk | 1959 | net/inet/tcp.c | if (timeout) tcp_time_wait(sk); |
sk | 1960 | net/inet/tcp.c | release_sock(sk); |
sk | 1964 | net/inet/tcp.c | sk->state = TCP_CLOSE; |
sk | 1966 | net/inet/tcp.c | release_sock(sk); |
sk | 1969 | net/inet/tcp.c | sk->state = TCP_CLOSE; |
sk | 1970 | net/inet/tcp.c | release_sock(sk); |
sk | 1973 | net/inet/tcp.c | release_sock(sk); |
sk | 1979 | net/inet/tcp.c | prot =(struct proto *)sk->prot; |
sk | 1980 | net/inet/tcp.c | th =(struct tcphdr *)&sk->dummy_th; |
sk | 1981 | net/inet/tcp.c | buff = (struct sk_buff *) prot->wmalloc(sk, MAX_FIN_SIZE, 1, GFP_ATOMIC); |
sk | 1986 | net/inet/tcp.c | release_sock(sk); |
sk | 1987 | net/inet/tcp.c | if (sk->state != TCP_CLOSE_WAIT) |
sk | 1988 | net/inet/tcp.c | sk->state = TCP_ESTABLISHED; |
sk | 1989 | net/inet/tcp.c | reset_timer(sk, TIME_CLOSE, 100); |
sk | 1994 | net/inet/tcp.c | buff->sk = sk; |
sk | 2000 | net/inet/tcp.c | tmp = prot->build_header(buff,sk->saddr, sk->daddr, &dev, |
sk | 2001 | net/inet/tcp.c | IPPROTO_TCP, sk->opt, |
sk | 2006 | net/inet/tcp.c | release_sock(sk); |
sk | 2014 | net/inet/tcp.c | t1->seq = ntohl(sk->send_seq); |
sk | 2015 | net/inet/tcp.c | sk->send_seq++; |
sk | 2016 | net/inet/tcp.c | buff->h.seq = sk->send_seq; |
sk | 2020 | net/inet/tcp.c | sk->delay_acks = 0; |
sk | 2021 | net/inet/tcp.c | t1->ack_seq = ntohl(sk->acked_seq); |
sk | 2022 | net/inet/tcp.c | t1->window = ntohs(sk->prot->rspace(sk)); |
sk | 2026 | net/inet/tcp.c | tcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk); |
sk | 2028 | net/inet/tcp.c | if (sk->wfront == NULL) { |
sk | 2029 | net/inet/tcp.c | prot->queue_xmit(sk, dev, buff, 0); |
sk | 2031 | net/inet/tcp.c | reset_timer(sk, TIME_WRITE, |
sk | 2032 | net/inet/tcp.c | backoff(sk->backoff) * (2 * sk->mdev + sk->rtt)); |
sk | 2034 | net/inet/tcp.c | if (sk->wback == NULL) { |
sk | 2035 | net/inet/tcp.c | sk->wfront=buff; |
sk | 2037 | net/inet/tcp.c | sk->wback->next = buff; |
sk | 2039 | net/inet/tcp.c | sk->wback = buff; |
sk | 2043 | net/inet/tcp.c | if (sk->state == TCP_CLOSE_WAIT) { |
sk | 2044 | net/inet/tcp.c | sk->state = TCP_FIN_WAIT2; |
sk | 2046 | net/inet/tcp.c | sk->state = TCP_FIN_WAIT1; |
sk | 2049 | net/inet/tcp.c | release_sock(sk); |
sk | 2058 | net/inet/tcp.c | tcp_write_xmit(struct sock *sk) |
sk | 2062 | net/inet/tcp.c | DPRINTF((DBG_TCP, "tcp_write_xmit(sk=%X)\n", sk)); |
sk | 2066 | net/inet/tcp.c | if(sk->zapped) |
sk | 2069 | net/inet/tcp.c | while(sk->wfront != NULL && |
sk | 2070 | net/inet/tcp.c | before(sk->wfront->h.seq, sk->window_seq) && |
sk | 2071 | net/inet/tcp.c | sk->packets_out < sk->cong_window) { |
sk | 2072 | net/inet/tcp.c | skb = sk->wfront; |
sk | 2074 | net/inet/tcp.c | sk->wfront =(struct sk_buff *)skb->next; |
sk | 2075 | net/inet/tcp.c | if (sk->wfront == NULL) sk->wback = NULL; |
sk | 2080 | net/inet/tcp.c | sk->wfront = NULL; |
sk | 2081 | net/inet/tcp.c | sk->wback = NULL; |
sk | 2088 | net/inet/tcp.c | if (before(skb->h.seq, sk->rcv_ack_seq +1)) { |
sk | 2089 | net/inet/tcp.c | sk->retransmits = 0; |
sk | 2091 | net/inet/tcp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 2093 | net/inet/tcp.c | sk->prot->queue_xmit(sk, skb->dev, skb, skb->free); |
sk | 2104 | net/inet/tcp.c | sort_send(struct sock *sk) |
sk | 2109 | net/inet/tcp.c | for (skb = sk->send_head; skb != NULL; skb = skb2) { |
sk | 2113 | net/inet/tcp.c | sk->send_tail = skb; |
sk | 2121 | net/inet/tcp.c | if (skb->link3 == NULL) sk->send_tail = skb; |
sk | 2127 | net/inet/tcp.c | sk->send_head = list; |
sk | 2133 | net/inet/tcp.c | tcp_ack(struct sock *sk, struct tcphdr *th, unsigned long saddr, int len) |
sk | 2138 | net/inet/tcp.c | if(sk->zapped) |
sk | 2144 | net/inet/tcp.c | ack, ntohs(th->window), sk->rcv_ack_seq, sk->window_seq)); |
sk | 2146 | net/inet/tcp.c | if (after(ack, sk->send_seq+1) || before(ack, sk->rcv_ack_seq-1)) { |
sk | 2147 | net/inet/tcp.c | if (after(ack, sk->send_seq) || |
sk | 2148 | net/inet/tcp.c | (sk->state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT)) { |
sk | 2151 | net/inet/tcp.c | if (sk->keepopen) { |
sk | 2152 | net/inet/tcp.c | reset_timer(sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN); |
sk | 2160 | net/inet/tcp.c | if (after(sk->window_seq, ack+ntohs(th->window))) { |
sk | 2172 | net/inet/tcp.c | skb2 = sk->send_head; |
sk | 2173 | net/inet/tcp.c | sk->send_head = NULL; |
sk | 2174 | net/inet/tcp.c | sk->send_tail = NULL; |
sk | 2178 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
sk | 2184 | net/inet/tcp.c | if (after(skb->h.seq, sk->window_seq)) { |
sk | 2185 | net/inet/tcp.c | if (sk->packets_out > 0) sk->packets_out--; |
sk | 2216 | net/inet/tcp.c | skb->next = sk->wfront; |
sk | 2217 | net/inet/tcp.c | sk->wfront = skb; |
sk | 2222 | net/inet/tcp.c | if (sk->wback == wskb) sk->wback = skb; |
sk | 2225 | net/inet/tcp.c | if (sk->send_head == NULL) { |
sk | 2226 | net/inet/tcp.c | sk->send_head = skb; |
sk | 2227 | net/inet/tcp.c | sk->send_tail = skb; |
sk | 2229 | net/inet/tcp.c | sk->send_tail->link3 = skb; |
sk | 2230 | net/inet/tcp.c | sk->send_tail = skb; |
sk | 2238 | net/inet/tcp.c | if (sk->send_tail == NULL || sk->send_head == NULL) { |
sk | 2239 | net/inet/tcp.c | sk->send_head = NULL; |
sk | 2240 | net/inet/tcp.c | sk->send_tail = NULL; |
sk | 2241 | net/inet/tcp.c | sk->packets_out= 0; |
sk | 2244 | net/inet/tcp.c | sk->window_seq = ack + ntohs(th->window); |
sk | 2247 | net/inet/tcp.c | if (sk->cong_window < 2048 && ack != sk->rcv_ack_seq) { |
sk | 2248 | net/inet/tcp.c | if (sk->exp_growth) sk->cong_window *= 2; |
sk | 2249 | net/inet/tcp.c | else sk->cong_window++; |
sk | 2253 | net/inet/tcp.c | sk->rcv_ack_seq = ack; |
sk | 2256 | net/inet/tcp.c | while(sk->send_head != NULL) { |
sk | 2258 | net/inet/tcp.c | if (sk->send_head->link3 && |
sk | 2259 | net/inet/tcp.c | after(sk->send_head->h.seq, sk->send_head->link3->h.seq)) { |
sk | 2261 | net/inet/tcp.c | sort_send(sk); |
sk | 2264 | net/inet/tcp.c | if (before(sk->send_head->h.seq, ack+1)) { |
sk | 2267 | net/inet/tcp.c | sk->retransmits = 0; |
sk | 2270 | net/inet/tcp.c | if (sk->packets_out > 0) sk->packets_out --; |
sk | 2272 | net/inet/tcp.c | sk->send_head, sk->send_head->h.seq, ack)); |
sk | 2275 | net/inet/tcp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 2277 | net/inet/tcp.c | oskb = sk->send_head; |
sk | 2280 | net/inet/tcp.c | if (sk->retransmits == 0 && !(flag&2)) { |
sk | 2283 | net/inet/tcp.c | if (sk->state == TCP_SYN_SENT || sk->state == TCP_SYN_RECV) |
sk | 2285 | net/inet/tcp.c | sk->rtt = rtt; |
sk | 2287 | net/inet/tcp.c | abserr = (rtt > sk->rtt) ? rtt - sk->rtt : sk->rtt - rtt; |
sk | 2288 | net/inet/tcp.c | sk->rtt = (7 * sk->rtt + rtt) >> 3; |
sk | 2289 | net/inet/tcp.c | sk->mdev = (3 * sk->mdev + abserr) >> 2; |
sk | 2291 | net/inet/tcp.c | sk->backoff = 0; |
sk | 2296 | net/inet/tcp.c | if (sk->rtt < 10) sk->rtt = 10; |
sk | 2297 | net/inet/tcp.c | if (sk->rtt > 12000) sk->rtt = 12000; |
sk | 2301 | net/inet/tcp.c | oskb = sk->send_head; |
sk | 2303 | net/inet/tcp.c | sk->send_head =(struct sk_buff *)oskb->link3; |
sk | 2304 | net/inet/tcp.c | if (sk->send_head == NULL) { |
sk | 2305 | net/inet/tcp.c | sk->send_tail = NULL; |
sk | 2313 | net/inet/tcp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 2323 | net/inet/tcp.c | if (sk->wfront != NULL) { |
sk | 2324 | net/inet/tcp.c | if (after (sk->window_seq, sk->wfront->h.seq) && |
sk | 2325 | net/inet/tcp.c | sk->packets_out < sk->cong_window) { |
sk | 2327 | net/inet/tcp.c | tcp_write_xmit(sk); |
sk | 2330 | net/inet/tcp.c | if (sk->send_head == NULL && sk->ack_backlog == 0 && |
sk | 2331 | net/inet/tcp.c | sk->state != TCP_TIME_WAIT && !sk->keepopen) { |
sk | 2333 | net/inet/tcp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 2335 | net/inet/tcp.c | if (sk->keepopen) |
sk | 2336 | net/inet/tcp.c | reset_timer(sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN); |
sk | 2338 | net/inet/tcp.c | delete_timer(sk); |
sk | 2340 | net/inet/tcp.c | if (sk->state != (unsigned char) sk->keepopen) { |
sk | 2341 | net/inet/tcp.c | reset_timer(sk, TIME_WRITE, |
sk | 2342 | net/inet/tcp.c | backoff(sk->backoff) * (2 * sk->mdev + sk->rtt)); |
sk | 2344 | net/inet/tcp.c | if (sk->state == TCP_TIME_WAIT) { |
sk | 2345 | net/inet/tcp.c | reset_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN); |
sk | 2350 | net/inet/tcp.c | if (sk->packets_out == 0 && sk->send_tmp != NULL && |
sk | 2351 | net/inet/tcp.c | sk->wfront == NULL && sk->send_head == NULL) { |
sk | 2353 | net/inet/tcp.c | tcp_send_partial(sk); |
sk | 2357 | net/inet/tcp.c | if (sk->state == TCP_TIME_WAIT) { |
sk | 2358 | net/inet/tcp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 2359 | net/inet/tcp.c | if (sk->rcv_ack_seq == sk->send_seq && sk->acked_seq == sk->fin_seq) { |
sk | 2361 | net/inet/tcp.c | sk->state = TCP_CLOSE; |
sk | 2362 | net/inet/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 2366 | net/inet/tcp.c | if (sk->state == TCP_LAST_ACK || sk->state == TCP_FIN_WAIT2) { |
sk | 2367 | net/inet/tcp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 2368 | net/inet/tcp.c | if (sk->rcv_ack_seq == sk->send_seq) { |
sk | 2370 | net/inet/tcp.c | if (sk->acked_seq != sk->fin_seq) { |
sk | 2371 | net/inet/tcp.c | tcp_time_wait(sk); |
sk | 2373 | net/inet/tcp.c | DPRINTF((DBG_TCP, "tcp_ack closing socket - %X\n", sk)); |
sk | 2374 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, |
sk | 2375 | net/inet/tcp.c | th, sk->daddr); |
sk | 2376 | net/inet/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 2377 | net/inet/tcp.c | sk->state = TCP_CLOSE; |
sk | 2382 | net/inet/tcp.c | if (((!flag) || (flag&4)) && sk->send_head != NULL && |
sk | 2383 | net/inet/tcp.c | (sk->send_head->when + backoff(sk->backoff) * (2 * sk->mdev + sk->rtt) |
sk | 2385 | net/inet/tcp.c | sk->exp_growth = 0; |
sk | 2386 | net/inet/tcp.c | ip_retransmit(sk, 0); |
sk | 2400 | net/inet/tcp.c | tcp_data(struct sk_buff *skb, struct sock *sk, |
sk | 2411 | net/inet/tcp.c | DPRINTF((DBG_TCP, "tcp_data len = %d sk = %X:\n", skb->len, sk)); |
sk | 2413 | net/inet/tcp.c | sk->bytes_rcv += skb->len; |
sk | 2416 | net/inet/tcp.c | if (!th->ack) tcp_send_ack(sk->send_seq, sk->acked_seq,sk, th, saddr); |
sk | 2421 | net/inet/tcp.c | if (sk->shutdown & RCV_SHUTDOWN) { |
sk | 2422 | net/inet/tcp.c | sk->acked_seq = th->seq + skb->len + th->syn + th->fin; |
sk | 2423 | net/inet/tcp.c | tcp_reset(sk->saddr, sk->daddr, skb->h.th, |
sk | 2424 | net/inet/tcp.c | sk->prot, NULL, skb->dev); |
sk | 2425 | net/inet/tcp.c | sk->state = TCP_CLOSE; |
sk | 2426 | net/inet/tcp.c | sk->err = EPIPE; |
sk | 2427 | net/inet/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 2428 | net/inet/tcp.c | DPRINTF((DBG_TCP, "tcp_data: closing socket - %X\n", sk)); |
sk | 2430 | net/inet/tcp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 2443 | net/inet/tcp.c | if (sk->rqueue == NULL) { |
sk | 2446 | net/inet/tcp.c | sk->rqueue = skb; |
sk | 2449 | net/inet/tcp.c | skb->list = &sk->rqueue; |
sk | 2451 | net/inet/tcp.c | skb_queue_head(&sk->rqueue,skb); |
sk | 2455 | net/inet/tcp.c | DPRINTF((DBG_TCP, "tcp_data adding to chain sk = %X:\n", sk)); |
sk | 2456 | net/inet/tcp.c | for(skb1=sk->rqueue->prev; ; skb1 =(struct sk_buff *)skb1->prev) { |
sk | 2457 | net/inet/tcp.c | if(sk->debug) |
sk | 2462 | net/inet/tcp.c | printk("copied_seq = %ld acked_seq = %ld\n", sk->copied_seq, |
sk | 2463 | net/inet/tcp.c | sk->acked_seq); |
sk | 2471 | net/inet/tcp.c | if (skb1 == sk->rqueue) sk->rqueue = skb; |
sk | 2474 | net/inet/tcp.c | if (skb1->prev == sk->rqueue) { |
sk | 2498 | net/inet/tcp.c | if (skb1 == sk->rqueue) |
sk | 2500 | net/inet/tcp.c | skb_queue_head(&sk->rqueue, skb); |
sk | 2512 | net/inet/tcp.c | if (before(sk->acked_seq, sk->copied_seq)) { |
sk | 2514 | net/inet/tcp.c | sk->acked_seq = sk->copied_seq; |
sk | 2518 | net/inet/tcp.c | if ((!dup_dumped && (skb1 == NULL || skb1->acked)) || before(th->seq, sk->acked_seq+1)) { |
sk | 2519 | net/inet/tcp.c | if (before(th->seq, sk->acked_seq+1)) { |
sk | 2520 | net/inet/tcp.c | if (after(th->ack_seq, sk->acked_seq)) |
sk | 2521 | net/inet/tcp.c | sk->acked_seq = th->ack_seq; |
sk | 2526 | net/inet/tcp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 2527 | net/inet/tcp.c | sk->shutdown |= RCV_SHUTDOWN; |
sk | 2531 | net/inet/tcp.c | skb2 !=(struct sk_buff *) sk->rqueue; |
sk | 2533 | net/inet/tcp.c | if (before(skb2->h.th->seq, sk->acked_seq+1)) { |
sk | 2534 | net/inet/tcp.c | if (after(skb2->h.th->ack_seq, sk->acked_seq)) |
sk | 2535 | net/inet/tcp.c | sk->acked_seq = skb2->h.th->ack_seq; |
sk | 2543 | net/inet/tcp.c | sk->shutdown |= RCV_SHUTDOWN; |
sk | 2544 | net/inet/tcp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 2548 | net/inet/tcp.c | sk->ack_backlog = sk->max_ack_backlog; |
sk | 2558 | net/inet/tcp.c | if (!sk->delay_acks || |
sk | 2559 | net/inet/tcp.c | sk->ack_backlog >= sk->max_ack_backlog || |
sk | 2560 | net/inet/tcp.c | sk->bytes_rcv > sk->max_unacked || th->fin) { |
sk | 2563 | net/inet/tcp.c | sk->ack_backlog++; |
sk | 2564 | net/inet/tcp.c | if(sk->debug) |
sk | 2566 | net/inet/tcp.c | reset_timer(sk, TIME_WRITE, TCP_ACK_TIME); |
sk | 2581 | net/inet/tcp.c | while (sk->prot->rspace(sk) < sk->mtu) { |
sk | 2582 | net/inet/tcp.c | skb1 = skb_peek(&sk->rqueue); |
sk | 2596 | net/inet/tcp.c | sk->rqueue = NULL; |
sk | 2598 | net/inet/tcp.c | sk->rqueue = (struct sk_buff *)skb1->prev; |
sk | 2605 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
sk | 2606 | net/inet/tcp.c | sk->ack_backlog++; |
sk | 2607 | net/inet/tcp.c | reset_timer(sk, TIME_WRITE, TCP_ACK_TIME); |
sk | 2610 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
sk | 2614 | net/inet/tcp.c | if (!sk->dead) { |
sk | 2615 | net/inet/tcp.c | if(sk->debug) |
sk | 2617 | net/inet/tcp.c | wake_up(sk->sleep); |
sk | 2622 | net/inet/tcp.c | if (sk->state == TCP_FIN_WAIT2 && |
sk | 2623 | net/inet/tcp.c | sk->acked_seq == sk->fin_seq && sk->rcv_ack_seq == sk->send_seq) { |
sk | 2624 | net/inet/tcp.c | DPRINTF((DBG_TCP, "tcp_data: entering last_ack state sk = %X\n", sk)); |
sk | 2627 | net/inet/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 2628 | net/inet/tcp.c | sk->state = TCP_LAST_ACK; |
sk | 2629 | net/inet/tcp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 2637 | net/inet/tcp.c | tcp_urg(struct sock *sk, struct tcphdr *th, unsigned long saddr) |
sk | 2642 | net/inet/tcp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 2644 | net/inet/tcp.c | if (sk->urginline) { |
sk | 2650 | net/inet/tcp.c | if (!sk->urg) { |
sk | 2652 | net/inet/tcp.c | if (sk->proc != 0) { |
sk | 2653 | net/inet/tcp.c | if (sk->proc > 0) { |
sk | 2654 | net/inet/tcp.c | kill_proc(sk->proc, SIGURG, 1); |
sk | 2656 | net/inet/tcp.c | kill_pg(-sk->proc, SIGURG, 1); |
sk | 2660 | net/inet/tcp.c | sk->urg++; |
sk | 2667 | net/inet/tcp.c | tcp_fin(struct sock *sk, struct tcphdr *th, |
sk | 2671 | net/inet/tcp.c | sk, th, saddr, dev)); |
sk | 2673 | net/inet/tcp.c | if (!sk->dead) { |
sk | 2674 | net/inet/tcp.c | wake_up(sk->sleep); |
sk | 2677 | net/inet/tcp.c | switch(sk->state) { |
sk | 2682 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
sk | 2683 | net/inet/tcp.c | sk->state = TCP_CLOSE_WAIT; |
sk | 2684 | net/inet/tcp.c | if (th->rst) sk->shutdown = SHUTDOWN_MASK; |
sk | 2693 | net/inet/tcp.c | sk->fin_seq = th->seq+1; |
sk | 2694 | net/inet/tcp.c | sk->state = TCP_FIN_WAIT2; |
sk | 2699 | net/inet/tcp.c | sk->state = TCP_LAST_ACK; |
sk | 2702 | net/inet/tcp.c | reset_timer(sk, TIME_CLOSE, TCP_TIMEWAIT_LEN); |
sk | 2705 | net/inet/tcp.c | sk->ack_backlog++; |
sk | 2713 | net/inet/tcp.c | tcp_accept(struct sock *sk, int flags) |
sk | 2719 | net/inet/tcp.c | sk, flags, in_ntoa(sk->saddr))); |
sk | 2725 | net/inet/tcp.c | if (sk->state != TCP_LISTEN) { |
sk | 2726 | net/inet/tcp.c | sk->err = EINVAL; |
sk | 2732 | net/inet/tcp.c | sk->inuse = 1; |
sk | 2733 | net/inet/tcp.c | while((skb = get_firstr(sk)) == NULL) { |
sk | 2736 | net/inet/tcp.c | release_sock(sk); |
sk | 2737 | net/inet/tcp.c | sk->err = EAGAIN; |
sk | 2741 | net/inet/tcp.c | release_sock(sk); |
sk | 2742 | net/inet/tcp.c | interruptible_sleep_on(sk->sleep); |
sk | 2745 | net/inet/tcp.c | sk->err = ERESTARTSYS; |
sk | 2748 | net/inet/tcp.c | sk->inuse = 1; |
sk | 2753 | net/inet/tcp.c | newsk = skb->sk; |
sk | 2756 | net/inet/tcp.c | sk->ack_backlog--; |
sk | 2757 | net/inet/tcp.c | release_sock(sk); |
sk | 2764 | net/inet/tcp.c | tcp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len) |
sk | 2774 | net/inet/tcp.c | if (sk->state != TCP_CLOSE) return(-EISCONN); |
sk | 2793 | net/inet/tcp.c | sk->inuse = 1; |
sk | 2794 | net/inet/tcp.c | sk->daddr = sin.sin_addr.s_addr; |
sk | 2795 | net/inet/tcp.c | sk->send_seq = jiffies * SEQ_TICK - seq_offset; |
sk | 2796 | net/inet/tcp.c | sk->rcv_ack_seq = sk->send_seq -1; |
sk | 2797 | net/inet/tcp.c | sk->err = 0; |
sk | 2798 | net/inet/tcp.c | sk->dummy_th.dest = sin.sin_port; |
sk | 2799 | net/inet/tcp.c | release_sock(sk); |
sk | 2801 | net/inet/tcp.c | buff = (struct sk_buff *) sk->prot->wmalloc(sk,MAX_SYN_SIZE,0, GFP_KERNEL); |
sk | 2805 | net/inet/tcp.c | sk->inuse = 1; |
sk | 2809 | net/inet/tcp.c | buff->sk = sk; |
sk | 2815 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
sk | 2818 | net/inet/tcp.c | sk->prot->wfree(sk, buff->mem_addr, buff->mem_len); |
sk | 2819 | net/inet/tcp.c | release_sock(sk); |
sk | 2825 | net/inet/tcp.c | memcpy(t1,(void *)&(sk->dummy_th), sizeof(*t1)); |
sk | 2826 | net/inet/tcp.c | t1->seq = ntohl(sk->send_seq++); |
sk | 2827 | net/inet/tcp.c | buff->h.seq = sk->send_seq; |
sk | 2845 | net/inet/tcp.c | sk->mtu = dev->mtu - HEADER_SIZE; |
sk | 2846 | net/inet/tcp.c | tcp_send_check(t1, sk->saddr, sk->daddr, |
sk | 2847 | net/inet/tcp.c | sizeof(struct tcphdr) + 4, sk); |
sk | 2850 | net/inet/tcp.c | sk->state = TCP_SYN_SENT; |
sk | 2851 | net/inet/tcp.c | sk->rtt = TCP_CONNECT_TIME; |
sk | 2852 | net/inet/tcp.c | reset_timer(sk, TIME_WRITE, TCP_CONNECT_TIME); /* Timer for repeating the SYN until an answer */ |
sk | 2853 | net/inet/tcp.c | sk->retransmits = TCP_RETR2 - TCP_SYN_RETRIES; |
sk | 2855 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 0); |
sk | 2857 | net/inet/tcp.c | release_sock(sk); |
sk | 2864 | net/inet/tcp.c | tcp_sequence(struct sock *sk, struct tcphdr *th, short len, |
sk | 2874 | net/inet/tcp.c | sk, th, len, opt, saddr)); |
sk | 2876 | net/inet/tcp.c | if (between(th->seq, sk->acked_seq, sk->acked_seq + sk->window)|| |
sk | 2877 | net/inet/tcp.c | between(th->seq + len-(th->doff*4), sk->acked_seq + 1, |
sk | 2878 | net/inet/tcp.c | sk->acked_seq + sk->window) || |
sk | 2879 | net/inet/tcp.c | (before(th->seq, sk->acked_seq) && |
sk | 2880 | net/inet/tcp.c | after(th->seq + len -(th->doff*4), sk->acked_seq + sk->window))) { |
sk | 2889 | net/inet/tcp.c | if (after(th->seq, sk->acked_seq + sk->window)) { |
sk | 2891 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
sk | 2897 | net/inet/tcp.c | after(th->seq, sk->acked_seq - 32767) && |
sk | 2902 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, sk, th, saddr); |
sk | 2917 | net/inet/tcp.c | struct sock *sk; |
sk | 2940 | net/inet/tcp.c | sk = get_sock(&tcp_prot, th->dest, saddr, th->source, daddr); |
sk | 2946 | net/inet/tcp.c | if (sk!=NULL && sk->zapped) |
sk | 2947 | net/inet/tcp.c | sk=NULL; |
sk | 2949 | net/inet/tcp.c | if (sk) { |
sk | 2950 | net/inet/tcp.c | DPRINTF((DBG_TCP, "sk = %X:\n", sk)); |
sk | 2955 | net/inet/tcp.c | skb->sk = NULL; |
sk | 2967 | net/inet/tcp.c | if (sk == NULL) { |
sk | 2974 | net/inet/tcp.c | skb->sk = NULL; |
sk | 2980 | net/inet/tcp.c | skb->sk = sk; |
sk | 2992 | net/inet/tcp.c | if (sk->inuse) { |
sk | 2993 | net/inet/tcp.c | if (sk->back_log == NULL) { |
sk | 2994 | net/inet/tcp.c | sk->back_log = skb; |
sk | 2998 | net/inet/tcp.c | skb->next = sk->back_log; |
sk | 2999 | net/inet/tcp.c | skb->prev = sk->back_log->prev; |
sk | 3006 | net/inet/tcp.c | sk->inuse = 1; |
sk | 3009 | net/inet/tcp.c | if (!sk) { |
sk | 3015 | net/inet/tcp.c | if (!sk->prot) { |
sk | 3021 | net/inet/tcp.c | if (sk->rmem_alloc + skb->mem_len >= sk->rcvbuf) { |
sk | 3022 | net/inet/tcp.c | skb->sk = NULL; |
sk | 3025 | net/inet/tcp.c | release_sock(sk); |
sk | 3028 | net/inet/tcp.c | sk->rmem_alloc += skb->mem_len; |
sk | 3033 | net/inet/tcp.c | switch(sk->state) { |
sk | 3040 | net/inet/tcp.c | sk->zapped=1; |
sk | 3041 | net/inet/tcp.c | sk->err = ECONNRESET; |
sk | 3042 | net/inet/tcp.c | sk->state = TCP_CLOSE; |
sk | 3043 | net/inet/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 3044 | net/inet/tcp.c | if (!sk->dead) { |
sk | 3045 | net/inet/tcp.c | wake_up(sk->sleep); |
sk | 3048 | net/inet/tcp.c | release_sock(sk); |
sk | 3057 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr)) { |
sk | 3060 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, sk->acked_seq, |
sk | 3061 | net/inet/tcp.c | sk, th, saddr); |
sk | 3063 | net/inet/tcp.c | release_sock(sk); |
sk | 3068 | net/inet/tcp.c | sk->zapped=1; |
sk | 3070 | net/inet/tcp.c | sk->err = ECONNRESET; |
sk | 3072 | net/inet/tcp.c | if (sk->state == TCP_CLOSE_WAIT) { |
sk | 3073 | net/inet/tcp.c | sk->err = EPIPE; |
sk | 3082 | net/inet/tcp.c | sk->state = TCP_CLOSE; |
sk | 3083 | net/inet/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 3084 | net/inet/tcp.c | if (!sk->dead) { |
sk | 3085 | net/inet/tcp.c | wake_up(sk->sleep); |
sk | 3088 | net/inet/tcp.c | release_sock(sk); |
sk | 3095 | net/inet/tcp.c | sk->err = ECONNRESET; |
sk | 3096 | net/inet/tcp.c | sk->state = TCP_CLOSE; |
sk | 3097 | net/inet/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 3098 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
sk | 3099 | net/inet/tcp.c | if (!sk->dead) { |
sk | 3100 | net/inet/tcp.c | wake_up(sk->sleep); |
sk | 3103 | net/inet/tcp.c | release_sock(sk); |
sk | 3108 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
sk | 3110 | net/inet/tcp.c | release_sock(sk); |
sk | 3115 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr)) { |
sk | 3117 | net/inet/tcp.c | release_sock(sk); |
sk | 3122 | net/inet/tcp.c | if (th->fin && tcp_fin(sk, th, saddr, dev)) { |
sk | 3124 | net/inet/tcp.c | release_sock(sk); |
sk | 3128 | net/inet/tcp.c | if (tcp_data(skb, sk, saddr, len)) { |
sk | 3130 | net/inet/tcp.c | release_sock(sk); |
sk | 3134 | net/inet/tcp.c | release_sock(sk); |
sk | 3138 | net/inet/tcp.c | if (sk->dead || sk->daddr) { |
sk | 3141 | net/inet/tcp.c | release_sock(sk); |
sk | 3148 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
sk | 3151 | net/inet/tcp.c | release_sock(sk); |
sk | 3157 | net/inet/tcp.c | release_sock(sk); |
sk | 3161 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt,dev); |
sk | 3163 | net/inet/tcp.c | release_sock(sk); |
sk | 3171 | net/inet/tcp.c | release_sock(sk); |
sk | 3182 | net/inet/tcp.c | tcp_conn_request(sk, skb, daddr, saddr, opt, dev); |
sk | 3183 | net/inet/tcp.c | release_sock(sk); |
sk | 3188 | net/inet/tcp.c | release_sock(sk); |
sk | 3192 | net/inet/tcp.c | if (!tcp_sequence(sk, th, len, opt, saddr)) { |
sk | 3194 | net/inet/tcp.c | release_sock(sk); |
sk | 3200 | net/inet/tcp.c | sk->err = ECONNREFUSED; |
sk | 3201 | net/inet/tcp.c | sk->state = TCP_CLOSE; |
sk | 3202 | net/inet/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 3203 | net/inet/tcp.c | sk->zapped = 1; |
sk | 3204 | net/inet/tcp.c | if (!sk->dead) { |
sk | 3205 | net/inet/tcp.c | wake_up(sk->sleep); |
sk | 3208 | net/inet/tcp.c | release_sock(sk); |
sk | 3213 | net/inet/tcp.c | sk->err = ECONNRESET; |
sk | 3214 | net/inet/tcp.c | sk->state = TCP_CLOSE; |
sk | 3215 | net/inet/tcp.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 3216 | net/inet/tcp.c | tcp_reset(daddr, saddr, th, sk->prot, opt, dev); |
sk | 3217 | net/inet/tcp.c | if (!sk->dead) { |
sk | 3218 | net/inet/tcp.c | wake_up(sk->sleep); |
sk | 3221 | net/inet/tcp.c | release_sock(sk); |
sk | 3227 | net/inet/tcp.c | sk->state = TCP_SYN_RECV; |
sk | 3231 | net/inet/tcp.c | release_sock(sk); |
sk | 3235 | net/inet/tcp.c | switch(sk->state) { |
sk | 3237 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
sk | 3239 | net/inet/tcp.c | sk->prot, opt,dev); |
sk | 3241 | net/inet/tcp.c | release_sock(sk); |
sk | 3251 | net/inet/tcp.c | release_sock(sk); |
sk | 3256 | net/inet/tcp.c | sk->acked_seq = th->seq+1; |
sk | 3257 | net/inet/tcp.c | sk->fin_seq = th->seq; |
sk | 3258 | net/inet/tcp.c | tcp_send_ack(sk->send_seq, th->seq+1, |
sk | 3259 | net/inet/tcp.c | sk, th, sk->daddr); |
sk | 3262 | net/inet/tcp.c | if (!tcp_ack(sk, th, saddr, len)) { |
sk | 3264 | net/inet/tcp.c | sk->prot, opt, dev); |
sk | 3266 | net/inet/tcp.c | release_sock(sk); |
sk | 3269 | net/inet/tcp.c | sk->state = TCP_ESTABLISHED; |
sk | 3276 | net/inet/tcp.c | tcp_options(sk, th); |
sk | 3277 | net/inet/tcp.c | sk->dummy_th.dest = th->source; |
sk | 3278 | net/inet/tcp.c | sk->copied_seq = sk->acked_seq-1; |
sk | 3279 | net/inet/tcp.c | if (!sk->dead) { |
sk | 3280 | net/inet/tcp.c | wake_up(sk->sleep); |
sk | 3288 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr)) { |
sk | 3290 | net/inet/tcp.c | release_sock(sk); |
sk | 3294 | net/inet/tcp.c | if (tcp_data(skb, sk, saddr, len)) |
sk | 3297 | net/inet/tcp.c | if (th->fin) tcp_fin(sk, th, saddr, dev); |
sk | 3298 | net/inet/tcp.c | release_sock(sk); |
sk | 3303 | net/inet/tcp.c | if (tcp_urg(sk, th, saddr)) { |
sk | 3305 | net/inet/tcp.c | release_sock(sk); |
sk | 3310 | net/inet/tcp.c | if (tcp_data(skb, sk, saddr, len)) { |
sk | 3312 | net/inet/tcp.c | release_sock(sk); |
sk | 3317 | net/inet/tcp.c | release_sock(sk); |
sk | 3320 | net/inet/tcp.c | tcp_fin(sk, th, saddr, dev); |
sk | 3321 | net/inet/tcp.c | release_sock(sk); |
sk | 3332 | net/inet/tcp.c | tcp_write_wakeup(struct sock *sk) |
sk | 3339 | net/inet/tcp.c | if (sk->zapped) |
sk | 3342 | net/inet/tcp.c | if (sk -> state != TCP_ESTABLISHED && sk->state != TCP_CLOSE_WAIT) return; |
sk | 3344 | net/inet/tcp.c | buff = (struct sk_buff *) sk->prot->wmalloc(sk,MAX_ACK_SIZE,1, GFP_ATOMIC); |
sk | 3351 | net/inet/tcp.c | buff->sk = sk; |
sk | 3356 | net/inet/tcp.c | tmp = sk->prot->build_header(buff, sk->saddr, sk->daddr, &dev, |
sk | 3357 | net/inet/tcp.c | IPPROTO_TCP, sk->opt, MAX_ACK_SIZE); |
sk | 3359 | net/inet/tcp.c | sk->prot->wfree(sk, buff->mem_addr, buff->mem_len); |
sk | 3366 | net/inet/tcp.c | memcpy(t1,(void *) &sk->dummy_th, sizeof(*t1)); |
sk | 3372 | net/inet/tcp.c | t1->seq = ntohl(sk->send_seq-1); |
sk | 3381 | net/inet/tcp.c | t1->ack_seq = ntohl(sk->acked_seq); |
sk | 3382 | net/inet/tcp.c | t1->window = ntohs(sk->prot->rspace(sk)); |
sk | 3384 | net/inet/tcp.c | tcp_send_check(t1, sk->saddr, sk->daddr, sizeof(*t1), sk); |
sk | 3389 | net/inet/tcp.c | sk->prot->queue_xmit(sk, dev, buff, 1); |
sk | 139 | net/inet/tcp.h | extern void tcp_shutdown (struct sock *sk, int how); |
sk | 145 | net/inet/tcp.h | extern int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg); |
sk | 92 | net/inet/timer.c | struct sock *sk = (struct sock*)data; |
sk | 93 | net/inet/timer.c | int why = sk->timeout; |
sk | 96 | net/inet/timer.c | if (sk->inuse || in_inet_bh()) { |
sk | 97 | net/inet/timer.c | sk->timer.expires = 10; |
sk | 98 | net/inet/timer.c | add_timer(&sk->timer); |
sk | 101 | net/inet/timer.c | sk->inuse = 1; |
sk | 103 | net/inet/timer.c | DPRINTF ((DBG_TMR, "net_timer: found sk=%X why = %d\n", sk, why)); |
sk | 104 | net/inet/timer.c | if (sk->keepopen) |
sk | 105 | net/inet/timer.c | reset_timer (sk, TIME_KEEPOPEN, TCP_TIMEOUT_LEN); |
sk | 108 | net/inet/timer.c | if (sk->ack_backlog) { |
sk | 109 | net/inet/timer.c | sk->prot->read_wakeup (sk); |
sk | 110 | net/inet/timer.c | if (! sk->dead) |
sk | 111 | net/inet/timer.c | wake_up (sk->sleep); |
sk | 117 | net/inet/timer.c | if (! sk->dead || sk->state != TCP_CLOSE) { |
sk | 119 | net/inet/timer.c | release_sock (sk); |
sk | 122 | net/inet/timer.c | destroy_sock (sk); |
sk | 128 | net/inet/timer.c | if(sk->wmem_alloc!=0 || sk->rmem_alloc!=0) |
sk | 130 | net/inet/timer.c | DPRINTF ((DBG_TMR, "possible memory leak. sk = %X\n", sk)); |
sk | 131 | net/inet/timer.c | sk->wmem_alloc++; /* So it DOESNT go away */ |
sk | 132 | net/inet/timer.c | destroy_sock (sk); |
sk | 133 | net/inet/timer.c | sk->wmem_alloc--; /* Might now have hit 0 - fall through and do it again if so */ |
sk | 134 | net/inet/timer.c | sk->inuse = 0; /* This will be ok, the destroy won't totally work */ |
sk | 136 | net/inet/timer.c | if(sk->wmem_alloc==0 && sk->rmem_alloc==0) |
sk | 137 | net/inet/timer.c | destroy_sock(sk); /* Socket gone, DONT update sk->inuse! */ |
sk | 141 | net/inet/timer.c | sk->state = TCP_CLOSE; |
sk | 142 | net/inet/timer.c | delete_timer (sk); |
sk | 144 | net/inet/timer.c | arp_destroy (sk->daddr); |
sk | 145 | net/inet/timer.c | if (!sk->dead) |
sk | 146 | net/inet/timer.c | wake_up (sk->sleep); |
sk | 147 | net/inet/timer.c | sk->shutdown = SHUTDOWN_MASK; |
sk | 148 | net/inet/timer.c | reset_timer (sk, TIME_DESTROY, TCP_DONE_TIME); |
sk | 149 | net/inet/timer.c | release_sock (sk); |
sk | 155 | net/inet/timer.c | if (sk->send_head) { |
sk | 156 | net/inet/timer.c | if (jiffies < (sk->send_head->when + backoff (sk->backoff) |
sk | 157 | net/inet/timer.c | * (2 * sk->mdev + sk->rtt))) { |
sk | 158 | net/inet/timer.c | reset_timer (sk, TIME_WRITE, (sk->send_head->when |
sk | 159 | net/inet/timer.c | + backoff (sk->backoff) * (2 * sk->mdev + sk->rtt)) - jiffies); |
sk | 160 | net/inet/timer.c | release_sock (sk); |
sk | 166 | net/inet/timer.c | sk->prot->retransmit (sk, 0); |
sk | 167 | net/inet/timer.c | if ((sk->state == TCP_ESTABLISHED && sk->retransmits && !(sk->retransmits & 7)) |
sk | 168 | net/inet/timer.c | || (sk->state != TCP_ESTABLISHED && sk->retransmits > TCP_RETR1)) { |
sk | 170 | net/inet/timer.c | arp_destroy (sk->daddr); |
sk | 171 | net/inet/timer.c | ip_route_check (sk->daddr); |
sk | 173 | net/inet/timer.c | if (sk->state != TCP_ESTABLISHED && sk->retransmits > TCP_RETR2) { |
sk | 175 | net/inet/timer.c | sk->err = ETIMEDOUT; |
sk | 176 | net/inet/timer.c | if (sk->state == TCP_FIN_WAIT1 || sk->state == TCP_FIN_WAIT2 |
sk | 177 | net/inet/timer.c | || sk->state == TCP_LAST_ACK) { |
sk | 178 | net/inet/timer.c | sk->state = TCP_TIME_WAIT; |
sk | 179 | net/inet/timer.c | reset_timer (sk, TIME_CLOSE, TCP_TIMEWAIT_LEN); |
sk | 181 | net/inet/timer.c | sk->prot->close (sk, 1); |
sk | 186 | net/inet/timer.c | release_sock (sk); |
sk | 190 | net/inet/timer.c | if (sk->prot->write_wakeup) |
sk | 191 | net/inet/timer.c | sk->prot->write_wakeup (sk); |
sk | 192 | net/inet/timer.c | sk->retransmits++; |
sk | 193 | net/inet/timer.c | if (sk->shutdown == SHUTDOWN_MASK) { |
sk | 194 | net/inet/timer.c | sk->prot->close (sk, 1); |
sk | 195 | net/inet/timer.c | sk->state = TCP_CLOSE; |
sk | 198 | net/inet/timer.c | if ((sk->state == TCP_ESTABLISHED && sk->retransmits && !(sk->retransmits & 7)) |
sk | 199 | net/inet/timer.c | || (sk->state != TCP_ESTABLISHED && sk->retransmits > TCP_RETR1)) { |
sk | 201 | net/inet/timer.c | arp_destroy (sk->daddr); |
sk | 202 | net/inet/timer.c | ip_route_check (sk->daddr); |
sk | 203 | net/inet/timer.c | release_sock (sk); |
sk | 206 | net/inet/timer.c | if (sk->state != TCP_ESTABLISHED && sk->retransmits > TCP_RETR2) { |
sk | 208 | net/inet/timer.c | arp_destroy (sk->daddr); |
sk | 209 | net/inet/timer.c | sk->err = ETIMEDOUT; |
sk | 210 | net/inet/timer.c | if (sk->state == TCP_FIN_WAIT1 || sk->state == TCP_FIN_WAIT2) { |
sk | 211 | net/inet/timer.c | sk->state = TCP_TIME_WAIT; |
sk | 212 | net/inet/timer.c | if (!sk->dead) |
sk | 213 | net/inet/timer.c | wake_up (sk->sleep); |
sk | 214 | net/inet/timer.c | release_sock (sk); |
sk | 216 | net/inet/timer.c | sk->prot->close (sk, 1); |
sk | 220 | net/inet/timer.c | release_sock (sk); |
sk | 223 | net/inet/timer.c | printk ("net timer expired - reason unknown, sk=%08X\n", (int)sk); |
sk | 224 | net/inet/timer.c | release_sock (sk); |
sk | 99 | net/inet/udp.c | struct sock *sk; |
sk | 109 | net/inet/udp.c | sk = get_sock(&udp_prot, th->source, daddr, th->dest, saddr); |
sk | 111 | net/inet/udp.c | if (sk == NULL) |
sk | 116 | net/inet/udp.c | sk->err = -err; |
sk | 117 | net/inet/udp.c | wake_up(sk->sleep); /* User process wakes to see error */ |
sk | 122 | net/inet/udp.c | if (sk->cong_window > 1) |
sk | 123 | net/inet/udp.c | sk->cong_window = sk->cong_window/2; |
sk | 127 | net/inet/udp.c | sk->err = icmp_err_convert[err & 0xff].errno; |
sk | 130 | net/inet/udp.c | if (icmp_err_convert[err & 0xff].fatal && sk->state == TCP_ESTABLISHED) { |
sk | 131 | net/inet/udp.c | sk->err=ECONNREFUSED; |
sk | 133 | net/inet/udp.c | wake_up(sk->sleep); |
sk | 204 | net/inet/udp.c | unsigned long daddr, int len, struct sock *sk) |
sk | 207 | net/inet/udp.c | if (sk && sk->no_check) |
sk | 215 | net/inet/udp.c | udp_send(struct sock *sk, struct sockaddr_in *sin, |
sk | 235 | net/inet/udp.c | size = sizeof(struct sk_buff) + sk->prot->max_header + len; |
sk | 236 | net/inet/udp.c | skb = (struct sk_buff *) sk->prot->wmalloc(sk, size, 0, GFP_KERNEL); |
sk | 241 | net/inet/udp.c | skb->sk = NULL; /* to avoid changing sk->saddr */ |
sk | 251 | net/inet/udp.c | tmp = sk->prot->build_header(skb, saddr, sin->sin_addr.s_addr, |
sk | 252 | net/inet/udp.c | &dev, IPPROTO_UDP, sk->opt, skb->mem_len); |
sk | 253 | net/inet/udp.c | skb->sk=sk; /* So memory is freed correctly */ |
sk | 256 | net/inet/udp.c | sk->prot->wfree(sk, skb->mem_addr, skb->mem_len); |
sk | 277 | net/inet/udp.c | sk->prot->wfree(sk, skb->mem_addr, skb->mem_len); |
sk | 284 | net/inet/udp.c | uh->source = sk->dummy_th.source; |
sk | 292 | net/inet/udp.c | udp_send_check(uh, saddr, sin->sin_addr.s_addr, skb->len - tmp, sk); |
sk | 295 | net/inet/udp.c | sk->prot->queue_xmit(sk, dev, skb, 1); |
sk | 302 | net/inet/udp.c | udp_sendto(struct sock *sk, unsigned char *from, int len, int noblock, |
sk | 331 | net/inet/udp.c | if (sk->state != TCP_ESTABLISHED) return(-EINVAL); |
sk | 333 | net/inet/udp.c | sin.sin_port = sk->dummy_th.dest; |
sk | 334 | net/inet/udp.c | sin.sin_addr.s_addr = sk->daddr; |
sk | 337 | net/inet/udp.c | if(!sk->broadcast && chk_addr(sin.sin_addr.s_addr)==IS_BROADCAST) |
sk | 339 | net/inet/udp.c | sk->inuse = 1; |
sk | 342 | net/inet/udp.c | tmp = udp_send(sk, &sin, from, len); |
sk | 345 | net/inet/udp.c | release_sock(sk); |
sk | 351 | net/inet/udp.c | udp_write(struct sock *sk, unsigned char *buff, int len, int noblock, |
sk | 354 | net/inet/udp.c | return(udp_sendto(sk, buff, len, noblock, flags, NULL, 0)); |
sk | 359 | net/inet/udp.c | udp_ioctl(struct sock *sk, int cmd, unsigned long arg) |
sk | 388 | net/inet/udp.c | if (sk->state == TCP_LISTEN) return(-EINVAL); |
sk | 389 | net/inet/udp.c | amount = sk->prot->wspace(sk)/*/2*/; |
sk | 403 | net/inet/udp.c | if (sk->state == TCP_LISTEN) return(-EINVAL); |
sk | 405 | net/inet/udp.c | skb = sk->rqueue; |
sk | 434 | net/inet/udp.c | udp_recvfrom(struct sock *sk, unsigned char *to, int len, |
sk | 447 | net/inet/udp.c | if (sk->err) { |
sk | 450 | net/inet/udp.c | err = -sk->err; |
sk | 451 | net/inet/udp.c | sk->err = 0; |
sk | 475 | net/inet/udp.c | skb=skb_recv_datagram(sk,flags,noblock,&er); |
sk | 494 | net/inet/udp.c | release_sock(sk); |
sk | 500 | net/inet/udp.c | udp_read(struct sock *sk, unsigned char *buff, int len, int noblock, |
sk | 503 | net/inet/udp.c | return(udp_recvfrom(sk, buff, len, noblock, flags, NULL, NULL)); |
sk | 508 | net/inet/udp.c | udp_connect(struct sock *sk, struct sockaddr_in *usin, int addr_len) |
sk | 524 | net/inet/udp.c | if(!sk->broadcast && chk_addr(sin.sin_addr.s_addr)==IS_BROADCAST) |
sk | 527 | net/inet/udp.c | sk->daddr = sin.sin_addr.s_addr; |
sk | 528 | net/inet/udp.c | sk->dummy_th.dest = sin.sin_port; |
sk | 529 | net/inet/udp.c | sk->state = TCP_ESTABLISHED; |
sk | 535 | net/inet/udp.c | udp_close(struct sock *sk, int timeout) |
sk | 537 | net/inet/udp.c | sk->inuse = 1; |
sk | 538 | net/inet/udp.c | sk->state = TCP_CLOSE; |
sk | 539 | net/inet/udp.c | if (sk->dead) destroy_sock(sk); |
sk | 540 | net/inet/udp.c | else release_sock(sk); |
sk | 550 | net/inet/udp.c | struct sock *sk; |
sk | 554 | net/inet/udp.c | sk = get_sock(&udp_prot, uh->dest, saddr, uh->source, daddr); |
sk | 555 | net/inet/udp.c | if (sk == NULL) |
sk | 566 | net/inet/udp.c | skb->sk = NULL; |
sk | 573 | net/inet/udp.c | skb->sk = NULL; |
sk | 578 | net/inet/udp.c | skb->sk = sk; |
sk | 588 | net/inet/udp.c | if (sk->rmem_alloc + skb->mem_len >= sk->rcvbuf) |
sk | 590 | net/inet/udp.c | skb->sk = NULL; |
sk | 592 | net/inet/udp.c | release_sock(sk); |
sk | 595 | net/inet/udp.c | sk->rmem_alloc += skb->mem_len; |
sk | 603 | net/inet/udp.c | skb_queue_tail(&sk->rqueue,skb); |
sk | 607 | net/inet/udp.c | if (!sk->dead) wake_up(sk->sleep); |
sk | 609 | net/inet/udp.c | release_sock(sk); |
sk | 36 | net/inet/udp.h | extern int udp_recvfrom(struct sock *sk, unsigned char *to, |
sk | 39 | net/inet/udp.h | extern int udp_read(struct sock *sk, unsigned char *buff, |
sk | 41 | net/inet/udp.h | extern int udp_connect(struct sock *sk, |
sk | 47 | net/inet/udp.h | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); |