⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mac_addr_dlpi.c

📁 一个简单实用的开源C++消息中间件SAFMQ - [软件开发] - [开源 消息中间件 SAFMQ ] 2006-11-23 在很多网络应用中
💻 C
字号:
/* * mac_addr_dlpi.c * * Return the MAC (ie, ethernet hardware) address by using the dlpi api. * * compile with: gcc -c -D "OS" mac_addr_dlpi.c * with "OS" is one of AIX, SunOS, HPUX  *//***********************************************************************//* this section defines a list of the dlpi capable devices * this depends on the operating system */#undef DLPI_DEV#ifdef HPUXstatic char *dlpi_dev[] = {"/dev/dlpi", ""};#define DLPI_DEV#endif#ifdef AIXstatic char *dlpi_dev[] = {"/dev/dlpi/et", "/dev/dlpi/en", "/dev/dlpi/tr", "/dev/dlpi/fddi", ""};#define DLPI_DEV/* AIX: remember to set up /etc/pse.conf or /etc/dlpi.conf */#endif#ifdef SunOSstatic char *dlpi_dev[] = {"/dev/eri", "/dev/hme", "/dev/ie", "/dev/le", ""};#define DLPI_DEV#endif#ifndef DLPI_DEVstatic char *dlpi_dev[] = {"/dev/dlpi", ""};/* unknown OS - hope that this will work ??? */#define DLPI_DEV#endif/***********************************************************************//*  * implementation  */#define INSAP 22 #define OUTSAP 24 #include <sys/types.h>#include <fcntl.h>#include <errno.h>#include <stdio.h>#include <string.h>#include <signal.h>#include <ctype.h>#include <sys/stropts.h>#include <sys/poll.h>#include <sys/dlpi.h>#define bcopy(source, destination, length) memcpy(destination, source, length)#define AREA_SZ 5000 /*

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -