• Home
  • Raw
  • Download

Lines Matching refs:lease

840 	const struct dhcp_lease *lease = &iface->state->lease;  in make_message()  local
848 iface->net.s_addr == lease->net.s_addr && in make_message()
855 dhcp->ciaddr = lease->addr.s_addr; in make_message()
893 if (lease->addr.s_addr && lease->cookie == htonl(MAGIC_COOKIE)) { in make_message()
896 lease->addr.s_addr != iface->addr.s_addr)) in make_message()
898 PUTADDR(DHO_IPADDRESS, lease->addr); in make_message()
899 if (lease->server.s_addr) in make_message()
900 PUTADDR(DHO_SERVERID, lease->server); in make_message()
904 if (lease->server.s_addr) in make_message()
905 PUTADDR(DHO_SERVERID, lease->server); in make_message()
1384 get_lease(struct dhcp_lease *lease, const struct dhcp_message *dhcp) in get_lease() argument
1388 lease->cookie = dhcp->cookie; in get_lease()
1391 lease->addr.s_addr = dhcp->yiaddr; in get_lease()
1393 lease->addr.s_addr = dhcp->ciaddr; in get_lease()
1394 if (get_option_addr(&lease->net, dhcp, DHO_SUBNETMASK) == -1) in get_lease()
1395 lease->net.s_addr = get_netmask(lease->addr.s_addr); in get_lease()
1396 if (get_option_addr(&lease->brd, dhcp, DHO_BROADCAST) == -1) in get_lease()
1397 lease->brd.s_addr = lease->addr.s_addr | ~lease->net.s_addr; in get_lease()
1398 if (get_option_uint32(&lease->leasetime, dhcp, DHO_LEASETIME) == 0) { in get_lease()
1401 if (now.tv_sec + (time_t)lease->leasetime < now.tv_sec) in get_lease()
1402 lease->leasetime = ~0U; /* Infinite lease */ in get_lease()
1404 lease->leasetime = ~0U; /* Default to infinite lease */ in get_lease()
1405 if (get_option_uint32(&lease->renewaltime, dhcp, DHO_RENEWALTIME) != 0) in get_lease()
1406 lease->renewaltime = 0; in get_lease()
1407 if (get_option_uint32(&lease->rebindtime, dhcp, DHO_REBINDTIME) != 0) in get_lease()
1408 lease->rebindtime = 0; in get_lease()
1409 if (get_option_addr(&lease->server, dhcp, DHO_SERVERID) != 0) in get_lease()
1410 lease->server.s_addr = INADDR_ANY; in get_lease()