Home | History | Annotate | Download | only in dhcpcd-6.8.2

Lines Matching defs:ip

38 #include <netinet/ip.h>
114 struct ip ip;
1595 struct ip *ip;
1601 ip = &udpp->ip;
1606 * ip structure and an invalid ip_len (basically udp length).
1609 * Finally we complete the ip structure and ip checksum.
1615 ip->ip_p = IPPROTO_UDP;
1616 ip->ip_src.s_addr = source.s_addr;
1618 ip->ip_dst.s_addr = INADDR_BROADCAST;
1620 ip->ip_dst.s_addr = dest.s_addr;
1625 ip->ip_len = udp->uh_ulen;
1628 ip->ip_v = IPVERSION;
1629 ip->ip_hl = sizeof(*ip) >> 2;
1630 ip->ip_id = (uint16_t)arc4random_uniform(UINT16_MAX);
1631 ip->ip_ttl = IPDEFTTL;
1632 ip->ip_len = htons((uint16_t)(sizeof(*ip) + sizeof(*udp) + length));
1633 ip->ip_sum = checksum(ip, sizeof(*ip));
1635 *sz = sizeof(*ip) + sizeof(*udp) + length;
1702 /* If we couldn't open a UDP port for our IP address
1704 * This could happen if our IP was pulled out from underneath us.
1749 * we don't have the ability to work beneath the IP layer
2270 "configure IP address",
2304 "configure IP address",
3186 return ntohs(p.ip.ip_len) - sizeof(p.ip) - sizeof(p.udp);
3196 if (data_len < sizeof(p.ip)) {
3197 syslog(LOG_WARNING, "packet short than an ip header "
3206 from->s_addr = p.ip.ip_src.s_addr;
3212 if (checksum(&p.ip, sizeof(p.ip)) != 0) {
3213 syslog(LOG_WARNING, "packet failed ip header checksum");
3218 bytes = ntohs(p.ip.ip_len);
3229 p.ip.ip_hl = 0;
3230 p.ip.ip_v = 0;
3231 p.ip.ip_tos = 0;
3232 p.ip.ip_len = p.udp.uh_ulen;
3233 p.ip.ip_id = 0;
3234 ip.ip_off = 0;
3235 p.ip.ip_ttl = 0;
3236 p.ip.ip_sum = 0;
3646 /* We still have the IP address from the last lease.
3762 "%s: removing IP address %s/%d",