tag | line | file | source code |
iph | 113 | arch/alpha/lib/checksum.c | unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl) |
iph | 115 | arch/alpha/lib/checksum.c | return ~do_csum(iph,ihl*4); |
iph | 127 | drivers/net/tunnel.c | struct iphdr *iph; /* Our new IP header */ |
iph | 163 | drivers/net/tunnel.c | iph=(struct iphdr *)skb->data; |
iph | 164 | drivers/net/tunnel.c | if ( iph->version != 4 ) |
iph | 169 | drivers/net/tunnel.c | printk("%s: Bad IP packet: ip version %d\n", dev->name, iph->version); |
iph | 180 | drivers/net/tunnel.c | if ( iph->protocol == IPPROTO_IPIP && iph->saddr == dev->pa_addr ) |
iph | 191 | drivers/net/tunnel.c | if ( iph->daddr == dev->pa_addr ) |
iph | 201 | drivers/net/tunnel.c | print_ip(iph); |
iph | 221 | drivers/net/tunnel.c | iph=skb2->h.iph=(struct iphdr *)skb2->data; |
iph | 222 | drivers/net/tunnel.c | skb2->ip_hdr=iph; |
iph | 223 | drivers/net/tunnel.c | memcpy(skb2->h.iph, skb->data, ip_header_len ); |
iph | 229 | drivers/net/tunnel.c | ++iph->ttl; /* Note: ip_forward() decrements ttl, so compensate */ |
iph | 230 | drivers/net/tunnel.c | iph->saddr = dev->pa_addr; |
iph | 231 | drivers/net/tunnel.c | iph->daddr = dev->pa_dstaddr; |
iph | 232 | drivers/net/tunnel.c | iph->protocol = IPPROTO_IPIP; |
iph | 233 | drivers/net/tunnel.c | iph->ihl = 5; |
iph | 234 | drivers/net/tunnel.c | iph->tot_len = htons(skb2->len); |
iph | 235 | drivers/net/tunnel.c | iph->frag_off = 0; |
iph | 239 | drivers/net/tunnel.c | iph->check = 0; |
iph | 240 | drivers/net/tunnel.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 244 | drivers/net/tunnel.c | print_ip(iph); |
iph | 250 | drivers/net/tunnel.c | if(ip_forward(skb2, dev, 0, iph->daddr)) |
iph | 9 | include/asm-alpha/checksum.h | extern unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl); |
iph | 45 | include/asm-i386/checksum.h | static inline unsigned short ip_fast_csum(unsigned char * iph, |
iph | 68 | include/asm-i386/checksum.h | : "=&r" (sum), "=&r" (iph), "=&r" (ihl) |
iph | 69 | include/asm-i386/checksum.h | : "1" (iph), "2" (ihl)); |
iph | 49 | include/asm-mips/checksum.h | static inline unsigned short ip_fast_csum(unsigned char * iph, |
iph | 96 | include/asm-mips/checksum.h | : "r" (iph), "r"(ihl) |
iph | 9 | include/asm-ppc/checksum.h | extern unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl); |
iph | 75 | include/asm-sparc/checksum.h | extern inline unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl) |
iph | 77 | include/asm-sparc/checksum.h | return ~do_csum(iph,ihl*4); |
iph | 54 | include/linux/skbuff.h | struct iphdr *iph; |
iph | 70 | include/net/ip.h | struct iphdr *iph; /* pointer to IP header */ |
iph | 128 | include/net/ip.h | struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev); |
iph | 268 | net/ethernet/eth.c | struct iphdr *iph; |
iph | 286 | net/ethernet/eth.c | iph=(struct iphdr*)(src+ETH_HLEN); |
iph | 287 | net/ethernet/eth.c | ip_length = ntohs(iph->tot_len) - sizeof(struct iphdr); |
iph | 255 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 265 | net/ipv4/icmp.c | iph = skb_in->ip_hdr; |
iph | 278 | net/ipv4/icmp.c | atype=ip_chk_addr(iph->daddr); |
iph | 287 | net/ipv4/icmp.c | if(iph->frag_off&htons(IP_OFFSET)) |
iph | 300 | net/ipv4/icmp.c | if(iph->protocol==IPPROTO_ICMP) |
iph | 302 | net/ipv4/icmp.c | icmph = (struct icmphdr *)((char *)iph + (iph->ihl<<2)); |
iph | 316 | net/ipv4/icmp.c | saddr=iph->daddr; |
iph | 323 | net/ipv4/icmp.c | icmp_param.data_ptr=iph; |
iph | 324 | net/ipv4/icmp.c | icmp_param.data_len=(iph->ihl<<2)+8; /* RFC says return header + 8 bytes */ |
iph | 330 | net/ipv4/icmp.c | if (ip_options_echo(&icmp_param.replyopts, NULL, saddr, iph->saddr, skb_in) == 0) |
iph | 331 | net/ipv4/icmp.c | icmp_build_xmit(&icmp_param, saddr, iph->saddr); |
iph | 341 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 346 | net/ipv4/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 348 | net/ipv4/icmp.c | dp= ((unsigned char *)iph)+(iph->ihl<<2); |
iph | 360 | net/ipv4/icmp.c | in_ntoa(iph->daddr), ntohs(iph->protocol)); |
iph | 367 | net/ipv4/icmp.c | in_ntoa(iph->daddr)); |
iph | 371 | net/ipv4/icmp.c | unsigned short old_mtu = ntohs(iph->tot_len); |
iph | 406 | net/ipv4/icmp.c | iph->id = htons(new_mtu); |
iph | 411 | net/ipv4/icmp.c | printk(KERN_INFO "ICMP: %s: Source Route Failed.\n", in_ntoa(iph->daddr)); |
iph | 432 | net/ipv4/icmp.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 454 | net/ipv4/icmp.c | if (iph->protocol == ipprot->protocol && ipprot->err_handler) |
iph | 457 | net/ipv4/icmp.c | iph->daddr, iph->saddr, ipprot); |
iph | 472 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 479 | net/ipv4/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 480 | net/ipv4/icmp.c | ip = iph->daddr; |
iph | 50 | net/ipv4/ip_forward.c | struct iphdr *iph=(struct iphdr *)skb_push(skb,sizeof(struct iphdr)); |
iph | 53 | net/ipv4/ip_forward.c | iph->version = 4; |
iph | 54 | net/ipv4/ip_forward.c | iph->tos = skb->ip_hdr->tos; |
iph | 55 | net/ipv4/ip_forward.c | iph->ttl = skb->ip_hdr->ttl; |
iph | 56 | net/ipv4/ip_forward.c | iph->frag_off = 0; |
iph | 57 | net/ipv4/ip_forward.c | iph->daddr = daddr; |
iph | 58 | net/ipv4/ip_forward.c | iph->saddr = out->pa_addr; |
iph | 59 | net/ipv4/ip_forward.c | iph->protocol = IPPROTO_IPIP; |
iph | 60 | net/ipv4/ip_forward.c | iph->ihl = 5; |
iph | 61 | net/ipv4/ip_forward.c | iph->tot_len = htons(skb->len); |
iph | 62 | net/ipv4/ip_forward.c | iph->id = htons(ip_id_count++); |
iph | 63 | net/ipv4/ip_forward.c | ip_send_check(iph); |
iph | 88 | net/ipv4/ip_forward.c | struct iphdr *iph; /* Our header */ |
iph | 110 | net/ipv4/ip_forward.c | fw_res=call_fw_firewall(PF_INET, skb, skb->h.iph); |
iph | 134 | net/ipv4/ip_forward.c | iph = skb->h.iph; |
iph | 135 | net/ipv4/ip_forward.c | iph->ttl--; |
iph | 143 | net/ipv4/ip_forward.c | iph->check = ntohs(iph->check) + 0x0100; |
iph | 144 | net/ipv4/ip_forward.c | if ((iph->check & 0xFF00) == 0) |
iph | 145 | net/ipv4/ip_forward.c | iph->check++; /* carry overflow */ |
iph | 146 | net/ipv4/ip_forward.c | iph->check = htons(iph->check); |
iph | 148 | net/ipv4/ip_forward.c | if (iph->ttl <= 0) |
iph | 209 | net/ipv4/ip_forward.c | if (dev == dev2 && !((iph->saddr^iph->daddr)&dev->pa_mask) && |
iph | 246 | net/ipv4/ip_forward.c | if (skb->len+encap > dev2->mtu && (ntohs(iph->frag_off) & IP_DF)) |
iph | 306 | net/ipv4/ip_forward.c | iph = skb2->ip_hdr = skb2->h.iph; |
iph | 351 | net/ipv4/ip_forward.c | optptr = (unsigned char *)iph + opt->rr; |
iph | 359 | net/ipv4/ip_forward.c | optptr = (unsigned char *)iph + opt->srr; |
iph | 375 | net/ipv4/ip_forward.c | iph->daddr = target_addr; |
iph | 383 | net/ipv4/ip_forward.c | optptr = (unsigned char *)iph + opt->ts; |
iph | 390 | net/ipv4/ip_forward.c | ip_send_check(iph); |
iph | 416 | net/ipv4/ip_forward.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 424 | net/ipv4/ip_forward.c | if(iph->tos & IPTOS_LOWDELAY) |
iph | 426 | net/ipv4/ip_forward.c | else if(iph->tos & IPTOS_THROUGHPUT) |
iph | 129 | net/ipv4/ip_fragment.c | static struct ipq *ip_find(struct iphdr *iph) |
iph | 138 | net/ipv4/ip_fragment.c | if (iph->id== qp->iph->id && iph->saddr == qp->iph->saddr && |
iph | 139 | net/ipv4/ip_fragment.c | iph->daddr == qp->iph->daddr && iph->protocol == qp->iph->protocol) |
iph | 196 | net/ipv4/ip_fragment.c | frag_kfree_s(qp->iph, 64 + 8); |
iph | 253 | net/ipv4/ip_fragment.c | static struct ipq *ip_create(struct sk_buff *skb, struct iphdr *iph, struct device *dev) |
iph | 271 | net/ipv4/ip_fragment.c | ihlen = iph->ihl * 4; |
iph | 272 | net/ipv4/ip_fragment.c | qp->iph = (struct iphdr *) frag_kmalloc(64 + 8, GFP_ATOMIC); |
iph | 273 | net/ipv4/ip_fragment.c | if (qp->iph == NULL) |
iph | 280 | net/ipv4/ip_fragment.c | memcpy(qp->iph, iph, ihlen + 8); |
iph | 344 | net/ipv4/ip_fragment.c | struct iphdr *iph; |
iph | 369 | net/ipv4/ip_fragment.c | memcpy(ptr, ((unsigned char *) qp->iph), qp->ihlen); |
iph | 395 | net/ipv4/ip_fragment.c | iph = skb->h.iph; |
iph | 396 | net/ipv4/ip_fragment.c | iph->frag_off = 0; |
iph | 397 | net/ipv4/ip_fragment.c | iph->tot_len = htons((iph->ihl * 4) + count); |
iph | 398 | net/ipv4/ip_fragment.c | skb->ip_hdr = iph; |
iph | 409 | net/ipv4/ip_fragment.c | struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev) |
iph | 431 | net/ipv4/ip_fragment.c | qp = ip_find(iph); |
iph | 434 | net/ipv4/ip_fragment.c | offset = ntohs(iph->frag_off); |
iph | 445 | net/ipv4/ip_fragment.c | ihl = iph->ihl * 4; |
iph | 461 | net/ipv4/ip_fragment.c | memcpy(qp->iph, iph, ihl+8); |
iph | 474 | net/ipv4/ip_fragment.c | if ((qp = ip_create(skb, iph, dev)) == NULL) |
iph | 487 | net/ipv4/ip_fragment.c | end = offset + ntohs(iph->tot_len) - ihl; |
iph | 620 | net/ipv4/ip_fragment.c | struct iphdr *iph; |
iph | 634 | net/ipv4/ip_fragment.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
iph | 635 | net/ipv4/ip_fragment.c | skb->ip_hdr = iph; |
iph | 637 | net/ipv4/ip_fragment.c | iph = skb->ip_hdr; |
iph | 644 | net/ipv4/ip_fragment.c | hlen = iph->ihl * 4; |
iph | 645 | net/ipv4/ip_fragment.c | left = ntohs(iph->tot_len) - hlen; /* Space per frame */ |
iph | 654 | net/ipv4/ip_fragment.c | if (ntohs(iph->frag_off) & IP_DF) |
iph | 685 | net/ipv4/ip_fragment.c | offset = (ntohs(iph->frag_off) & IP_OFFSET) << 3; |
iph | 760 | net/ipv4/ip_fragment.c | iph = (struct iphdr *)(skb2->h.raw/*+dev->hard_header_len*/); |
iph | 761 | net/ipv4/ip_fragment.c | iph->frag_off = htons((offset >> 3)); |
iph | 762 | net/ipv4/ip_fragment.c | skb2->ip_hdr = iph; |
iph | 778 | net/ipv4/ip_fragment.c | iph->frag_off |= htons(IP_MF); |
iph | 596 | net/ipv4/ip_fw.c | struct iphdr *iph = skb->h.iph; |
iph | 597 | net/ipv4/ip_fw.c | struct tcphdr *th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
iph | 676 | net/ipv4/ip_fw.c | ms->dst = iph->daddr; |
iph | 746 | net/ipv4/ip_fw.c | iph=skb2->h.iph; |
iph | 750 | net/ipv4/ip_fw.c | iph->tot_len = htons(diff+ntohs(iph->tot_len)); |
iph | 751 | net/ipv4/ip_fw.c | iph->check = 0; |
iph | 752 | net/ipv4/ip_fw.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 767 | net/ipv4/ip_fw.c | iph->tot_len = htons(skb->len + diff); |
iph | 793 | net/ipv4/ip_fw.c | struct iphdr *iph = skb->h.iph; |
iph | 802 | net/ipv4/ip_fw.c | if (iph->protocol!=IPPROTO_UDP && iph->protocol!=IPPROTO_TCP) |
iph | 809 | net/ipv4/ip_fw.c | portptr = (unsigned short *)&(((char *)iph)[iph->ihl*4]); |
iph | 814 | net/ipv4/ip_fw.c | strProt[iph->protocol==IPPROTO_TCP], |
iph | 815 | net/ipv4/ip_fw.c | ntohl(iph->saddr), ntohs(portptr[0]), |
iph | 816 | net/ipv4/ip_fw.c | ntohl(iph->daddr), ntohs(portptr[1])); |
iph | 820 | net/ipv4/ip_fw.c | if (iph->protocol == ms->protocol && |
iph | 821 | net/ipv4/ip_fw.c | iph->saddr == ms->src && iph->daddr == ms->dst && |
iph | 842 | net/ipv4/ip_fw.c | ms->protocol = iph->protocol; |
iph | 843 | net/ipv4/ip_fw.c | ms->src = iph->saddr; |
iph | 844 | net/ipv4/ip_fw.c | ms->dst = iph->daddr; |
iph | 854 | net/ipv4/ip_fw.c | iph->saddr = dev->pa_addr; /* my own address */ |
iph | 861 | net/ipv4/ip_fw.c | if (iph->protocol==IPPROTO_UDP) |
iph | 864 | net/ipv4/ip_fw.c | recalc_check((struct udphdr *)portptr,iph->saddr,iph->daddr,size); |
iph | 873 | net/ipv4/ip_fw.c | iph = skb->h.iph; |
iph | 874 | net/ipv4/ip_fw.c | portptr = (unsigned short *)&(((char *)iph)[iph->ihl*4]); |
iph | 889 | net/ipv4/ip_fw.c | tcp_send_check(th,iph->saddr,iph->daddr,size,skb->sk); |
iph | 892 | net/ipv4/ip_fw.c | ip_send_check(iph); |
iph | 910 | net/ipv4/ip_fw.c | struct iphdr *iph = skb_ptr->h.iph; |
iph | 913 | net/ipv4/ip_fw.c | struct tcphdr *th = (struct tcphdr *)(skb_ptr->h.raw+(iph->ihl<<2)); |
iph | 915 | net/ipv4/ip_fw.c | if (iph->protocol!=IPPROTO_UDP && iph->protocol!=IPPROTO_TCP) |
iph | 918 | net/ipv4/ip_fw.c | portptr = (unsigned short *)&(((char *)iph)[iph->ihl*4]); |
iph | 925 | net/ipv4/ip_fw.c | strProt[iph->protocol==IPPROTO_TCP], |
iph | 926 | net/ipv4/ip_fw.c | ntohl(iph->saddr), ntohs(portptr[0]), |
iph | 927 | net/ipv4/ip_fw.c | ntohl(iph->daddr), ntohs(portptr[1])); |
iph | 942 | net/ipv4/ip_fw.c | if (iph->protocol==ms->protocol && |
iph | 943 | net/ipv4/ip_fw.c | (iph->saddr==ms->dst || iph->protocol==IPPROTO_UDP) && |
iph | 949 | net/ipv4/ip_fw.c | iph->daddr = ms->src; |
iph | 963 | net/ipv4/ip_fw.c | if (iph->protocol==IPPROTO_UDP) |
iph | 964 | net/ipv4/ip_fw.c | recalc_check((struct udphdr *)portptr,iph->saddr,iph->daddr,size); |
iph | 994 | net/ipv4/ip_fw.c | tcp_send_check((struct tcphdr *)portptr,iph->saddr,iph->daddr,size,skb_ptr->sk); |
iph | 996 | net/ipv4/ip_fw.c | ip_send_check(iph); |
iph | 998 | net/ipv4/ip_fw.c | printk("I-routed to %lX:%X\n",ntohl(iph->daddr),ntohs(portptr[1])); |
iph | 1360 | net/ipv4/ip_fw.c | void ip_acct_cnt(struct iphdr *iph, struct device *dev, struct ip_fw *f) |
iph | 1362 | net/ipv4/ip_fw.c | (void) ip_fw_chk(iph, dev, f, 0, 1); |
iph | 199 | net/ipv4/ip_input.c | struct iphdr *iph = skb->h.iph; |
iph | 219 | net/ipv4/ip_input.c | if(iph->version == 6) |
iph | 229 | net/ipv4/ip_input.c | skb->ip_hdr = iph; |
iph | 244 | net/ipv4/ip_input.c | if (skb->len<sizeof(struct iphdr) || iph->ihl<5 || iph->version != 4 || ip_fast_csum((unsigned char *)iph, iph->ihl) !=0 |
iph | 245 | net/ipv4/ip_input.c | || skb->len < ntohs(iph->tot_len)) |
iph | 258 | net/ipv4/ip_input.c | skb_trim(skb,ntohs(iph->tot_len)); |
iph | 260 | net/ipv4/ip_input.c | if (iph->ihl > 5) |
iph | 282 | net/ipv4/ip_input.c | if (iph->daddr != skb->dev->pa_addr && net_alias_has(skb->dev)) |
iph | 283 | net/ipv4/ip_input.c | skb->dev = dev = net_alias_dev_rcv_sel32(skb->dev, AF_INET, iph->saddr, iph->daddr); |
iph | 292 | net/ipv4/ip_input.c | if ((err=call_in_firewall(PF_INET, skb, iph))<FW_ACCEPT) |
iph | 306 | net/ipv4/ip_input.c | if(iph->frag_off) |
iph | 308 | net/ipv4/ip_input.c | if (iph->frag_off & htons(IP_MF)) |
iph | 314 | net/ipv4/ip_input.c | if (iph->frag_off & htons(IP_OFFSET)) |
iph | 330 | net/ipv4/ip_input.c | if ( iph->daddr == skb->dev->pa_addr || (brd = ip_chk_addr(iph->daddr)) != 0) |
iph | 336 | net/ipv4/ip_input.c | unsigned char * optptr = ((unsigned char *)iph) + opt->srr; |
iph | 388 | net/ipv4/ip_input.c | if(!(dev->flags&IFF_ALLMULTI) && brd==IS_MULTICAST && iph->daddr!=IGMP_ALL_HOSTS && !(dev->flags&IFF_LOOPBACK)) |
iph | 401 | net/ipv4/ip_input.c | if(ip_mc->multiaddr==iph->daddr) |
iph | 415 | net/ipv4/ip_input.c | struct iphdr *iph=skb->h.iph; |
iph | 416 | net/ipv4/ip_input.c | if (ip_forward(skb, dev, is_frag|4, iph->daddr)) |
iph | 427 | net/ipv4/ip_input.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 437 | net/ipv4/ip_input.c | skb=ip_defrag(iph,skb,dev); |
iph | 441 | net/ipv4/ip_input.c | iph=skb->h.iph; |
iph | 448 | net/ipv4/ip_input.c | skb->ip_hdr = iph; |
iph | 449 | net/ipv4/ip_input.c | skb->h.raw += iph->ihl*4; |
iph | 456 | net/ipv4/ip_input.c | if(brd==IS_MULTICAST && (iph->daddr&htonl(0xFFFFFF00))!=htonl(0xE0000000)) |
iph | 466 | net/ipv4/ip_input.c | hash = iph->protocol & (SOCK_ARRAY_SIZE-1); |
iph | 476 | net/ipv4/ip_input.c | raw_sk=get_sock_raw(raw_sk, iph->protocol, iph->saddr, iph->daddr); |
iph | 482 | net/ipv4/ip_input.c | sknext=get_sock_raw(raw_sk->next, iph->protocol, iph->saddr, iph->daddr); |
iph | 488 | net/ipv4/ip_input.c | raw_rcv(raw_sk, skb1, dev, iph->saddr,iph->daddr); |
iph | 507 | net/ipv4/ip_input.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 512 | net/ipv4/ip_input.c | if (ipprot->protocol != iph->protocol) |
iph | 543 | net/ipv4/ip_input.c | ipprot->handler(skb2, dev, opt, iph->daddr, |
iph | 544 | net/ipv4/ip_input.c | (ntohs(iph->tot_len) - (iph->ihl * 4)), |
iph | 545 | net/ipv4/ip_input.c | iph->saddr, 0, ipprot); |
iph | 580 | net/ipv4/ip_input.c | raw_rcv(raw_sk, skb, dev, iph->saddr, iph->daddr); |
iph | 616 | net/ipv4/ip_input.c | if (ip_forward(skb, dev, is_frag, iph->daddr)) |
iph | 33 | net/ipv4/ip_options.c | unsigned char * iph = (unsigned char*)skb->ip_hdr; |
iph | 36 | net/ipv4/ip_options.c | memcpy(iph+sizeof(struct iphdr), opt->__data, opt->optlen); |
iph | 41 | net/ipv4/ip_options.c | memcpy(iph+opt->srr+iph[opt->srr+1]-4, &daddr, 4); |
iph | 46 | net/ipv4/ip_options.c | memcpy(iph+opt->rr+iph[opt->rr+2]-5, &saddr, 4); |
iph | 48 | net/ipv4/ip_options.c | memcpy(iph+opt->ts+iph[opt->ts+2]-9, &saddr, 4); |
iph | 55 | net/ipv4/ip_options.c | memcpy(iph+opt->ts+iph[opt->ts+2]-5, &midtime, 4); |
iph | 61 | net/ipv4/ip_options.c | memset(iph+opt->rr, IPOPT_NOP, iph[opt->rr+1]); |
iph | 67 | net/ipv4/ip_options.c | memset(iph+opt->ts, IPOPT_NOP, iph[opt->ts+1]); |
iph | 237 | net/ipv4/ip_options.c | unsigned char * iph; |
iph | 246 | net/ipv4/ip_options.c | iph = (unsigned char*)skb->ip_hdr; |
iph | 247 | net/ipv4/ip_options.c | opt->optlen = ((struct iphdr *)iph)->ihl*4 - sizeof(struct iphdr); |
iph | 248 | net/ipv4/ip_options.c | optptr = iph + sizeof(struct iphdr); |
iph | 254 | net/ipv4/ip_options.c | iph = optptr - sizeof(struct iphdr); |
iph | 314 | net/ipv4/ip_options.c | opt->srr = optptr - iph; |
iph | 347 | net/ipv4/ip_options.c | opt->rr = optptr - iph; |
iph | 377 | net/ipv4/ip_options.c | opt->ts = optptr - iph; |
iph | 389 | net/ipv4/ip_options.c | opt->ts = optptr - iph; |
iph | 405 | net/ipv4/ip_options.c | opt->ts = optptr - iph; |
iph | 440 | net/ipv4/ip_options.c | opt->ts = optptr - iph; |
iph | 468 | net/ipv4/ip_options.c | icmp_send(skb, ICMP_PARAMETERPROB, 0, pp_ptr-iph, skb->dev); |
iph | 199 | net/ipv4/ip_output.c | struct iphdr *iph; |
iph | 293 | net/ipv4/ip_output.c | iph=(struct iphdr *)skb_put(skb,sizeof(struct iphdr) + opt->optlen); |
iph | 295 | net/ipv4/ip_output.c | iph=(struct iphdr *)skb_put(skb,sizeof(struct iphdr)); |
iph | 297 | net/ipv4/ip_output.c | iph->version = 4; |
iph | 298 | net/ipv4/ip_output.c | iph->ihl = 5; |
iph | 299 | net/ipv4/ip_output.c | iph->tos = tos; |
iph | 300 | net/ipv4/ip_output.c | iph->frag_off = 0; |
iph | 301 | net/ipv4/ip_output.c | iph->ttl = ttl; |
iph | 302 | net/ipv4/ip_output.c | iph->daddr = daddr; |
iph | 303 | net/ipv4/ip_output.c | iph->saddr = saddr; |
iph | 304 | net/ipv4/ip_output.c | iph->protocol = type; |
iph | 305 | net/ipv4/ip_output.c | skb->ip_hdr = iph; |
iph | 309 | net/ipv4/ip_output.c | iph->ihl += opt->optlen>>2; |
iph | 311 | net/ipv4/ip_output.c | return iph->ihl*4 + tmp; |
iph | 319 | net/ipv4/ip_output.c | void ip_send_check(struct iphdr *iph) |
iph | 321 | net/ipv4/ip_output.c | iph->check = 0; |
iph | 322 | net/ipv4/ip_output.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 337 | net/ipv4/ip_output.c | struct iphdr *iph; |
iph | 365 | net/ipv4/ip_output.c | iph = skb->ip_hdr; |
iph | 366 | net/ipv4/ip_output.c | iph->tot_len = ntohs(skb->len-(((unsigned char *)iph)-skb->data)); |
iph | 369 | net/ipv4/ip_output.c | if(call_out_firewall(PF_INET, skb, iph) < FW_ACCEPT) |
iph | 379 | net/ipv4/ip_output.c | iph->id = htons(ip_id_count++); |
iph | 395 | net/ipv4/ip_output.c | if(ntohs(iph->tot_len)> dev->mtu) |
iph | 407 | net/ipv4/ip_output.c | ip_send_check(iph); |
iph | 471 | net/ipv4/ip_output.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 480 | net/ipv4/ip_output.c | if (MULTICAST(iph->daddr) && !(dev->flags&IFF_LOOPBACK)) |
iph | 484 | net/ipv4/ip_output.c | if(iph->daddr==IGMP_ALL_HOSTS || (dev->flags&IFF_ALLMULTI)) |
iph | 493 | net/ipv4/ip_output.c | if(imc->multiaddr==iph->daddr) |
iph | 511 | net/ipv4/ip_output.c | if((dev->flags&IFF_BROADCAST) && (iph->daddr==dev->pa_brdaddr||iph->daddr==0xFFFFFFFF) && !(dev->flags&IFF_LOOPBACK)) |
iph | 581 | net/ipv4/ip_output.c | struct iphdr *iph; |
iph | 683 | net/ipv4/ip_output.c | skb->ip_hdr=iph=(struct iphdr *)skb_put(skb,length); |
iph | 687 | net/ipv4/ip_output.c | iph->version=4; |
iph | 688 | net/ipv4/ip_output.c | iph->ihl=5; |
iph | 689 | net/ipv4/ip_output.c | iph->tos=sk->ip_tos; |
iph | 690 | net/ipv4/ip_output.c | iph->tot_len = htons(length); |
iph | 691 | net/ipv4/ip_output.c | iph->id=htons(ip_id_count++); |
iph | 692 | net/ipv4/ip_output.c | iph->frag_off = 0; |
iph | 693 | net/ipv4/ip_output.c | iph->ttl=sk->ip_ttl; |
iph | 694 | net/ipv4/ip_output.c | iph->protocol=type; |
iph | 695 | net/ipv4/ip_output.c | iph->saddr=saddr; |
iph | 696 | net/ipv4/ip_output.c | iph->daddr=daddr; |
iph | 699 | net/ipv4/ip_output.c | iph->ihl += opt->optlen>>2; |
iph | 703 | net/ipv4/ip_output.c | iph->check=0; |
iph | 704 | net/ipv4/ip_output.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 705 | net/ipv4/ip_output.c | getfrag(frag,saddr,((char *)iph)+iph->ihl*4,0, length-iph->ihl*4); |
iph | 708 | net/ipv4/ip_output.c | getfrag(frag,saddr,(void *)iph,0,length-20); |
iph | 711 | net/ipv4/ip_output.c | if(call_out_firewall(PF_INET, skb, iph)< FW_ACCEPT) |
iph | 863 | net/ipv4/ip_output.c | skb->ip_hdr = iph = (struct iphdr *)data; |
iph | 872 | net/ipv4/ip_output.c | iph->version = 4; |
iph | 873 | net/ipv4/ip_output.c | iph->ihl = 5; /* ugh */ |
iph | 875 | net/ipv4/ip_output.c | iph->ihl += opt->optlen>>2; |
iph | 879 | net/ipv4/ip_output.c | iph->tos = sk->ip_tos; |
iph | 880 | net/ipv4/ip_output.c | iph->tot_len = htons(fraglen - fragheaderlen + iph->ihl*4); |
iph | 881 | net/ipv4/ip_output.c | iph->id = id; |
iph | 882 | net/ipv4/ip_output.c | iph->frag_off = htons(offset>>3); |
iph | 883 | net/ipv4/ip_output.c | iph->frag_off |= mf; |
iph | 886 | net/ipv4/ip_output.c | iph->ttl = sk->ip_mc_ttl; |
iph | 889 | net/ipv4/ip_output.c | iph->ttl = sk->ip_ttl; |
iph | 890 | net/ipv4/ip_output.c | iph->protocol = type; |
iph | 891 | net/ipv4/ip_output.c | iph->check = 0; |
iph | 892 | net/ipv4/ip_output.c | iph->saddr = saddr; |
iph | 893 | net/ipv4/ip_output.c | iph->daddr = daddr; |
iph | 894 | net/ipv4/ip_output.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 895 | net/ipv4/ip_output.c | data += iph->ihl*4; |
iph | 915 | net/ipv4/ip_output.c | if(!offset && call_out_firewall(PF_INET, skb, iph) < FW_ACCEPT) |
iph | 924 | net/ipv4/ip_output.c | ip_fw_chk(iph, dev, ip_acct_chain, IP_FW_F_ACCEPT, 1); |
iph | 74 | net/ipv4/ipip.c | skb->h.iph=(struct iphdr *)skb->data; |
iph | 267 | net/ipv4/ipmr.c | skb->h.iph=skb->ip_hdr; |
iph | 713 | net/ipv4/ipmr.c | skb->raddr=skb->h.iph->daddr; |
iph | 177 | net/ipv4/raw.c | struct iphdr *iph=(struct iphdr *)to; |
iph | 178 | net/ipv4/raw.c | iph->saddr=saddr; |
iph | 179 | net/ipv4/raw.c | iph->check=0; |
iph | 180 | net/ipv4/raw.c | iph->tot_len=htons(fraglen); /* This is right as you cant frag |
iph | 186 | net/ipv4/raw.c | iph->id = htons(ip_id_count++); |
iph | 187 | net/ipv4/raw.c | iph->check=ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 646 | net/ipv4/tcp.c | struct iphdr *iph; |
iph | 668 | net/ipv4/tcp.c | iph = (struct iphdr *)skb->data; |
iph | 669 | net/ipv4/tcp.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
iph | 670 | net/ipv4/tcp.c | size = ntohs(iph->tot_len) - (iph->ihl<<2); |
iph | 685 | net/ipv4/tcp.c | rt = ip_check_route(&sk->ip_route_cache, opt->srr?opt->faddr:iph->daddr, skb->localroute); |
iph | 688 | net/ipv4/tcp.c | iph->id = htons(ip_id_count++); |
iph | 690 | net/ipv4/tcp.c | if (rt && ntohs(iph->tot_len) > rt->rt_mtu) |
iph | 691 | net/ipv4/tcp.c | iph->frag_off &= ~htons(IP_DF); |
iph | 693 | net/ipv4/tcp.c | ip_send_check(iph); |
iph | 716 | net/ipv4/tcp.c | printk("tcp_do_retransmit: hh miss %08x via %08x\n", iph->daddr, rt->rt_gateway); |
iph | 1078 | net/ipv4/tcp.c | struct iphdr *iph=(struct iphdr *)(header-sizeof(struct iphdr)); |
iph | 1112 | net/ipv4/tcp.c | unsigned short new_mtu = ntohs(iph->id); |
iph | 3358 | net/ipv4/tcp.c | struct iphdr *iph; |
iph | 3367 | net/ipv4/tcp.c | iph = skb->ip_hdr; |
iph | 3368 | net/ipv4/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
iph | 3373 | net/ipv4/tcp.c | iph->frag_off &= ~htons(IP_DF); |
iph | 3374 | net/ipv4/tcp.c | ip_send_check(iph); |
iph | 5271 | net/ipv4/tcp.c | struct iphdr *iph; |
iph | 5290 | net/ipv4/tcp.c | iph = (struct iphdr *)skb->ip_hdr; |
iph | 5291 | net/ipv4/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
iph | 5298 | net/ipv4/tcp.c | (iph->ihl << 2) + |