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 | 45 | include/asm-m68k/checksum.h | ip_fast_csum(unsigned char *iph, unsigned int ihl) |
iph | 59 | include/asm-m68k/checksum.h | : "=d" (sum), "=a" (iph), "=d" (ihl) |
iph | 60 | include/asm-m68k/checksum.h | : "0" (sum), "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 | 121 | include/asm-sparc/checksum.h | extern inline unsigned short ip_fast_csum(const unsigned char *iph, unsigned int ihl) |
iph | 151 | include/asm-sparc/checksum.h | : "=&r" (sum), "=&r" (iph), "=&r" (ihl) |
iph | 152 | include/asm-sparc/checksum.h | : "1" (iph), "2" (ihl) |
iph | 64 | 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 | 508 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 518 | net/ipv4/icmp.c | iph = skb_in->ip_hdr; |
iph | 531 | net/ipv4/icmp.c | atype=ip_chk_addr(iph->daddr); |
iph | 540 | net/ipv4/icmp.c | if(iph->frag_off&htons(IP_OFFSET)) |
iph | 553 | net/ipv4/icmp.c | if(iph->protocol==IPPROTO_ICMP) |
iph | 555 | net/ipv4/icmp.c | icmph = (struct icmphdr *)((char *)iph + (iph->ihl<<2)); |
iph | 570 | net/ipv4/icmp.c | if (!xrlim_allow(type, iph->saddr)) |
iph | 578 | net/ipv4/icmp.c | saddr=iph->daddr; |
iph | 585 | net/ipv4/icmp.c | icmp_param.data_ptr=iph; |
iph | 586 | net/ipv4/icmp.c | icmp_param.data_len=(iph->ihl<<2)+8; /* RFC says return header + 8 bytes */ |
iph | 592 | net/ipv4/icmp.c | if (ip_options_echo(&icmp_param.replyopts, NULL, saddr, iph->saddr, skb_in) == 0) |
iph | 593 | net/ipv4/icmp.c | icmp_build_xmit(&icmp_param, saddr, iph->saddr, ((iph->tos & 0x38) | 6)); |
iph | 603 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 608 | net/ipv4/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 610 | net/ipv4/icmp.c | dp= ((unsigned char *)iph)+(iph->ihl<<2); |
iph | 629 | net/ipv4/icmp.c | in_ntoa(iph->daddr)); |
iph | 633 | net/ipv4/icmp.c | unsigned short old_mtu = ntohs(iph->tot_len); |
iph | 679 | net/ipv4/icmp.c | iph->id = htons(new_mtu); |
iph | 684 | net/ipv4/icmp.c | printk(KERN_INFO "ICMP: %s: Source Route Failed.\n", in_ntoa(iph->daddr)); |
iph | 705 | net/ipv4/icmp.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 727 | net/ipv4/icmp.c | if (iph->protocol == ipprot->protocol && ipprot->err_handler) |
iph | 730 | net/ipv4/icmp.c | iph->daddr, iph->saddr, ipprot); |
iph | 745 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 752 | net/ipv4/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 753 | net/ipv4/icmp.c | ip = iph->daddr; |
iph | 902 | net/ipv4/icmp.c | icmp_build_xmit(&icmp_param, daddr, saddr, skb->iph->tos); |
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 | 258 | net/ipv4/ip_fragment.c | ihlen = iph->ihl * 4; |
iph | 259 | net/ipv4/ip_fragment.c | qp->iph = (struct iphdr *) frag_kmalloc(64 + 8, GFP_ATOMIC); |
iph | 260 | net/ipv4/ip_fragment.c | if (qp->iph == NULL) |
iph | 267 | net/ipv4/ip_fragment.c | memcpy(qp->iph, iph, ihlen + 8); |
iph | 331 | net/ipv4/ip_fragment.c | struct iphdr *iph; |
iph | 356 | net/ipv4/ip_fragment.c | memcpy(ptr, ((unsigned char *) qp->iph), qp->ihlen); |
iph | 382 | net/ipv4/ip_fragment.c | iph = skb->h.iph; |
iph | 383 | net/ipv4/ip_fragment.c | iph->frag_off = 0; |
iph | 384 | net/ipv4/ip_fragment.c | iph->tot_len = htons((iph->ihl * 4) + count); |
iph | 385 | net/ipv4/ip_fragment.c | skb->ip_hdr = iph; |
iph | 396 | net/ipv4/ip_fragment.c | struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev) |
iph | 418 | net/ipv4/ip_fragment.c | qp = ip_find(iph); |
iph | 421 | net/ipv4/ip_fragment.c | offset = ntohs(iph->frag_off); |
iph | 432 | net/ipv4/ip_fragment.c | ihl = iph->ihl * 4; |
iph | 448 | net/ipv4/ip_fragment.c | memcpy(qp->iph, iph, ihl+8); |
iph | 461 | net/ipv4/ip_fragment.c | if ((qp = ip_create(skb, iph, dev)) == NULL) |
iph | 474 | net/ipv4/ip_fragment.c | end = offset + ntohs(iph->tot_len) - ihl; |
iph | 607 | net/ipv4/ip_fragment.c | struct iphdr *iph; |
iph | 620 | net/ipv4/ip_fragment.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
iph | 621 | net/ipv4/ip_fragment.c | skb->ip_hdr = iph; |
iph | 623 | net/ipv4/ip_fragment.c | iph = skb->ip_hdr; |
iph | 630 | net/ipv4/ip_fragment.c | hlen = iph->ihl * 4; |
iph | 631 | net/ipv4/ip_fragment.c | left = ntohs(iph->tot_len) - hlen; /* Space per frame */ |
iph | 640 | net/ipv4/ip_fragment.c | if (ntohs(iph->frag_off) & IP_DF) |
iph | 671 | net/ipv4/ip_fragment.c | offset = (ntohs(iph->frag_off) & IP_OFFSET) << 3; |
iph | 743 | net/ipv4/ip_fragment.c | iph = (struct iphdr *)(skb2->h.raw/*+dev->hard_header_len*/); |
iph | 744 | net/ipv4/ip_fragment.c | iph->frag_off = htons((offset >> 3)); |
iph | 745 | net/ipv4/ip_fragment.c | skb2->ip_hdr = iph; |
iph | 761 | 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 | 193 | net/ipv4/ip_masq.c | ip_masq_in_get(struct iphdr *iph) |
iph | 202 | net/ipv4/ip_masq.c | portptr = (__u16 *)&(((char *)iph)[iph->ihl*4]); |
iph | 203 | net/ipv4/ip_masq.c | protocol = iph->protocol; |
iph | 204 | net/ipv4/ip_masq.c | s_addr = iph->saddr; |
iph | 206 | net/ipv4/ip_masq.c | d_addr = iph->daddr; |
iph | 226 | net/ipv4/ip_masq.c | ip_masq_out_get(struct iphdr *iph) |
iph | 233 | net/ipv4/ip_masq.c | portptr = (__u16 *)&(((char *)iph)[iph->ihl*4]); |
iph | 234 | net/ipv4/ip_masq.c | protocol = iph->protocol; |
iph | 235 | net/ipv4/ip_masq.c | s_addr = iph->saddr; |
iph | 237 | net/ipv4/ip_masq.c | d_addr = iph->daddr; |
iph | 430 | net/ipv4/ip_masq.c | struct iphdr *iph = skb->h.iph; |
iph | 440 | net/ipv4/ip_masq.c | if (iph->protocol!=IPPROTO_UDP && iph->protocol!=IPPROTO_TCP) |
iph | 447 | net/ipv4/ip_masq.c | portptr = (__u16 *)&(((char *)iph)[iph->ihl*4]); |
iph | 450 | net/ipv4/ip_masq.c | masq_proto_name(iph->protocol), |
iph | 451 | net/ipv4/ip_masq.c | ntohl(iph->saddr), ntohs(portptr[0]), |
iph | 452 | net/ipv4/ip_masq.c | ntohl(iph->daddr), ntohs(portptr[1])); |
iph | 455 | net/ipv4/ip_masq.c | ms = ip_masq_out_get(iph); |
iph | 465 | net/ipv4/ip_masq.c | ms = ip_masq_new(dev, iph->protocol, |
iph | 466 | net/ipv4/ip_masq.c | iph->saddr, portptr[0], |
iph | 467 | net/ipv4/ip_masq.c | iph->daddr, portptr[1], |
iph | 481 | net/ipv4/ip_masq.c | iph->saddr = ms->maddr; |
iph | 494 | net/ipv4/ip_masq.c | iph = skb->h.iph; |
iph | 495 | net/ipv4/ip_masq.c | portptr = (__u16 *)&(((char *)iph)[iph->ihl*4]); |
iph | 503 | net/ipv4/ip_masq.c | if (iph->protocol==IPPROTO_UDP) |
iph | 506 | net/ipv4/ip_masq.c | recalc_check((struct udphdr *)portptr,iph->saddr,iph->daddr,size); |
iph | 530 | net/ipv4/ip_masq.c | tcp_send_check(th,iph->saddr,iph->daddr,size,skb); |
iph | 533 | net/ipv4/ip_masq.c | ip_send_check(iph); |
iph | 552 | net/ipv4/ip_masq.c | struct iphdr *iph = skb->h.iph; |
iph | 557 | net/ipv4/ip_masq.c | if (iph->protocol!=IPPROTO_UDP && iph->protocol!=IPPROTO_TCP) |
iph | 564 | net/ipv4/ip_masq.c | frag = ntohs(iph->frag_off); |
iph | 571 | net/ipv4/ip_masq.c | portptr = (__u16 *)&(((char *)iph)[iph->ihl*4]); |
iph | 578 | net/ipv4/ip_masq.c | masq_proto_name(iph->protocol), |
iph | 579 | net/ipv4/ip_masq.c | ntohl(iph->saddr), ntohs(portptr[0]), |
iph | 580 | net/ipv4/ip_masq.c | ntohl(iph->daddr), ntohs(portptr[1])); |
iph | 586 | net/ipv4/ip_masq.c | ms = ip_masq_in_get(iph); |
iph | 606 | net/ipv4/ip_masq.c | ms->daddr = iph->saddr; |
iph | 613 | net/ipv4/ip_masq.c | iph->daddr = ms->saddr; |
iph | 628 | net/ipv4/ip_masq.c | iph = skb->h.iph; |
iph | 629 | net/ipv4/ip_masq.c | portptr = (__u16 *)&(((char *)iph)[iph->ihl*4]); |
iph | 640 | net/ipv4/ip_masq.c | if (iph->protocol==IPPROTO_UDP) |
iph | 643 | net/ipv4/ip_masq.c | recalc_check((struct udphdr *)portptr,iph->saddr,iph->daddr,size); |
iph | 652 | net/ipv4/ip_masq.c | tcp_send_check((struct tcphdr *)portptr,iph->saddr,iph->daddr,size,skb); |
iph | 663 | net/ipv4/ip_masq.c | ip_send_check(iph); |
iph | 665 | 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 | 572 | net/ipv4/ip_masq_app.c | struct iphdr *iph; |
iph | 579 | net/ipv4/ip_masq_app.c | iph = n_skb->h.iph; |
iph | 580 | net/ipv4/ip_masq_app.c | iph->check = 0; |
iph | 581 | net/ipv4/ip_masq_app.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 582 | 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 | 108 | net/ipv4/ip_masq_ftp.c | printk("protocol %d %lX:%X %X:%X\n", iph->protocol, htonl(from), htons(port), iph->daddr, 0); |
iph | 111 | net/ipv4/ip_masq_ftp.c | n_ms = ip_masq_out_get_2(iph->protocol, |
iph | 113 | net/ipv4/ip_masq_ftp.c | iph->daddr, 0); |
iph | 121 | 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 | 469 | net/ipv4/ip_options.c | icmp_send(skb, ICMP_PARAMETERPROB, 0, pp_ptr-iph, skb->dev); |
iph | 204 | net/ipv4/ip_output.c | struct iphdr *iph; |
iph | 291 | net/ipv4/ip_output.c | iph=(struct iphdr *)skb_put(skb,sizeof(struct iphdr) + opt->optlen); |
iph | 293 | net/ipv4/ip_output.c | iph=(struct iphdr *)skb_put(skb,sizeof(struct iphdr)); |
iph | 295 | net/ipv4/ip_output.c | iph->version = 4; |
iph | 296 | net/ipv4/ip_output.c | iph->ihl = 5; |
iph | 297 | net/ipv4/ip_output.c | iph->tos = tos; |
iph | 298 | net/ipv4/ip_output.c | iph->frag_off = 0; |
iph | 299 | net/ipv4/ip_output.c | iph->ttl = ttl; |
iph | 300 | net/ipv4/ip_output.c | iph->daddr = daddr; |
iph | 301 | net/ipv4/ip_output.c | iph->saddr = saddr; |
iph | 302 | net/ipv4/ip_output.c | iph->protocol = type; |
iph | 303 | net/ipv4/ip_output.c | skb->ip_hdr = iph; |
iph | 307 | net/ipv4/ip_output.c | iph->ihl += opt->optlen>>2; |
iph | 309 | net/ipv4/ip_output.c | return iph->ihl*4 + tmp; |
iph | 317 | net/ipv4/ip_output.c | void ip_send_check(struct iphdr *iph) |
iph | 319 | net/ipv4/ip_output.c | iph->check = 0; |
iph | 320 | net/ipv4/ip_output.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 335 | net/ipv4/ip_output.c | struct iphdr *iph; |
iph | 363 | net/ipv4/ip_output.c | iph = skb->ip_hdr; |
iph | 364 | net/ipv4/ip_output.c | iph->tot_len = htons(skb->len-(((unsigned char *)iph)-skb->data)); |
iph | 371 | net/ipv4/ip_output.c | iph->id = htons(ip_id_count++); |
iph | 382 | net/ipv4/ip_output.c | if(call_out_firewall(PF_INET, skb->dev, iph) < FW_ACCEPT) { |
iph | 398 | net/ipv4/ip_output.c | if(ntohs(iph->tot_len)> dev->mtu) |
iph | 410 | net/ipv4/ip_output.c | ip_send_check(iph); |
iph | 474 | net/ipv4/ip_output.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 483 | net/ipv4/ip_output.c | if (MULTICAST(iph->daddr) && !(dev->flags&IFF_LOOPBACK)) |
iph | 487 | net/ipv4/ip_output.c | if(iph->daddr==IGMP_ALL_HOSTS || (dev->flags&IFF_ALLMULTI)) |
iph | 496 | net/ipv4/ip_output.c | if(imc->multiaddr==iph->daddr) |
iph | 514 | net/ipv4/ip_output.c | if((dev->flags&IFF_BROADCAST) && (iph->daddr==dev->pa_brdaddr||iph->daddr==0xFFFFFFFF) && !(dev->flags&IFF_LOOPBACK)) |
iph | 584 | net/ipv4/ip_output.c | struct iphdr *iph; |
iph | 687 | net/ipv4/ip_output.c | skb->ip_hdr=iph=(struct iphdr *)skb_put(skb,length); |
iph | 691 | net/ipv4/ip_output.c | iph->version=4; |
iph | 692 | net/ipv4/ip_output.c | iph->ihl=5; |
iph | 693 | net/ipv4/ip_output.c | iph->tos=sk->ip_tos; |
iph | 694 | net/ipv4/ip_output.c | iph->tot_len = htons(length); |
iph | 695 | net/ipv4/ip_output.c | iph->id=htons(ip_id_count++); |
iph | 696 | net/ipv4/ip_output.c | iph->frag_off = 0; |
iph | 697 | net/ipv4/ip_output.c | iph->ttl=sk->ip_ttl; |
iph | 698 | net/ipv4/ip_output.c | iph->protocol=type; |
iph | 699 | net/ipv4/ip_output.c | iph->saddr=saddr; |
iph | 700 | net/ipv4/ip_output.c | iph->daddr=daddr; |
iph | 703 | net/ipv4/ip_output.c | iph->ihl += opt->optlen>>2; |
iph | 707 | net/ipv4/ip_output.c | iph->check=0; |
iph | 708 | net/ipv4/ip_output.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 709 | net/ipv4/ip_output.c | getfrag(frag,saddr,((char *)iph)+iph->ihl*4,0, length-iph->ihl*4); |
iph | 712 | net/ipv4/ip_output.c | getfrag(frag,saddr,(void *)iph,0,length); |
iph | 715 | net/ipv4/ip_output.c | if(call_out_firewall(PF_INET, skb->dev, iph)< FW_ACCEPT) |
iph | 722 | net/ipv4/ip_output.c | ip_fw_chk(iph,dev,ip_acct_chain, IP_FW_F_ACCEPT,1); |
iph | 867 | net/ipv4/ip_output.c | skb->ip_hdr = iph = (struct iphdr *)data; |
iph | 876 | net/ipv4/ip_output.c | iph->version = 4; |
iph | 877 | net/ipv4/ip_output.c | iph->ihl = 5; /* ugh */ |
iph | 879 | net/ipv4/ip_output.c | iph->ihl += opt->optlen>>2; |
iph | 883 | net/ipv4/ip_output.c | iph->tos = sk->ip_tos; |
iph | 884 | net/ipv4/ip_output.c | iph->tot_len = htons(fraglen - fragheaderlen + iph->ihl*4); |
iph | 885 | net/ipv4/ip_output.c | iph->id = id; |
iph | 886 | net/ipv4/ip_output.c | iph->frag_off = htons(offset>>3); |
iph | 887 | net/ipv4/ip_output.c | iph->frag_off |= mf; |
iph | 890 | net/ipv4/ip_output.c | iph->ttl = sk->ip_mc_ttl; |
iph | 893 | net/ipv4/ip_output.c | iph->ttl = sk->ip_ttl; |
iph | 894 | net/ipv4/ip_output.c | iph->protocol = type; |
iph | 895 | net/ipv4/ip_output.c | iph->check = 0; |
iph | 896 | net/ipv4/ip_output.c | iph->saddr = saddr; |
iph | 897 | net/ipv4/ip_output.c | iph->daddr = daddr; |
iph | 898 | net/ipv4/ip_output.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 899 | net/ipv4/ip_output.c | data += iph->ihl*4; |
iph | 919 | net/ipv4/ip_output.c | if(!offset && call_out_firewall(PF_INET, skb->dev, iph) < FW_ACCEPT) |
iph | 928 | 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 | 197 | net/ipv4/raw.c | struct iphdr *iph=(struct iphdr *)to; |
iph | 198 | net/ipv4/raw.c | if(!iph->saddr) |
iph | 199 | net/ipv4/raw.c | iph->saddr=saddr; |
iph | 200 | net/ipv4/raw.c | iph->check=0; |
iph | 201 | net/ipv4/raw.c | iph->tot_len=htons(fraglen); /* This is right as you cant frag |
iph | 207 | net/ipv4/raw.c | iph->id = htons(ip_id_count++); |
iph | 208 | net/ipv4/raw.c | iph->check=ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 510 | net/ipv4/tcp.c | struct iphdr *iph=(struct iphdr *)(header-sizeof(struct iphdr)); |
iph | 544 | 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) + |