#define PKTALIGN ARCH_DMA_MINALIGN
/* IPv4 addresses are always 32 bits in size */
-typedef u32 IPaddr_t;
+typedef __be32 IPaddr_t;
/**
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 */
+
/* get the current device MAC */
+extern struct eth_device *eth_current;
+
static inline __attribute__((always_inline))
struct eth_device *eth_get_dev(void)
{
- extern struct eth_device *eth_current;
-
return eth_current;
}
extern struct eth_device *eth_get_dev_by_name(const char *devname);
enum proto_t {
BOOTP, RARP, ARP, TFTPGET, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP,
- TFTPSRV, TFTPPUT, LINKLOCAL
+ TFTPSRV, TFTPPUT, LINKLOCAL, BOOTME
};
/* from net/net.c */
NETLOOP_SUCCESS,
NETLOOP_FAIL
};
+extern enum net_loop_state net_state;
+
static inline void net_set_state(enum net_loop_state state)
{
- extern enum net_loop_state net_state;
-
debug_cond(DEBUG_INT_STATE, "--- NetState set to %d\n", state);
net_state = state;
}
net_loop_last_protocol = protocol;
#endif
}
+#ifdef CONFIG_CMD_BOOTCE
+void BootmeStart(void);
+#endif
/*
* Check if autoload is enabled. If so, use either NFS or TFTP to download
/* get a random source port */
extern unsigned int random_port(void);
+/* Update U-Boot over TFTP */
+extern int update_tftp(ulong addr);
+
/**********************************************************************/
#endif /* __NET_H__ */