source: trunk/minix/servers/inet/generic/io.c@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 607 bytes
Line 
1/*
2io.c
3
4Copyright 1995 Philip Homburg
5*/
6
7#include <stdlib.h>
8
9#include "inet.h"
10#include "io.h"
11
12PUBLIC void writeIpAddr(addr)
13ipaddr_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
22PUBLIC void writeEtherAddr(addr)
23ether_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.