PreviousNext

Binding Data Structure Size Calculation Macros

The following macros are supplied to calculate the size of data types that hold binding information. The macros work with the ERA API data types and their equivalent dce_attr_sch data types.

/*
* SA_BND_INFO_SIZE(N) - calculate the size required
* for a sec_attr_bind_info_t with N bindings.
*/

#define SA_BND_INFO_SIZE(N) ( sizeof(sec_attr_bind_info_t) + \

(((N) - 1) * sizeof(sec_attr_binding_t)) )

* SA_TWR_SET_SIZE(N) - calculate the size required

* for a sec_attr_twr_set_t with N towers.

*/

#define SA_TWR_SET_SIZE(N) ( sizeof(sec_attr_twr_set_t) + \

(((N) - 1) * sizeof(sec_attr_twr_ref_t)) )

/*

* SA_TWR_SIZE(N) - calculate the size required

* for a twr_t with a tower_octet_string of length N.

*/

#define SA_TWR_SIZE(N) ( sizeof(twr_t) + (N) - 1 )