From f85b60710571b37293d2233933b76e2aa3db5635 Mon Sep 17 00:00:00 2001 From: Rafal Jaworowski Date: Thu, 27 Dec 2007 18:19:02 +0100 Subject: Introduce new eth_receive routine The purpose of this routine is receiving a single network frame, outside of U-Boot's NetLoop(). Exporting it to standalone programs that run on top of U-Boot will let them utilise networking facilities. For sending a raw frame the already existing eth_send() can be used. The direct consumer of this routine is the newly introduced API layer for external applications (enabled with CONFIG_API). Signed-off-by: Rafal Jaworowski Signed-off-by: Piotr Kruszynski Signed-off-by: Ben Warren --- include/net.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/net.h') diff --git a/include/net.h b/include/net.h index 603452ab32..f6decdca88 100644 --- a/include/net.h +++ b/include/net.h @@ -122,6 +122,9 @@ extern void eth_set_enetaddr(int num, char* a); /* Set new MAC address */ extern int eth_init(bd_t *bis); /* Initialize the device */ extern int eth_send(volatile void *packet, int length); /* Send a packet */ +#ifdef CONFIG_API +extern int eth_receive(volatile void *packet, int length); /* Receive a packet */ +#endif extern int eth_rx(void); /* Check for received packets */ extern void eth_halt(void); /* stop SCC */ extern char *eth_get_name(void); /* get name of current device */ -- cgit v1.2.1