Where Online Learning is simpler!
The C and C++ Include Header Files
/usr/include/tirpc/rpc/rpcsec_gss.h
$ cat -n /usr/include/tirpc/rpc/rpcsec_gss.h 1 /* 2 * Copyright (c) 2013, Oracle America, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * - Redistributions of source code must retain the above copyright notice, 8 * this list of conditions and the following disclaimer. 9 * - Redistributions in binary form must reproduce the above copyright notice, 10 * this list of conditions and the following disclaimer in the documentation 11 * and/or other materials provided with the distribution. 12 * - Neither the name of "Oracle America, Inc." nor the names of its 13 * contributors may be used to endorse or promote products derived 14 * from this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 * POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 #ifndef _TIRPC_RPCSEC_GSS_H 30 #define _TIRPC_RPCSEC_GSS_H 31 32 #include
33 34 #include
35 #include
36 37 #include
38 39 typedef enum { 40 rpcsec_gss_svc_default = 0, 41 rpcsec_gss_svc_none = 1, 42 rpcsec_gss_svc_integrity = 2, 43 rpcsec_gss_svc_privacy = 3 44 } rpc_gss_service_t; 45 46 typedef struct { 47 int len; 48 char name[1]; 49 } *rpc_gss_principal_t; 50 51 typedef struct { 52 int req_flags; 53 int time_req; 54 gss_cred_id_t my_cred; 55 gss_channel_bindings_t input_channel_bindings; 56 } rpc_gss_options_req_t; 57 58 #define MAX_GSS_MECH 128 59 typedef struct { 60 int major_status; 61 int minor_status; 62 u_int rpcsec_version; 63 int ret_flags; 64 int time_ret; 65 gss_ctx_id_t gss_context; 66 char actual_mechanism[MAX_GSS_MECH]; 67 } rpc_gss_options_ret_t; 68 69 typedef struct { 70 u_int version; 71 char *mechanism; 72 char *qop; 73 rpc_gss_principal_t client_principal; 74 char *svc_principal; 75 rpc_gss_service_t service; 76 } rpc_gss_rawcred_t; 77 78 typedef struct { 79 uid_t uid; 80 gid_t gid; 81 short gidlen; 82 gid_t *gidlist; 83 } rpc_gss_ucred_t; 84 85 typedef struct { 86 bool_t locked; 87 rpc_gss_rawcred_t *raw_cred; 88 } rpc_gss_lock_t; 89 90 typedef struct { 91 u_int program; 92 u_int version; 93 bool_t (*callback)(struct svc_req *, 94 gss_cred_id_t, gss_ctx_id_t, 95 rpc_gss_lock_t *, void **); 96 } rpc_gss_callback_t; 97 98 typedef struct { 99 int rpc_gss_error; 100 int system_error; 101 } rpc_gss_error_t; 102 #define RPC_GSS_ER_SUCCESS 0 103 #define RPC_GSS_ER_SYSTEMERROR 1 104 105 typedef gss_OID_desc rpc_gss_OID_desc; 106 typedef rpc_gss_OID_desc *rpc_gss_OID; 107 108 109 #ifdef __cplusplus 110 extern "C" { 111 #endif 112 113 AUTH *rpc_gss_seccreate(CLIENT *, char *, char *, rpc_gss_service_t, 114 char *, rpc_gss_options_req_t *, 115 rpc_gss_options_ret_t *); 116 bool_t rpc_gss_set_defaults(AUTH *, rpc_gss_service_t, char *); 117 int rpc_gss_max_data_length(AUTH *, int); 118 int rpc_gss_svc_max_data_length(struct svc_req *, int); 119 bool_t rpc_gss_set_svc_name(char *, char *, u_int, u_int, u_int); 120 bool_t rpc_gss_getcred(struct svc_req *, rpc_gss_rawcred_t **, 121 rpc_gss_ucred_t **, void **); 122 bool_t rpc_gss_set_callback(rpc_gss_callback_t *); 123 bool_t rpc_gss_get_principal_name(rpc_gss_principal_t *, char *, 124 char *, char *, char *); 125 void rpc_gss_get_error(rpc_gss_error_t *); 126 char **rpc_gss_get_mechanisms(void); 127 char **rpc_gss_get_mech_info(char *, rpc_gss_service_t *); 128 bool_t rpc_gss_get_versions(u_int *, u_int *); 129 bool_t rpc_gss_is_installed(char *); 130 bool_t rpc_gss_mech_to_oid(char *, rpc_gss_OID *); 131 bool_t rpc_gss_qop_to_num(char *, char *, u_int *); 132 133 #ifdef __cplusplus 134 } 135 #endif 136 137 #endif /* !_TIRPC_RPCSEC_GSS_H */
Contact us
|
About us
|
Term of use
|
Copyright © 2000-2025 MyWebUniversity.com ™