tag | line | file | source code |
iph | 81 | drivers/net/slhc.c | extern int ip_csum(struct iphdr *iph); |
iph | 53 | include/linux/skbuff.h | struct iphdr *iph; |
iph | 109 | net/inet/icmp.c | struct iphdr *iph; |
iph | 122 | net/inet/icmp.c | iph = (struct iphdr *) (skb_in->data + dev->hard_header_len); |
iph | 130 | net/inet/icmp.c | if(iph->protocol==IPPROTO_ICMP) |
iph | 194 | net/inet/icmp.c | offset = ip_build_header(skb, dev->pa_addr, iph->saddr, |
iph | 220 | net/inet/icmp.c | memcpy(icmph + 1, iph, sizeof(struct iphdr) + 8); |
iph | 242 | net/inet/icmp.c | struct iphdr *iph; |
iph | 247 | net/inet/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 253 | net/inet/icmp.c | in_ntoa(iph->daddr))); |
iph | 257 | net/inet/icmp.c | in_ntoa(iph->daddr))); |
iph | 261 | net/inet/icmp.c | in_ntoa(iph->daddr), ntohs(iph->protocol)); |
iph | 265 | net/inet/icmp.c | in_ntoa(iph->daddr), -1 /* FIXME: ntohs(iph->port) */)); |
iph | 269 | net/inet/icmp.c | in_ntoa(iph->daddr)); |
iph | 272 | net/inet/icmp.c | printk("ICMP: %s: Source Route Failed.\n", in_ntoa(iph->daddr)); |
iph | 276 | net/inet/icmp.c | (icmph->code & 7), in_ntoa(iph->daddr))); |
iph | 284 | net/inet/icmp.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 300 | net/inet/icmp.c | if (iph->protocol == ipprot->protocol && ipprot->err_handler) |
iph | 303 | net/inet/icmp.c | iph->daddr, iph->saddr, ipprot); |
iph | 320 | net/inet/icmp.c | struct iphdr *iph; |
iph | 327 | net/inet/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 328 | net/inet/icmp.c | ip = iph->daddr; |
iph | 182 | net/inet/ip.c | strict_route(struct iphdr *iph, struct options *opt) |
iph | 188 | net/inet/ip.c | loose_route(struct iphdr *iph, struct options *opt) |
iph | 211 | net/inet/ip.c | build_options(struct iphdr *iph, struct options *opt) |
iph | 215 | net/inet/ip.c | ptr = (unsigned char *)(iph+1); |
iph | 260 | net/inet/ip.c | struct iphdr *iph; |
iph | 363 | net/inet/ip.c | iph = (struct iphdr *)buff; |
iph | 364 | net/inet/ip.c | iph->version = 4; |
iph | 365 | net/inet/ip.c | iph->tos = tos; |
iph | 366 | net/inet/ip.c | iph->frag_off = 0; |
iph | 367 | net/inet/ip.c | iph->ttl = ttl; |
iph | 368 | net/inet/ip.c | iph->daddr = daddr; |
iph | 369 | net/inet/ip.c | iph->saddr = saddr; |
iph | 370 | net/inet/ip.c | iph->protocol = type; |
iph | 371 | net/inet/ip.c | iph->ihl = 5; |
iph | 372 | net/inet/ip.c | iph->id = htons(count++); |
iph | 376 | net/inet/ip.c | build_options(iph, opt); |
iph | 384 | net/inet/ip.c | do_options(struct iphdr *iph, struct options *opt) |
iph | 403 | net/inet/ip.c | buff = (unsigned char *)(iph + 1); |
iph | 406 | net/inet/ip.c | while (!done && len < iph->ihl*4) switch(*buff) { |
iph | 517 | net/inet/ip.c | strict_route(iph, opt); |
iph | 523 | net/inet/ip.c | loose_route(iph, opt); |
iph | 612 | net/inet/ip.c | int ip_csum(struct iphdr *iph) |
iph | 614 | net/inet/ip.c | return ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 621 | net/inet/ip.c | static void ip_send_check(struct iphdr *iph) |
iph | 623 | net/inet/ip.c | iph->check = 0; |
iph | 624 | net/inet/ip.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 669 | net/inet/ip.c | static struct ipq *ip_find(struct iphdr *iph) |
iph | 678 | net/inet/ip.c | if (iph->id== qp->iph->id && iph->saddr == qp->iph->saddr && |
iph | 679 | net/inet/ip.c | iph->daddr == qp->iph->daddr && iph->protocol == qp->iph->protocol) |
iph | 739 | net/inet/ip.c | kfree_s(qp->iph, qp->ihlen + 8); |
iph | 784 | net/inet/ip.c | static struct ipq *ip_create(struct sk_buff *skb, struct iphdr *iph, struct device *dev) |
iph | 806 | net/inet/ip.c | maclen = ((unsigned long) iph) - ((unsigned long) skb->data); |
iph | 819 | net/inet/ip.c | ihlen = (iph->ihl * sizeof(unsigned long)); |
iph | 820 | net/inet/ip.c | qp->iph = (struct iphdr *) kmalloc(ihlen + 8, GFP_ATOMIC); |
iph | 821 | net/inet/ip.c | if (qp->iph == NULL) |
iph | 831 | net/inet/ip.c | memcpy(qp->iph, iph, ihlen + 8); |
iph | 897 | net/inet/ip.c | struct iphdr *iph; |
iph | 925 | net/inet/ip.c | memcpy(ptr, ((unsigned char *) qp->iph), qp->ihlen); |
iph | 952 | net/inet/ip.c | iph = skb->h.iph; |
iph | 953 | net/inet/ip.c | iph->frag_off = 0; |
iph | 954 | net/inet/ip.c | iph->tot_len = htons((iph->ihl * sizeof(unsigned long)) + count); |
iph | 955 | net/inet/ip.c | skb->ip_hdr = iph; |
iph | 966 | net/inet/ip.c | static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev) |
iph | 979 | net/inet/ip.c | qp = ip_find(iph); |
iph | 982 | net/inet/ip.c | offset = ntohs(iph->frag_off); |
iph | 1013 | net/inet/ip.c | if ((qp = ip_create(skb, iph, dev)) == NULL) |
iph | 1026 | net/inet/ip.c | ihl = (iph->ihl * sizeof(unsigned long)); |
iph | 1027 | net/inet/ip.c | end = offset + ntohs(iph->tot_len) - ihl; |
iph | 1165 | net/inet/ip.c | struct iphdr *iph; |
iph | 1177 | net/inet/ip.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
iph | 1179 | net/inet/ip.c | skb->ip_hdr = iph; |
iph | 1185 | net/inet/ip.c | hlen = (iph->ihl * sizeof(unsigned long)); |
iph | 1186 | net/inet/ip.c | left = ntohs(iph->tot_len) - hlen; /* Space per frame */ |
iph | 1193 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
iph | 1194 | net/inet/ip.c | DPRINTF((DBG_IP, " DST=%s\n", in_ntoa(iph->daddr))); |
iph | 1200 | net/inet/ip.c | if (ntohs(iph->frag_off) & IP_DF) |
iph | 1204 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
iph | 1205 | net/inet/ip.c | DPRINTF((DBG_IP, " DST=%s\n", in_ntoa(iph->daddr))); |
iph | 1236 | net/inet/ip.c | offset = (ntohs(iph->frag_off) & 0x1fff) << 3; |
iph | 1306 | net/inet/ip.c | iph = (struct iphdr *)(skb2->h.raw/*+dev->hard_header_len*/); |
iph | 1307 | net/inet/ip.c | iph->frag_off = htons((offset >> 3)); |
iph | 1313 | net/inet/ip.c | iph->frag_off |= htons(IP_MF); |
iph | 1339 | net/inet/ip.c | struct iphdr *iph; /* Our header */ |
iph | 1369 | net/inet/ip.c | iph = skb->h.iph; |
iph | 1370 | net/inet/ip.c | iph->ttl--; |
iph | 1371 | net/inet/ip.c | if (iph->ttl <= 0) |
iph | 1374 | net/inet/ip.c | DPRINTF((DBG_IP, " SRC = %s ", in_ntoa(iph->saddr))); |
iph | 1375 | net/inet/ip.c | DPRINTF((DBG_IP, " DST = %s (ignored)\n", in_ntoa(iph->daddr))); |
iph | 1388 | net/inet/ip.c | ip_send_check(iph); |
iph | 1395 | net/inet/ip.c | rt = ip_rt_route(iph->daddr, NULL, NULL); |
iph | 1440 | net/inet/ip.c | raddr = iph->daddr; |
iph | 1463 | net/inet/ip.c | DPRINTF((DBG_IP, "\nIP: *** fwd %s -> ", in_ntoa(iph->saddr))); |
iph | 1519 | net/inet/ip.c | if(iph->tos & IPTOS_LOWDELAY) |
iph | 1521 | net/inet/ip.c | else if(iph->tos & IPTOS_THROUGHPUT) |
iph | 1538 | net/inet/ip.c | struct iphdr *iph = skb->h.iph; |
iph | 1557 | net/inet/ip.c | skb->ip_hdr = iph; |
iph | 1568 | 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 | 1572 | net/inet/ip.c | DPRINTF((DBG_IP, " SRC = %s ", in_ntoa(iph->saddr))); |
iph | 1573 | net/inet/ip.c | DPRINTF((DBG_IP, " DST = %s (ignored)\n", in_ntoa(iph->daddr))); |
iph | 1583 | net/inet/ip.c | skb->len=ntohs(iph->tot_len); |
iph | 1590 | net/inet/ip.c | if (iph->ihl != 5) |
iph | 1592 | net/inet/ip.c | ip_print(iph); /* Bogus, only for debugging. */ |
iph | 1594 | net/inet/ip.c | if (do_options(iph, &opt) != 0) |
iph | 1603 | net/inet/ip.c | if (iph->frag_off & 0x0020) |
iph | 1610 | net/inet/ip.c | if (ntohs(iph->frag_off) & 0x1fff) |
iph | 1621 | net/inet/ip.c | if ((brd = ip_chk_addr(iph->daddr)) == 0) |
iph | 1632 | net/inet/ip.c | iph->saddr,iph->daddr); |
iph | 1652 | net/inet/ip.c | skb=ip_defrag(iph,skb,dev); |
iph | 1655 | net/inet/ip.c | iph=skb->h.iph; |
iph | 1658 | net/inet/ip.c | printk(" SRC = %s ", in_ntoa(iph->saddr)); |
iph | 1659 | net/inet/ip.c | printk(" DST = %s (ignored)\n", in_ntoa(iph->daddr)); |
iph | 1670 | net/inet/ip.c | skb->ip_hdr = iph; |
iph | 1671 | net/inet/ip.c | skb->h.raw += iph->ihl*4; |
iph | 1677 | net/inet/ip.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 1682 | net/inet/ip.c | if (ipprot->protocol != iph->protocol) |
iph | 1730 | net/inet/ip.c | ipprot->handler(skb2, dev, opts_p ? &opt : 0, iph->daddr, |
iph | 1731 | net/inet/ip.c | (ntohs(iph->tot_len) - (iph->ihl * 4)), |
iph | 1732 | net/inet/ip.c | iph->saddr, 0, ipprot); |
iph | 1765 | net/inet/ip.c | struct iphdr *iph; |
iph | 1801 | net/inet/ip.c | iph = (struct iphdr *)ptr; |
iph | 1802 | net/inet/ip.c | skb->ip_hdr = iph; |
iph | 1803 | net/inet/ip.c | iph->tot_len = ntohs(skb->len-dev->hard_header_len); |
iph | 1823 | net/inet/ip.c | ip_send_check(iph); |
iph | 1828 | net/inet/ip.c | ip_print(iph); |
iph | 54 | net/inet/ip.h | struct iphdr *iph; /* pointer to IP header */ |
iph | 267 | net/inet/raw.c | struct iphdr *iph; |
iph | 272 | net/inet/raw.c | iph = (struct iphdr *)buff; |
iph | 273 | net/inet/raw.c | iph->saddr = sk->saddr; |
iph | 232 | net/inet/tcp.c | struct iphdr *iph=(struct iphdr *)header; |
iph | 234 | net/inet/tcp.c | header+=4*iph->ihl; |