Lines Matching refs:iphdr
362 struct pptp_ip_hdr *iphdr,
368 iphdr->version = 4; /* Version */
369 iphdr->ihl = 5; /* Header length (5*4)=20 */
370 iphdr->tos = inet->tos; /* Differentiated services field */
371 //iphdr->tot_len = hton16(skb->len + grehdrlen + 20 + 2); /* Total length */
372 iphdr->tot_len = hton16(total_len); /* Total length */
374 //iphdr->frag_off = hton16(IP_DF); /* Don't fragment */
375 iphdr->frag_off = 0;
377 ip_select_ident((struct iphdr *)iphdr, &rt->dst, sk);
378 iphdr->ttl = 255; /* Time to live (64), maximum is 255 */
379 iphdr->protocol = IP_PROTOCOL_GRE; /* Protocol: GRE(0x2f) */
380 iphdr->saddr = src_ip_addr; /* Source IP address */
381 iphdr->daddr = dst_ip_addr; /* Destination IP address */
383 iphdr->check = 0;
384 iphdr->check = ip_fast_csum((unsigned char *) iphdr, iphdr->ihl);