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 | 133 | net/inet/ip.c | strict_route(struct iphdr *iph, struct options *opt) |
iph | 139 | net/inet/ip.c | loose_route(struct iphdr *iph, struct options *opt) |
iph | 162 | net/inet/ip.c | build_options(struct iphdr *iph, struct options *opt) |
iph | 166 | net/inet/ip.c | ptr = (unsigned char *)(iph+1); |
iph | 207 | net/inet/ip.c | struct iphdr *iph; |
iph | 260 | net/inet/ip.c | iph = (struct iphdr *)buff; |
iph | 261 | net/inet/ip.c | iph->version = 4; |
iph | 262 | net/inet/ip.c | iph->tos = tos; |
iph | 263 | net/inet/ip.c | iph->frag_off = 0; |
iph | 264 | net/inet/ip.c | iph->ttl = ttl; |
iph | 265 | net/inet/ip.c | iph->daddr = daddr; |
iph | 266 | net/inet/ip.c | iph->saddr = saddr; |
iph | 267 | net/inet/ip.c | iph->protocol = type; |
iph | 268 | net/inet/ip.c | iph->ihl = 5; |
iph | 269 | net/inet/ip.c | iph->id = htons(count++); |
iph | 273 | net/inet/ip.c | build_options(iph, opt); |
iph | 281 | net/inet/ip.c | do_options(struct iphdr *iph, struct options *opt) |
iph | 300 | net/inet/ip.c | buff = (unsigned char *)(iph + 1); |
iph | 303 | net/inet/ip.c | while (!done && len < iph->ihl*4) switch(*buff) { |
iph | 414 | net/inet/ip.c | strict_route(iph, opt); |
iph | 420 | net/inet/ip.c | loose_route(iph, opt); |
iph | 501 | net/inet/ip.c | ip_csum(struct iphdr *iph) |
iph | 503 | net/inet/ip.c | return ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 508 | net/inet/ip.c | ip_send_check(struct iphdr *iph) |
iph | 510 | net/inet/ip.c | iph->check = 0; |
iph | 511 | net/inet/ip.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 545 | net/inet/ip.c | static struct ipq *ip_find(struct iphdr *iph) |
iph | 554 | net/inet/ip.c | if (iph->id== qp->iph->id && iph->saddr == qp->iph->saddr && |
iph | 555 | net/inet/ip.c | iph->daddr == qp->iph->daddr && iph->protocol == qp->iph->protocol) |
iph | 615 | net/inet/ip.c | kfree_s(qp->iph, qp->ihlen + 8); |
iph | 635 | net/inet/ip.c | icmp_send(qp->iph->ip_src.s_addr, ICMP_TIME_EXCEEDED, |
iph | 636 | net/inet/ip.c | ICMP_EXC_FRAGTIME, qp->iph); |
iph | 654 | net/inet/ip.c | static struct ipq *ip_create(struct sk_buff *skb, struct iphdr *iph, struct device *dev) |
iph | 669 | net/inet/ip.c | maclen = ((unsigned long) iph) - ((unsigned long) skb->data); |
iph | 679 | net/inet/ip.c | ihlen = (iph->ihl * sizeof(unsigned long)); |
iph | 680 | net/inet/ip.c | qp->iph = (struct iphdr *) kmalloc(ihlen + 8, GFP_ATOMIC); |
iph | 681 | net/inet/ip.c | if (qp->iph == NULL) |
iph | 691 | net/inet/ip.c | memcpy(qp->iph, iph, ihlen + 8); |
iph | 747 | net/inet/ip.c | struct iphdr *iph; |
iph | 772 | net/inet/ip.c | memcpy(ptr, ((unsigned char *) qp->iph), qp->ihlen); |
iph | 800 | net/inet/ip.c | iph = skb->h.iph; |
iph | 801 | net/inet/ip.c | iph->frag_off = 0; |
iph | 802 | net/inet/ip.c | iph->tot_len = htons((iph->ihl * sizeof(unsigned long)) + count); |
iph | 803 | net/inet/ip.c | skb->ip_hdr = iph; |
iph | 809 | net/inet/ip.c | static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev) |
iph | 820 | net/inet/ip.c | qp = ip_find(iph); |
iph | 823 | net/inet/ip.c | offset = ntohs(iph->frag_off); |
iph | 849 | net/inet/ip.c | if ((qp = ip_create(skb, iph, dev)) == NULL) |
iph | 854 | net/inet/ip.c | ihl = (iph->ihl * sizeof(unsigned long)); |
iph | 855 | net/inet/ip.c | end = offset + ntohs(iph->tot_len) - ihl; |
iph | 962 | net/inet/ip.c | struct iphdr *iph; |
iph | 971 | net/inet/ip.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
iph | 974 | net/inet/ip.c | hlen = (iph->ihl * sizeof(unsigned long)); |
iph | 975 | net/inet/ip.c | left = ntohs(iph->tot_len) - hlen; |
iph | 982 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
iph | 983 | net/inet/ip.c | DPRINTF((DBG_IP, " DST=%s\n", in_ntoa(iph->daddr))); |
iph | 986 | net/inet/ip.c | if (ntohs(iph->frag_off) & IP_DF) |
iph | 990 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
iph | 991 | net/inet/ip.c | DPRINTF((DBG_IP, " DST=%s\n", in_ntoa(iph->daddr))); |
iph | 1004 | net/inet/ip.c | offset = (ntohs(iph->frag_off) & 0x1fff) << 3; |
iph | 1043 | net/inet/ip.c | iph = (struct iphdr *)(skb2->h.raw/*+dev->hard_header_len*/); |
iph | 1044 | net/inet/ip.c | iph->frag_off = htons((offset >> 3)); |
iph | 1048 | net/inet/ip.c | iph->frag_off |= htons(IP_MF); |
iph | 1068 | net/inet/ip.c | struct iphdr *iph; |
iph | 1090 | net/inet/ip.c | iph = skb->h.iph; |
iph | 1091 | net/inet/ip.c | iph->ttl--; |
iph | 1092 | net/inet/ip.c | if (iph->ttl <= 0) { |
iph | 1094 | net/inet/ip.c | DPRINTF((DBG_IP, " SRC = %s ", in_ntoa(iph->saddr))); |
iph | 1095 | net/inet/ip.c | DPRINTF((DBG_IP, " DST = %s (ignored)\n", in_ntoa(iph->daddr))); |
iph | 1103 | net/inet/ip.c | ip_send_check(iph); |
iph | 1109 | net/inet/ip.c | rt = rt_route(iph->daddr, NULL); |
iph | 1137 | net/inet/ip.c | } else raddr = iph->daddr; |
iph | 1147 | net/inet/ip.c | DPRINTF((DBG_IP, "\nIP: *** fwd %s -> ", in_ntoa(iph->saddr))); |
iph | 1190 | net/inet/ip.c | struct iphdr *iph = skb->h.iph; |
iph | 1202 | net/inet/ip.c | skb->ip_hdr = iph; /* Fragments can cause ICMP errors too! */ |
iph | 1204 | 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 | 1206 | net/inet/ip.c | DPRINTF((DBG_IP, " SRC = %s ", in_ntoa(iph->saddr))); |
iph | 1207 | net/inet/ip.c | DPRINTF((DBG_IP, " DST = %s (ignored)\n", in_ntoa(iph->daddr))); |
iph | 1213 | net/inet/ip.c | if (iph->ihl != 5) { /* Fast path for the typical optionless IP packet. */ |
iph | 1214 | net/inet/ip.c | ip_print(iph); /* Bogus, only for debugging. */ |
iph | 1216 | net/inet/ip.c | if (do_options(iph, &opt) != 0) |
iph | 1221 | net/inet/ip.c | if (iph->frag_off & 0x0020) |
iph | 1223 | net/inet/ip.c | if (ntohs(iph->frag_off) & 0x1fff) |
iph | 1227 | net/inet/ip.c | if ((brd = chk_addr(iph->daddr)) == 0) { |
iph | 1232 | net/inet/ip.c | iph->saddr,iph->daddr); |
iph | 1246 | net/inet/ip.c | skb=ip_defrag(iph,skb,dev); |
iph | 1251 | net/inet/ip.c | iph=skb->h.iph; |
iph | 1254 | net/inet/ip.c | printk(" SRC = %s ", in_ntoa(iph->saddr)); |
iph | 1255 | net/inet/ip.c | printk(" DST = %s (ignored)\n", in_ntoa(iph->daddr)); |
iph | 1276 | net/inet/ip.c | skb->ip_hdr = iph; |
iph | 1277 | net/inet/ip.c | skb->h.raw += iph->ihl*4; |
iph | 1278 | net/inet/ip.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 1285 | net/inet/ip.c | if (ipprot->protocol != iph->protocol) continue; |
iph | 1319 | net/inet/ip.c | ipprot->handler(skb2, dev, opts_p ? &opt : 0, iph->daddr, |
iph | 1320 | net/inet/ip.c | (ntohs(iph->tot_len) - (iph->ihl * 4)), |
iph | 1321 | net/inet/ip.c | iph->saddr, 0, ipprot); |
iph | 1353 | net/inet/ip.c | struct iphdr *iph; |
iph | 1369 | net/inet/ip.c | iph = (struct iphdr *)ptr; |
iph | 1370 | net/inet/ip.c | iph->tot_len = ntohs(skb->len-dev->hard_header_len); |
iph | 1381 | net/inet/ip.c | ip_send_check(iph); |
iph | 1382 | 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 | 243 | net/inet/tcp.c | struct iphdr *iph=(struct iphdr *)header; |
iph | 245 | net/inet/tcp.c | header+=4*iph->ihl; |
iph | 3572 | net/inet/tcp.c | struct iphdr *iph; |
iph | 3599 | net/inet/tcp.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
iph | 3601 | net/inet/tcp.c | hlen = (iph->ihl * sizeof(unsigned long)) + dev->hard_header_len; |