bootinfo_null.c 744 Bytes
Newer Older
Leigh Stoller's avatar
Leigh Stoller committed
1 2
/*
 * EMULAB-COPYRIGHT
3
 * Copyright (c) 2000-2003 University of Utah and the Flux Group.
Leigh Stoller's avatar
Leigh Stoller committed
4 5 6
 * All rights reserved.
 */

7 8 9 10
#include <sys/types.h>
#include <netinet/in.h>
#include <stdio.h>

11
#include "bootwhat.h"
12
#include "bootinfo.h"
13 14

#ifdef USE_NULL_DB
15 16 17 18 19 20

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

21 22 23 24 25 26 27
int
open_bootinfo_db(void)
{
	return 0;
}

int
28
query_bootinfo_db(struct in_addr ipaddr, int version, boot_what_t *info)
29 30
{
#if 0
31 32
	info->type  = BIBOOTWHAT_TYPE_MB;
	info->flags = 0;
33 34 35
	info->what.mb.tftp_ip.s_addr = 0;
	strcpy(info->what.mb.filename, NETBOOT);
#else
36 37
	info->type  = BIBOOTWHAT_TYPE_SYSID;
	info->flags = 0;
38 39 40 41 42 43 44 45 46 47 48
	info->what.sysid = 165; /* BSD */
#endif
	return 0;
}

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