| Line | |
|---|
| 1 | /*
|
|---|
| 2 | io.c
|
|---|
| 3 |
|
|---|
| 4 | Copyright 1995 Philip Homburg
|
|---|
| 5 | */
|
|---|
| 6 |
|
|---|
| 7 | #include <stdlib.h>
|
|---|
| 8 |
|
|---|
| 9 | #include "inet.h"
|
|---|
| 10 | #include "io.h"
|
|---|
| 11 |
|
|---|
| 12 | PUBLIC void writeIpAddr(addr)
|
|---|
| 13 | ipaddr_t addr;
|
|---|
| 14 | {
|
|---|
| 15 | #define addrInBytes ((u8_t *)&addr)
|
|---|
| 16 |
|
|---|
| 17 | printf("%d.%d.%d.%d", addrInBytes[0], addrInBytes[1],
|
|---|
| 18 | addrInBytes[2], addrInBytes[3]);
|
|---|
| 19 | #undef addrInBytes
|
|---|
| 20 | }
|
|---|
| 21 |
|
|---|
| 22 | PUBLIC void writeEtherAddr(addr)
|
|---|
| 23 | ether_addr_t *addr;
|
|---|
| 24 | {
|
|---|
| 25 | #define addrInBytes ((u8_t *)addr->ea_addr)
|
|---|
| 26 |
|
|---|
| 27 | printf("%x:%x:%x:%x:%x:%x", addrInBytes[0], addrInBytes[1],
|
|---|
| 28 | addrInBytes[2], addrInBytes[3], addrInBytes[4], addrInBytes[5]);
|
|---|
| 29 | #undef addrInBytes
|
|---|
| 30 | }
|
|---|
| 31 |
|
|---|
| 32 | /*
|
|---|
| 33 | * $PchId: io.c,v 1.6 1998/10/23 20:24:34 philip Exp $
|
|---|
| 34 | */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.