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 | 131 | drivers/net/new_tunnel.c | struct iphdr *iph; /* Our new IP header */ |
iph | 165 | drivers/net/new_tunnel.c | iph = (struct iphdr *) skb->data; |
iph | 166 | drivers/net/new_tunnel.c | if ((rt = ip_rt_route(iph->daddr, 0)) == NULL) |
iph | 215 | drivers/net/new_tunnel.c | print_ip(iph); |
iph | 228 | drivers/net/new_tunnel.c | skb->h.iph = (struct iphdr *) skb_push(skb, tunnel_hlen); |
iph | 247 | drivers/net/new_tunnel.c | new_skb->h.iph = (struct iphdr *) skb_push(new_skb, tunnel_hlen); |
iph | 266 | drivers/net/new_tunnel.c | iph = skb->h.iph; |
iph | 267 | drivers/net/new_tunnel.c | iph->version = 4; |
iph | 268 | drivers/net/new_tunnel.c | iph->tos = skb->ip_hdr->tos; |
iph | 269 | drivers/net/new_tunnel.c | iph->ttl = skb->ip_hdr->ttl; |
iph | 270 | drivers/net/new_tunnel.c | iph->frag_off = 0; |
iph | 271 | drivers/net/new_tunnel.c | iph->daddr = target; |
iph | 272 | drivers/net/new_tunnel.c | iph->saddr = tdev->pa_addr; |
iph | 273 | drivers/net/new_tunnel.c | iph->protocol = IPPROTO_IPIP; |
iph | 274 | drivers/net/new_tunnel.c | iph->ihl = 5; |
iph | 275 | drivers/net/new_tunnel.c | iph->tot_len = htons(skb->len); |
iph | 276 | drivers/net/new_tunnel.c | iph->id = htons(ip_id_count++); /* Race condition here? */ |
iph | 277 | drivers/net/new_tunnel.c | ip_send_check(iph); |
iph | 278 | drivers/net/new_tunnel.c | skb->ip_hdr = skb->h.iph; |
iph | 282 | drivers/net/new_tunnel.c | print_ip(iph); |
iph | 128 | drivers/net/tunnel.c | struct iphdr *iph; /* Our new IP header */ |
iph | 164 | drivers/net/tunnel.c | iph=(struct iphdr *)skb->data; |
iph | 165 | drivers/net/tunnel.c | if ( iph->version != 4 ) |
iph | 170 | drivers/net/tunnel.c | printk("%s: Bad IP packet: ip version %d\n", dev->name, iph->version); |
iph | 181 | drivers/net/tunnel.c | if ( iph->protocol == IPPROTO_IPIP && iph->saddr == dev->pa_addr ) |
iph | 192 | drivers/net/tunnel.c | if ( iph->daddr == dev->pa_addr ) |
iph | 202 | drivers/net/tunnel.c | print_ip(iph); |
iph | 222 | drivers/net/tunnel.c | iph=skb2->h.iph=(struct iphdr *)skb2->data; |
iph | 223 | drivers/net/tunnel.c | skb2->ip_hdr=iph; |
iph | 224 | drivers/net/tunnel.c | memcpy(skb2->h.iph, skb->data, ip_header_len ); |
iph | 230 | drivers/net/tunnel.c | ++iph->ttl; /* Note: ip_forward() decrements ttl, so compensate */ |
iph | 231 | drivers/net/tunnel.c | iph->saddr = dev->pa_addr; |
iph | 232 | drivers/net/tunnel.c | iph->daddr = dev->pa_dstaddr; |
iph | 233 | drivers/net/tunnel.c | iph->protocol = IPPROTO_IPIP; |
iph | 234 | drivers/net/tunnel.c | iph->ihl = 5; |
iph | 235 | drivers/net/tunnel.c | iph->tot_len = htons(skb2->len); |
iph | 236 | drivers/net/tunnel.c | iph->frag_off = 0; |
iph | 240 | drivers/net/tunnel.c | iph->check = 0; |
iph | 241 | drivers/net/tunnel.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 245 | drivers/net/tunnel.c | print_ip(iph); |
iph | 251 | 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 | 63 | include/linux/skbuff.h | struct iphdr *iph; |
iph | 71 | include/net/ip.h | struct iphdr *iph; /* pointer to IP header */ |
iph | 129 | include/net/ip.h | struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev); |
iph | 271 | net/ethernet/eth.c | struct iphdr *iph; |
iph | 289 | net/ethernet/eth.c | iph=(struct iphdr*)(src+ETH_HLEN); |
iph | 290 | net/ethernet/eth.c | ip_length = ntohs(iph->tot_len) - sizeof(struct iphdr); |
iph | 256 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 266 | net/ipv4/icmp.c | iph = skb_in->ip_hdr; |
iph | 279 | net/ipv4/icmp.c | atype=ip_chk_addr(iph->daddr); |
iph | 288 | net/ipv4/icmp.c | if(iph->frag_off&htons(IP_OFFSET)) |
iph | 301 | net/ipv4/icmp.c | if(iph->protocol==IPPROTO_ICMP) |
iph | 303 | net/ipv4/icmp.c | icmph = (struct icmphdr *)((char *)iph + (iph->ihl<<2)); |
iph | 317 | net/ipv4/icmp.c | saddr=iph->daddr; |
iph | 324 | net/ipv4/icmp.c | icmp_param.data_ptr=iph; |
iph | 325 | net/ipv4/icmp.c | icmp_param.data_len=(iph->ihl<<2)+8; /* RFC says return header + 8 bytes */ |
iph | 331 | net/ipv4/icmp.c | if (ip_options_echo(&icmp_param.replyopts, NULL, saddr, iph->saddr, skb_in) == 0) |
iph | 332 | net/ipv4/icmp.c | icmp_build_xmit(&icmp_param, saddr, iph->saddr); |
iph | 342 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 347 | net/ipv4/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 349 | net/ipv4/icmp.c | dp= ((unsigned char *)iph)+(iph->ihl<<2); |
iph | 368 | net/ipv4/icmp.c | in_ntoa(iph->daddr)); |
iph | 372 | net/ipv4/icmp.c | unsigned short old_mtu = ntohs(iph->tot_len); |
iph | 418 | net/ipv4/icmp.c | iph->id = htons(new_mtu); |
iph | 423 | net/ipv4/icmp.c | printk(KERN_INFO "ICMP: %s: Source Route Failed.\n", in_ntoa(iph->daddr)); |
iph | 444 | net/ipv4/icmp.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 466 | net/ipv4/icmp.c | if (iph->protocol == ipprot->protocol && ipprot->err_handler) |
iph | 469 | net/ipv4/icmp.c | iph->daddr, iph->saddr, ipprot); |
iph | 484 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 491 | net/ipv4/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 492 | net/ipv4/icmp.c | ip = iph->daddr; |
iph | 52 | net/ipv4/ip_forward.c | struct iphdr *iph=(struct iphdr *)skb_push(skb,sizeof(struct iphdr)); |
iph | 55 | net/ipv4/ip_forward.c | iph->version = 4; |
iph | 56 | net/ipv4/ip_forward.c | iph->tos = skb->ip_hdr->tos; |
iph | 57 | net/ipv4/ip_forward.c | iph->ttl = skb->ip_hdr->ttl; |
iph | 58 | net/ipv4/ip_forward.c | iph->frag_off = 0; |
iph | 59 | net/ipv4/ip_forward.c | iph->daddr = daddr; |
iph | 60 | net/ipv4/ip_forward.c | iph->saddr = out->pa_addr; |
iph | 61 | net/ipv4/ip_forward.c | iph->protocol = IPPROTO_IPIP; |
iph | 62 | net/ipv4/ip_forward.c | iph->ihl = 5; |
iph | 63 | net/ipv4/ip_forward.c | iph->tot_len = htons(skb->len); |
iph | 64 | net/ipv4/ip_forward.c | iph->id = htons(ip_id_count++); |
iph | 65 | net/ipv4/ip_forward.c | ip_send_check(iph); |
iph | 90 | net/ipv4/ip_forward.c | struct iphdr *iph; /* Our header */ |
iph | 112 | net/ipv4/ip_forward.c | fw_res=call_fw_firewall(PF_INET, skb, skb->h.iph); |
iph | 136 | net/ipv4/ip_forward.c | iph = skb->h.iph; |
iph | 137 | net/ipv4/ip_forward.c | iph->ttl--; |
iph | 145 | net/ipv4/ip_forward.c | iph->check = ntohs(iph->check) + 0x0100; |
iph | 146 | net/ipv4/ip_forward.c | if ((iph->check & 0xFF00) == 0) |
iph | 147 | net/ipv4/ip_forward.c | iph->check++; /* carry overflow */ |
iph | 148 | net/ipv4/ip_forward.c | iph->check = htons(iph->check); |
iph | 150 | net/ipv4/ip_forward.c | if (iph->ttl <= 0) |
iph | 211 | net/ipv4/ip_forward.c | if (dev == dev2 && !((iph->saddr^iph->daddr)&dev->pa_mask) && |
iph | 248 | net/ipv4/ip_forward.c | if (skb->len+encap > dev2->mtu && (ntohs(iph->frag_off) & IP_DF)) |
iph | 308 | net/ipv4/ip_forward.c | iph = skb2->ip_hdr = skb2->h.iph; |
iph | 347 | net/ipv4/ip_forward.c | if((fw_res = call_out_firewall(PF_INET, skb2, iph)) < FW_ACCEPT) |
iph | 365 | net/ipv4/ip_forward.c | optptr = (unsigned char *)iph + opt->rr; |
iph | 373 | net/ipv4/ip_forward.c | optptr = (unsigned char *)iph + opt->srr; |
iph | 389 | net/ipv4/ip_forward.c | iph->daddr = target_addr; |
iph | 397 | net/ipv4/ip_forward.c | optptr = (unsigned char *)iph + opt->ts; |
iph | 404 | net/ipv4/ip_forward.c | ip_send_check(iph); |
iph | 430 | net/ipv4/ip_forward.c | ip_fw_chk(iph,dev2,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 438 | net/ipv4/ip_forward.c | if(iph->tos & IPTOS_LOWDELAY) |
iph | 440 | 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 | 615 | net/ipv4/ip_fw.c | struct iphdr *iph = skb->h.iph; |
iph | 616 | net/ipv4/ip_fw.c | struct tcphdr *th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
iph | 695 | net/ipv4/ip_fw.c | ms->dst = iph->daddr; |
iph | 765 | net/ipv4/ip_fw.c | iph=skb2->h.iph; |
iph | 769 | net/ipv4/ip_fw.c | iph->tot_len = htons(diff+ntohs(iph->tot_len)); |
iph | 770 | net/ipv4/ip_fw.c | iph->check = 0; |
iph | 771 | net/ipv4/ip_fw.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 786 | net/ipv4/ip_fw.c | iph->tot_len = htons(skb->len + diff); |
iph | 812 | net/ipv4/ip_fw.c | struct iphdr *iph = skb->h.iph; |
iph | 821 | net/ipv4/ip_fw.c | if (iph->protocol!=IPPROTO_UDP && iph->protocol!=IPPROTO_TCP) |
iph | 828 | net/ipv4/ip_fw.c | portptr = (unsigned short *)&(((char *)iph)[iph->ihl*4]); |
iph | 833 | net/ipv4/ip_fw.c | strProt[iph->protocol==IPPROTO_TCP], |
iph | 834 | net/ipv4/ip_fw.c | ntohl(iph->saddr), ntohs(portptr[0]), |
iph | 835 | net/ipv4/ip_fw.c | ntohl(iph->daddr), ntohs(portptr[1])); |
iph | 839 | net/ipv4/ip_fw.c | if (iph->protocol == ms->protocol && |
iph | 840 | net/ipv4/ip_fw.c | iph->saddr == ms->src && iph->daddr == ms->dst && |
iph | 861 | net/ipv4/ip_fw.c | ms->protocol = iph->protocol; |
iph | 862 | net/ipv4/ip_fw.c | ms->src = iph->saddr; |
iph | 863 | net/ipv4/ip_fw.c | ms->dst = iph->daddr; |
iph | 873 | net/ipv4/ip_fw.c | iph->saddr = dev->pa_addr; /* my own address */ |
iph | 880 | net/ipv4/ip_fw.c | if (iph->protocol==IPPROTO_UDP) |
iph | 883 | net/ipv4/ip_fw.c | recalc_check((struct udphdr *)portptr,iph->saddr,iph->daddr,size); |
iph | 892 | net/ipv4/ip_fw.c | iph = skb->h.iph; |
iph | 893 | net/ipv4/ip_fw.c | portptr = (unsigned short *)&(((char *)iph)[iph->ihl*4]); |
iph | 909 | net/ipv4/ip_fw.c | tcp_send_check(th,iph->saddr,iph->daddr,size,skb); |
iph | 912 | net/ipv4/ip_fw.c | ip_send_check(iph); |
iph | 930 | net/ipv4/ip_fw.c | struct iphdr *iph = skb->h.iph; |
iph | 933 | net/ipv4/ip_fw.c | struct tcphdr *th = (struct tcphdr *)(skb->h.raw+(iph->ihl<<2)); |
iph | 935 | net/ipv4/ip_fw.c | if (iph->protocol!=IPPROTO_UDP && iph->protocol!=IPPROTO_TCP) |
iph | 938 | net/ipv4/ip_fw.c | portptr = (unsigned short *)&(((char *)iph)[iph->ihl*4]); |
iph | 945 | net/ipv4/ip_fw.c | strProt[iph->protocol==IPPROTO_TCP], |
iph | 946 | net/ipv4/ip_fw.c | ntohl(iph->saddr), ntohs(portptr[0]), |
iph | 947 | net/ipv4/ip_fw.c | ntohl(iph->daddr), ntohs(portptr[1])); |
iph | 962 | net/ipv4/ip_fw.c | if (iph->protocol==ms->protocol && |
iph | 963 | net/ipv4/ip_fw.c | (iph->saddr==ms->dst || iph->protocol==IPPROTO_UDP) && |
iph | 969 | net/ipv4/ip_fw.c | iph->daddr = ms->src; |
iph | 983 | net/ipv4/ip_fw.c | if (iph->protocol==IPPROTO_UDP) |
iph | 984 | net/ipv4/ip_fw.c | recalc_check((struct udphdr *)portptr,iph->saddr,iph->daddr,size); |
iph | 1016 | net/ipv4/ip_fw.c | tcp_send_check((struct tcphdr *)portptr,iph->saddr,iph->daddr,size,skb); |
iph | 1018 | net/ipv4/ip_fw.c | ip_send_check(iph); |
iph | 1020 | net/ipv4/ip_fw.c | printk("I-routed to %lX:%X\n",ntohl(iph->daddr),ntohs(portptr[1])); |
iph | 1278 | net/ipv4/ip_fw.c | void ip_acct_cnt(struct iphdr *iph, struct device *dev, struct ip_fw *f) |
iph | 1280 | net/ipv4/ip_fw.c | (void) ip_fw_chk(iph, dev, f, 0, 1); |
iph | 200 | net/ipv4/ip_input.c | struct iphdr *iph = skb->h.iph; |
iph | 222 | net/ipv4/ip_input.c | if(iph->version == 6) |
iph | 232 | net/ipv4/ip_input.c | skb->ip_hdr = iph; |
iph | 247 | 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 | 248 | net/ipv4/ip_input.c | || skb->len < ntohs(iph->tot_len)) |
iph | 261 | net/ipv4/ip_input.c | skb_trim(skb,ntohs(iph->tot_len)); |
iph | 263 | net/ipv4/ip_input.c | if (iph->ihl > 5) |
iph | 285 | net/ipv4/ip_input.c | if (iph->daddr != skb->dev->pa_addr && net_alias_has(skb->dev)) |
iph | 286 | net/ipv4/ip_input.c | skb->dev = dev = net_alias_dev_rcv_sel32(skb->dev, AF_INET, iph->saddr, iph->daddr); |
iph | 295 | net/ipv4/ip_input.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 304 | net/ipv4/ip_input.c | if ((err=call_in_firewall(PF_INET, skb, iph))<FW_ACCEPT) |
iph | 318 | net/ipv4/ip_input.c | if(iph->frag_off) |
iph | 320 | net/ipv4/ip_input.c | if (iph->frag_off & htons(IP_MF)) |
iph | 326 | net/ipv4/ip_input.c | if (iph->frag_off & htons(IP_OFFSET)) |
iph | 341 | net/ipv4/ip_input.c | daddr = iph->daddr; |
iph | 342 | net/ipv4/ip_input.c | if ( iph->daddr == skb->dev->pa_addr || (brd = ip_chk_addr(iph->daddr)) != 0) |
iph | 348 | net/ipv4/ip_input.c | unsigned char * optptr = ((unsigned char *)iph) + opt->srr; |
iph | 401 | net/ipv4/ip_input.c | if(!(dev->flags&IFF_ALLMULTI) && brd==IS_MULTICAST && iph->daddr!=IGMP_ALL_HOSTS && !(dev->flags&IFF_LOOPBACK)) |
iph | 414 | net/ipv4/ip_input.c | if(ip_mc->multiaddr==iph->daddr) |
iph | 428 | net/ipv4/ip_input.c | struct iphdr *iph=skb->h.iph; |
iph | 429 | net/ipv4/ip_input.c | if (ip_forward(skb, dev, is_frag|IPFWD_MASQUERADED, iph->daddr)) |
iph | 442 | net/ipv4/ip_input.c | skb=ip_defrag(iph,skb,dev); |
iph | 446 | net/ipv4/ip_input.c | iph=skb->h.iph; |
iph | 453 | net/ipv4/ip_input.c | skb->ip_hdr = iph; |
iph | 454 | net/ipv4/ip_input.c | skb->h.raw += iph->ihl*4; |
iph | 461 | net/ipv4/ip_input.c | if(brd==IS_MULTICAST && (iph->daddr&htonl(0xFFFFFF00))!=htonl(0xE0000000)) |
iph | 471 | net/ipv4/ip_input.c | hash = iph->protocol & (SOCK_ARRAY_SIZE-1); |
iph | 481 | net/ipv4/ip_input.c | raw_sk=get_sock_raw(raw_sk, iph->protocol, iph->saddr, iph->daddr); |
iph | 487 | net/ipv4/ip_input.c | sknext=get_sock_raw(raw_sk->next, iph->protocol, iph->saddr, iph->daddr); |
iph | 493 | net/ipv4/ip_input.c | raw_rcv(raw_sk, skb1, dev, iph->saddr,daddr); |
iph | 512 | net/ipv4/ip_input.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 517 | net/ipv4/ip_input.c | if (ipprot->protocol != iph->protocol) |
iph | 549 | net/ipv4/ip_input.c | (ntohs(iph->tot_len) - (iph->ihl * 4)), |
iph | 550 | net/ipv4/ip_input.c | iph->saddr, 0, ipprot); |
iph | 585 | net/ipv4/ip_input.c | raw_rcv(raw_sk, skb, dev, iph->saddr, daddr); |
iph | 621 | 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 | 718 | net/ipv4/ip_output.c | ip_fw_chk(iph,dev,ip_acct_chain, IP_FW_F_ACCEPT,1); |
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 | 268 | net/ipv4/ipmr.c | skb->h.iph=skb->ip_hdr; |
iph | 714 | net/ipv4/ipmr.c | skb->raddr=skb->h.iph->daddr; |
iph | 176 | net/ipv4/raw.c | struct iphdr *iph=(struct iphdr *)to; |
iph | 177 | net/ipv4/raw.c | iph->saddr=saddr; |
iph | 178 | net/ipv4/raw.c | iph->check=0; |
iph | 179 | net/ipv4/raw.c | iph->tot_len=htons(fraglen); /* This is right as you cant frag |
iph | 185 | net/ipv4/raw.c | iph->id = htons(ip_id_count++); |
iph | 186 | net/ipv4/raw.c | iph->check=ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 522 | net/ipv4/tcp.c | struct iphdr *iph=(struct iphdr *)(header-sizeof(struct iphdr)); |
iph | 556 | net/ipv4/tcp.c | unsigned short new_mtu = ntohs(iph->id); |
iph | 261 | net/ipv4/tcp_output.c | struct iphdr *iph; |
iph | 270 | net/ipv4/tcp_output.c | iph = skb->ip_hdr; |
iph | 271 | net/ipv4/tcp_output.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
iph | 276 | net/ipv4/tcp_output.c | iph->frag_off &= ~htons(IP_DF); |
iph | 277 | net/ipv4/tcp_output.c | ip_send_check(iph); |
iph | 327 | net/ipv4/tcp_output.c | struct iphdr *iph; |
iph | 362 | net/ipv4/tcp_output.c | iph = (struct iphdr *)skb->data; |
iph | 363 | net/ipv4/tcp_output.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
iph | 364 | net/ipv4/tcp_output.c | size = ntohs(iph->tot_len) - (iph->ihl<<2); |
iph | 379 | net/ipv4/tcp_output.c | rt = ip_check_route(&sk->ip_route_cache, opt->srr?opt->faddr:iph->daddr, skb->localroute); |
iph | 382 | net/ipv4/tcp_output.c | iph->id = htons(ip_id_count++); |
iph | 384 | net/ipv4/tcp_output.c | if (rt && ntohs(iph->tot_len) > rt->rt_mtu) |
iph | 385 | net/ipv4/tcp_output.c | iph->frag_off &= ~htons(IP_DF); |
iph | 387 | net/ipv4/tcp_output.c | ip_send_check(iph); |
iph | 410 | net/ipv4/tcp_output.c | printk("tcp_do_retransmit: hh miss %08x via %08x\n", iph->daddr, rt->rt_gateway); |
iph | 891 | net/ipv4/tcp_output.c | struct iphdr *iph; |
iph | 909 | net/ipv4/tcp_output.c | iph = (struct iphdr *)skb->ip_hdr; |
iph | 910 | net/ipv4/tcp_output.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
iph | 917 | net/ipv4/tcp_output.c | (iph->ihl << 2) + |