OSF DCE Application Development Guide--Core Components

The Extended Attribute API
(((N) - 1) * sizeof(sec_attr_acl_mgr_info_p_t)) )
28.7.6 Attribute Instance Data Structure Size Calculation Macros
The following macros are supplied to calculate the size of data types that hold attribute
information.
/*
* SA_ATTR_STR_ARRAY_SIZE(N) - calculate the size required
* for a sec_attr_enc_str_array_t with N sec_attr_enc_printstring_p_t-s.
*/
#define SA_ATTR_STR_ARRAY_SIZE(N) ( sizeof(sec_attr_enc_str_array_t) + \
(((N) - 1) * sizeof(sec_attr_enc_printstring_p_t)) )
/*
* SA_ATTR_BYTES_SIZE(N) - calculate the size required
* for a sec_attr_enc_bytes_t with byte string length of N.
*/
#define SA_ATTR_BYTES_SIZE(N) ( sizeof(sec_attr_enc_bytes_t) + (N)-1)
/*
* SA_ATTR_IDATA_SIZE(N) - calculate the size required
* for a sec_attr_i18n_data_t with byte string length of N.
*/
#define SA_ATTR_IDATA_SIZE(N) ( sizeof(sec_attr_i18n_data_t) + (N)-1)
/*
* SA_ATTR_SET_SIZE(N) - calculate the size required
* for a sec_attr_enc_attr_set_t with N members (uuids).
*/
#define SA_ATTR_SET_SIZE(N) ( sizeof(sec_attr_enc_attr_set_t) + \
(((N) - 1) * sizeof(uuid_t)) )
28.7.7 Binding Semantic Check Macros
The following macros are supplied to check the semantics of entries in the binding
fields. The macros work with the ERA API data types and their equivalent
dce_attr_sch data types.
/*
* SA_BND_AUTH_INFO_TYPE_VALID(B) - evaluates to TRUE (1)
* if the binding auth_info type is valid; FALSE (0) otherwise.
* B is a pointer to a sec_attr_bind_info_t.
*/
124245 Tandem Computers Incorporated 28 33