Lines Matching defs:ip

45     struct ip reqiph;
132 struct ip *ip = mtod(m, struct ip *);
142 ttl = ip->ip_ttl;
145 reqsize = ip->ip_len - hlen - sizeof(struct icmp_echo);
171 reqdata = mtod(m, char *) + sizeof(struct ip) + sizeof(struct icmp_echo);
177 m_copydata(m, sizeof(struct ip) + sizeof(struct icmp_echo),
181 dst = ip->ip_dst.s_addr;
184 opts.Tos = ip->ip_tos; /* affected by DisableUserTOSSetting key */
185 opts.Flags = (ip->ip_off & IP_DF) != 0 ? IP_FLAG_DF : 0;
222 struct ip *eip = mtod(em, struct ip *);
344 struct ip *ip;
379 && sizeof(struct ip) + sizeof(struct icmp_echo) + reqsize > if_mtu)
386 ip = mtod(m, struct ip *);
387 icmp = (struct icmp_echo *)(mtod(m, char *) + sizeof(*ip));
389 /* fill in ip (ip_output0() does the boilerplate for us) */
390 ip->ip_tos = reply->Options.Tos;
391 ip->ip_len = sizeof(*ip) + sizeof(*icmp) + reqsize;
392 ip->ip_off = 0;
393 ip->ip_ttl = reply->Options.Ttl;
394 ip->ip_p = IPPROTO_ICMP;
395 ip->ip_src.s_addr = reply->Address;
396 ip->ip_dst = pong->reqiph.ip_src;
406 icmp->icmp_cksum = in_cksum_skip(m, ip->ip_len, sizeof(*ip));
450 ip = mtod(m, struct ip *);
452 ip->ip_tos = reply->Options.Tos;
453 ip->ip_ttl = reply->Options.Ttl; /* XXX: decrement */
454 ip->ip_src.s_addr = reply->Address;
457 Assert(ip->ip_len == m_length(m, NULL));
471 struct ip *ip;
483 ip = mtod(m, struct ip *);
484 icmp = (struct icmp_echo *)(mtod(m, char *) + sizeof(*ip));
486 ip->ip_tos = 0;
487 ip->ip_len = sizeof(*ip) + sizeof(*icmp) + reqsize;
488 ip->ip_off = 0;
489 ip->ip_ttl = IPDEFTTL;
490 ip->ip_p = IPPROTO_ICMP;
491 ip->ip_src.s_addr = 0; /* NB */
492 ip->ip_dst = pong->reqiph.ip_src;
503 icmp->icmp_cksum = in_cksum_skip(m, ip->ip_len, sizeof(*ip));
520 reqsize += sizeof(struct ip) + sizeof(struct icmp_echo);
535 m->m_len = sizeof(struct ip) + sizeof(struct icmp_echo);