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

📄 ethers.3n

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 3N
字号:
.TH ethers 3n.SH Nameethers, ether_ntoa, ether_aton, ether_ntohost, ether_hostton, ether_line \- Ethernet address mapping operations.SH Syntax.nf#include <sys/types.h>#include <sys/socket.h>#include <net/if.h>#include <netinet/in.h>#include <netinet/if_ether.h>.spchar *ether_ntoa(e)	struct ether_addr *e;.spstruct ether_addr *ether_aton(s)	char *s;.spether_ntohost(hostname, e)	char *hostname;	struct ether_addr *e;.spether_hostton(hostname, e)	char *hostname;	struct ether_addr *e;.spether_line(l, e, hostname)	char *l;	struct ether_addr *e;	char *hostname;.fi.SH ArgumentsThe .PN ether_addrstructure is defined as:.EX\f(CWstruct ether_addr {        u_char  ether_addr_octet[6];};.EE.SH DescriptionThese routines are useful for mapping 48 bit Ethernet numbers to theirASCIIrepresentations or their corresponding host names, and vice versa..NXR "Ethernet address mapping operations"The mapping is obtained from the.PN /etc/ethersdatabase; see.MS ethers 5 ..PPThe function.PN ether_ntoa(\|)converts a 48 bit Ethernet number pointed to by.I eto its standard ACSIIrepresentation; it returns a pointer to the ASCIIstring.  The representation is of the form:.IR x : x : x :\c.IR x : x : xwhere.I xis a hexadecimal number between 0 and ff.The function.PN ether_aton(\|)converts an ASCIIstring in the standard representation backto a 48 bit Ethernet number;  the function returns NULLif the stringcannot be scanned successfully..PPThe function.PN ether_ntohost(\|)maps an Ethernet number (pointed to by.IR e )to its associated hostname.  The string pointed to by.PN hostnamemust be long enough to hold the hostname and a NULLcharacter.  The function returns zeroupon success and non-zero upon failure.Inversely, the function.PN ether_hostton(\|)maps a hostname string to its corresponding Ethernet number;the function modifies the Ethernet number pointed to by.IR e .The function also returns zero upon success and non-zero upon failure..PPThe function.PN ether_line(\|)scans a line (pointed to by.IR l )and sets the hostname and the Ethernet number (pointed to by.IR e ).The string pointed to by.PN hostnamemust be long enough to hold the hostname and a NULLcharacter.The function returns zero upon success and non-zero upon failure.The format of the scanned line is described by.MS ethers 5 ..SH Files.TP 20.PN /etc/ethers.SH See Alsopacketfilter(4), ethers(5), rarpd(8c)

⌨️ 快捷键说明

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