2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 /* All data returned by the network data base library are supplied in
18 host order and returned in network order (suitable for use in
22 #define _ETHERNETDB_H 1
25 #include <netinet/in.h>
28 /* Absolute file name for network data base files. */
29 #ifndef _PATH_ETHERTYPES
30 #define _PATH_ETHERTYPES "/etc/ethertypes"
31 #endif /* _PATH_ETHERTYPES */
34 char *e_name
; /* Official ethernet type name. */
35 char **e_aliases
; /* Alias list. */
36 int e_ethertype
; /* Ethernet type number. */
39 /* Open ethertype data base files and mark them as staying open even
40 after a later search if STAY_OPEN is non-zero. */
41 extern void setethertypeent(int __stay_open
) __THROW
;
43 /* Close ethertype data base files and clear `stay open' flag. */
44 extern void endethertypeent(void) __THROW
;
46 /* Get next entry from ethertype data base file. Open data base if
48 extern struct ethertypeent
*getethertypeent(void) __THROW
;
50 /* Return entry from ethertype data base for network with NAME. */
51 extern struct ethertypeent
*getethertypebyname(__const
char *__name
)
54 /* Return entry from ethertype data base which number is PROTO. */
55 extern struct ethertypeent
*getethertypebynumber(int __ethertype
) __THROW
;
58 #endif /* ethernetdb.h */