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/tunnel.c | struct iphdr *iph; /* Our new IP header */ |
iph | 168 | drivers/net/tunnel.c | iph=(struct iphdr *)skb->data; |
iph | 169 | drivers/net/tunnel.c | if ( iph->version != 4 ) |
iph | 174 | drivers/net/tunnel.c | printk("%s: Bad IP packet: ip version %d\n", dev->name, iph->version); |
iph | 185 | drivers/net/tunnel.c | if ( iph->protocol == IPPROTO_IPIP && iph->saddr == dev->pa_addr ) |
iph | 196 | drivers/net/tunnel.c | if ( iph->daddr == dev->pa_addr ) |
iph | 206 | drivers/net/tunnel.c | print_ip(iph); |
iph | 226 | drivers/net/tunnel.c | iph=skb2->h.iph=(struct iphdr *)skb2->data; |
iph | 227 | drivers/net/tunnel.c | skb2->ip_hdr=iph; |
iph | 228 | drivers/net/tunnel.c | memcpy(skb2->h.iph, skb->data, ip_header_len ); |
iph | 234 | drivers/net/tunnel.c | ++iph->ttl; /* Note: ip_forward() decrements ttl, so compensate */ |
iph | 235 | drivers/net/tunnel.c | iph->saddr = dev->pa_addr; |
iph | 236 | drivers/net/tunnel.c | iph->daddr = dev->pa_dstaddr; |
iph | 237 | drivers/net/tunnel.c | iph->protocol = IPPROTO_IPIP; |
iph | 238 | drivers/net/tunnel.c | iph->ihl = 5; |
iph | 239 | drivers/net/tunnel.c | iph->tot_len = htons(skb2->len); |
iph | 240 | drivers/net/tunnel.c | iph->frag_off = 0; |
iph | 244 | drivers/net/tunnel.c | iph->check = 0; |
iph | 245 | drivers/net/tunnel.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 249 | drivers/net/tunnel.c | print_ip(iph); |
iph | 255 | 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 | 54 | include/linux/skbuff.h | struct iphdr *iph; |
iph | 64 | include/net/ip.h | struct iphdr *iph; /* pointer to IP header */ |
iph | 248 | net/ethernet/eth.c | struct iphdr *iph; |
iph | 266 | net/ethernet/eth.c | iph=(struct iphdr*)(src+14); /* 14 = Rx_addr+Tx_addr+type_field */ |
iph | 267 | net/ethernet/eth.c | ip_length = ntohs(iph->tot_len) - sizeof(struct iphdr); |
iph | 253 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 263 | net/ipv4/icmp.c | iph = skb_in->ip_hdr; |
iph | 276 | net/ipv4/icmp.c | atype=ip_chk_addr(iph->daddr); |
iph | 285 | net/ipv4/icmp.c | if(iph->frag_off&htons(IP_OFFSET)) |
iph | 298 | net/ipv4/icmp.c | if(iph->protocol==IPPROTO_ICMP) |
iph | 300 | net/ipv4/icmp.c | icmph = (struct icmphdr *)((char *)iph + (iph->ihl<<2)); |
iph | 314 | net/ipv4/icmp.c | saddr=iph->daddr; |
iph | 321 | net/ipv4/icmp.c | icmp_param.data_ptr=iph; |
iph | 322 | net/ipv4/icmp.c | icmp_param.data_len=(iph->ihl<<2)+8; /* RFC says return header + 8 bytes */ |
iph | 328 | net/ipv4/icmp.c | if (ip_options_echo(&icmp_param.replyopts, NULL, saddr, iph->saddr, skb_in) == 0) |
iph | 329 | net/ipv4/icmp.c | icmp_build_xmit(&icmp_param, saddr, iph->saddr); |
iph | 339 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 344 | net/ipv4/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 346 | net/ipv4/icmp.c | dp= ((unsigned char *)iph)+(iph->ihl<<2); |
iph | 358 | net/ipv4/icmp.c | in_ntoa(iph->daddr), ntohs(iph->protocol)); |
iph | 364 | net/ipv4/icmp.c | in_ntoa(iph->daddr)); |
iph | 367 | net/ipv4/icmp.c | printk("ICMP: %s: Source Route Failed.\n", in_ntoa(iph->daddr)); |
iph | 388 | net/ipv4/icmp.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 410 | net/ipv4/icmp.c | if (iph->protocol == ipprot->protocol && ipprot->err_handler) |
iph | 413 | net/ipv4/icmp.c | iph->daddr, iph->saddr, ipprot); |
iph | 431 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 438 | net/ipv4/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 439 | net/ipv4/icmp.c | ip = iph->daddr; |
iph | 184 | net/ipv4/ip.c | unsigned char * iph = (unsigned char*)skb->ip_hdr; |
iph | 187 | net/ipv4/ip.c | memcpy(iph+sizeof(struct iphdr), opt->__data, opt->optlen); |
iph | 192 | net/ipv4/ip.c | memcpy(iph+opt->srr+iph[opt->srr+1]-4, &daddr, 4); |
iph | 196 | net/ipv4/ip.c | memcpy(iph+opt->rr+iph[opt->rr+2]-5, &saddr, 4); |
iph | 198 | net/ipv4/ip.c | memcpy(iph+opt->ts+iph[opt->ts+2]-9, &saddr, 4); |
iph | 204 | net/ipv4/ip.c | memcpy(iph+opt->ts+iph[opt->ts+2]-5, &midtime, 4); |
iph | 209 | net/ipv4/ip.c | memset(iph+opt->rr, IPOPT_NOP, iph[opt->rr+1]); |
iph | 214 | net/ipv4/ip.c | memset(iph+opt->ts, IPOPT_NOP, iph[opt->ts+1]); |
iph | 368 | net/ipv4/ip.c | unsigned char * iph; |
iph | 376 | net/ipv4/ip.c | iph = (unsigned char*)skb->ip_hdr; |
iph | 377 | net/ipv4/ip.c | opt->optlen = ((struct iphdr *)iph)->ihl*4 - sizeof(struct iphdr); |
iph | 378 | net/ipv4/ip.c | optptr = iph + sizeof(struct iphdr); |
iph | 382 | net/ipv4/ip.c | iph = optptr - sizeof(struct iphdr); |
iph | 431 | net/ipv4/ip.c | opt->srr = optptr - iph; |
iph | 458 | net/ipv4/ip.c | opt->rr = optptr - iph; |
iph | 482 | net/ipv4/ip.c | opt->ts = optptr - iph; |
iph | 494 | net/ipv4/ip.c | opt->ts = optptr - iph; |
iph | 508 | net/ipv4/ip.c | opt->ts = optptr - iph; |
iph | 539 | net/ipv4/ip.c | opt->ts = optptr - iph; |
iph | 564 | net/ipv4/ip.c | icmp_send(skb, ICMP_PARAMETERPROB, 0, pp_ptr-iph, skb->dev); |
iph | 649 | net/ipv4/ip.c | struct iphdr *iph; |
iph | 749 | net/ipv4/ip.c | iph=(struct iphdr *)skb_put(skb,sizeof(struct iphdr) + opt->optlen); |
iph | 751 | net/ipv4/ip.c | iph=(struct iphdr *)skb_put(skb,sizeof(struct iphdr)); |
iph | 753 | net/ipv4/ip.c | iph->version = 4; |
iph | 754 | net/ipv4/ip.c | iph->ihl = 5; |
iph | 755 | net/ipv4/ip.c | iph->tos = tos; |
iph | 756 | net/ipv4/ip.c | iph->frag_off = 0; |
iph | 757 | net/ipv4/ip.c | iph->ttl = ttl; |
iph | 758 | net/ipv4/ip.c | iph->daddr = daddr; |
iph | 759 | net/ipv4/ip.c | iph->saddr = saddr; |
iph | 760 | net/ipv4/ip.c | iph->protocol = type; |
iph | 761 | net/ipv4/ip.c | skb->ip_hdr = iph; |
iph | 769 | net/ipv4/ip.c | iph->ihl += opt->optlen>>2; |
iph | 771 | net/ipv4/ip.c | return iph->ihl*4 + tmp; |
iph | 779 | net/ipv4/ip.c | void ip_send_check(struct iphdr *iph) |
iph | 781 | net/ipv4/ip.c | iph->check = 0; |
iph | 782 | net/ipv4/ip.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 828 | net/ipv4/ip.c | static struct ipq *ip_find(struct iphdr *iph) |
iph | 837 | net/ipv4/ip.c | if (iph->id== qp->iph->id && iph->saddr == qp->iph->saddr && |
iph | 838 | net/ipv4/ip.c | iph->daddr == qp->iph->daddr && iph->protocol == qp->iph->protocol) |
iph | 895 | net/ipv4/ip.c | kfree_s(qp->iph, 64 + 8); |
iph | 938 | net/ipv4/ip.c | static struct ipq *ip_create(struct sk_buff *skb, struct iphdr *iph, struct device *dev) |
iph | 956 | net/ipv4/ip.c | ihlen = iph->ihl * 4; |
iph | 957 | net/ipv4/ip.c | qp->iph = (struct iphdr *) kmalloc(64 + 8, GFP_ATOMIC); |
iph | 958 | net/ipv4/ip.c | if (qp->iph == NULL) |
iph | 965 | net/ipv4/ip.c | memcpy(qp->iph, iph, ihlen + 8); |
iph | 1029 | net/ipv4/ip.c | struct iphdr *iph; |
iph | 1054 | net/ipv4/ip.c | memcpy(ptr, ((unsigned char *) qp->iph), qp->ihlen); |
iph | 1080 | net/ipv4/ip.c | iph = skb->h.iph; |
iph | 1081 | net/ipv4/ip.c | iph->frag_off = 0; |
iph | 1082 | net/ipv4/ip.c | iph->tot_len = htons((iph->ihl * 4) + count); |
iph | 1083 | net/ipv4/ip.c | skb->ip_hdr = iph; |
iph | 1094 | net/ipv4/ip.c | static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev) |
iph | 1107 | net/ipv4/ip.c | qp = ip_find(iph); |
iph | 1110 | net/ipv4/ip.c | offset = ntohs(iph->frag_off); |
iph | 1121 | net/ipv4/ip.c | ihl = iph->ihl * 4; |
iph | 1137 | net/ipv4/ip.c | memcpy(qp->iph, iph, ihl+8); |
iph | 1150 | net/ipv4/ip.c | if ((qp = ip_create(skb, iph, dev)) == NULL) |
iph | 1163 | net/ipv4/ip.c | end = offset + ntohs(iph->tot_len) - ihl; |
iph | 1296 | net/ipv4/ip.c | struct iphdr *iph; |
iph | 1310 | net/ipv4/ip.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
iph | 1311 | net/ipv4/ip.c | skb->ip_hdr = iph; |
iph | 1313 | net/ipv4/ip.c | iph = skb->ip_hdr; |
iph | 1320 | net/ipv4/ip.c | hlen = iph->ihl * 4; |
iph | 1321 | net/ipv4/ip.c | left = ntohs(iph->tot_len) - hlen; /* Space per frame */ |
iph | 1330 | net/ipv4/ip.c | if (ntohs(iph->frag_off) & IP_DF) |
iph | 1361 | net/ipv4/ip.c | offset = (ntohs(iph->frag_off) & IP_OFFSET) << 3; |
iph | 1436 | net/ipv4/ip.c | iph = (struct iphdr *)(skb2->h.raw/*+dev->hard_header_len*/); |
iph | 1437 | net/ipv4/ip.c | iph->frag_off = htons((offset >> 3)); |
iph | 1438 | net/ipv4/ip.c | skb2->ip_hdr = iph; |
iph | 1454 | net/ipv4/ip.c | iph->frag_off |= htons(IP_MF); |
iph | 1487 | net/ipv4/ip.c | struct iphdr *iph=(struct iphdr *)skb_push(skb,sizeof(struct iphdr)); |
iph | 1490 | net/ipv4/ip.c | iph->version = 4; |
iph | 1491 | net/ipv4/ip.c | iph->tos = skb->ip_hdr->tos; |
iph | 1492 | net/ipv4/ip.c | iph->ttl = skb->ip_hdr->ttl; |
iph | 1493 | net/ipv4/ip.c | iph->frag_off = 0; |
iph | 1494 | net/ipv4/ip.c | iph->daddr = daddr; |
iph | 1495 | net/ipv4/ip.c | iph->saddr = out->pa_addr; |
iph | 1496 | net/ipv4/ip.c | iph->protocol = IPPROTO_IPIP; |
iph | 1497 | net/ipv4/ip.c | iph->ihl = 5; |
iph | 1498 | net/ipv4/ip.c | iph->tot_len = htons(skb->len); |
iph | 1499 | net/ipv4/ip.c | iph->id = htons(ip_id_count++); |
iph | 1500 | net/ipv4/ip.c | ip_send_check(iph); |
iph | 1525 | net/ipv4/ip.c | struct iphdr *iph; /* Our header */ |
iph | 1546 | net/ipv4/ip.c | fw_res=ip_fw_chk(skb->h.iph, dev, ip_fw_fwd_chain, ip_fw_fwd_policy, 0); |
iph | 1572 | net/ipv4/ip.c | iph = skb->h.iph; |
iph | 1573 | net/ipv4/ip.c | iph->ttl--; |
iph | 1581 | net/ipv4/ip.c | iph->check = ntohs(iph->check) + 0x0100; |
iph | 1582 | net/ipv4/ip.c | if ((iph->check & 0xFF00) == 0) |
iph | 1583 | net/ipv4/ip.c | iph->check++; /* carry overflow */ |
iph | 1584 | net/ipv4/ip.c | iph->check = htons(iph->check); |
iph | 1586 | net/ipv4/ip.c | if (iph->ttl <= 0) |
iph | 1655 | net/ipv4/ip.c | if (dev == dev2 && !((iph->saddr^iph->daddr)&dev->pa_mask) && |
iph | 1691 | net/ipv4/ip.c | if (skb->len+encap > dev2->mtu && (ntohs(iph->frag_off) & IP_DF)) { |
iph | 1745 | net/ipv4/ip.c | iph = skb2->ip_hdr = skb2->h.iph; |
iph | 1777 | net/ipv4/ip.c | optptr = (unsigned char *)iph + opt->rr; |
iph | 1784 | net/ipv4/ip.c | optptr = (unsigned char *)iph + opt->srr; |
iph | 1798 | net/ipv4/ip.c | iph->daddr = target_addr; |
iph | 1804 | net/ipv4/ip.c | optptr = (unsigned char *)iph + opt->ts; |
iph | 1810 | net/ipv4/ip.c | ip_send_check(iph); |
iph | 1836 | net/ipv4/ip.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 1844 | net/ipv4/ip.c | if(iph->tos & IPTOS_LOWDELAY) |
iph | 1846 | net/ipv4/ip.c | else if(iph->tos & IPTOS_THROUGHPUT) |
iph | 1889 | net/ipv4/ip.c | struct iphdr *iph = skb->h.iph; |
iph | 1909 | net/ipv4/ip.c | if(iph->version == 6) |
iph | 1919 | net/ipv4/ip.c | skb->ip_hdr = iph; |
iph | 1934 | net/ipv4/ip.c | if (skb->len<sizeof(struct iphdr) || iph->ihl<5 || iph->version != 4 || ip_fast_csum((unsigned char *)iph, iph->ihl) !=0 |
iph | 1935 | net/ipv4/ip.c | || skb->len < ntohs(iph->tot_len)) |
iph | 1948 | net/ipv4/ip.c | skb_trim(skb,ntohs(iph->tot_len)); |
iph | 1950 | net/ipv4/ip.c | if (iph->ihl > 5) { |
iph | 1969 | net/ipv4/ip.c | if ((err=ip_fw_chk(iph,dev,ip_fw_blk_chain,ip_fw_blk_policy, 0))<FW_ACCEPT) |
iph | 1983 | net/ipv4/ip.c | if(iph->frag_off) |
iph | 1985 | net/ipv4/ip.c | if (iph->frag_off & htons(IP_MF)) |
iph | 1991 | net/ipv4/ip.c | if (iph->frag_off & htons(IP_OFFSET)) |
iph | 2007 | net/ipv4/ip.c | if ( iph->daddr == skb->dev->pa_addr || (brd = ip_chk_addr(iph->daddr)) != 0) |
iph | 2012 | net/ipv4/ip.c | unsigned char * optptr = ((unsigned char *)iph) + opt->srr; |
iph | 2063 | net/ipv4/ip.c | if(!(dev->flags&IFF_ALLMULTI) && brd==IS_MULTICAST && iph->daddr!=IGMP_ALL_HOSTS && !(dev->flags&IFF_LOOPBACK)) |
iph | 2076 | net/ipv4/ip.c | if(ip_mc->multiaddr==iph->daddr) |
iph | 2090 | net/ipv4/ip.c | struct iphdr *iph=skb->h.iph; |
iph | 2091 | net/ipv4/ip.c | if (ip_forward(skb, dev, is_frag|4, iph->daddr)) |
iph | 2102 | net/ipv4/ip.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 2112 | net/ipv4/ip.c | skb=ip_defrag(iph,skb,dev); |
iph | 2116 | net/ipv4/ip.c | iph=skb->h.iph; |
iph | 2123 | net/ipv4/ip.c | skb->ip_hdr = iph; |
iph | 2124 | net/ipv4/ip.c | skb->h.raw += iph->ihl*4; |
iph | 2131 | net/ipv4/ip.c | if(brd==IS_MULTICAST && (iph->daddr&htonl(0xFFFFFF00))!=htonl(0xE0000000)) |
iph | 2141 | net/ipv4/ip.c | hash = iph->protocol & (SOCK_ARRAY_SIZE-1); |
iph | 2151 | net/ipv4/ip.c | raw_sk=get_sock_raw(raw_sk, iph->protocol, iph->saddr, iph->daddr); |
iph | 2157 | net/ipv4/ip.c | sknext=get_sock_raw(raw_sk->next, iph->protocol, iph->saddr, iph->daddr); |
iph | 2163 | net/ipv4/ip.c | raw_rcv(raw_sk, skb1, dev, iph->saddr,iph->daddr); |
iph | 2182 | net/ipv4/ip.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 2187 | net/ipv4/ip.c | if (ipprot->protocol != iph->protocol) |
iph | 2218 | net/ipv4/ip.c | ipprot->handler(skb2, dev, opt, iph->daddr, |
iph | 2219 | net/ipv4/ip.c | (ntohs(iph->tot_len) - (iph->ihl * 4)), |
iph | 2220 | net/ipv4/ip.c | iph->saddr, 0, ipprot); |
iph | 2255 | net/ipv4/ip.c | raw_rcv(raw_sk, skb, dev, iph->saddr, iph->daddr); |
iph | 2290 | net/ipv4/ip.c | if (ip_forward(skb, dev, is_frag, iph->daddr)) |
iph | 2360 | net/ipv4/ip.c | struct iphdr *iph; |
iph | 2388 | net/ipv4/ip.c | iph = skb->ip_hdr; |
iph | 2389 | net/ipv4/ip.c | iph->tot_len = ntohs(skb->len-(((unsigned char *)iph)-skb->data)); |
iph | 2392 | net/ipv4/ip.c | if(ip_fw_chk(iph, dev, ip_fw_blk_chain, ip_fw_blk_policy, 0) < FW_ACCEPT) |
iph | 2402 | net/ipv4/ip.c | iph->id = htons(ip_id_count++); |
iph | 2418 | net/ipv4/ip.c | if(ntohs(iph->tot_len)> dev->mtu) |
iph | 2430 | net/ipv4/ip.c | ip_send_check(iph); |
iph | 2494 | net/ipv4/ip.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 2503 | net/ipv4/ip.c | if (MULTICAST(iph->daddr) && !(dev->flags&IFF_LOOPBACK)) |
iph | 2507 | net/ipv4/ip.c | if(iph->daddr==IGMP_ALL_HOSTS || (dev->flags&IFF_ALLMULTI)) |
iph | 2516 | net/ipv4/ip.c | if(imc->multiaddr==iph->daddr) |
iph | 2534 | net/ipv4/ip.c | if((dev->flags&IFF_BROADCAST) && (iph->daddr==dev->pa_brdaddr||iph->daddr==0xFFFFFFFF) && !(dev->flags&IFF_LOOPBACK)) |
iph | 3093 | net/ipv4/ip.c | struct iphdr *iph; |
iph | 3230 | net/ipv4/ip.c | skb->ip_hdr=iph=(struct iphdr *)skb_put(skb,length); |
iph | 3234 | net/ipv4/ip.c | iph->version=4; |
iph | 3235 | net/ipv4/ip.c | iph->ihl=5; |
iph | 3236 | net/ipv4/ip.c | iph->tos=sk->ip_tos; |
iph | 3237 | net/ipv4/ip.c | iph->tot_len = htons(length); |
iph | 3238 | net/ipv4/ip.c | iph->id=htons(ip_id_count++); |
iph | 3239 | net/ipv4/ip.c | iph->frag_off = 0; |
iph | 3240 | net/ipv4/ip.c | iph->ttl=sk->ip_ttl; |
iph | 3241 | net/ipv4/ip.c | iph->protocol=type; |
iph | 3242 | net/ipv4/ip.c | iph->saddr=saddr; |
iph | 3243 | net/ipv4/ip.c | iph->daddr=daddr; |
iph | 3245 | net/ipv4/ip.c | iph->ihl += opt->optlen>>2; |
iph | 3249 | net/ipv4/ip.c | iph->check=0; |
iph | 3250 | net/ipv4/ip.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 3251 | net/ipv4/ip.c | getfrag(frag,saddr,((char *)iph)+iph->ihl*4,0, length-iph->ihl*4); |
iph | 3254 | net/ipv4/ip.c | getfrag(frag,saddr,(void *)iph,0,length-20); |
iph | 3257 | net/ipv4/ip.c | if(ip_fw_chk(iph, dev, ip_fw_blk_chain, ip_fw_blk_policy,0) < FW_ACCEPT) |
iph | 3399 | net/ipv4/ip.c | skb->ip_hdr = iph = (struct iphdr *)data; |
iph | 3408 | net/ipv4/ip.c | iph->version = 4; |
iph | 3409 | net/ipv4/ip.c | iph->ihl = 5; /* ugh */ |
iph | 3411 | net/ipv4/ip.c | iph->ihl += opt->optlen>>2; |
iph | 3415 | net/ipv4/ip.c | iph->tos = sk->ip_tos; |
iph | 3416 | net/ipv4/ip.c | iph->tot_len = htons(fraglen - fragheaderlen + iph->ihl*4); |
iph | 3417 | net/ipv4/ip.c | iph->id = id; |
iph | 3418 | net/ipv4/ip.c | iph->frag_off = htons(offset>>3); |
iph | 3419 | net/ipv4/ip.c | iph->frag_off |= mf; |
iph | 3422 | net/ipv4/ip.c | iph->ttl = sk->ip_mc_ttl; |
iph | 3425 | net/ipv4/ip.c | iph->ttl = sk->ip_ttl; |
iph | 3426 | net/ipv4/ip.c | iph->protocol = type; |
iph | 3427 | net/ipv4/ip.c | iph->check = 0; |
iph | 3428 | net/ipv4/ip.c | iph->saddr = saddr; |
iph | 3429 | net/ipv4/ip.c | iph->daddr = daddr; |
iph | 3430 | net/ipv4/ip.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 3431 | net/ipv4/ip.c | data += iph->ihl*4; |
iph | 3451 | net/ipv4/ip.c | if(!offset && ip_fw_chk(iph, dev, ip_fw_blk_chain, ip_fw_blk_policy,0) < FW_ACCEPT) |
iph | 3460 | net/ipv4/ip.c | ip_fw_chk(iph, dev, ip_acct_chain, IP_FW_F_ACCEPT, 1); |
iph | 580 | net/ipv4/ip_fw.c | struct iphdr *iph = skb->h.iph; |
iph | 581 | net/ipv4/ip_fw.c | struct tcphdr *th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
iph | 660 | net/ipv4/ip_fw.c | ms->dst = iph->daddr; |
iph | 730 | net/ipv4/ip_fw.c | iph=skb2->h.iph; |
iph | 734 | net/ipv4/ip_fw.c | iph->tot_len = htons(diff+ntohs(iph->tot_len)); |
iph | 735 | net/ipv4/ip_fw.c | iph->check = 0; |
iph | 736 | net/ipv4/ip_fw.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 751 | net/ipv4/ip_fw.c | iph->tot_len = htons(skb->len + diff); |
iph | 777 | net/ipv4/ip_fw.c | struct iphdr *iph = skb->h.iph; |
iph | 786 | net/ipv4/ip_fw.c | if (iph->protocol!=IPPROTO_UDP && iph->protocol!=IPPROTO_TCP) |
iph | 793 | net/ipv4/ip_fw.c | portptr = (unsigned short *)&(((char *)iph)[iph->ihl*4]); |
iph | 798 | net/ipv4/ip_fw.c | strProt[iph->protocol==IPPROTO_TCP], |
iph | 799 | net/ipv4/ip_fw.c | ntohl(iph->saddr), ntohs(portptr[0]), |
iph | 800 | net/ipv4/ip_fw.c | ntohl(iph->daddr), ntohs(portptr[1])); |
iph | 804 | net/ipv4/ip_fw.c | if (iph->protocol == ms->protocol && |
iph | 805 | net/ipv4/ip_fw.c | iph->saddr == ms->src && iph->daddr == ms->dst && |
iph | 826 | net/ipv4/ip_fw.c | ms->protocol = iph->protocol; |
iph | 827 | net/ipv4/ip_fw.c | ms->src = iph->saddr; |
iph | 828 | net/ipv4/ip_fw.c | ms->dst = iph->daddr; |
iph | 838 | net/ipv4/ip_fw.c | iph->saddr = dev->pa_addr; /* my own address */ |
iph | 845 | net/ipv4/ip_fw.c | if (iph->protocol==IPPROTO_UDP) |
iph | 848 | net/ipv4/ip_fw.c | recalc_check((struct udphdr *)portptr,iph->saddr,iph->daddr,size); |
iph | 857 | net/ipv4/ip_fw.c | iph = skb->h.iph; |
iph | 858 | net/ipv4/ip_fw.c | portptr = (unsigned short *)&(((char *)iph)[iph->ihl*4]); |
iph | 873 | net/ipv4/ip_fw.c | tcp_send_check(th,iph->saddr,iph->daddr,size,skb->sk); |
iph | 876 | net/ipv4/ip_fw.c | ip_send_check(iph); |
iph | 894 | net/ipv4/ip_fw.c | struct iphdr *iph = skb_ptr->h.iph; |
iph | 897 | net/ipv4/ip_fw.c | struct tcphdr *th = (struct tcphdr *)(skb_ptr->h.raw+(iph->ihl<<2)); |
iph | 899 | net/ipv4/ip_fw.c | if (iph->protocol!=IPPROTO_UDP && iph->protocol!=IPPROTO_TCP) |
iph | 902 | net/ipv4/ip_fw.c | portptr = (unsigned short *)&(((char *)iph)[iph->ihl*4]); |
iph | 909 | net/ipv4/ip_fw.c | strProt[iph->protocol==IPPROTO_TCP], |
iph | 910 | net/ipv4/ip_fw.c | ntohl(iph->saddr), ntohs(portptr[0]), |
iph | 911 | net/ipv4/ip_fw.c | ntohl(iph->daddr), ntohs(portptr[1])); |
iph | 926 | net/ipv4/ip_fw.c | if (iph->protocol==ms->protocol && |
iph | 927 | net/ipv4/ip_fw.c | (iph->saddr==ms->dst || iph->protocol==IPPROTO_UDP) && |
iph | 933 | net/ipv4/ip_fw.c | iph->daddr = ms->src; |
iph | 947 | net/ipv4/ip_fw.c | if (iph->protocol==IPPROTO_UDP) |
iph | 948 | net/ipv4/ip_fw.c | recalc_check((struct udphdr *)portptr,iph->saddr,iph->daddr,size); |
iph | 978 | net/ipv4/ip_fw.c | tcp_send_check((struct tcphdr *)portptr,iph->saddr,iph->daddr,size,skb_ptr->sk); |
iph | 980 | net/ipv4/ip_fw.c | ip_send_check(iph); |
iph | 982 | net/ipv4/ip_fw.c | printk("I-routed to %lX:%X\n",ntohl(iph->daddr),ntohs(portptr[1])); |
iph | 1341 | net/ipv4/ip_fw.c | void ip_acct_cnt(struct iphdr *iph, struct device *dev, struct ip_fw *f) |
iph | 1343 | net/ipv4/ip_fw.c | (void) ip_fw_chk(iph, dev, f, 0, 1); |
iph | 84 | net/ipv4/ipip.c | skb->h.iph=(struct iphdr *)skb->data; |
iph | 269 | net/ipv4/ipmr.c | skb->h.iph=skb->ip_hdr; |
iph | 714 | net/ipv4/ipmr.c | skb->raddr=skb->h.iph->daddr; |
iph | 164 | net/ipv4/raw.c | struct iphdr *iph=(struct iphdr *)to; |
iph | 165 | net/ipv4/raw.c | iph->saddr=saddr; |
iph | 166 | net/ipv4/raw.c | iph->check=0; |
iph | 167 | net/ipv4/raw.c | iph->tot_len=htons(fraglen); /* This is right as you cant frag |
iph | 173 | net/ipv4/raw.c | iph->id = htons(ip_id_count++); |
iph | 174 | net/ipv4/raw.c | iph->check=ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 644 | net/ipv4/tcp.c | struct iphdr *iph; |
iph | 666 | net/ipv4/tcp.c | iph = (struct iphdr *)skb->data; |
iph | 667 | net/ipv4/tcp.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
iph | 668 | net/ipv4/tcp.c | size = ntohs(iph->tot_len) - (iph->ihl<<2); |
iph | 675 | net/ipv4/tcp.c | iph->id = htons(ip_id_count++); |
iph | 676 | net/ipv4/tcp.c | ip_send_check(iph); |
iph | 683 | net/ipv4/tcp.c | rt=ip_rt_local(iph->daddr,NULL,NULL); |
iph | 685 | net/ipv4/tcp.c | rt=ip_rt_route(iph->daddr,NULL,NULL); |
iph | 700 | net/ipv4/tcp.c | skb->raddr=iph->daddr; |
iph | 1043 | net/ipv4/tcp.c | struct iphdr *iph=(struct iphdr *)header; |
iph | 1045 | net/ipv4/tcp.c | header+=4*iph->ihl; |
iph | 3281 | net/ipv4/tcp.c | struct iphdr *iph; |
iph | 3290 | net/ipv4/tcp.c | iph = skb->ip_hdr; |
iph | 3291 | net/ipv4/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
iph | 5165 | net/ipv4/tcp.c | struct iphdr *iph; |
iph | 5184 | net/ipv4/tcp.c | iph = (struct iphdr *)skb->ip_hdr; |
iph | 5185 | net/ipv4/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
iph | 5192 | net/ipv4/tcp.c | (iph->ihl << 2) + |
iph | 5245 | net/ipv4/tcp.c | (iph->ihl << 2) + th->doff * 4; |