[plain text]
#ifndef _S_DHCPD_H
#define _S_DHCPD_H
#include "dhcplib.h"
#include "bootpd.h"
void
dhcp_init();
void
dhcp_request(request_t * request, dhcp_msgtype_t msgtype,
boolean_t dhcp_allocate);
boolean_t
dhcp_bootp_allocate(char * idstr, char * hwstr, struct dhcp * rq,
interface_t * if_p, struct timeval * time_in_p,
struct in_addr * iaddr_p, id * subnet_p);
#define DHCP_CLIENT_TYPE "dhcp"
#define DHCP_PENDING_SECS 60
#define DHCP_MIN_LEASE ((dhcp_lease_t)60 * 60)
#define DHCP_MAX_LEASE ((dhcp_lease_t)60 * 60 * 24 * 30)
#define DHCP_DECLINE_WAIT_SECS (60 * 10)
#define SUBNETPROP_LEASE_MIN "lease_min"
#define SUBNETPROP_LEASE_MAX "lease_max"
#define TIME_DRIFT_PERCENT 0.99
static __inline__ u_long
lease_prorate(u_long lease_time)
{
double d = lease_time * TIME_DRIFT_PERCENT;
return ((u_long)d);
}
struct dhcp *
make_dhcp_reply(struct dhcp * reply, int pkt_size,
struct in_addr server_id, dhcp_msgtype_t msg,
struct dhcp * request, dhcpoa_t * options);
int
dhcp_max_message_size(dhcpol_t * client_options);
#endif _S_DHCPD_H
Generated by GNU enscript 1.6.4.