/**************************************************************************
NETBOOT - BOOTP/TFTP Bootstrap Program
**************************************************************************/
#include <nfs/nfsdiskless.h>
#define DEFAULT_BOOTFILE "386bsd"
#define MAX_TFTP_RETRIES 20
#ifndef MAX_BOOTP_RETRIES
#define MAX_BOOTP_RETRIES 20
#define MAX_ARP_RETRIES 20
#ifndef TIMEOUT /* Inter-packet retry in ticks 18/sec */
#define ETHER_ADDR_SIZE 6 /* Size of Ethernet address */
#define ETHER_HDR_SIZE 14 /* Size of ethernet header */
#define IP_BROADCAST 0xFFFFFFFF
#define TFTP_CODE_ERROR 3
#define TFTP_MIN_PACKET_SIZE (sizeof(struct iphdr) + sizeof(struct udphdr) + 4)
static inline unsigned short htons(unsigned short in
)
return((in
>> 8) | (in
<< 8));
static inline unsigned long htonl(unsigned long in
)
return((in
>> 24) | ((in
>> 16) & 0x0000FF00) |
((in
<< 16) & 0x00FF0000) | (in
<< 24));
static inline unsigned char inb(a
)
asm volatile( "inb %1, %0" : "=a" (d
) : "d" (a
));
static inline void outb(a
,d
)
asm volatile( "outb %0, %1" : : "a" (d
), "d" (a
));