#define PKTALIGN 32
-typedef ulong IPaddr_t;
+/* IPv4 addresses are always 32 bits in size */
+typedef u32 IPaddr_t;
/**
#endif
int (*write_hwaddr) (struct eth_device*);
struct eth_device *next;
+ int index;
void *priv;
};
extern int eth_initialize(bd_t *bis); /* Initialize network subsystem */
extern int eth_register(struct eth_device* dev);/* Register network device */
+extern int eth_unregister(struct eth_device *dev);/* Remove network device */
extern void eth_try_another(int first_restart); /* Change the device */
extern void eth_set_current(void); /* set nterface to ethcur var */
extern struct eth_device *eth_get_dev(void); /* get the current device MAC */
extern int NetRestartWrap; /* Tried all network devices */
-typedef enum { BOOTP, RARP, ARP, TFTP, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP,
- TFTPSRV } proto_t;
+enum proto_t {
+ BOOTP, RARP, ARP, TFTPGET, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP,
+ TFTPSRV, TFTPPUT
+};
/* from net/net.c */
extern char BootFile[128]; /* Boot File name */
#endif
/* Initialize the network adapter */
-extern int NetLoop(proto_t);
+extern int NetLoop(enum proto_t);
/* Shutdown adapters and cleanup */
extern void NetStop(void);
/* Processes a received packet */
extern void NetReceive(volatile uchar *, int);
+/*
+ * Check if autoload is enabled. If so, use either NFS or TFTP to download
+ * the boot file.
+ */
+void net_auto_load(void);
+
/*
* The following functions are a bit ugly, but necessary to deal with
* alignment restrictions on ARM.