/*************************************************/
/* Center for Information Technology Integration */
/*           The University of Michigan          */
/*                    Ann Arbor                  */
/*                                               */
/* Dedicated to the public domain.               */
/* Send questions to info@citi.umich.edu         */
/*                                               */
/* BOOTP is documented in RFC 951 and RFC 1048   */
/*************************************************/

#ifndef _BOOTPD_H
#define _BOOTPD_H
#ifndef _SOCKET_H
#include "socket.h"
#endif

#ifndef _ARP_H
#include "arp.h"
#endif

#define MHOSTS  12     /* max number of 'hosts' structs */
#define BP_MAXDNS 5


#if 0
struct bootpd_stat {
	int	rcvd;
	int	bad_size;
	int	bad_op;

};
#endif

struct host {
        char name[31];		/* host name (and suffix) */
        unsigned char  htype;	/* hardware type */
        char   haddr[MAXHWALEN];/* hardware address */
        struct in_addr iaddr;	/* internet address */
        char bootfile[32];	/* default boot file name */
};

#define NULLHOST (struct host *) 0

extern const char *ArpNames[];
#ifndef _BOOTP_H
extern char bp_ascii[];
#endif

int readtab (void);
void bp_log (const char *fmt,...);
void da_status (struct iface *iface);
int da_assign (struct iface *iface,char *hwaddr,uint32 *ipaddr);
int da_init (void);
void da_shut (void);
int da_done_net (struct iface *iface);
int da_serve_net (struct iface *iface,uint32 rstart,uint32 rend);

#endif
