1*53ee8cc1Swenshuai.xi /* Functions for storing Ethernet addresses in ASCII and mapping to hostnames. 2*53ee8cc1Swenshuai.xi Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. 3*53ee8cc1Swenshuai.xi This file is part of the GNU C Library. 4*53ee8cc1Swenshuai.xi 5*53ee8cc1Swenshuai.xi The GNU C Library is free software; you can redistribute it and/or 6*53ee8cc1Swenshuai.xi modify it under the terms of the GNU Lesser General Public 7*53ee8cc1Swenshuai.xi License as published by the Free Software Foundation; either 8*53ee8cc1Swenshuai.xi version 2.1 of the License, or (at your option) any later version. 9*53ee8cc1Swenshuai.xi 10*53ee8cc1Swenshuai.xi The GNU C Library is distributed in the hope that it will be useful, 11*53ee8cc1Swenshuai.xi but WITHOUT ANY WARRANTY; without even the implied warranty of 12*53ee8cc1Swenshuai.xi MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13*53ee8cc1Swenshuai.xi Lesser General Public License for more details. 14*53ee8cc1Swenshuai.xi 15*53ee8cc1Swenshuai.xi You should have received a copy of the GNU Lesser General Public 16*53ee8cc1Swenshuai.xi License along with the GNU C Library; if not, write to the Free 17*53ee8cc1Swenshuai.xi Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 18*53ee8cc1Swenshuai.xi 02111-1307 USA. */ 19*53ee8cc1Swenshuai.xi 20*53ee8cc1Swenshuai.xi #ifndef _NETINET_ETHER_H 21*53ee8cc1Swenshuai.xi #define _NETINET_ETHER_H 1 22*53ee8cc1Swenshuai.xi 23*53ee8cc1Swenshuai.xi #include <features.h> 24*53ee8cc1Swenshuai.xi 25*53ee8cc1Swenshuai.xi /* Get definition of `struct ether_addr'. */ 26*53ee8cc1Swenshuai.xi #include <netinet/if_ether.h> 27*53ee8cc1Swenshuai.xi 28*53ee8cc1Swenshuai.xi __BEGIN_DECLS 29*53ee8cc1Swenshuai.xi 30*53ee8cc1Swenshuai.xi /* Convert 48 bit Ethernet ADDRess to ASCII. */ 31*53ee8cc1Swenshuai.xi extern char *ether_ntoa (__const struct ether_addr *__addr) __THROW; 32*53ee8cc1Swenshuai.xi extern char *ether_ntoa_r (__const struct ether_addr *__addr, char *__buf) 33*53ee8cc1Swenshuai.xi __THROW; 34*53ee8cc1Swenshuai.xi 35*53ee8cc1Swenshuai.xi /* Convert ASCII string S to 48 bit Ethernet address. */ 36*53ee8cc1Swenshuai.xi extern struct ether_addr *ether_aton (__const char *__asc) __THROW; 37*53ee8cc1Swenshuai.xi extern struct ether_addr *ether_aton_r (__const char *__asc, 38*53ee8cc1Swenshuai.xi struct ether_addr *__addr) __THROW; 39*53ee8cc1Swenshuai.xi 40*53ee8cc1Swenshuai.xi /* Map 48 bit Ethernet number ADDR to HOSTNAME. */ 41*53ee8cc1Swenshuai.xi extern int ether_ntohost (char *__hostname, __const struct ether_addr *__addr) 42*53ee8cc1Swenshuai.xi __THROW; 43*53ee8cc1Swenshuai.xi 44*53ee8cc1Swenshuai.xi /* Map HOSTNAME to 48 bit Ethernet address. */ 45*53ee8cc1Swenshuai.xi extern int ether_hostton (__const char *__hostname, struct ether_addr *__addr) 46*53ee8cc1Swenshuai.xi __THROW; 47*53ee8cc1Swenshuai.xi 48*53ee8cc1Swenshuai.xi /* Scan LINE and set ADDR and HOSTNAME. */ 49*53ee8cc1Swenshuai.xi extern int ether_line (__const char *__line, struct ether_addr *__addr, 50*53ee8cc1Swenshuai.xi char *__hostname) __THROW; 51*53ee8cc1Swenshuai.xi 52*53ee8cc1Swenshuai.xi __END_DECLS 53*53ee8cc1Swenshuai.xi 54*53ee8cc1Swenshuai.xi #endif /* netinet/ether.h */ 55