2005-04-21 16:53:53 +02:00
|
|
|
/*
|
|
|
|
io.c
|
|
|
|
|
|
|
|
Copyright 1995 Philip Homburg
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "inet.h"
|
|
|
|
#include "io.h"
|
|
|
|
|
2012-03-25 20:25:53 +02:00
|
|
|
void writeIpAddr(addr)
|
2005-04-21 16:53:53 +02:00
|
|
|
ipaddr_t addr;
|
|
|
|
{
|
|
|
|
#define addrInBytes ((u8_t *)&addr)
|
|
|
|
|
|
|
|
printf("%d.%d.%d.%d", addrInBytes[0], addrInBytes[1],
|
|
|
|
addrInBytes[2], addrInBytes[3]);
|
|
|
|
#undef addrInBytes
|
|
|
|
}
|
|
|
|
|
2012-03-25 20:25:53 +02:00
|
|
|
void writeEtherAddr(addr)
|
2005-04-21 16:53:53 +02:00
|
|
|
ether_addr_t *addr;
|
|
|
|
{
|
|
|
|
#define addrInBytes ((u8_t *)addr->ea_addr)
|
|
|
|
|
|
|
|
printf("%x:%x:%x:%x:%x:%x", addrInBytes[0], addrInBytes[1],
|
|
|
|
addrInBytes[2], addrInBytes[3], addrInBytes[4], addrInBytes[5]);
|
|
|
|
#undef addrInBytes
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2005-06-28 17:19:58 +02:00
|
|
|
* $PchId: io.c,v 1.6 1998/10/23 20:24:34 philip Exp $
|
2005-04-21 16:53:53 +02:00
|
|
|
*/
|