PreviousNext

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.
*/

#define SA_BND_AUTH_INFO_TYPE_VALID(B) ( \

(SA_BND_AUTH_INFO_TYPE(B)) == sec_attr_bind_auth_none || \

(SA_BND_AUTH_INFO_TYPE(B)) == sec_attr_bind_auth_dce ? true : false )

/*

* SA_BND_AUTH_PROT_LEV_VALID(B) - evaluates to TRUE (1)

* if the binding auth_info protect_level is valid; FALSE (0) otherwise.

* B is a pointer to a sec_attr_bind_info_t.

*/

#define SA_BND_AUTH_PROT_LEV_VALID(B) ( \

(SA_BND_AUTH_PROT_LEVEL(B)) == rpc_c_protect_level_default || \

(SA_BND_AUTH_PROT_LEVEL(B)) == rpc_c_protect_level_none || \

(SA_BND_AUTH_PROT_LEVEL(B)) == rpc_c_protect_level_connect || \

(SA_BND_AUTH_PROT_LEVEL(B)) == rpc_c_protect_level_call || \

(SA_BND_AUTH_PROT_LEVEL(B)) == rpc_c_protect_level_pkt || \

(SA_BND_AUTH_PROT_LEVEL(B)) == rpc_c_protect_level_pkt_integ || \

(SA_BND_AUTH_PROT_LEVEL(B)) == rpc_c_protect_level_pkt_privacy ? \

true : false )

/*

* SA_BND_AUTH_AUTHN_SVC_VALID(B) - evaluates to TRUE (1)

* if the binding auth_info authentication service is valid; * FALSE (0) otherwise.

* B is a pointer to a sec_attr_bind_info_t.

*/

#define SA_BND_AUTH_AUTHN_SVC_VALID(B) ( \

(SA_BND_AUTH_AUTHN_SVC(B)) == rpc_c_authn_none || \

(SA_BND_AUTH_AUTHN_SVC(B)) == rpc_c_authn_dce_secret || \

(SA_BND_AUTH_AUTHN_SVC(B)) == rpc_c_authn_dce_public || \

(SA_BND_AUTH_AUTHN_SVC(B)) == rpc_c_authn_dce_dummy || \

(SA_BND_AUTH_AUTHN_SVC(B)) == rpc_c_authn_dssa_public || \

(SA_BND_AUTH_AUTHN_SVC(B)) == rpc_c_authn_default ? \

true : false )

/*

* SA_BND_AUTH_AUTHZ_SVC_VALID(B) - evaluates to TRUE (1)

* if the binding auth_info authorization service is valid; * FALSE (0) otherwise.

* B is a pointer to a sec_attr_bind_info_t.

*/

#define SA_BND_AUTH_AUTHZ_SVC_VALID(B) ( \

(SA_BND_AUTH_AUTHZ_SVC(B)) == rpc_c_authz_none || \

(SA_BND_AUTH_AUTHZ_SVC(B)) == rpc_c_authz_name || \

(SA_BND_AUTH_AUTHZ_SVC(B)) == rpc_c_authz_dce ? \

true : false )