lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #ifndef _NETINET_ETHER_H |
| 2 | #include <inet/netinet/ether.h> |
| 3 | |
| 4 | libc_hidden_proto (ether_aton_r) |
| 5 | libc_hidden_proto (ether_ntoa_r) |
| 6 | |
| 7 | /* Because the `ethers' lookup does not fit so well in the scheme we |
| 8 | define a dummy struct here which helps us to use the available |
| 9 | functions. */ |
| 10 | struct etherent |
| 11 | { |
| 12 | const char *e_name; |
| 13 | struct ether_addr e_addr; |
| 14 | }; |
| 15 | |
| 16 | struct parser_data; |
| 17 | extern int _nss_files_parse_etherent (char *line, struct etherent *result, |
| 18 | struct parser_data *data, |
| 19 | size_t datalen, int *errnop); |
| 20 | libnss_files_hidden_proto (_nss_files_parse_etherent) |
| 21 | |
| 22 | #define DECLARE_NSS_PROTOTYPES(service) \ |
| 23 | extern enum nss_status _nss_ ## service ## _setetherent (int __stayopen); \ |
| 24 | extern enum nss_status _nss_ ## service ## _endetherent (void); \ |
| 25 | extern enum nss_status _nss_ ## service ## _getetherent_r \ |
| 26 | (struct etherent *result, char *buffer, \ |
| 27 | size_t buflen, int *errnop); \ |
| 28 | extern enum nss_status _nss_ ## service ## _gethostton_r \ |
| 29 | (const char *name, struct etherent *eth, \ |
| 30 | char *buffer, size_t buflen, int *errnop); \ |
| 31 | extern enum nss_status _nss_ ## service ## _getntohost_r \ |
| 32 | (const struct ether_addr *addr, \ |
| 33 | struct etherent *eth, \ |
| 34 | char *buffer, size_t buflen, int *errnop); |
| 35 | |
| 36 | DECLARE_NSS_PROTOTYPES (files) |
| 37 | DECLARE_NSS_PROTOTYPES (nis) |
| 38 | DECLARE_NSS_PROTOTYPES (nisplus) |
| 39 | |
| 40 | #undef DECLARE_NSS_PROTOTYPES |
| 41 | |
| 42 | #endif |