bootinfo_null.c 553 Bytes
Newer Older
1 2 3 4
#include <sys/types.h>
#include <netinet/in.h>
#include <stdio.h>

5
#include "bootwhat.h"
6 7

#ifdef USE_NULL_DB
8 9 10 11 12 13

/*
 * For now, hardwired.
 */
#define NETBOOT		"/tftpboot/netboot"

14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
int
open_bootinfo_db(void)
{
	return 0;
}

int
query_bootinfo_db(struct in_addr ipaddr, boot_what_t *info)
{
#if 0
	info->type = BIBOOTWHAT_TYPE_MB;
	info->what.mb.tftp_ip.s_addr = 0;
	strcpy(info->what.mb.filename, NETBOOT);
#else
	info->type = BIBOOTWHAT_TYPE_SYSID;
	info->what.sysid = 165; /* BSD */
#endif
	return 0;
}

int
close_bootinfo_db(void)
{
	return 0;
}
#endif