io.c
来自「Minix3.11的源码。[MINIX 3是一个为高可靠性应用而设计的自由且简洁」· C语言 代码 · 共 35 行
C
35 行
/*io.cCopyright 1995 Philip Homburg*/#include <stdlib.h>#include "inet.h"#include "io.h"PUBLIC void writeIpAddr(addr)ipaddr_t addr;{#define addrInBytes ((u8_t *)&addr) printf("%d.%d.%d.%d", addrInBytes[0], addrInBytes[1], addrInBytes[2], addrInBytes[3]);#undef addrInBytes}PUBLIC void writeEtherAddr(addr)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}/* * $PchId: io.c,v 1.6 1998/10/23 20:24:34 philip Exp $ */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?