/* * Please do not edit this file. * It was generated using rpcgen. */ #ifndef _IDMAP_PROT_H_RPCGEN #define _IDMAP_PROT_H_RPCGEN #include #ifndef _KERNEL #include #include #endif /* !_KERNEL */ #ifdef __cplusplus extern "C" { #endif #if defined(_KERNEL) #include #else #include #endif typedef nvlist_t *nvlist_t_ptr; typedef char *idmap_utf8str; typedef struct { u_int idmap_utf8str_list_len; idmap_utf8str *idmap_utf8str_list_val; } idmap_utf8str_list; typedef int idmap_retcode; enum idmap_id_type { IDMAP_NONE = 0, IDMAP_UID = 1, IDMAP_GID = 1 + 1, IDMAP_SID = 1 + 2, IDMAP_USID = 1 + 3, IDMAP_GSID = 1 + 4, IDMAP_POSIXID = 1 + 5 }; typedef enum idmap_id_type idmap_id_type; enum idmap_map_type { IDMAP_MAP_TYPE_UNKNOWN = 0, IDMAP_MAP_TYPE_DS_AD = 0 + 1, IDMAP_MAP_TYPE_DS_NLDAP = 0 + 2, IDMAP_MAP_TYPE_RULE_BASED = 0 + 3, IDMAP_MAP_TYPE_EPHEMERAL = 0 + 4, IDMAP_MAP_TYPE_LOCAL_SID = 0 + 5, IDMAP_MAP_TYPE_KNOWN_SID = 0 + 6, IDMAP_MAP_TYPE_IDMU = 0 + 7 }; typedef enum idmap_map_type idmap_map_type; enum idmap_map_src { IDMAP_MAP_SRC_UNKNOWN = 0, IDMAP_MAP_SRC_NEW = 0 + 1, IDMAP_MAP_SRC_CACHE = 0 + 2, IDMAP_MAP_SRC_HARD_CODED = 0 + 3, IDMAP_MAP_SRC_ALGORITHMIC = 0 + 4 }; typedef enum idmap_map_src idmap_map_src; struct idmap_sid { char *prefix; uint32_t rid; }; typedef struct idmap_sid idmap_sid; struct idmap_id { idmap_id_type idtype; union { uint32_t uid; uint32_t gid; idmap_sid sid; idmap_sid usid; idmap_sid gsid; } idmap_id_u; }; typedef struct idmap_id idmap_id; struct idmap_namerule { bool_t is_user; bool_t is_wuser; int direction; idmap_utf8str windomain; idmap_utf8str winname; idmap_utf8str unixname; bool_t is_nt4; }; typedef struct idmap_namerule idmap_namerule; struct idmap_namerules_res { idmap_retcode retcode; uint64_t lastrowid; struct { u_int rules_len; idmap_namerule *rules_val; } rules; }; typedef struct idmap_namerules_res idmap_namerules_res; struct idmap_how_ds_based { idmap_utf8str dn; idmap_utf8str attr; idmap_utf8str value; }; typedef struct idmap_how_ds_based idmap_how_ds_based; struct idmap_how { idmap_map_type map_type; union { idmap_how_ds_based ad; idmap_how_ds_based nldap; idmap_namerule rule; idmap_how_ds_based idmu; } idmap_how_u; }; typedef struct idmap_how idmap_how; struct idmap_info { idmap_map_src src; idmap_how how; nvlist_t_ptr trace; }; typedef struct idmap_info idmap_info; struct idmap_id_res { idmap_retcode retcode; idmap_id id; int direction; idmap_info info; }; typedef struct idmap_id_res idmap_id_res; struct idmap_ids_res { idmap_retcode retcode; struct { u_int ids_len; idmap_id_res *ids_val; } ids; }; typedef struct idmap_ids_res idmap_ids_res; #define IDMAP_REQ_FLG_NO_NEW_ID_ALLOC 0x00000001 #define IDMAP_REQ_FLG_VALIDATE 0x00000002 #define IDMAP_REQ_FLG_NO_NAMESERVICE 0x00000004 #define IDMAP_REQ_FLG_MAPPING_INFO 0x00000008 #define IDMAP_REQ_FLG_WK_OR_LOCAL_SIDS_ONLY 0x00000020 #define IDMAP_REQ_FLG_TRACE 0x00000040 #define IDMAP_DIRECTION_UNDEF -1 #define IDMAP_DIRECTION_BI 0 #define IDMAP_DIRECTION_W2U 1 #define IDMAP_DIRECTION_U2W 2 struct idmap_mapping { int32_t flag; int direction; idmap_id id1; idmap_utf8str id1domain; idmap_utf8str id1name; idmap_id id2; idmap_utf8str id2domain; idmap_utf8str id2name; idmap_info info; }; typedef struct idmap_mapping idmap_mapping; typedef struct { u_int idmap_mapping_batch_len; idmap_mapping *idmap_mapping_batch_val; } idmap_mapping_batch; struct idmap_mappings_res { idmap_retcode retcode; uint64_t lastrowid; struct { u_int mappings_len; idmap_mapping *mappings_val; } mappings; }; typedef struct idmap_mappings_res idmap_mappings_res; struct idmap_update_res { idmap_retcode retcode; int64_t error_index; idmap_namerule error_rule; idmap_namerule conflict_rule; }; typedef struct idmap_update_res idmap_update_res; enum idmap_opnum { OP_NONE = 0, OP_ADD_NAMERULE = 1, OP_RM_NAMERULE = 2, OP_FLUSH_NAMERULES = 3 }; typedef enum idmap_opnum idmap_opnum; struct idmap_update_op { idmap_opnum opnum; union { idmap_namerule rule; } idmap_update_op_u; }; typedef struct idmap_update_op idmap_update_op; typedef struct { u_int idmap_update_batch_len; idmap_update_op *idmap_update_batch_val; } idmap_update_batch; #define AD_DISC_MAXHOSTNAME 256 struct idmap_ad_disc_ds_t { int port; int priority; int weight; char host[AD_DISC_MAXHOSTNAME]; }; typedef struct idmap_ad_disc_ds_t idmap_ad_disc_ds_t; enum idmap_prop_type { PROP_UNKNOWN = 0, PROP_LIST_SIZE_LIMIT = 1, PROP_DEFAULT_DOMAIN = 2, PROP_DOMAIN_NAME = 3, PROP_MACHINE_SID = 4, PROP_DOMAIN_CONTROLLER = 5, PROP_FOREST_NAME = 6, PROP_SITE_NAME = 7, PROP_GLOBAL_CATALOG = 8, PROP_AD_UNIXUSER_ATTR = 9, PROP_AD_UNIXGROUP_ATTR = 10, PROP_NLDAP_WINNAME_ATTR = 11, PROP_DIRECTORY_BASED_MAPPING = 12 }; typedef enum idmap_prop_type idmap_prop_type; struct idmap_prop_val { idmap_prop_type prop; union { uint64_t intval; idmap_utf8str utf8val; idmap_ad_disc_ds_t dsval; } idmap_prop_val_u; }; typedef struct idmap_prop_val idmap_prop_val; struct idmap_prop_res { idmap_retcode retcode; idmap_prop_val value; bool_t auto_discovered; }; typedef struct idmap_prop_res idmap_prop_res; enum idmap_flush_op { IDMAP_FLUSH_EXPIRE = 0, IDMAP_FLUSH_DELETE = 1 }; typedef enum idmap_flush_op idmap_flush_op; struct directory_error_rpc { idmap_utf8str code; idmap_utf8str fmt; struct { u_int params_len; idmap_utf8str *params_val; } params; }; typedef struct directory_error_rpc directory_error_rpc; typedef struct { u_int directory_value_rpc_len; char *directory_value_rpc_val; } directory_value_rpc; struct directory_values_rpc { bool_t found; union { struct { u_int values_len; directory_value_rpc *values_val; } values; } directory_values_rpc_u; }; typedef struct directory_values_rpc directory_values_rpc; enum directory_lookup_status_rpc { DIRECTORY_NOT_FOUND = 0, DIRECTORY_FOUND = 1, DIRECTORY_ERROR = 2 }; typedef enum directory_lookup_status_rpc directory_lookup_status_rpc; struct directory_entry_rpc { directory_lookup_status_rpc status; union { struct { u_int attrs_len; directory_values_rpc *attrs_val; } attrs; directory_error_rpc err; } directory_entry_rpc_u; }; typedef struct directory_entry_rpc directory_entry_rpc; struct directory_results_rpc { bool_t failed; union { directory_error_rpc err; struct { u_int entries_len; directory_entry_rpc *entries_val; } entries; } directory_results_rpc_u; }; typedef struct directory_results_rpc directory_results_rpc; struct idmap_list_mappings_1_argument { int64_t lastrowid; uint64_t limit; int32_t flag; }; typedef struct idmap_list_mappings_1_argument idmap_list_mappings_1_argument; struct idmap_list_namerules_1_argument { idmap_namerule rule; uint64_t lastrowid; uint64_t limit; }; typedef struct idmap_list_namerules_1_argument idmap_list_namerules_1_argument; struct directory_get_common_1_argument { idmap_utf8str_list ids; idmap_utf8str types; idmap_utf8str_list attrs; }; typedef struct directory_get_common_1_argument directory_get_common_1_argument; #define IDMAP_PROG 100172 #define IDMAP_V1 1 #if defined(__STDC__) || defined(__cplusplus) #define IDMAP_NULL 0 extern enum clnt_stat idmap_null_1(void *, CLIENT *); extern bool_t idmap_null_1_svc(void *, struct svc_req *); #define IDMAP_GET_MAPPED_IDS 1 extern enum clnt_stat idmap_get_mapped_ids_1(idmap_mapping_batch , idmap_ids_res *, CLIENT *); extern bool_t idmap_get_mapped_ids_1_svc(idmap_mapping_batch , idmap_ids_res *, struct svc_req *); #define IDMAP_LIST_MAPPINGS 2 extern enum clnt_stat idmap_list_mappings_1(int64_t , uint64_t , int32_t , idmap_mappings_res *, CLIENT *); extern bool_t idmap_list_mappings_1_svc(int64_t , uint64_t , int32_t , idmap_mappings_res *, struct svc_req *); #define IDMAP_LIST_NAMERULES 3 extern enum clnt_stat idmap_list_namerules_1(idmap_namerule , uint64_t , uint64_t , idmap_namerules_res *, CLIENT *); extern bool_t idmap_list_namerules_1_svc(idmap_namerule , uint64_t , uint64_t , idmap_namerules_res *, struct svc_req *); #define IDMAP_UPDATE 4 extern enum clnt_stat idmap_update_1(idmap_update_batch , idmap_update_res *, CLIENT *); extern bool_t idmap_update_1_svc(idmap_update_batch , idmap_update_res *, struct svc_req *); #define IDMAP_GET_MAPPED_ID_BY_NAME 5 extern enum clnt_stat idmap_get_mapped_id_by_name_1(idmap_mapping , idmap_mappings_res *, CLIENT *); extern bool_t idmap_get_mapped_id_by_name_1_svc(idmap_mapping , idmap_mappings_res *, struct svc_req *); #define IDMAP_GET_PROP 6 extern enum clnt_stat idmap_get_prop_1(idmap_prop_type , idmap_prop_res *, CLIENT *); extern bool_t idmap_get_prop_1_svc(idmap_prop_type , idmap_prop_res *, struct svc_req *); #define DIRECTORY_GET_COMMON 7 extern enum clnt_stat directory_get_common_1(idmap_utf8str_list , idmap_utf8str , idmap_utf8str_list , directory_results_rpc *, CLIENT *); extern bool_t directory_get_common_1_svc(idmap_utf8str_list , idmap_utf8str , idmap_utf8str_list , directory_results_rpc *, struct svc_req *); #define IDMAP_FLUSH 8 extern enum clnt_stat idmap_flush_1(idmap_flush_op , idmap_retcode *, CLIENT *); extern bool_t idmap_flush_1_svc(idmap_flush_op , idmap_retcode *, struct svc_req *); extern int idmap_prog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t); #else /* K&R C */ #define IDMAP_NULL 0 extern enum clnt_stat idmap_null_1(); extern bool_t idmap_null_1_svc(); #define IDMAP_GET_MAPPED_IDS 1 extern enum clnt_stat idmap_get_mapped_ids_1(); extern bool_t idmap_get_mapped_ids_1_svc(); #define IDMAP_LIST_MAPPINGS 2 extern enum clnt_stat idmap_list_mappings_1(); extern bool_t idmap_list_mappings_1_svc(); #define IDMAP_LIST_NAMERULES 3 extern enum clnt_stat idmap_list_namerules_1(); extern bool_t idmap_list_namerules_1_svc(); #define IDMAP_UPDATE 4 extern enum clnt_stat idmap_update_1(); extern bool_t idmap_update_1_svc(); #define IDMAP_GET_MAPPED_ID_BY_NAME 5 extern enum clnt_stat idmap_get_mapped_id_by_name_1(); extern bool_t idmap_get_mapped_id_by_name_1_svc(); #define IDMAP_GET_PROP 6 extern enum clnt_stat idmap_get_prop_1(); extern bool_t idmap_get_prop_1_svc(); #define DIRECTORY_GET_COMMON 7 extern enum clnt_stat directory_get_common_1(); extern bool_t directory_get_common_1_svc(); #define IDMAP_FLUSH 8 extern enum clnt_stat idmap_flush_1(); extern bool_t idmap_flush_1_svc(); extern int idmap_prog_1_freeresult(); #endif /* K&R C */ /* the xdr functions */ #if defined(__STDC__) || defined(__cplusplus) extern bool_t xdr_idmap_utf8str(XDR *, idmap_utf8str*); extern bool_t xdr_idmap_utf8str_list(XDR *, idmap_utf8str_list*); extern bool_t xdr_idmap_retcode(XDR *, idmap_retcode*); extern bool_t xdr_idmap_id_type(XDR *, idmap_id_type*); extern bool_t xdr_idmap_map_type(XDR *, idmap_map_type*); extern bool_t xdr_idmap_map_src(XDR *, idmap_map_src*); extern bool_t xdr_idmap_sid(XDR *, idmap_sid*); extern bool_t xdr_idmap_id(XDR *, idmap_id*); extern bool_t xdr_idmap_namerule(XDR *, idmap_namerule*); extern bool_t xdr_idmap_namerules_res(XDR *, idmap_namerules_res*); extern bool_t xdr_idmap_how_ds_based(XDR *, idmap_how_ds_based*); extern bool_t xdr_idmap_how(XDR *, idmap_how*); extern bool_t xdr_idmap_info(XDR *, idmap_info*); extern bool_t xdr_idmap_id_res(XDR *, idmap_id_res*); extern bool_t xdr_idmap_ids_res(XDR *, idmap_ids_res*); extern bool_t xdr_idmap_mapping(XDR *, idmap_mapping*); extern bool_t xdr_idmap_mapping_batch(XDR *, idmap_mapping_batch*); extern bool_t xdr_idmap_mappings_res(XDR *, idmap_mappings_res*); extern bool_t xdr_idmap_update_res(XDR *, idmap_update_res*); extern bool_t xdr_idmap_opnum(XDR *, idmap_opnum*); extern bool_t xdr_idmap_update_op(XDR *, idmap_update_op*); extern bool_t xdr_idmap_update_batch(XDR *, idmap_update_batch*); extern bool_t xdr_idmap_ad_disc_ds_t(XDR *, idmap_ad_disc_ds_t*); extern bool_t xdr_idmap_prop_type(XDR *, idmap_prop_type*); extern bool_t xdr_idmap_prop_val(XDR *, idmap_prop_val*); extern bool_t xdr_idmap_prop_res(XDR *, idmap_prop_res*); extern bool_t xdr_idmap_flush_op(XDR *, idmap_flush_op*); extern bool_t xdr_directory_error_rpc(XDR *, directory_error_rpc*); extern bool_t xdr_directory_value_rpc(XDR *, directory_value_rpc*); extern bool_t xdr_directory_values_rpc(XDR *, directory_values_rpc*); extern bool_t xdr_directory_lookup_status_rpc(XDR *, directory_lookup_status_rpc*); extern bool_t xdr_directory_entry_rpc(XDR *, directory_entry_rpc*); extern bool_t xdr_directory_results_rpc(XDR *, directory_results_rpc*); extern bool_t xdr_idmap_list_mappings_1_argument(XDR *, idmap_list_mappings_1_argument*); extern bool_t xdr_idmap_list_namerules_1_argument(XDR *, idmap_list_namerules_1_argument*); extern bool_t xdr_directory_get_common_1_argument(XDR *, directory_get_common_1_argument*); #else /* K&R C */ extern bool_t xdr_idmap_utf8str(); extern bool_t xdr_idmap_utf8str_list(); extern bool_t xdr_idmap_retcode(); extern bool_t xdr_idmap_id_type(); extern bool_t xdr_idmap_map_type(); extern bool_t xdr_idmap_map_src(); extern bool_t xdr_idmap_sid(); extern bool_t xdr_idmap_id(); extern bool_t xdr_idmap_namerule(); extern bool_t xdr_idmap_namerules_res(); extern bool_t xdr_idmap_how_ds_based(); extern bool_t xdr_idmap_how(); extern bool_t xdr_idmap_info(); extern bool_t xdr_idmap_id_res(); extern bool_t xdr_idmap_ids_res(); extern bool_t xdr_idmap_mapping(); extern bool_t xdr_idmap_mapping_batch(); extern bool_t xdr_idmap_mappings_res(); extern bool_t xdr_idmap_update_res(); extern bool_t xdr_idmap_opnum(); extern bool_t xdr_idmap_update_op(); extern bool_t xdr_idmap_update_batch(); extern bool_t xdr_idmap_ad_disc_ds_t(); extern bool_t xdr_idmap_prop_type(); extern bool_t xdr_idmap_prop_val(); extern bool_t xdr_idmap_prop_res(); extern bool_t xdr_idmap_flush_op(); extern bool_t xdr_directory_error_rpc(); extern bool_t xdr_directory_value_rpc(); extern bool_t xdr_directory_values_rpc(); extern bool_t xdr_directory_lookup_status_rpc(); extern bool_t xdr_directory_entry_rpc(); extern bool_t xdr_directory_results_rpc(); extern bool_t xdr_idmap_list_mappings_1_argument(); extern bool_t xdr_idmap_list_namerules_1_argument(); extern bool_t xdr_directory_get_common_1_argument(); #endif /* K&R C */ #ifdef __cplusplus } #endif #endif /* !_IDMAP_PROT_H_RPCGEN */