[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:
@@ -99,18 +99,17 @@ struct tcpip_net_protocol {
|
||||
};
|
||||
|
||||
/** TCP/IP transport-layer protocol table */
|
||||
#define TCPIP_PROTOCOLS "tcpip_protocols"
|
||||
#define TCPIP_PROTOCOLS __table ( struct tcpip_protocol, "tcpip_protocols" )
|
||||
|
||||
/** Declare a TCP/IP transport-layer protocol */
|
||||
#define __tcpip_protocol \
|
||||
__table ( struct tcpip_protocol, TCPIP_PROTOCOLS, 01 )
|
||||
#define __tcpip_protocol __table_entry ( TCPIP_PROTOCOLS, 01 )
|
||||
|
||||
/** TCP/IP network-layer protocol table */
|
||||
#define TCPIP_NET_PROTOCOLS "tcpip_net_protocols"
|
||||
#define TCPIP_NET_PROTOCOLS \
|
||||
__table ( struct tcpip_net_protocol, "tcpip_net_protocols" )
|
||||
|
||||
/** Declare a TCP/IP network-layer protocol */
|
||||
#define __tcpip_net_protocol \
|
||||
__table ( struct tcpip_net_protocol, TCPIP_NET_PROTOCOLS, 01 )
|
||||
#define __tcpip_net_protocol __table_entry ( TCPIP_NET_PROTOCOLS, 01 )
|
||||
|
||||
extern int tcpip_rx ( struct io_buffer *iobuf, uint8_t tcpip_proto,
|
||||
struct sockaddr_tcpip *st_src,
|
||||
|
||||
Reference in New Issue
Block a user