tag | line | file | source code |
iph | 113 | arch/alpha/lib/checksum.c | unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl) |
iph | 115 | arch/alpha/lib/checksum.c | return ~do_csum(iph,ihl*4); |
iph | 127 | drivers/net/tunnel.c | struct iphdr *iph; /* Our new IP header */ |
iph | 163 | drivers/net/tunnel.c | iph=(struct iphdr *)skb->data; |
iph | 164 | drivers/net/tunnel.c | if ( iph->version != 4 ) |
iph | 169 | drivers/net/tunnel.c | printk("%s: Bad IP packet: ip version %d\n", dev->name, iph->version); |
iph | 180 | drivers/net/tunnel.c | if ( iph->protocol == IPPROTO_IPIP && iph->saddr == dev->pa_addr ) |
iph | 191 | drivers/net/tunnel.c | if ( iph->daddr == dev->pa_addr ) |
iph | 201 | drivers/net/tunnel.c | print_ip(iph); |
iph | 221 | drivers/net/tunnel.c | iph=skb2->h.iph=(struct iphdr *)skb2->data; |
iph | 222 | drivers/net/tunnel.c | skb2->ip_hdr=iph; |
iph | 223 | drivers/net/tunnel.c | memcpy(skb2->h.iph, skb->data, ip_header_len ); |
iph | 229 | drivers/net/tunnel.c | ++iph->ttl; /* Note: ip_forward() decrements ttl, so compensate */ |
iph | 230 | drivers/net/tunnel.c | iph->saddr = dev->pa_addr; |
iph | 231 | drivers/net/tunnel.c | iph->daddr = dev->pa_dstaddr; |
iph | 232 | drivers/net/tunnel.c | iph->protocol = IPPROTO_IPIP; |
iph | 233 | drivers/net/tunnel.c | iph->ihl = 5; |
iph | 234 | drivers/net/tunnel.c | iph->tot_len = htons(skb2->len); |
iph | 235 | drivers/net/tunnel.c | iph->frag_off = 0; |
iph | 239 | drivers/net/tunnel.c | iph->check = 0; |
iph | 240 | drivers/net/tunnel.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 244 | drivers/net/tunnel.c | print_ip(iph); |
iph | 250 | drivers/net/tunnel.c | if(ip_forward(skb2, dev, 0, iph->daddr)) |
iph | 9 | include/asm-alpha/checksum.h | extern unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl); |
iph | 45 | include/asm-i386/checksum.h | static inline unsigned short ip_fast_csum(unsigned char * iph, |
iph | 68 | include/asm-i386/checksum.h | : "=&r" (sum), "=&r" (iph), "=&r" (ihl) |
iph | 69 | include/asm-i386/checksum.h | : "1" (iph), "2" (ihl)); |
iph | 54 | include/linux/skbuff.h | struct iphdr *iph; |
iph | 69 | include/net/ip.h | struct iphdr *iph; /* pointer to IP header */ |
iph | 127 | include/net/ip.h | struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev); |
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 | 255 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 265 | net/ipv4/icmp.c | iph = skb_in->ip_hdr; |
iph | 278 | net/ipv4/icmp.c | atype=ip_chk_addr(iph->daddr); |
iph | 287 | net/ipv4/icmp.c | if(iph->frag_off&htons(IP_OFFSET)) |
iph | 300 | net/ipv4/icmp.c | if(iph->protocol==IPPROTO_ICMP) |
iph | 302 | net/ipv4/icmp.c | icmph = (struct icmphdr *)((char *)iph + (iph->ihl<<2)); |
iph | 316 | net/ipv4/icmp.c | saddr=iph->daddr; |
iph | 323 | net/ipv4/icmp.c | icmp_param.data_ptr=iph; |
iph | 324 | net/ipv4/icmp.c | icmp_param.data_len=(iph->ihl<<2)+8; /* RFC says return header + 8 bytes */ |
iph | 330 | net/ipv4/icmp.c | if (ip_options_echo(&icmp_param.replyopts, NULL, saddr, iph->saddr, skb_in) == 0) |
iph | 331 | net/ipv4/icmp.c | icmp_build_xmit(&icmp_param, saddr, iph->saddr); |
iph | 341 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 346 | net/ipv4/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 348 | net/ipv4/icmp.c | dp= ((unsigned char *)iph)+(iph->ihl<<2); |
iph | 360 | net/ipv4/icmp.c | in_ntoa(iph->daddr), ntohs(iph->protocol)); |
iph | 366 | net/ipv4/icmp.c | in_ntoa(iph->daddr)); |
iph | 369 | net/ipv4/icmp.c | printk("ICMP: %s: Source Route Failed.\n", in_ntoa(iph->daddr)); |
iph | 390 | net/ipv4/icmp.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 412 | net/ipv4/icmp.c | if (iph->protocol == ipprot->protocol && ipprot->err_handler) |
iph | 415 | net/ipv4/icmp.c | iph->daddr, iph->saddr, ipprot); |
iph | 433 | net/ipv4/icmp.c | struct iphdr *iph; |
iph | 440 | net/ipv4/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 441 | net/ipv4/icmp.c | ip = iph->daddr; |
iph | 49 | net/ipv4/ip_forward.c | struct iphdr *iph=(struct iphdr *)skb_push(skb,sizeof(struct iphdr)); |
iph | 52 | net/ipv4/ip_forward.c | iph->version = 4; |
iph | 53 | net/ipv4/ip_forward.c | iph->tos = skb->ip_hdr->tos; |
iph | 54 | net/ipv4/ip_forward.c | iph->ttl = skb->ip_hdr->ttl; |
iph | 55 | net/ipv4/ip_forward.c | iph->frag_off = 0; |
iph | 56 | net/ipv4/ip_forward.c | iph->daddr = daddr; |
iph | 57 | net/ipv4/ip_forward.c | iph->saddr = out->pa_addr; |
iph | 58 | net/ipv4/ip_forward.c | iph->protocol = IPPROTO_IPIP; |
iph | 59 | net/ipv4/ip_forward.c | iph->ihl = 5; |
iph | 60 | net/ipv4/ip_forward.c | iph->tot_len = htons(skb->len); |
iph | 61 | net/ipv4/ip_forward.c | iph->id = htons(ip_id_count++); |
iph | 62 | net/ipv4/ip_forward.c | ip_send_check(iph); |
iph | 87 | net/ipv4/ip_forward.c | struct iphdr *iph; /* Our header */ |
iph | 108 | net/ipv4/ip_forward.c | fw_res=call_fw_firewall(PF_INET, skb, skb->h.iph); |
iph | 132 | net/ipv4/ip_forward.c | iph = skb->h.iph; |
iph | 133 | net/ipv4/ip_forward.c | iph->ttl--; |
iph | 141 | net/ipv4/ip_forward.c | iph->check = ntohs(iph->check) + 0x0100; |
iph | 142 | net/ipv4/ip_forward.c | if ((iph->check & 0xFF00) == 0) |
iph | 143 | net/ipv4/ip_forward.c | iph->check++; /* carry overflow */ |
iph | 144 | net/ipv4/ip_forward.c | iph->check = htons(iph->check); |
iph | 146 | net/ipv4/ip_forward.c | if (iph->ttl <= 0) |
iph | 215 | net/ipv4/ip_forward.c | if (dev == dev2 && !((iph->saddr^iph->daddr)&dev->pa_mask) && |
iph | 251 | net/ipv4/ip_forward.c | if (skb->len+encap > dev2->mtu && (ntohs(iph->frag_off) & IP_DF)) { |
iph | 305 | net/ipv4/ip_forward.c | iph = skb2->ip_hdr = skb2->h.iph; |
iph | 339 | net/ipv4/ip_forward.c | optptr = (unsigned char *)iph + opt->rr; |
iph | 347 | net/ipv4/ip_forward.c | optptr = (unsigned char *)iph + opt->srr; |
iph | 363 | net/ipv4/ip_forward.c | iph->daddr = target_addr; |
iph | 371 | net/ipv4/ip_forward.c | optptr = (unsigned char *)iph + opt->ts; |
iph | 378 | net/ipv4/ip_forward.c | ip_send_check(iph); |
iph | 404 | net/ipv4/ip_forward.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 412 | net/ipv4/ip_forward.c | if(iph->tos & IPTOS_LOWDELAY) |
iph | 414 | 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 | 581 | net/ipv4/ip_fw.c | struct iphdr *iph = skb->h.iph; |
iph | 582 | net/ipv4/ip_fw.c | struct tcphdr *th = (struct tcphdr *)&(((char *)iph)[iph->ihl*4]); |
iph | 661 | net/ipv4/ip_fw.c | ms->dst = iph->daddr; |
iph | 731 | net/ipv4/ip_fw.c | iph=skb2->h.iph; |
iph | 735 | net/ipv4/ip_fw.c | iph->tot_len = htons(diff+ntohs(iph->tot_len)); |
iph | 736 | net/ipv4/ip_fw.c | iph->check = 0; |
iph | 737 | net/ipv4/ip_fw.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 752 | net/ipv4/ip_fw.c | iph->tot_len = htons(skb->len + diff); |
iph | 778 | net/ipv4/ip_fw.c | struct iphdr *iph = skb->h.iph; |
iph | 787 | net/ipv4/ip_fw.c | if (iph->protocol!=IPPROTO_UDP && iph->protocol!=IPPROTO_TCP) |
iph | 794 | net/ipv4/ip_fw.c | portptr = (unsigned short *)&(((char *)iph)[iph->ihl*4]); |
iph | 799 | net/ipv4/ip_fw.c | strProt[iph->protocol==IPPROTO_TCP], |
iph | 800 | net/ipv4/ip_fw.c | ntohl(iph->saddr), ntohs(portptr[0]), |
iph | 801 | net/ipv4/ip_fw.c | ntohl(iph->daddr), ntohs(portptr[1])); |
iph | 805 | net/ipv4/ip_fw.c | if (iph->protocol == ms->protocol && |
iph | 806 | net/ipv4/ip_fw.c | iph->saddr == ms->src && iph->daddr == ms->dst && |
iph | 827 | net/ipv4/ip_fw.c | ms->protocol = iph->protocol; |
iph | 828 | net/ipv4/ip_fw.c | ms->src = iph->saddr; |
iph | 829 | net/ipv4/ip_fw.c | ms->dst = iph->daddr; |
iph | 839 | net/ipv4/ip_fw.c | iph->saddr = dev->pa_addr; /* my own address */ |
iph | 846 | net/ipv4/ip_fw.c | if (iph->protocol==IPPROTO_UDP) |
iph | 849 | net/ipv4/ip_fw.c | recalc_check((struct udphdr *)portptr,iph->saddr,iph->daddr,size); |
iph | 858 | net/ipv4/ip_fw.c | iph = skb->h.iph; |
iph | 859 | net/ipv4/ip_fw.c | portptr = (unsigned short *)&(((char *)iph)[iph->ihl*4]); |
iph | 874 | net/ipv4/ip_fw.c | tcp_send_check(th,iph->saddr,iph->daddr,size,skb->sk); |
iph | 877 | net/ipv4/ip_fw.c | ip_send_check(iph); |
iph | 895 | net/ipv4/ip_fw.c | struct iphdr *iph = skb_ptr->h.iph; |
iph | 898 | net/ipv4/ip_fw.c | struct tcphdr *th = (struct tcphdr *)(skb_ptr->h.raw+(iph->ihl<<2)); |
iph | 900 | net/ipv4/ip_fw.c | if (iph->protocol!=IPPROTO_UDP && iph->protocol!=IPPROTO_TCP) |
iph | 903 | net/ipv4/ip_fw.c | portptr = (unsigned short *)&(((char *)iph)[iph->ihl*4]); |
iph | 910 | net/ipv4/ip_fw.c | strProt[iph->protocol==IPPROTO_TCP], |
iph | 911 | net/ipv4/ip_fw.c | ntohl(iph->saddr), ntohs(portptr[0]), |
iph | 912 | net/ipv4/ip_fw.c | ntohl(iph->daddr), ntohs(portptr[1])); |
iph | 927 | net/ipv4/ip_fw.c | if (iph->protocol==ms->protocol && |
iph | 928 | net/ipv4/ip_fw.c | (iph->saddr==ms->dst || iph->protocol==IPPROTO_UDP) && |
iph | 934 | net/ipv4/ip_fw.c | iph->daddr = ms->src; |
iph | 948 | net/ipv4/ip_fw.c | if (iph->protocol==IPPROTO_UDP) |
iph | 949 | net/ipv4/ip_fw.c | recalc_check((struct udphdr *)portptr,iph->saddr,iph->daddr,size); |
iph | 979 | net/ipv4/ip_fw.c | tcp_send_check((struct tcphdr *)portptr,iph->saddr,iph->daddr,size,skb_ptr->sk); |
iph | 981 | net/ipv4/ip_fw.c | ip_send_check(iph); |
iph | 983 | net/ipv4/ip_fw.c | printk("I-routed to %lX:%X\n",ntohl(iph->daddr),ntohs(portptr[1])); |
iph | 1342 | net/ipv4/ip_fw.c | void ip_acct_cnt(struct iphdr *iph, struct device *dev, struct ip_fw *f) |
iph | 1344 | net/ipv4/ip_fw.c | (void) ip_fw_chk(iph, dev, f, 0, 1); |
iph | 196 | net/ipv4/ip_input.c | struct iphdr *iph = skb->h.iph; |
iph | 216 | net/ipv4/ip_input.c | if(iph->version == 6) |
iph | 226 | net/ipv4/ip_input.c | skb->ip_hdr = iph; |
iph | 241 | 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 | 242 | net/ipv4/ip_input.c | || skb->len < ntohs(iph->tot_len)) |
iph | 255 | net/ipv4/ip_input.c | skb_trim(skb,ntohs(iph->tot_len)); |
iph | 257 | net/ipv4/ip_input.c | if (iph->ihl > 5) |
iph | 278 | net/ipv4/ip_input.c | if ((err=call_in_firewall(PF_INET, skb, iph))<FW_ACCEPT) |
iph | 292 | net/ipv4/ip_input.c | if(iph->frag_off) |
iph | 294 | net/ipv4/ip_input.c | if (iph->frag_off & htons(IP_MF)) |
iph | 300 | net/ipv4/ip_input.c | if (iph->frag_off & htons(IP_OFFSET)) |
iph | 316 | net/ipv4/ip_input.c | if ( iph->daddr == skb->dev->pa_addr || (brd = ip_chk_addr(iph->daddr)) != 0) |
iph | 322 | net/ipv4/ip_input.c | unsigned char * optptr = ((unsigned char *)iph) + opt->srr; |
iph | 374 | net/ipv4/ip_input.c | if(!(dev->flags&IFF_ALLMULTI) && brd==IS_MULTICAST && iph->daddr!=IGMP_ALL_HOSTS && !(dev->flags&IFF_LOOPBACK)) |
iph | 387 | net/ipv4/ip_input.c | if(ip_mc->multiaddr==iph->daddr) |
iph | 401 | net/ipv4/ip_input.c | struct iphdr *iph=skb->h.iph; |
iph | 402 | net/ipv4/ip_input.c | if (ip_forward(skb, dev, is_frag|4, iph->daddr)) |
iph | 413 | net/ipv4/ip_input.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 423 | net/ipv4/ip_input.c | skb=ip_defrag(iph,skb,dev); |
iph | 427 | net/ipv4/ip_input.c | iph=skb->h.iph; |
iph | 434 | net/ipv4/ip_input.c | skb->ip_hdr = iph; |
iph | 435 | net/ipv4/ip_input.c | skb->h.raw += iph->ihl*4; |
iph | 442 | net/ipv4/ip_input.c | if(brd==IS_MULTICAST && (iph->daddr&htonl(0xFFFFFF00))!=htonl(0xE0000000)) |
iph | 452 | net/ipv4/ip_input.c | hash = iph->protocol & (SOCK_ARRAY_SIZE-1); |
iph | 462 | net/ipv4/ip_input.c | raw_sk=get_sock_raw(raw_sk, iph->protocol, iph->saddr, iph->daddr); |
iph | 468 | net/ipv4/ip_input.c | sknext=get_sock_raw(raw_sk->next, iph->protocol, iph->saddr, iph->daddr); |
iph | 474 | net/ipv4/ip_input.c | raw_rcv(raw_sk, skb1, dev, iph->saddr,iph->daddr); |
iph | 493 | net/ipv4/ip_input.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 498 | net/ipv4/ip_input.c | if (ipprot->protocol != iph->protocol) |
iph | 529 | net/ipv4/ip_input.c | ipprot->handler(skb2, dev, opt, iph->daddr, |
iph | 530 | net/ipv4/ip_input.c | (ntohs(iph->tot_len) - (iph->ihl * 4)), |
iph | 531 | net/ipv4/ip_input.c | iph->saddr, 0, ipprot); |
iph | 566 | net/ipv4/ip_input.c | raw_rcv(raw_sk, skb, dev, iph->saddr, iph->daddr); |
iph | 602 | 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 | 391 | net/ipv4/ip_options.c | opt->ts = optptr - iph; |
iph | 407 | net/ipv4/ip_options.c | opt->ts = optptr - iph; |
iph | 442 | net/ipv4/ip_options.c | opt->ts = optptr - iph; |
iph | 470 | net/ipv4/ip_options.c | icmp_send(skb, ICMP_PARAMETERPROB, 0, pp_ptr-iph, skb->dev); |
iph | 172 | net/ipv4/ip_output.c | struct iphdr *iph; |
iph | 272 | net/ipv4/ip_output.c | iph=(struct iphdr *)skb_put(skb,sizeof(struct iphdr) + opt->optlen); |
iph | 274 | net/ipv4/ip_output.c | iph=(struct iphdr *)skb_put(skb,sizeof(struct iphdr)); |
iph | 276 | net/ipv4/ip_output.c | iph->version = 4; |
iph | 277 | net/ipv4/ip_output.c | iph->ihl = 5; |
iph | 278 | net/ipv4/ip_output.c | iph->tos = tos; |
iph | 279 | net/ipv4/ip_output.c | iph->frag_off = 0; |
iph | 280 | net/ipv4/ip_output.c | iph->ttl = ttl; |
iph | 281 | net/ipv4/ip_output.c | iph->daddr = daddr; |
iph | 282 | net/ipv4/ip_output.c | iph->saddr = saddr; |
iph | 283 | net/ipv4/ip_output.c | iph->protocol = type; |
iph | 284 | net/ipv4/ip_output.c | skb->ip_hdr = iph; |
iph | 293 | net/ipv4/ip_output.c | iph->ihl += opt->optlen>>2; |
iph | 295 | net/ipv4/ip_output.c | return iph->ihl*4 + tmp; |
iph | 303 | net/ipv4/ip_output.c | void ip_send_check(struct iphdr *iph) |
iph | 305 | net/ipv4/ip_output.c | iph->check = 0; |
iph | 306 | net/ipv4/ip_output.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 321 | net/ipv4/ip_output.c | struct iphdr *iph; |
iph | 349 | net/ipv4/ip_output.c | iph = skb->ip_hdr; |
iph | 350 | net/ipv4/ip_output.c | iph->tot_len = ntohs(skb->len-(((unsigned char *)iph)-skb->data)); |
iph | 353 | net/ipv4/ip_output.c | if(call_out_firewall(PF_INET, skb, iph) < FW_ACCEPT) |
iph | 363 | net/ipv4/ip_output.c | iph->id = htons(ip_id_count++); |
iph | 379 | net/ipv4/ip_output.c | if(ntohs(iph->tot_len)> dev->mtu) |
iph | 391 | net/ipv4/ip_output.c | ip_send_check(iph); |
iph | 455 | net/ipv4/ip_output.c | ip_fw_chk(iph,dev,ip_acct_chain,IP_FW_F_ACCEPT,1); |
iph | 464 | net/ipv4/ip_output.c | if (MULTICAST(iph->daddr) && !(dev->flags&IFF_LOOPBACK)) |
iph | 468 | net/ipv4/ip_output.c | if(iph->daddr==IGMP_ALL_HOSTS || (dev->flags&IFF_ALLMULTI)) |
iph | 477 | net/ipv4/ip_output.c | if(imc->multiaddr==iph->daddr) |
iph | 495 | net/ipv4/ip_output.c | if((dev->flags&IFF_BROADCAST) && (iph->daddr==dev->pa_brdaddr||iph->daddr==0xFFFFFFFF) && !(dev->flags&IFF_LOOPBACK)) |
iph | 565 | net/ipv4/ip_output.c | struct iphdr *iph; |
iph | 704 | net/ipv4/ip_output.c | skb->ip_hdr=iph=(struct iphdr *)skb_put(skb,length); |
iph | 708 | net/ipv4/ip_output.c | iph->version=4; |
iph | 709 | net/ipv4/ip_output.c | iph->ihl=5; |
iph | 710 | net/ipv4/ip_output.c | iph->tos=sk->ip_tos; |
iph | 711 | net/ipv4/ip_output.c | iph->tot_len = htons(length); |
iph | 712 | net/ipv4/ip_output.c | iph->id=htons(ip_id_count++); |
iph | 713 | net/ipv4/ip_output.c | iph->frag_off = 0; |
iph | 714 | net/ipv4/ip_output.c | iph->ttl=sk->ip_ttl; |
iph | 715 | net/ipv4/ip_output.c | iph->protocol=type; |
iph | 716 | net/ipv4/ip_output.c | iph->saddr=saddr; |
iph | 717 | net/ipv4/ip_output.c | iph->daddr=daddr; |
iph | 720 | net/ipv4/ip_output.c | iph->ihl += opt->optlen>>2; |
iph | 724 | net/ipv4/ip_output.c | iph->check=0; |
iph | 725 | net/ipv4/ip_output.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 726 | net/ipv4/ip_output.c | getfrag(frag,saddr,((char *)iph)+iph->ihl*4,0, length-iph->ihl*4); |
iph | 729 | net/ipv4/ip_output.c | getfrag(frag,saddr,(void *)iph,0,length-20); |
iph | 732 | net/ipv4/ip_output.c | if(call_out_firewall(PF_INET, skb, iph)< FW_ACCEPT) |
iph | 877 | net/ipv4/ip_output.c | skb->ip_hdr = iph = (struct iphdr *)data; |
iph | 886 | net/ipv4/ip_output.c | iph->version = 4; |
iph | 887 | net/ipv4/ip_output.c | iph->ihl = 5; /* ugh */ |
iph | 889 | net/ipv4/ip_output.c | iph->ihl += opt->optlen>>2; |
iph | 893 | net/ipv4/ip_output.c | iph->tos = sk->ip_tos; |
iph | 894 | net/ipv4/ip_output.c | iph->tot_len = htons(fraglen - fragheaderlen + iph->ihl*4); |
iph | 895 | net/ipv4/ip_output.c | iph->id = id; |
iph | 896 | net/ipv4/ip_output.c | iph->frag_off = htons(offset>>3); |
iph | 897 | net/ipv4/ip_output.c | iph->frag_off |= mf; |
iph | 900 | net/ipv4/ip_output.c | iph->ttl = sk->ip_mc_ttl; |
iph | 903 | net/ipv4/ip_output.c | iph->ttl = sk->ip_ttl; |
iph | 904 | net/ipv4/ip_output.c | iph->protocol = type; |
iph | 905 | net/ipv4/ip_output.c | iph->check = 0; |
iph | 906 | net/ipv4/ip_output.c | iph->saddr = saddr; |
iph | 907 | net/ipv4/ip_output.c | iph->daddr = daddr; |
iph | 908 | net/ipv4/ip_output.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 909 | net/ipv4/ip_output.c | data += iph->ihl*4; |
iph | 929 | net/ipv4/ip_output.c | if(!offset && call_out_firewall(PF_INET, skb, iph) < FW_ACCEPT) |
iph | 938 | net/ipv4/ip_output.c | ip_fw_chk(iph, dev, ip_acct_chain, IP_FW_F_ACCEPT, 1); |
iph | 74 | net/ipv4/ipip.c | skb->h.iph=(struct iphdr *)skb->data; |
iph | 267 | net/ipv4/ipmr.c | skb->h.iph=skb->ip_hdr; |
iph | 712 | net/ipv4/ipmr.c | skb->raddr=skb->h.iph->daddr; |
iph | 166 | net/ipv4/raw.c | struct iphdr *iph=(struct iphdr *)to; |
iph | 167 | net/ipv4/raw.c | iph->saddr=saddr; |
iph | 168 | net/ipv4/raw.c | iph->check=0; |
iph | 169 | net/ipv4/raw.c | iph->tot_len=htons(fraglen); /* This is right as you cant frag |
iph | 175 | net/ipv4/raw.c | iph->id = htons(ip_id_count++); |
iph | 176 | net/ipv4/raw.c | iph->check=ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 646 | net/ipv4/tcp.c | struct iphdr *iph; |
iph | 668 | net/ipv4/tcp.c | iph = (struct iphdr *)skb->data; |
iph | 669 | net/ipv4/tcp.c | th = (struct tcphdr *)(((char *)iph) + (iph->ihl << 2)); |
iph | 670 | net/ipv4/tcp.c | size = ntohs(iph->tot_len) - (iph->ihl<<2); |
iph | 677 | net/ipv4/tcp.c | iph->id = htons(ip_id_count++); |
iph | 678 | net/ipv4/tcp.c | ip_send_check(iph); |
iph | 685 | net/ipv4/tcp.c | rt=ip_rt_local(iph->daddr,NULL,NULL); |
iph | 687 | net/ipv4/tcp.c | rt=ip_rt_route(iph->daddr,NULL,NULL); |
iph | 702 | net/ipv4/tcp.c | skb->raddr=iph->daddr; |
iph | 1045 | net/ipv4/tcp.c | struct iphdr *iph=(struct iphdr *)header; |
iph | 1047 | net/ipv4/tcp.c | header+=4*iph->ihl; |
iph | 3272 | net/ipv4/tcp.c | struct iphdr *iph; |
iph | 3281 | net/ipv4/tcp.c | iph = skb->ip_hdr; |
iph | 3282 | net/ipv4/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
iph | 5176 | net/ipv4/tcp.c | struct iphdr *iph; |
iph | 5195 | net/ipv4/tcp.c | iph = (struct iphdr *)skb->ip_hdr; |
iph | 5196 | net/ipv4/tcp.c | th = (struct tcphdr *)(((char *)iph) +(iph->ihl << 2)); |
iph | 5203 | net/ipv4/tcp.c | (iph->ihl << 2) + |
iph | 5256 | net/ipv4/tcp.c | (iph->ihl << 2) + th->doff * 4; |