diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-01-29 19:43:44 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-03-20 22:39:09 +0100 |
commit | 3f6e6993e92fd0658da1746d1c84644612ee520b (patch) | |
tree | c0dd1c3077e30083cb94bfeb96064138cfd73485 /include/net.h | |
parent | b6446b67758ea1e41223f0782924bb73fd0a89d0 (diff) | |
download | u-boot-imx-3f6e6993e92fd0658da1746d1c84644612ee520b.zip u-boot-imx-3f6e6993e92fd0658da1746d1c84644612ee520b.tar.gz u-boot-imx-3f6e6993e92fd0658da1746d1c84644612ee520b.tar.bz2 |
net: new utility functions for working with enetaddr's
Declare new utility functions for converting between the environment
variables (eth*addr) and the binary MAC address representation. This way
we can unify all the random places that already do this kind of thing.
The functions in question:
eth_parse_enetaddr - "..." -> {...}
eth_getenv_enetaddr - env -> {...}
eth_setenv_enetaddr - {...} -> env
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h index bd061d9..5a1d36e 100644 --- a/include/net.h +++ b/include/net.h @@ -120,6 +120,9 @@ extern struct eth_device *eth_get_dev_by_name(char *devname); /* get device */ extern struct eth_device *eth_get_dev_by_index(int index); /* get dev @ index */ extern int eth_get_dev_index (void); /* get the device index */ extern void eth_set_enetaddr(int num, char* a); /* Set new MAC address */ +extern void eth_parse_enetaddr(const char *addr, uchar *enetaddr); +extern int eth_getenv_enetaddr(char *name, uchar *enetaddr); +extern int eth_setenv_enetaddr(char *name, const uchar *enetaddr); extern int eth_init(bd_t *bis); /* Initialize the device */ extern int eth_send(volatile void *packet, int length); /* Send a packet */ |