grub.h revision 1b8adde7ba7d5e04395c141c5400dc2cffd7d809
#ifndef GRUB_H
#define GRUB_H
#include "osdep.h"
#include "byteswap.h"
#include "in.h"
#include "ip.h"
#include "udp.h"
#include "if_ether.h"
#include "latch.h"
#include "io.h"
#include "nic.h"
#include <shared.h>
#define K_ESC '\033'
#ifndef MAX_RPC_RETRIES
#define MAX_RPC_RETRIES 20
#endif
/* Inter-packet retry in ticks */
#ifndef TIMEOUT
#endif
#ifndef NULL
#define NULL ((void *)0)
#endif
#define ARP_CLIENT 0
#define ARP_SERVER 1
#define ARP_GATEWAY 2
#define IGMP_SERVER 0
#define RARP_REQUEST 3
#define RARP_REPLY 4
#define MULTICAST_MASK 0xF0000000
#define MULTICAST_NETWORK 0xE0000000
struct arptable_t {
};
struct igmptable_t {
unsigned long time;
};
#define FLOPPY_BOOT_LOCATION 0x7c00
/* Must match offsets in loader.S */
#define ROM_SEGMENT 0x1fa
#define ROM_LENGTH 0x1fc
/* at end of floppy boot block */
/* Define a type for passing info to a loaded program */
struct ebinfo {
};
/***************************************************************************
External prototypes
***************************************************************************/
extern void rx_qdrain P((void));
extern void build_udp_hdr P((unsigned long destip,
typedef int (*reply_t)(int ival, void *ptr, unsigned short ptype, struct iphdr *ip, struct udphdr *udp);
extern int decode_rfc1533 P((unsigned char *, unsigned int, unsigned int, int));
extern void leave_group(int slot);
#define RAND_MAX 2147483647L
#ifndef DOWNLOAD_PROTO_TFTP
#endif
extern void cleanup P((void));
/* misc.c */
extern void twiddle P((void));
extern void interruptible_sleep P((int secs));
extern void poll_interruptions P((void));
extern int strcasecmp P((const char *a, const char *b));
extern char *substr P((const char *a, const char *b));
extern void printf P((const char *, ...));
extern int sprintf P((char *, const char *, ...));
extern void putchar P((int));
extern int getchar P((void));
extern int iskey P((void));
extern void grub_printf(const char *, ...);
extern char config_file[128];
extern void etherboot_printf(const char *, ...);
extern int etherboot_sprintf(char *, const char *, ...);
extern int getdec(char **s);
extern void cleanup_net(void);
extern void print_network_configuration (void);
extern int ifconfig (char *, char *, char *, char *);
#define printf etherboot_printf
#define sprintf etherboot_sprintf
#ifdef DEBUG
#else
#define EnterFunction(func)
#define LeaveFunction(func)
#endif
/*
* Some codes from etherboot use a level in DEBUG. Define it to be
* zero means no debug info output, that will make them silence in
* compiling. Up it as you want.
*/
#ifndef DEBUG
# define DEBUG 0
#endif
/*#define RPC_DEBUG*/
extern char *hostname;
extern int hostnamelen;
/* Whether network is ready */
extern int network_ready;
/* User aborted in await_reply if not zero */
extern int user_abort;
extern int rarp(void);
extern int grub_eth_probe(void);
extern int bootp(void);
extern int dhcp(void);
#endif /* GRUB_H */