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 | 132 | drivers/net/new_tunnel.c | struct iphdr *iph; /* Our new IP header */ |
iph | 166 | drivers/net/new_tunnel.c | iph = (struct iphdr *) skb->data; |
iph | 167 | drivers/net/new_tunnel.c | if ((rt = ip_rt_route(iph->daddr, 0)) == NULL) |
iph | 222 | drivers/net/new_tunnel.c | print_ip(iph); |
iph | 235 | drivers/net/new_tunnel.c | skb->h.iph = (struct iphdr *) skb_push(skb, tunnel_hlen); |
iph | 266 | drivers/net/new_tunnel.c | new_skb->h.iph = (struct iphdr *) skb_push(new_skb, tunnel_hlen); |
iph | 277 | drivers/net/new_tunnel.c | iph = skb->h.iph; |
iph | 278 | drivers/net/new_tunnel.c | iph->version = 4; |
iph | 279 | drivers/net/new_tunnel.c | iph->tos = skb->ip_hdr->tos; |
iph | 280 | drivers/net/new_tunnel.c | iph->ttl = skb->ip_hdr->ttl; |
iph | 281 | drivers/net/new_tunnel.c | iph->frag_off = 0; |
iph | 282 | drivers/net/new_tunnel.c | iph->daddr = target; |
iph | 283 | drivers/net/new_tunnel.c | iph->saddr = tdev->pa_addr; |
iph | 284 | drivers/net/new_tunnel.c | iph->protocol = IPPROTO_IPIP; |
iph | 285 | drivers/net/new_tunnel.c | iph->ihl = 5; |
iph | 286 | drivers/net/new_tunnel.c | iph->tot_len = htons(skb->len); |
iph | 287 | drivers/net/new_tunnel.c | iph->id = htons(ip_id_count++); /* Race condition here? */ |
iph | 288 | drivers/net/new_tunnel.c | ip_send_check(iph); |
iph | 289 | drivers/net/new_tunnel.c | skb->ip_hdr = skb->h.iph; |
iph | 293 | drivers/net/new_tunnel.c | print_ip(iph); |
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 | 65 | 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 | 272 | net/ethernet/eth.c | struct iphdr *iph; |
iph | 290 | net/ethernet/eth.c | iph=(struct iphdr*)(src+ETH_HLEN); |
iph | 291 | 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 | 55 | net/ipv4/ip_forward.c | struct iphdr *iph=(struct iphdr *)skb_push(skb,sizeof(struct iphdr)); |
iph | 58 | net/ipv4/ip_forward.c | iph->version = 4; |
iph | 59 | net/ipv4/ip_forward.c | iph->tos = skb->ip_hdr->tos; |
iph | 60 | net/ipv4/ip_forward.c | iph->ttl = skb->ip_hdr->ttl; |
iph | 61 | net/ipv4/ip_forward.c | iph->frag_off = 0; |
iph | 62 | net/ipv4/ip_forward.c | iph->daddr = daddr; |
iph | 63 | net/ipv4/ip_forward.c | iph->saddr = out->pa_addr; |
iph | 64 | net/ipv4/ip_forward.c | iph->protocol = IPPROTO_IPIP; |
iph | 65 | net/ipv4/ip_forward.c | iph->ihl = 5; |
iph | 66 | net/ipv4/ip_forward.c | iph->tot_len = htons(skb->len); |
iph | 67 | net/ipv4/ip_forward.c | iph->id = htons(ip_id_count++); |
iph | 68 | net/ipv4/ip_forward.c | ip_send_check(iph); |
iph | 93 | net/ipv4/ip_forward.c | struct iphdr *iph; /* Our header */ |
iph | 116 | net/ipv4/ip_forward.c | fw_res=call_fw_firewall(PF_INET, dev, skb->h.iph); |
iph | 141 | net/ipv4/ip_forward.c | iph = skb->h.iph; |
iph | 142 | net/ipv4/ip_forward.c | iph->ttl--; |
iph | 150 | net/ipv4/ip_forward.c | iph->check = ntohs(iph->check) + 0x0100; |
iph | 151 | net/ipv4/ip_forward.c | if ((iph->check & 0xFF00) == 0) |
iph | 152 | net/ipv4/ip_forward.c | iph->check++; /* carry overflow */ |
iph | 153 | net/ipv4/ip_forward.c | iph->check = htons(iph->check); |
iph | 155 | net/ipv4/ip_forward.c | if (iph->ttl <= 0) |
iph | 218 | net/ipv4/ip_forward.c | !((iph->saddr^dev->pa_addr)&dev->pa_mask) && |
iph | 222 | net/ipv4/ip_forward.c | iph->daddr != raddr/*ANK*/ && !opt->srr) |
iph | 257 | net/ipv4/ip_forward.c | if (skb->len+encap > dev2->mtu && (ntohs(iph->frag_off) & IP_DF)) |
iph | 317 | net/ipv4/ip_forward.c | iph = skb2->ip_hdr = skb2->h.iph; |
iph | 356 | net/ipv4/ip_forward.c | if((fw_res = call_out_firewall(PF_INET, skb2->dev, iph)) < FW_ACCEPT) |
iph | 374 | net/ipv4/ip_forward.c | optptr = (unsigned char *)iph + opt->rr; |
iph | 382 | net/ipv4/ip_forward.c | optptr = (unsigned char *)iph + opt->srr; |
iph | 398 | net/ipv4/ip_forward.c | iph->daddr = target_addr; |
iph | 406 | net/ipv4/ip_forward.c | optptr = (unsigned char *)iph + opt->ts; |
iph | 413 | net/ipv4/ip_forward.c | ip_send_check(iph); |
iph | 439 | net/ipv4/ip_forward.c | ip_fw_chk(iph,dev2,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 447 | net/ipv4/ip_forward.c | if(iph->tos & IPTOS_LOWDELAY) |
iph | 449 | net/ipv4/ip_forward.c | else if(iph->tos & IPTOS_THROUGHPUT) |
iph | 117 | net/ipv4/ip_fragment.c | static struct ipq *ip_find(struct iphdr *iph) |
iph | 126 | net/ipv4/ip_fragment.c | if (iph->id== qp->iph->id && iph->saddr == qp->iph->saddr && |
iph | 127 | net/ipv4/ip_fragment.c | iph->daddr == qp->iph->daddr && iph->protocol == qp->iph->protocol) |
iph | 184 | net/ipv4/ip_fragment.c | frag_kfree_s(qp->iph, 64 + 8); |
iph | 241 | net/ipv4/ip_fragment.c | static struct ipq *ip_create(struct sk_buff *skb, struct iphdr *iph, struct device *dev) |
iph | 259 | net/ipv4/ip_fragment.c | ihlen = iph->ihl * 4; |
iph | 260 | net/ipv4/ip_fragment.c | qp->iph = (struct iphdr *) frag_kmalloc(64 + 8, GFP_ATOMIC); |
iph | 261 | net/ipv4/ip_fragment.c | if (qp->iph == NULL) |
iph | 268 | net/ipv4/ip_fragment.c | memcpy(qp->iph, iph, ihlen + 8); |
iph | 332 | net/ipv4/ip_fragment.c | struct iphdr *iph; |
iph | 357 | net/ipv4/ip_fragment.c | memcpy(ptr, ((unsigned char *) qp->iph), qp->ihlen); |
iph | 383 | net/ipv4/ip_fragment.c | iph = skb->h.iph; |
iph | 384 | net/ipv4/ip_fragment.c | iph->frag_off = 0; |
iph | 385 | net/ipv4/ip_fragment.c | iph->tot_len = htons((iph->ihl * 4) + count); |
iph | 386 | net/ipv4/ip_fragment.c | skb->ip_hdr = iph; |
iph | 397 | net/ipv4/ip_fragment.c | struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev) |
iph | 419 | net/ipv4/ip_fragment.c | qp = ip_find(iph); |
iph | 422 | net/ipv4/ip_fragment.c | offset = ntohs(iph->frag_off); |
iph | 433 | net/ipv4/ip_fragment.c | ihl = iph->ihl * 4; |
iph | 449 | net/ipv4/ip_fragment.c | memcpy(qp->iph, iph, ihl+8); |
iph | 462 | net/ipv4/ip_fragment.c | if ((qp = ip_create(skb, iph, dev)) == NULL) |
iph | 475 | net/ipv4/ip_fragment.c | end = offset + ntohs(iph->tot_len) - ihl; |
iph | 608 | net/ipv4/ip_fragment.c | struct iphdr *iph; |
iph | 621 | net/ipv4/ip_fragment.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
iph | 622 | net/ipv4/ip_fragment.c | skb->ip_hdr = iph; |
iph | 624 | net/ipv4/ip_fragment.c | iph = skb->ip_hdr; |
iph | 631 | net/ipv4/ip_fragment.c | hlen = iph->ihl * 4; |
iph | 632 | net/ipv4/ip_fragment.c | left = ntohs(iph->tot_len) - hlen; /* Space per frame */ |
iph | 641 | net/ipv4/ip_fragment.c | if (ntohs(iph->frag_off) & IP_DF) |
iph | 672 | net/ipv4/ip_fragment.c | offset = (ntohs(iph->frag_off) & IP_OFFSET) << 3; |
iph | 744 | net/ipv4/ip_fragment.c | iph = (struct iphdr *)(skb2->h.raw/*+dev->hard_header_len*/); |
iph | 745 | net/ipv4/ip_fragment.c | iph->frag_off = htons((offset >> 3)); |
iph | 746 | net/ipv4/ip_fragment.c | skb2->ip_hdr = iph; |
iph | 762 | net/ipv4/ip_fragment.c | iph->frag_off |= htons(IP_MF); |
iph | 774 | net/ipv4/ip_fw.c | void ip_acct_cnt(struct iphdr *iph, struct device *dev, struct ip_fw *f) |
iph | 776 | net/ipv4/ip_fw.c | (void) ip_fw_chk(iph, dev, f, 0, 1); |
iph | 203 | net/ipv4/ip_input.c | struct iphdr *iph = skb->h.iph; |
iph | 225 | net/ipv4/ip_input.c | if(iph->version == 6) |
iph | 235 | net/ipv4/ip_input.c | skb->ip_hdr = iph; |
iph | 250 | 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 | 251 | net/ipv4/ip_input.c | || skb->len < ntohs(iph->tot_len)) |
iph | 264 | net/ipv4/ip_input.c | skb_trim(skb,ntohs(iph->tot_len)); |
iph | 273 | net/ipv4/ip_input.c | if (iph->daddr != skb->dev->pa_addr && net_alias_has(skb->dev)) |
iph | 274 | net/ipv4/ip_input.c | skb->dev = dev = net_alias_dev_rcv_sel32(skb->dev, AF_INET, iph->saddr, iph->daddr); |
iph | 277 | net/ipv4/ip_input.c | if (iph->ihl > 5) |
iph | 298 | net/ipv4/ip_input.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 307 | net/ipv4/ip_input.c | if ((err=call_in_firewall(PF_INET, skb->dev, iph))<FW_ACCEPT) |
iph | 321 | net/ipv4/ip_input.c | if(iph->frag_off) |
iph | 323 | net/ipv4/ip_input.c | if (iph->frag_off & htons(IP_MF)) |
iph | 329 | net/ipv4/ip_input.c | if (iph->frag_off & htons(IP_OFFSET)) |
iph | 344 | net/ipv4/ip_input.c | daddr = iph->daddr; |
iph | 345 | net/ipv4/ip_input.c | if ( iph->daddr == skb->dev->pa_addr || (brd = ip_chk_addr(iph->daddr)) != 0) |
iph | 351 | net/ipv4/ip_input.c | unsigned char * optptr = ((unsigned char *)iph) + opt->srr; |
iph | 404 | net/ipv4/ip_input.c | if(!(dev->flags&IFF_ALLMULTI) && brd==IS_MULTICAST && iph->daddr!=IGMP_ALL_HOSTS && !(dev->flags&IFF_LOOPBACK)) |
iph | 417 | net/ipv4/ip_input.c | if(ip_mc->multiaddr==iph->daddr) |
iph | 431 | net/ipv4/ip_input.c | struct iphdr *iph=skb->h.iph; |
iph | 432 | net/ipv4/ip_input.c | if (ip_forward(skb, dev, is_frag|IPFWD_MASQUERADED, iph->daddr)) |
iph | 445 | net/ipv4/ip_input.c | skb=ip_defrag(iph,skb,dev); |
iph | 449 | net/ipv4/ip_input.c | iph=skb->h.iph; |
iph | 453 | net/ipv4/ip_input.c | struct iphdr *iph=skb->h.iph; |
iph | 454 | net/ipv4/ip_input.c | if (ip_forward(skb, dev, IPFWD_MASQUERADED, iph->daddr)) |
iph | 465 | net/ipv4/ip_input.c | skb->ip_hdr = iph; |
iph | 466 | net/ipv4/ip_input.c | skb->h.raw += iph->ihl*4; |
iph | 473 | net/ipv4/ip_input.c | if(brd==IS_MULTICAST && (iph->daddr&htonl(0xFFFFFF00))!=htonl(0xE0000000)) |
iph | 483 | net/ipv4/ip_input.c | hash = iph->protocol & (SOCK_ARRAY_SIZE-1); |
iph | 493 | net/ipv4/ip_input.c | raw_sk=get_sock_raw(raw_sk, iph->protocol, iph->saddr, iph->daddr); |
iph | 499 | net/ipv4/ip_input.c | sknext=get_sock_raw(raw_sk->next, iph->protocol, iph->saddr, iph->daddr); |
iph | 505 | net/ipv4/ip_input.c | raw_rcv(raw_sk, skb1, dev, iph->saddr,daddr); |
iph | 524 | net/ipv4/ip_input.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 529 | net/ipv4/ip_input.c | if (ipprot->protocol != iph->protocol) |
iph | 561 | net/ipv4/ip_input.c | (ntohs(iph->tot_len) - (iph->ihl * 4)), |
iph | 562 | net/ipv4/ip_input.c | iph->saddr, 0, ipprot); |
iph | 597 | net/ipv4/ip_input.c | raw_rcv(raw_sk, skb, dev, iph->saddr, daddr); |
iph | 633 | net/ipv4/ip_input.c | if (ip_forward(skb, dev, is_frag, iph->daddr)) |
iph | 192 | net/ipv4/ip_masq.c | ip_masq_in_get(struct iphdr *iph) |
iph | 201 | net/ipv4/ip_masq.c | portptr = (__u16 *)&(((char *)iph)[iph->ihl*4]); |
iph | 202 | net/ipv4/ip_masq.c | protocol = iph->protocol; |
iph | 203 | net/ipv4/ip_masq.c | s_addr = iph->saddr; |
iph | 205 | net/ipv4/ip_masq.c | d_addr = iph->daddr; |
iph | 225 | net/ipv4/ip_masq.c | ip_masq_out_get(struct iphdr *iph) |
iph | 234 | net/ipv4/ip_masq.c | portptr = (__u16 *)&(((char *)iph)[iph->ihl*4]); |
iph | 235 | net/ipv4/ip_masq.c | protocol = iph->protocol; |
iph | 236 | net/ipv4/ip_masq.c | s_addr = iph->saddr; |
iph | 238 | net/ipv4/ip_masq.c | d_addr = iph->daddr; |
iph | 413 | net/ipv4/ip_masq.c | struct iphdr *iph = skb->h.iph; |
iph | 423 | net/ipv4/ip_masq.c | if (iph->protocol!=IPPROTO_UDP && iph->protocol!=IPPROTO_TCP) |
iph | 430 | net/ipv4/ip_masq.c | portptr = (__u16 *)&(((char *)iph)[iph->ihl*4]); |
iph | 433 | net/ipv4/ip_masq.c | masq_proto_name(iph->protocol), |
iph | 434 | net/ipv4/ip_masq.c | ntohl(iph->saddr), ntohs(portptr[0]), |
iph | 435 | net/ipv4/ip_masq.c | ntohl(iph->daddr), ntohs(portptr[1])); |
iph | 438 | net/ipv4/ip_masq.c | ms = ip_masq_out_get(iph); |
iph | 448 | net/ipv4/ip_masq.c | ms = ip_masq_new(dev, iph->protocol, |
iph | 449 | net/ipv4/ip_masq.c | iph->saddr, portptr[0], |
iph | 450 | net/ipv4/ip_masq.c | iph->daddr, portptr[1], |
iph | 464 | net/ipv4/ip_masq.c | iph->saddr = ms->maddr; |
iph | 477 | net/ipv4/ip_masq.c | iph = skb->h.iph; |
iph | 478 | net/ipv4/ip_masq.c | portptr = (__u16 *)&(((char *)iph)[iph->ihl*4]); |
iph | 486 | net/ipv4/ip_masq.c | if (iph->protocol==IPPROTO_UDP) |
iph | 489 | net/ipv4/ip_masq.c | recalc_check((struct udphdr *)portptr,iph->saddr,iph->daddr,size); |
iph | 507 | net/ipv4/ip_masq.c | tcp_send_check(th,iph->saddr,iph->daddr,size,skb); |
iph | 510 | net/ipv4/ip_masq.c | ip_send_check(iph); |
iph | 529 | net/ipv4/ip_masq.c | struct iphdr *iph = skb->h.iph; |
iph | 534 | net/ipv4/ip_masq.c | if (iph->protocol!=IPPROTO_UDP && iph->protocol!=IPPROTO_TCP) |
iph | 541 | net/ipv4/ip_masq.c | frag = ntohs(iph->frag_off); |
iph | 548 | net/ipv4/ip_masq.c | portptr = (__u16 *)&(((char *)iph)[iph->ihl*4]); |
iph | 555 | net/ipv4/ip_masq.c | masq_proto_name(iph->protocol), |
iph | 556 | net/ipv4/ip_masq.c | ntohl(iph->saddr), ntohs(portptr[0]), |
iph | 557 | net/ipv4/ip_masq.c | ntohl(iph->daddr), ntohs(portptr[1])); |
iph | 563 | net/ipv4/ip_masq.c | ms = ip_masq_in_get(iph); |
iph | 583 | net/ipv4/ip_masq.c | ms->daddr = iph->saddr; |
iph | 590 | net/ipv4/ip_masq.c | iph->daddr = ms->saddr; |
iph | 605 | net/ipv4/ip_masq.c | iph = skb->h.iph; |
iph | 606 | net/ipv4/ip_masq.c | portptr = (__u16 *)&(((char *)iph)[iph->ihl*4]); |
iph | 613 | net/ipv4/ip_masq.c | if (iph->protocol==IPPROTO_UDP) |
iph | 614 | net/ipv4/ip_masq.c | recalc_check((struct udphdr *)portptr,iph->saddr,iph->daddr,size); |
iph | 619 | net/ipv4/ip_masq.c | tcp_send_check((struct tcphdr *)portptr,iph->saddr,iph->daddr,size,skb); |
iph | 621 | net/ipv4/ip_masq.c | ip_send_check(iph); |
iph | 623 | net/ipv4/ip_masq.c | printk("I-routed to %lX:%X\n",ntohl(iph->daddr),ntohs(portptr[1])); |
iph | 313 | net/ipv4/ip_masq_app.c | struct iphdr *iph; |
iph | 328 | net/ipv4/ip_masq_app.c | iph = (*skb_p)->h.iph; |
iph | 329 | net/ipv4/ip_masq_app.c | th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
iph | 376 | net/ipv4/ip_masq_app.c | struct iphdr *iph; |
iph | 391 | net/ipv4/ip_masq_app.c | iph = (*skb_p)->h.iph; |
iph | 392 | net/ipv4/ip_masq_app.c | th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
iph | 561 | net/ipv4/ip_masq_app.c | struct iphdr *iph; |
iph | 568 | net/ipv4/ip_masq_app.c | iph = n_skb->h.iph; |
iph | 569 | net/ipv4/ip_masq_app.c | iph->check = 0; |
iph | 570 | net/ipv4/ip_masq_app.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 571 | net/ipv4/ip_masq_app.c | iph->tot_len = htons(skb_len + diff); |
iph | 54 | net/ipv4/ip_masq_ftp.c | struct iphdr *iph; |
iph | 66 | net/ipv4/ip_masq_ftp.c | iph = skb->h.iph; |
iph | 67 | net/ipv4/ip_masq_ftp.c | th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
iph | 109 | net/ipv4/ip_masq_ftp.c | iph->daddr, 0, |
iph | 55 | net/ipv4/ip_masq_irc.c | struct iphdr *iph; |
iph | 68 | net/ipv4/ip_masq_irc.c | iph = skb->h.iph; |
iph | 69 | net/ipv4/ip_masq_irc.c | th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
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 | 201 | net/ipv4/ip_output.c | struct iphdr *iph; |
iph | 288 | net/ipv4/ip_output.c | iph=(struct iphdr *)skb_put(skb,sizeof(struct iphdr) + opt->optlen); |
iph | 290 | net/ipv4/ip_output.c | iph=(struct iphdr *)skb_put(skb,sizeof(struct iphdr)); |
iph | 292 | net/ipv4/ip_output.c | iph->version = 4; |
iph | 293 | net/ipv4/ip_output.c | iph->ihl = 5; |
iph | 294 | net/ipv4/ip_output.c | iph->tos = tos; |
iph | 295 | net/ipv4/ip_output.c | iph->frag_off = 0; |
iph | 296 | net/ipv4/ip_output.c | iph->ttl = ttl; |
iph | 297 | net/ipv4/ip_output.c | iph->daddr = daddr; |
iph | 298 | net/ipv4/ip_output.c | iph->saddr = saddr; |
iph | 299 | net/ipv4/ip_output.c | iph->protocol = type; |
iph | 300 | net/ipv4/ip_output.c | skb->ip_hdr = iph; |
iph | 304 | net/ipv4/ip_output.c | iph->ihl += opt->optlen>>2; |
iph | 306 | net/ipv4/ip_output.c | return iph->ihl*4 + tmp; |
iph | 314 | net/ipv4/ip_output.c | void ip_send_check(struct iphdr *iph) |
iph | 316 | net/ipv4/ip_output.c | iph->check = 0; |
iph | 317 | net/ipv4/ip_output.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 332 | net/ipv4/ip_output.c | struct iphdr *iph; |
iph | 360 | net/ipv4/ip_output.c | iph = skb->ip_hdr; |
iph | 361 | net/ipv4/ip_output.c | iph->tot_len = htons(skb->len-(((unsigned char *)iph)-skb->data)); |
iph | 364 | net/ipv4/ip_output.c | if(call_out_firewall(PF_INET, skb->dev, iph) < FW_ACCEPT) |
iph | 374 | net/ipv4/ip_output.c | iph->id = htons(ip_id_count++); |
iph | 390 | net/ipv4/ip_output.c | if(ntohs(iph->tot_len)> dev->mtu) |
iph | 402 | net/ipv4/ip_output.c | ip_send_check(iph); |
iph | 466 | net/ipv4/ip_output.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 475 | net/ipv4/ip_output.c | if (MULTICAST(iph->daddr) && !(dev->flags&IFF_LOOPBACK)) |
iph | 479 | net/ipv4/ip_output.c | if(iph->daddr==IGMP_ALL_HOSTS || (dev->flags&IFF_ALLMULTI)) |
iph | 488 | net/ipv4/ip_output.c | if(imc->multiaddr==iph->daddr) |
iph | 506 | net/ipv4/ip_output.c | if((dev->flags&IFF_BROADCAST) && (iph->daddr==dev->pa_brdaddr||iph->daddr==0xFFFFFFFF) && !(dev->flags&IFF_LOOPBACK)) |
iph | 576 | net/ipv4/ip_output.c | struct iphdr *iph; |
iph | 678 | net/ipv4/ip_output.c | skb->ip_hdr=iph=(struct iphdr *)skb_put(skb,length); |
iph | 682 | net/ipv4/ip_output.c | iph->version=4; |
iph | 683 | net/ipv4/ip_output.c | iph->ihl=5; |
iph | 684 | net/ipv4/ip_output.c | iph->tos=sk->ip_tos; |
iph | 685 | net/ipv4/ip_output.c | iph->tot_len = htons(length); |
iph | 686 | net/ipv4/ip_output.c | iph->id=htons(ip_id_count++); |
iph | 687 | net/ipv4/ip_output.c | iph->frag_off = 0; |
iph | 688 | net/ipv4/ip_output.c | iph->ttl=sk->ip_ttl; |
iph | 689 | net/ipv4/ip_output.c | iph->protocol=type; |
iph | 690 | net/ipv4/ip_output.c | iph->saddr=saddr; |
iph | 691 | net/ipv4/ip_output.c | iph->daddr=daddr; |
iph | 694 | net/ipv4/ip_output.c | iph->ihl += opt->optlen>>2; |
iph | 698 | net/ipv4/ip_output.c | iph->check=0; |
iph | 699 | net/ipv4/ip_output.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 700 | net/ipv4/ip_output.c | getfrag(frag,saddr,((char *)iph)+iph->ihl*4,0, length-iph->ihl*4); |
iph | 703 | net/ipv4/ip_output.c | getfrag(frag,saddr,(void *)iph,0,length-20); |
iph | 706 | net/ipv4/ip_output.c | if(call_out_firewall(PF_INET, skb->dev, iph)< FW_ACCEPT) |
iph | 713 | net/ipv4/ip_output.c | ip_fw_chk(iph,dev,ip_acct_chain, IP_FW_F_ACCEPT,1); |
iph | 858 | net/ipv4/ip_output.c | skb->ip_hdr = iph = (struct iphdr *)data; |
iph | 867 | net/ipv4/ip_output.c | iph->version = 4; |
iph | 868 | net/ipv4/ip_output.c | iph->ihl = 5; /* ugh */ |
iph | 870 | net/ipv4/ip_output.c | iph->ihl += opt->optlen>>2; |
iph | 874 | net/ipv4/ip_output.c | iph->tos = sk->ip_tos; |
iph | 875 | net/ipv4/ip_output.c | iph->tot_len = htons(fraglen - fragheaderlen + iph->ihl*4); |
iph | 876 | net/ipv4/ip_output.c | iph->id = id; |
iph | 877 | net/ipv4/ip_output.c | iph->frag_off = htons(offset>>3); |
iph | 878 | net/ipv4/ip_output.c | iph->frag_off |= mf; |
iph | 881 | net/ipv4/ip_output.c | iph->ttl = sk->ip_mc_ttl; |
iph | 884 | net/ipv4/ip_output.c | iph->ttl = sk->ip_ttl; |
iph | 885 | net/ipv4/ip_output.c | iph->protocol = type; |
iph | 886 | net/ipv4/ip_output.c | iph->check = 0; |
iph | 887 | net/ipv4/ip_output.c | iph->saddr = saddr; |
iph | 888 | net/ipv4/ip_output.c | iph->daddr = daddr; |
iph | 889 | net/ipv4/ip_output.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 890 | net/ipv4/ip_output.c | data += iph->ihl*4; |
iph | 910 | net/ipv4/ip_output.c | if(!offset && call_out_firewall(PF_INET, skb->dev, iph) < FW_ACCEPT) |
iph | 919 | 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 | if(!iph->saddr) |
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 | 534 | net/ipv4/tcp.c | struct iphdr *iph=(struct iphdr *)(header-sizeof(struct iphdr)); |
iph | 568 | net/ipv4/tcp.c | unsigned short new_mtu = ntohs(iph->id); |
iph | 270 | net/ipv4/tcp_output.c | struct iphdr *iph; |
iph | 279 | net/ipv4/tcp_output.c | iph = skb->ip_hdr; |
iph | 280 | net/ipv4/tcp_output.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
iph | 285 | net/ipv4/tcp_output.c | iph->frag_off &= ~htons(IP_DF); |
iph | 286 | net/ipv4/tcp_output.c | ip_send_check(iph); |
iph | 334 | net/ipv4/tcp_output.c | struct iphdr *iph; |
iph | 369 | net/ipv4/tcp_output.c | iph = (struct iphdr *)skb->data; |
iph | 370 | net/ipv4/tcp_output.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
iph | 371 | net/ipv4/tcp_output.c | size = ntohs(iph->tot_len) - (iph->ihl<<2); |
iph | 386 | net/ipv4/tcp_output.c | rt = ip_check_route(&sk->ip_route_cache, opt->srr?opt->faddr:iph->daddr, skb->localroute); |
iph | 389 | net/ipv4/tcp_output.c | iph->id = htons(ip_id_count++); |
iph | 391 | net/ipv4/tcp_output.c | if (rt && ntohs(iph->tot_len) > rt->rt_mtu) |
iph | 392 | net/ipv4/tcp_output.c | iph->frag_off &= ~htons(IP_DF); |
iph | 394 | net/ipv4/tcp_output.c | ip_send_check(iph); |
iph | 417 | net/ipv4/tcp_output.c | printk("tcp_do_retransmit: hh miss %08x via %08x\n", iph->daddr, rt->rt_gateway); |
iph | 916 | net/ipv4/tcp_output.c | struct iphdr *iph; |
iph | 934 | net/ipv4/tcp_output.c | iph = (struct iphdr *)skb->ip_hdr; |
iph | 935 | net/ipv4/tcp_output.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
iph | 942 | net/ipv4/tcp_output.c | (iph->ihl << 2) + |