Lines Matching refs:lease
298 void queue_script(int action, struct dhcp_lease *lease, char *hostname, time_t now) in queue_script() argument
309 if (lease->vendorclass) in queue_script()
310 vclass_len = lease->vendorclass_len; in queue_script()
311 if (lease->userclass) in queue_script()
312 uclass_len = lease->userclass_len; in queue_script()
313 if (lease->supplied_hostname) in queue_script()
314 shost_len = lease->supplied_hostname_len; in queue_script()
315 if (lease->clid) in queue_script()
316 clid_len = lease->clid_len; in queue_script()
339 buf->hwaddr_len = lease->hwaddr_len; in queue_script()
340 buf->hwaddr_type = lease->hwaddr_type; in queue_script()
346 buf->addr = lease->addr; in queue_script()
347 buf->giaddr = lease->giaddr; in queue_script()
348 memcpy(buf->hwaddr, lease->hwaddr, lease->hwaddr_len); in queue_script()
351 if (lease->last_interface != 0) in queue_script()
354 ifr.ifr_ifindex = lease->last_interface; in queue_script()
359 if (lease->last_interface != 0) in queue_script()
360 if_indextoname(lease->last_interface, buf->interface); in queue_script()
364 buf->length = lease->length; in queue_script()
366 buf->expires = lease->expires; in queue_script()
368 buf->remaining_time = (unsigned int)difftime(lease->expires, now); in queue_script()
373 memcpy(p, lease->clid, clid_len); in queue_script()
378 memcpy(p, lease->vendorclass, vclass_len); in queue_script()
383 memcpy(p, lease->userclass, uclass_len); in queue_script()
388 memcpy(p, lease->supplied_hostname, shost_len); in queue_script()