tag | line | file | source code |
iph | 75 | drivers/net/slhc.c | extern int ip_csum(struct iphdr *iph); |
iph | 84 | net/inet/icmp.c | struct iphdr *iph; |
iph | 107 | net/inet/icmp.c | iph = (struct iphdr *) (skb_in->data + dev->hard_header_len); |
iph | 110 | net/inet/icmp.c | offset = ip_build_header(skb, dev->pa_addr, iph->saddr, |
iph | 125 | net/inet/icmp.c | memcpy(icmph + 1, iph, sizeof(struct iphdr) + 8); |
iph | 143 | net/inet/icmp.c | struct iphdr *iph; |
iph | 148 | net/inet/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 152 | net/inet/icmp.c | in_ntoa(iph->daddr))); |
iph | 156 | net/inet/icmp.c | in_ntoa(iph->daddr))); |
iph | 160 | net/inet/icmp.c | in_ntoa(iph->daddr), ntohs(iph->protocol)); |
iph | 164 | net/inet/icmp.c | in_ntoa(iph->daddr), -1 /* FIXME: ntohs(iph->port) */)); |
iph | 168 | net/inet/icmp.c | in_ntoa(iph->daddr)); |
iph | 171 | net/inet/icmp.c | printk("ICMP: %s: Source Route Failed.\n", in_ntoa(iph->daddr)); |
iph | 175 | net/inet/icmp.c | (icmph->code & 7), in_ntoa(iph->daddr))); |
iph | 180 | net/inet/icmp.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 190 | net/inet/icmp.c | if (iph->protocol == ipprot->protocol && ipprot->err_handler) { |
iph | 192 | net/inet/icmp.c | iph->daddr, iph->saddr, ipprot); |
iph | 206 | net/inet/icmp.c | struct iphdr *iph; |
iph | 209 | net/inet/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 210 | net/inet/icmp.c | ip = iph->daddr; |
iph | 145 | net/inet/ip.c | strict_route(struct iphdr *iph, struct options *opt) |
iph | 151 | net/inet/ip.c | loose_route(struct iphdr *iph, struct options *opt) |
iph | 174 | net/inet/ip.c | build_options(struct iphdr *iph, struct options *opt) |
iph | 178 | net/inet/ip.c | ptr = (unsigned char *)(iph+1); |
iph | 219 | net/inet/ip.c | struct iphdr *iph; |
iph | 272 | net/inet/ip.c | iph = (struct iphdr *)buff; |
iph | 273 | net/inet/ip.c | iph->version = 4; |
iph | 274 | net/inet/ip.c | iph->tos = tos; |
iph | 275 | net/inet/ip.c | iph->frag_off = 0; |
iph | 276 | net/inet/ip.c | iph->ttl = ttl; |
iph | 277 | net/inet/ip.c | iph->daddr = daddr; |
iph | 278 | net/inet/ip.c | iph->saddr = saddr; |
iph | 279 | net/inet/ip.c | iph->protocol = type; |
iph | 280 | net/inet/ip.c | iph->ihl = 5; |
iph | 281 | net/inet/ip.c | iph->id = htons(count++); |
iph | 285 | net/inet/ip.c | build_options(iph, opt); |
iph | 293 | net/inet/ip.c | do_options(struct iphdr *iph, struct options *opt) |
iph | 312 | net/inet/ip.c | buff = (unsigned char *)(iph + 1); |
iph | 315 | net/inet/ip.c | while (!done && len < iph->ihl*4) switch(*buff) { |
iph | 426 | net/inet/ip.c | strict_route(iph, opt); |
iph | 432 | net/inet/ip.c | loose_route(iph, opt); |
iph | 513 | net/inet/ip.c | ip_csum(struct iphdr *iph) |
iph | 515 | net/inet/ip.c | return ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 520 | net/inet/ip.c | ip_send_check(struct iphdr *iph) |
iph | 522 | net/inet/ip.c | iph->check = 0; |
iph | 523 | net/inet/ip.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 557 | net/inet/ip.c | static struct ipq *ip_find(struct iphdr *iph) |
iph | 566 | net/inet/ip.c | if (iph->id== qp->iph->id && iph->saddr == qp->iph->saddr && |
iph | 567 | net/inet/ip.c | iph->daddr == qp->iph->daddr && iph->protocol == qp->iph->protocol) |
iph | 627 | net/inet/ip.c | kfree_s(qp->iph, qp->ihlen + 8); |
iph | 647 | net/inet/ip.c | icmp_send(qp->iph->ip_src.s_addr, ICMP_TIME_EXCEEDED, |
iph | 648 | net/inet/ip.c | ICMP_EXC_FRAGTIME, qp->iph); |
iph | 666 | net/inet/ip.c | static struct ipq *ip_create(struct sk_buff *skb, struct iphdr *iph, struct device *dev) |
iph | 681 | net/inet/ip.c | maclen = ((unsigned long) iph) - ((unsigned long) skb->data); |
iph | 691 | net/inet/ip.c | ihlen = (iph->ihl * sizeof(unsigned long)); |
iph | 692 | net/inet/ip.c | qp->iph = (struct iphdr *) kmalloc(ihlen + 8, GFP_ATOMIC); |
iph | 693 | net/inet/ip.c | if (qp->iph == NULL) |
iph | 703 | net/inet/ip.c | memcpy(qp->iph, iph, ihlen + 8); |
iph | 759 | net/inet/ip.c | struct iphdr *iph; |
iph | 783 | net/inet/ip.c | memcpy(ptr, ((unsigned char *) qp->iph), qp->ihlen); |
iph | 812 | net/inet/ip.c | iph = skb->h.iph; |
iph | 813 | net/inet/ip.c | iph->frag_off = 0; |
iph | 814 | net/inet/ip.c | iph->tot_len = htons((iph->ihl * sizeof(unsigned long)) + count); |
iph | 815 | net/inet/ip.c | skb->ip_hdr = iph; |
iph | 821 | net/inet/ip.c | static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev) |
iph | 832 | net/inet/ip.c | qp = ip_find(iph); |
iph | 835 | net/inet/ip.c | offset = ntohs(iph->frag_off); |
iph | 857 | net/inet/ip.c | if ((qp = ip_create(skb, iph, dev)) == NULL) { |
iph | 865 | net/inet/ip.c | ihl = (iph->ihl * sizeof(unsigned long)); |
iph | 866 | net/inet/ip.c | end = offset + ntohs(iph->tot_len) - ihl; |
iph | 979 | net/inet/ip.c | struct iphdr *iph; |
iph | 988 | net/inet/ip.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
iph | 990 | net/inet/ip.c | skb->ip_hdr = iph; |
iph | 993 | net/inet/ip.c | hlen = (iph->ihl * sizeof(unsigned long)); |
iph | 994 | net/inet/ip.c | left = ntohs(iph->tot_len) - hlen; |
iph | 1001 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
iph | 1002 | net/inet/ip.c | DPRINTF((DBG_IP, " DST=%s\n", in_ntoa(iph->daddr))); |
iph | 1005 | net/inet/ip.c | if (ntohs(iph->frag_off) & IP_DF) |
iph | 1009 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
iph | 1010 | net/inet/ip.c | DPRINTF((DBG_IP, " DST=%s\n", in_ntoa(iph->daddr))); |
iph | 1018 | net/inet/ip.c | offset = (ntohs(iph->frag_off) & 0x1fff) << 3; |
iph | 1060 | net/inet/ip.c | iph = (struct iphdr *)(skb2->h.raw/*+dev->hard_header_len*/); |
iph | 1061 | net/inet/ip.c | iph->frag_off = htons((offset >> 3)); |
iph | 1065 | net/inet/ip.c | iph->frag_off |= htons(IP_MF); |
iph | 1085 | net/inet/ip.c | struct iphdr *iph; |
iph | 1107 | net/inet/ip.c | iph = skb->h.iph; |
iph | 1108 | net/inet/ip.c | iph->ttl--; |
iph | 1109 | net/inet/ip.c | if (iph->ttl <= 0) { |
iph | 1111 | net/inet/ip.c | DPRINTF((DBG_IP, " SRC = %s ", in_ntoa(iph->saddr))); |
iph | 1112 | net/inet/ip.c | DPRINTF((DBG_IP, " DST = %s (ignored)\n", in_ntoa(iph->daddr))); |
iph | 1120 | net/inet/ip.c | ip_send_check(iph); |
iph | 1126 | net/inet/ip.c | rt = rt_route(iph->daddr, NULL); |
iph | 1154 | net/inet/ip.c | } else raddr = iph->daddr; |
iph | 1164 | net/inet/ip.c | DPRINTF((DBG_IP, "\nIP: *** fwd %s -> ", in_ntoa(iph->saddr))); |
iph | 1197 | net/inet/ip.c | if(iph->tos & IPTOS_LOWDELAY) |
iph | 1199 | net/inet/ip.c | if(iph->tos & IPTOS_THROUGHPUT) |
iph | 1214 | net/inet/ip.c | struct iphdr *iph = skb->h.iph; |
iph | 1226 | net/inet/ip.c | skb->ip_hdr = iph; /* Fragments can cause ICMP errors too! */ |
iph | 1228 | net/inet/ip.c | if (skb->len<sizeof(struct iphdr) || iph->ihl<5 || iph->version != 4 || ip_fast_csum((unsigned char *)iph, iph->ihl) !=0) { |
iph | 1230 | net/inet/ip.c | DPRINTF((DBG_IP, " SRC = %s ", in_ntoa(iph->saddr))); |
iph | 1231 | net/inet/ip.c | DPRINTF((DBG_IP, " DST = %s (ignored)\n", in_ntoa(iph->daddr))); |
iph | 1237 | net/inet/ip.c | if (iph->ihl != 5) { /* Fast path for the typical optionless IP packet. */ |
iph | 1238 | net/inet/ip.c | ip_print(iph); /* Bogus, only for debugging. */ |
iph | 1240 | net/inet/ip.c | if (do_options(iph, &opt) != 0) |
iph | 1245 | net/inet/ip.c | if (iph->frag_off & 0x0020) |
iph | 1247 | net/inet/ip.c | if (ntohs(iph->frag_off) & 0x1fff) |
iph | 1251 | net/inet/ip.c | if ((brd = chk_addr(iph->daddr)) == 0) { |
iph | 1256 | net/inet/ip.c | iph->saddr,iph->daddr); |
iph | 1270 | net/inet/ip.c | skb=ip_defrag(iph,skb,dev); |
iph | 1275 | net/inet/ip.c | iph=skb->h.iph; |
iph | 1278 | net/inet/ip.c | printk(" SRC = %s ", in_ntoa(iph->saddr)); |
iph | 1279 | net/inet/ip.c | printk(" DST = %s (ignored)\n", in_ntoa(iph->daddr)); |
iph | 1300 | net/inet/ip.c | skb->ip_hdr = iph; |
iph | 1301 | net/inet/ip.c | skb->h.raw += iph->ihl*4; |
iph | 1302 | net/inet/ip.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 1309 | net/inet/ip.c | if (ipprot->protocol != iph->protocol) continue; |
iph | 1343 | net/inet/ip.c | ipprot->handler(skb2, dev, opts_p ? &opt : 0, iph->daddr, |
iph | 1344 | net/inet/ip.c | (ntohs(iph->tot_len) - (iph->ihl * 4)), |
iph | 1345 | net/inet/ip.c | iph->saddr, 0, ipprot); |
iph | 1377 | net/inet/ip.c | struct iphdr *iph; |
iph | 1393 | net/inet/ip.c | iph = (struct iphdr *)ptr; |
iph | 1394 | net/inet/ip.c | skb->ip_hdr = iph; |
iph | 1395 | net/inet/ip.c | iph->tot_len = ntohs(skb->len-dev->hard_header_len); |
iph | 1406 | net/inet/ip.c | ip_send_check(iph); |
iph | 1407 | net/inet/ip.c | ip_print(iph); |
iph | 50 | net/inet/ip.h | struct iphdr *iph; /* pointer to IP header */ |
iph | 238 | net/inet/raw.c | struct iphdr *iph; |
iph | 242 | net/inet/raw.c | iph = (struct iphdr *)buff; |
iph | 243 | net/inet/raw.c | iph->saddr = sk->saddr; |
iph | 54 | net/inet/skbuff.h | struct iphdr *iph; |
iph | 256 | net/inet/tcp.c | struct iphdr *iph=(struct iphdr *)header; |
iph | 258 | net/inet/tcp.c | header+=4*iph->ihl; |