From b6446b67758ea1e41223f0782924bb73fd0a89d0 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 17 Feb 2009 00:00:53 -0500 Subject: convert print_IPaddr() to %pI4 Now that our printf functions support the %pI4 modifier like the kernel, let's drop the inflexible print_IPaddr() function and covert over to the %pI4 modifier. Signed-off-by: Mike Frysinger CC: Ben Warren --- include/net.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/net.h') diff --git a/include/net.h b/include/net.h index b192db1938c..bd061d9e760 100644 --- a/include/net.h +++ b/include/net.h @@ -408,9 +408,6 @@ extern int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, i /* Processes a received packet */ extern void NetReceive(volatile uchar *, int); -/* Print an IP address on the console */ -extern void print_IPaddr (IPaddr_t); - /* * The following functions are a bit ugly, but necessary to deal with * alignment restrictions on ARM. -- cgit v1.2.3 From 3f6e6993e92fd0658da1746d1c84644612ee520b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 29 Jan 2009 19:43:44 -0500 Subject: 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 CC: 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 bd061d9e760..5a1d36ee311 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 */ -- cgit v1.2.3