[tables] Incorporate table data type information into table definition

Eliminate the potential for mismatches between table names and the
table entry data type by incorporating the data type into the
definition of the table, rather than specifying it explicitly in each
table accessor method.
This commit is contained in:
Michael Brown
2009-03-13 00:13:38 +00:00
parent 1266d7902b
commit 3c68ff99ea
26 changed files with 185 additions and 130 deletions

View File

@@ -900,8 +900,8 @@ int dhcp_create_request ( struct dhcp_packet *dhcppkt,
dhcppkt->dhcphdr->ciaddr = ciaddr;
/* Add options to identify the feature list */
dhcp_features = table_start ( uint8_t, DHCP_FEATURES );
dhcp_features_len = table_num_entries ( uint8_t, DHCP_FEATURES );
dhcp_features = table_start ( DHCP_FEATURES );
dhcp_features_len = table_num_entries ( DHCP_FEATURES );
if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_EB_ENCAP, dhcp_features,
dhcp_features_len ) ) != 0 ) {
DBG ( "DHCP could not set features list option: %s\n",