Provide a value for arp_hardware_types_size array

* defs.h (arp_hardware_types_size): New declaration.
* sockaddr.c (arp_hardware_types_size): New variable.
This commit is contained in:
Eugene Syromyatnikov 2018-05-07 08:52:30 +02:00 committed by Dmitry V. Levin
parent fd3aa07209
commit 7d0396345d
2 changed files with 6 additions and 0 deletions

5
defs.h
View File

@ -289,7 +289,12 @@ struct tcb {
#include "xlat.h"
extern const struct xlat addrfams[];
/** Protocol hardware identifiers array, sorted, defined in sockaddr.c. */
extern const struct xlat arp_hardware_types[];
/** Protocol hardware identifiers array size without terminating record. */
extern const size_t arp_hardware_types_size;
extern const struct xlat at_flags[];
extern const struct xlat clocknames[];
extern const struct xlat dirent_types[];

View File

@ -61,6 +61,7 @@
#define SIZEOF_SA_FAMILY sizeof(((struct sockaddr *) 0)->sa_family)
const size_t arp_hardware_types_size = ARRAY_SIZE(arp_hardware_types) - 1;
const size_t ethernet_protocols_size = ARRAY_SIZE(ethernet_protocols) - 1;
static void