tag | line | file | source code |
iph | 75 | drivers/net/slhc.c | extern int ip_csum(struct iphdr *iph); |
iph | 83 | net/inet/icmp.c | struct iphdr *iph; |
iph | 106 | net/inet/icmp.c | iph = (struct iphdr *) (skb_in + 1); |
iph | 107 | net/inet/icmp.c | iph = (struct iphdr *) ((unsigned char *) iph + 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 | 130 | net/inet/ip.c | strict_route(struct iphdr *iph, struct options *opt) |
iph | 136 | net/inet/ip.c | loose_route(struct iphdr *iph, struct options *opt) |
iph | 159 | net/inet/ip.c | build_options(struct iphdr *iph, struct options *opt) |
iph | 163 | net/inet/ip.c | ptr = (unsigned char *)(iph+1); |
iph | 204 | net/inet/ip.c | struct iphdr *iph; |
iph | 257 | net/inet/ip.c | iph = (struct iphdr *)buff; |
iph | 258 | net/inet/ip.c | iph->version = 4; |
iph | 259 | net/inet/ip.c | iph->tos = 0; |
iph | 260 | net/inet/ip.c | iph->frag_off = 0; |
iph | 261 | net/inet/ip.c | iph->ttl = 32; |
iph | 262 | net/inet/ip.c | iph->daddr = daddr; |
iph | 263 | net/inet/ip.c | iph->saddr = saddr; |
iph | 264 | net/inet/ip.c | iph->protocol = type; |
iph | 265 | net/inet/ip.c | iph->ihl = 5; |
iph | 266 | net/inet/ip.c | iph->id = htons(count++); |
iph | 270 | net/inet/ip.c | build_options(iph, opt); |
iph | 278 | net/inet/ip.c | do_options(struct iphdr *iph, struct options *opt) |
iph | 297 | net/inet/ip.c | buff = (unsigned char *)(iph + 1); |
iph | 300 | net/inet/ip.c | while (!done && len < iph->ihl*4) switch(*buff) { |
iph | 411 | net/inet/ip.c | strict_route(iph, opt); |
iph | 417 | net/inet/ip.c | loose_route(iph, opt); |
iph | 497 | net/inet/ip.c | ip_csum(struct iphdr *iph) |
iph | 499 | net/inet/ip.c | return ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 504 | net/inet/ip.c | ip_send_check(struct iphdr *iph) |
iph | 506 | net/inet/ip.c | iph->check = 0; |
iph | 507 | net/inet/ip.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 541 | net/inet/ip.c | static struct ipq *ip_find(struct iphdr *iph) |
iph | 550 | net/inet/ip.c | if (iph->id== qp->iph->id && iph->saddr == qp->iph->saddr && |
iph | 551 | net/inet/ip.c | iph->daddr == qp->iph->daddr && iph->protocol == qp->iph->protocol) |
iph | 611 | net/inet/ip.c | kfree_s(qp->iph, qp->ihlen + 8); |
iph | 631 | net/inet/ip.c | icmp_send(qp->iph->ip_src.s_addr, ICMP_TIME_EXCEEDED, |
iph | 632 | net/inet/ip.c | ICMP_EXC_FRAGTIME, qp->iph); |
iph | 650 | net/inet/ip.c | static struct ipq *ip_create(struct sk_buff *skb, struct iphdr *iph, struct device *dev) |
iph | 665 | net/inet/ip.c | maclen = ((unsigned long) iph) - ((unsigned long) (skb + 1)); |
iph | 675 | net/inet/ip.c | ihlen = (iph->ihl * sizeof(unsigned long)); |
iph | 676 | net/inet/ip.c | qp->iph = (struct iphdr *) kmalloc(ihlen + 8, GFP_ATOMIC); |
iph | 677 | net/inet/ip.c | if (qp->iph == NULL) |
iph | 687 | net/inet/ip.c | memcpy(qp->iph, iph, ihlen + 8); |
iph | 743 | net/inet/ip.c | struct iphdr *iph; |
iph | 768 | net/inet/ip.c | memcpy(ptr, ((unsigned char *) qp->iph), qp->ihlen); |
iph | 796 | net/inet/ip.c | iph = skb->h.iph; |
iph | 797 | net/inet/ip.c | iph->frag_off = 0; |
iph | 798 | net/inet/ip.c | iph->tot_len = htons((iph->ihl * sizeof(unsigned long)) + count); |
iph | 804 | net/inet/ip.c | static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev) |
iph | 815 | net/inet/ip.c | qp = ip_find(iph); |
iph | 818 | net/inet/ip.c | offset = ntohs(iph->frag_off); |
iph | 844 | net/inet/ip.c | if ((qp = ip_create(skb, iph, dev)) == NULL) |
iph | 849 | net/inet/ip.c | ihl = (iph->ihl * sizeof(unsigned long)); |
iph | 850 | net/inet/ip.c | end = offset + ntohs(iph->tot_len) - ihl; |
iph | 957 | net/inet/ip.c | struct iphdr *iph; |
iph | 966 | net/inet/ip.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
iph | 969 | net/inet/ip.c | hlen = (iph->ihl * sizeof(unsigned long)); |
iph | 970 | net/inet/ip.c | left = ntohs(iph->tot_len) - hlen; |
iph | 977 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
iph | 978 | net/inet/ip.c | DPRINTF((DBG_IP, " DST=%s\n", in_ntoa(iph->daddr))); |
iph | 981 | net/inet/ip.c | if (ntohs(iph->frag_off) & IP_DF) |
iph | 985 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
iph | 986 | net/inet/ip.c | DPRINTF((DBG_IP, " DST=%s\n", in_ntoa(iph->daddr))); |
iph | 999 | net/inet/ip.c | offset = (ntohs(iph->frag_off) & 0x1fff) << 3; |
iph | 1038 | net/inet/ip.c | iph = (struct iphdr *)(skb2->h.raw/*+dev->hard_header_len*/); |
iph | 1039 | net/inet/ip.c | iph->frag_off = htons((offset >> 3)); |
iph | 1043 | net/inet/ip.c | iph->frag_off |= htons(IP_MF); |
iph | 1063 | net/inet/ip.c | struct iphdr *iph; |
iph | 1085 | net/inet/ip.c | iph = skb->h.iph; |
iph | 1086 | net/inet/ip.c | iph->ttl--; |
iph | 1087 | net/inet/ip.c | if (iph->ttl <= 0) { |
iph | 1089 | net/inet/ip.c | DPRINTF((DBG_IP, " SRC = %s ", in_ntoa(iph->saddr))); |
iph | 1090 | net/inet/ip.c | DPRINTF((DBG_IP, " DST = %s (ignored)\n", in_ntoa(iph->daddr))); |
iph | 1098 | net/inet/ip.c | ip_send_check(iph); |
iph | 1104 | net/inet/ip.c | rt = rt_route(iph->daddr, NULL); |
iph | 1132 | net/inet/ip.c | } else raddr = iph->daddr; |
iph | 1142 | net/inet/ip.c | DPRINTF((DBG_IP, "\nIP: *** fwd %s -> ", in_ntoa(iph->saddr))); |
iph | 1185 | net/inet/ip.c | struct iphdr *iph = skb->h.iph; |
iph | 1198 | 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 | 1200 | net/inet/ip.c | DPRINTF((DBG_IP, " SRC = %s ", in_ntoa(iph->saddr))); |
iph | 1201 | net/inet/ip.c | DPRINTF((DBG_IP, " DST = %s (ignored)\n", in_ntoa(iph->daddr))); |
iph | 1207 | net/inet/ip.c | if (iph->ihl != 5) { /* Fast path for the typical optionless IP packet. */ |
iph | 1208 | net/inet/ip.c | ip_print(iph); /* Bogus, only for debugging. */ |
iph | 1210 | net/inet/ip.c | if (do_options(iph, &opt) != 0) |
iph | 1215 | net/inet/ip.c | if (iph->frag_off & 0x0020) |
iph | 1217 | net/inet/ip.c | if (ntohs(iph->frag_off) & 0x1fff) |
iph | 1221 | net/inet/ip.c | if ((brd = chk_addr(iph->daddr)) == 0) { |
iph | 1226 | net/inet/ip.c | iph->saddr,iph->daddr); |
iph | 1240 | net/inet/ip.c | skb=ip_defrag(iph,skb,dev); |
iph | 1245 | net/inet/ip.c | iph=skb->h.iph; |
iph | 1248 | net/inet/ip.c | printk(" SRC = %s ", in_ntoa(iph->saddr)); |
iph | 1249 | net/inet/ip.c | printk(" DST = %s (ignored)\n", in_ntoa(iph->daddr)); |
iph | 1269 | net/inet/ip.c | skb->h.raw += iph->ihl*4; |
iph | 1270 | net/inet/ip.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 1277 | net/inet/ip.c | if (ipprot->protocol != iph->protocol) continue; |
iph | 1307 | net/inet/ip.c | ipprot->handler(skb2, dev, opts_p ? &opt : 0, iph->daddr, |
iph | 1308 | net/inet/ip.c | (ntohs(iph->tot_len) - (iph->ihl * 4)), |
iph | 1309 | net/inet/ip.c | iph->saddr, 0, ipprot); |
iph | 1341 | net/inet/ip.c | struct iphdr *iph; |
iph | 1357 | net/inet/ip.c | iph = (struct iphdr *)ptr; |
iph | 1358 | net/inet/ip.c | iph->tot_len = ntohs(skb->len-dev->hard_header_len); |
iph | 1369 | net/inet/ip.c | ip_send_check(iph); |
iph | 1370 | net/inet/ip.c | ip_print(iph); |
iph | 50 | net/inet/ip.h | struct iphdr *iph; /* pointer to IP header */ |
iph | 233 | net/inet/raw.c | struct iphdr *iph; |
iph | 237 | net/inet/raw.c | iph = (struct iphdr *)buff; |
iph | 238 | net/inet/raw.c | iph->saddr = sk->saddr; |
iph | 54 | net/inet/skbuff.h | struct iphdr *iph; |
iph | 200 | net/inet/tcp.c | struct iphdr *iph=(struct iphdr *)header; |
iph | 202 | net/inet/tcp.c | header+=4*iph->ihl; |