Lines Matching refs:iph
162 struct ip* iph;
168 iph = (struct ip*) buf;
169 uh = (struct udphdr*) ((char*)iph + 20);
176 strcpy(ip, inet_ntoa(iph->ip_src));
177 *ttl = iph->ip_ttl;
229 struct ip* iph; in send_stuff() local
235 iph = (struct ip*) buf; in send_stuff()
236 iph->ip_hl = 5; in send_stuff()
237 iph->ip_v = 4; in send_stuff()
238 iph->ip_tos = 0; in send_stuff()
239 iph->ip_len = htons(20+8+dlen); in send_stuff()
240 iph->ip_id = htons(666); in send_stuff()
241 iph->ip_off = 0; in send_stuff()
242 iph->ip_ttl = TTLSENT; in send_stuff()
243 iph->ip_p = IPPROTO_UDP; in send_stuff()
244 iph->ip_sum = 0; in send_stuff()
246 inet_aton(sip, &iph->ip_src); in send_stuff()
247 inet_aton(ip, &iph->ip_dst); in send_stuff()
252 memcpy(&dst.sin_addr, &iph->ip_dst, sizeof(dst.sin_addr)); in send_stuff()
254 iph->ip_sum = in_cksum((unsigned short*)iph, 20); in send_stuff()
256 uh = (struct udphdr*) ((char*)iph + 20); in send_stuff()
267 &iph->ip_src, &iph->ip_dst); in send_stuff()
270 iph->ip_len = ntohs(iph->ip_len); in send_stuff()