summaryrefslogtreecommitdiffstats
path: root/include/net.h
diff options
context:
space:
mode:
authorJohannes Stezenbach <js@sig21.net>2012-06-18 16:47:59 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-06-30 13:58:18 +0200
commit69e07e2afb650702dad23bea882731fe02dbb964 (patch)
treec9730ca246aa956990649606a4e30303c4b62423 /include/net.h
parent8f2fcf65541d911c5de0bf9fcfbfda93a20bd723 (diff)
downloadbarebox-69e07e2afb650702dad23bea882731fe02dbb964.tar.gz
barebox-69e07e2afb650702dad23bea882731fe02dbb964.tar.xz
eth: eth MAC addresses are six bytes
Reduce confusion by making clear six bytes are passed, not a string. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/net.h b/include/net.h
index 08f897e958..9152943812 100644
--- a/include/net.h
+++ b/include/net.h
@@ -38,8 +38,8 @@ struct eth_device {
int (*send) (struct eth_device*, void *packet, int length);
int (*recv) (struct eth_device*);
void (*halt) (struct eth_device*);
- int (*get_ethaddr) (struct eth_device*, unsigned char *adr);
- int (*set_ethaddr) (struct eth_device*, unsigned char *adr);
+ int (*get_ethaddr) (struct eth_device*, u8 adr[6]);
+ int (*set_ethaddr) (struct eth_device*, u8 adr[6]);
struct eth_device *next;
void *priv;
@@ -287,8 +287,8 @@ int string_to_ip(const char *s, IPaddr_t *ip);
IPaddr_t getenv_ip(const char *name);
int setenv_ip(const char *name, IPaddr_t ip);
-int string_to_ethaddr(const char *str, char *enetaddr);
-void ethaddr_to_string(const unsigned char *enetaddr, char *str);
+int string_to_ethaddr(const char *str, u8 enetaddr[6]);
+void ethaddr_to_string(const u8 enetaddr[6], char *str);
#ifdef CONFIG_NET_RESOLV
IPaddr_t resolv(char *host);