tag | line | file | source code |
iph | 75 | drivers/net/slhc.c | extern int ip_csum(struct iphdr *iph); |
iph | 94 | net/inet/icmp.c | struct iphdr *iph; |
iph | 118 | net/inet/icmp.c | iph = (struct iphdr *) (skb_in + 1); |
iph | 119 | net/inet/icmp.c | iph = (struct iphdr *) ((unsigned char *) iph + dev->hard_header_len); |
iph | 122 | net/inet/icmp.c | offset = ip_build_header(skb, dev->pa_addr, iph->saddr, |
iph | 138 | net/inet/icmp.c | memcpy(icmph + 1, iph, sizeof(struct iphdr) + 8); |
iph | 159 | net/inet/icmp.c | struct iphdr *iph; |
iph | 164 | net/inet/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 169 | net/inet/icmp.c | in_ntoa(iph->daddr))); |
iph | 173 | net/inet/icmp.c | in_ntoa(iph->daddr))); |
iph | 177 | net/inet/icmp.c | in_ntoa(iph->daddr), ntohs(iph->protocol)); |
iph | 181 | net/inet/icmp.c | in_ntoa(iph->daddr), -1 /* FIXME: ntohs(iph->port) */)); |
iph | 185 | net/inet/icmp.c | in_ntoa(iph->daddr)); |
iph | 188 | net/inet/icmp.c | printk("ICMP: %s: Source Route Failed.\n", in_ntoa(iph->daddr)); |
iph | 192 | net/inet/icmp.c | (icmph->code & 7), in_ntoa(iph->daddr))); |
iph | 197 | net/inet/icmp.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 208 | net/inet/icmp.c | if (iph->protocol == ipprot->protocol && ipprot->err_handler) |
iph | 211 | net/inet/icmp.c | iph->daddr, iph->saddr, ipprot); |
iph | 227 | net/inet/icmp.c | struct iphdr *iph; |
iph | 230 | net/inet/icmp.c | iph = (struct iphdr *) (icmph + 1); |
iph | 231 | net/inet/icmp.c | ip = iph->daddr; |
iph | 157 | net/inet/ip.c | static void strict_route(struct iphdr *iph, struct options *opt) |
iph | 162 | net/inet/ip.c | static void loose_route(struct iphdr *iph, struct options *opt) |
iph | 187 | net/inet/ip.c | static int build_options(struct iphdr *iph, struct options *opt) |
iph | 190 | net/inet/ip.c | ptr = (unsigned char *)(iph+1); |
iph | 242 | net/inet/ip.c | struct iphdr *iph; |
iph | 301 | net/inet/ip.c | iph = (struct iphdr *)buff; |
iph | 302 | net/inet/ip.c | iph->version = 4; |
iph | 303 | net/inet/ip.c | iph->tos = tos; |
iph | 304 | net/inet/ip.c | iph->frag_off = 0; |
iph | 305 | net/inet/ip.c | iph->ttl = ttl; |
iph | 306 | net/inet/ip.c | iph->daddr = daddr; |
iph | 307 | net/inet/ip.c | iph->saddr = saddr; |
iph | 308 | net/inet/ip.c | iph->protocol = type; |
iph | 309 | net/inet/ip.c | iph->ihl = 5; |
iph | 310 | net/inet/ip.c | iph->id = htons(count++); |
iph | 314 | net/inet/ip.c | optlen=build_options(iph, opt); |
iph | 315 | net/inet/ip.c | iph->ihl+=optlen; |
iph | 325 | net/inet/ip.c | static int do_options(struct iphdr *iph, struct options **opt_ptr, struct device *dev) |
iph | 335 | net/inet/ip.c | if(iph->ihl==5) |
iph | 343 | net/inet/ip.c | ol=(iph->ihl*4)-sizeof(struct iphdr); |
iph | 368 | net/inet/ip.c | buff = (unsigned char *)(iph + 1); |
iph | 374 | net/inet/ip.c | while (!done && len < iph->ihl*4) switch(*buff) |
iph | 525 | net/inet/ip.c | strict_route(iph, opt); |
iph | 532 | net/inet/ip.c | loose_route(iph, opt); |
iph | 617 | net/inet/ip.c | int ip_csum(struct iphdr *iph) |
iph | 619 | net/inet/ip.c | return ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 626 | net/inet/ip.c | static void ip_send_check(struct iphdr *iph) |
iph | 628 | net/inet/ip.c | iph->check = 0; |
iph | 629 | net/inet/ip.c | iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); |
iph | 668 | net/inet/ip.c | static struct ipq *ip_find(struct iphdr *iph) |
iph | 677 | net/inet/ip.c | if (iph->id== qp->iph->id && iph->saddr == qp->iph->saddr && |
iph | 678 | net/inet/ip.c | iph->daddr == qp->iph->daddr && iph->protocol == qp->iph->protocol) |
iph | 738 | net/inet/ip.c | kfree_s(qp->iph, qp->ihlen + 8); |
iph | 760 | net/inet/ip.c | icmp_send(qp->iph->ip_src.s_addr, ICMP_TIME_EXCEEDED, |
iph | 761 | net/inet/ip.c | ICMP_EXC_FRAGTIME, qp->iph); |
iph | 779 | net/inet/ip.c | static struct ipq *ip_create(struct sk_buff *skb, struct iphdr *iph, struct device *dev) |
iph | 794 | net/inet/ip.c | maclen = ((unsigned long) iph) - ((unsigned long) (skb + 1)); |
iph | 804 | net/inet/ip.c | ihlen = (iph->ihl * sizeof(unsigned long)); |
iph | 805 | net/inet/ip.c | qp->iph = (struct iphdr *) kmalloc(ihlen + 8, GFP_ATOMIC); |
iph | 806 | net/inet/ip.c | if (qp->iph == NULL) |
iph | 816 | net/inet/ip.c | memcpy(qp->iph, iph, ihlen + 8); |
iph | 878 | net/inet/ip.c | struct iphdr *iph; |
iph | 903 | net/inet/ip.c | memcpy(ptr, ((unsigned char *) qp->iph), qp->ihlen); |
iph | 932 | net/inet/ip.c | iph = skb->h.iph; |
iph | 933 | net/inet/ip.c | iph->frag_off = 0; |
iph | 934 | net/inet/ip.c | iph->tot_len = htons((iph->ihl * sizeof(unsigned long)) + count); |
iph | 943 | net/inet/ip.c | static struct sk_buff *ip_defrag(struct iphdr *iph, struct sk_buff *skb, struct device *dev) |
iph | 954 | net/inet/ip.c | qp = ip_find(iph); |
iph | 957 | net/inet/ip.c | offset = ntohs(iph->frag_off); |
iph | 983 | net/inet/ip.c | if ((qp = ip_create(skb, iph, dev)) == NULL) |
iph | 988 | net/inet/ip.c | ihl = (iph->ihl * sizeof(unsigned long)); |
iph | 989 | net/inet/ip.c | end = offset + ntohs(iph->tot_len) - ihl; |
iph | 1097 | net/inet/ip.c | struct iphdr *iph; |
iph | 1106 | net/inet/ip.c | iph = (struct iphdr *) (raw + dev->hard_header_len); |
iph | 1109 | net/inet/ip.c | hlen = (iph->ihl * sizeof(unsigned long)); |
iph | 1110 | net/inet/ip.c | left = ntohs(iph->tot_len) - hlen; |
iph | 1117 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
iph | 1118 | net/inet/ip.c | DPRINTF((DBG_IP, " DST=%s\n", in_ntoa(iph->daddr))); |
iph | 1121 | net/inet/ip.c | if (ntohs(iph->frag_off) & IP_DF) |
iph | 1125 | net/inet/ip.c | dev->name, dev->mtu, left, in_ntoa(iph->saddr))); |
iph | 1126 | net/inet/ip.c | DPRINTF((DBG_IP, " DST=%s\n", in_ntoa(iph->daddr))); |
iph | 1149 | net/inet/ip.c | offset = (ntohs(iph->frag_off) & 0x1fff) << 3; |
iph | 1188 | net/inet/ip.c | iph = (struct iphdr *)(skb2->h.raw/*+dev->hard_header_len*/); |
iph | 1189 | net/inet/ip.c | iph->frag_off = htons((offset >> 3)); |
iph | 1193 | net/inet/ip.c | iph->frag_off |= htons(IP_MF); |
iph | 1215 | net/inet/ip.c | struct iphdr *iph; |
iph | 1237 | net/inet/ip.c | iph = skb->h.iph; |
iph | 1238 | net/inet/ip.c | iph->ttl--; |
iph | 1239 | net/inet/ip.c | if (iph->ttl <= 0) |
iph | 1242 | net/inet/ip.c | DPRINTF((DBG_IP, " SRC = %s ", in_ntoa(iph->saddr))); |
iph | 1243 | net/inet/ip.c | DPRINTF((DBG_IP, " DST = %s (ignored)\n", in_ntoa(iph->daddr))); |
iph | 1251 | net/inet/ip.c | ip_send_check(iph); |
iph | 1257 | net/inet/ip.c | rt = rt_route(iph->daddr, NULL); |
iph | 1291 | net/inet/ip.c | raddr = iph->daddr; |
iph | 1304 | net/inet/ip.c | DPRINTF((DBG_IP, "\nIP: *** fwd %s -> ", in_ntoa(iph->saddr))); |
iph | 1350 | net/inet/ip.c | struct iphdr *iph = skb->h.iph; |
iph | 1363 | 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 | 1366 | net/inet/ip.c | DPRINTF((DBG_IP, " SRC = %s ", in_ntoa(iph->saddr))); |
iph | 1367 | net/inet/ip.c | DPRINTF((DBG_IP, " DST = %s (ignored)\n", in_ntoa(iph->daddr))); |
iph | 1373 | net/inet/ip.c | if (iph->ihl != 5) |
iph | 1376 | net/inet/ip.c | ip_print(iph); /* Bogus, only for debugging. */ |
iph | 1378 | net/inet/ip.c | if (do_options(iph, &opt,dev) != 0) |
iph | 1390 | net/inet/ip.c | if (iph->frag_off & 0x0020) |
iph | 1392 | net/inet/ip.c | if (ntohs(iph->frag_off) & 0x1fff) |
iph | 1396 | net/inet/ip.c | if ((brd = chk_addr(iph->daddr)) == 0) |
iph | 1402 | net/inet/ip.c | iph->saddr,iph->daddr); |
iph | 1416 | net/inet/ip.c | skb=ip_defrag(iph,skb,dev); |
iph | 1421 | net/inet/ip.c | iph=skb->h.iph; |
iph | 1424 | net/inet/ip.c | printk(" SRC = %s ", in_ntoa(iph->saddr)); |
iph | 1425 | net/inet/ip.c | printk(" DST = %s (ignored)\n", in_ntoa(iph->daddr)); |
iph | 1435 | net/inet/ip.c | skb->ip_hdr = iph; |
iph | 1436 | net/inet/ip.c | skb->h.raw += iph->ihl*4; |
iph | 1437 | net/inet/ip.c | hash = iph->protocol & (MAX_INET_PROTOS -1); |
iph | 1447 | net/inet/ip.c | if (ipprot->protocol != iph->protocol) |
iph | 1481 | net/inet/ip.c | ipprot->handler(skb2, dev, opts_p ? opt : 0, iph->daddr, |
iph | 1482 | net/inet/ip.c | (ntohs(iph->tot_len) - (iph->ihl * 4)), |
iph | 1483 | net/inet/ip.c | iph->saddr, 0, ipprot); |
iph | 1515 | net/inet/ip.c | struct iphdr *iph; |
iph | 1533 | net/inet/ip.c | iph = (struct iphdr *)ptr; |
iph | 1534 | net/inet/ip.c | iph->tot_len = ntohs(skb->len-dev->hard_header_len); |
iph | 1545 | net/inet/ip.c | ip_send_check(iph); |
iph | 1547 | net/inet/ip.c | ip_print(iph); |
iph | 50 | net/inet/ip.h | struct iphdr *iph; /* pointer to IP header */ |
iph | 134 | net/inet/raw.c | skb->h.iph = skb->ip_hdr; |
iph | 271 | net/inet/raw.c | struct iphdr *iph; |
iph | 275 | net/inet/raw.c | iph = (struct iphdr *)buff; |
iph | 276 | net/inet/raw.c | iph->saddr = sk->saddr; |
iph | 212 | net/inet/tcp.c | struct iphdr *iph=(struct iphdr *)header; |
iph | 214 | net/inet/tcp.c | header+=4*iph->ihl; |
iph | 57 | net/socket/skbuff.h | struct iphdr *iph; |