/*1* Copyright (C) The Internet Society (2000). All Rights Reserved.2*3* This document and translations of it may be copied and furnished to4* others, and derivative works that comment on or otherwise explain it5* or assist in its implementation may be prepared, copied, published6* and distributed, in whole or in part, without restriction of any7* kind, provided that the above copyright notice and this paragraph are8* included on all such copies and derivative works. However, this9* document itself may not be modified in any way, such as by removing10* the copyright notice or references to the Internet Society or other11* Internet organizations, except as needed for the purpose of12* developing Internet standards in which case the procedures for13* copyrights defined in the Internet Standards process must be14* followed, or as required to translate it into languages other than15* English.16*17* The limited permissions granted above are perpetual and will not be18* revoked by the Internet Society or its successors or assigns.19*20* This document and the information contained herein is provided on an21* "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING22* TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING23* BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION24* HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF25* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.26*/2728#ifndef _KGSSAPI_GSSAPI_H_29#define _KGSSAPI_GSSAPI_H_3031/*32* A cut-down version of the GSS-API for in-kernel use33*/3435/*36* Now define the three implementation-dependent types.37*/38typedef struct _gss_ctx_id_t *gss_ctx_id_t;39typedef struct _gss_cred_id_t *gss_cred_id_t;40typedef struct _gss_name_t *gss_name_t;4142/*43* We can't use X/Open definitions, so roll our own.44*/45typedef uint32_t OM_uint32;46typedef uint64_t OM_uint64;4748typedef struct gss_OID_desc_struct {49OM_uint32 length;50void *elements;51} gss_OID_desc, *gss_OID;5253typedef struct gss_OID_set_desc_struct {54size_t count;55gss_OID elements;56} gss_OID_set_desc, *gss_OID_set;5758typedef struct gss_buffer_desc_struct {59size_t length;60void *value;61} gss_buffer_desc, *gss_buffer_t;6263typedef struct gss_channel_bindings_struct {64OM_uint32 initiator_addrtype;65gss_buffer_desc initiator_address;66OM_uint32 acceptor_addrtype;67gss_buffer_desc acceptor_address;68gss_buffer_desc application_data;69} *gss_channel_bindings_t;7071/*72* For now, define a QOP-type as an OM_uint3273*/74typedef OM_uint32 gss_qop_t;7576typedef int gss_cred_usage_t;7778/*79* Flag bits for context-level services.80*/81#define GSS_C_DELEG_FLAG 182#define GSS_C_MUTUAL_FLAG 283#define GSS_C_REPLAY_FLAG 484#define GSS_C_SEQUENCE_FLAG 885#define GSS_C_CONF_FLAG 1686#define GSS_C_INTEG_FLAG 3287#define GSS_C_ANON_FLAG 6488#define GSS_C_PROT_READY_FLAG 12889#define GSS_C_TRANS_FLAG 2569091/*92* Credential usage options93*/94#define GSS_C_BOTH 095#define GSS_C_INITIATE 196#define GSS_C_ACCEPT 29798/*99* Status code types for gss_display_status100*/101#define GSS_C_GSS_CODE 1102#define GSS_C_MECH_CODE 2103104/*105* The constant definitions for channel-bindings address families106*/107#define GSS_C_AF_UNSPEC 0108#define GSS_C_AF_LOCAL 1109#define GSS_C_AF_INET 2110#define GSS_C_AF_IMPLINK 3111#define GSS_C_AF_PUP 4112#define GSS_C_AF_CHAOS 5113#define GSS_C_AF_NS 6114#define GSS_C_AF_NBS 7115#define GSS_C_AF_ECMA 8116#define GSS_C_AF_DATAKIT 9117#define GSS_C_AF_CCITT 10118#define GSS_C_AF_SNA 11119#define GSS_C_AF_DECnet 12120#define GSS_C_AF_DLI 13121#define GSS_C_AF_LAT 14122#define GSS_C_AF_HYLINK 15123#define GSS_C_AF_APPLETALK 16124#define GSS_C_AF_BSC 17125#define GSS_C_AF_DSS 18126#define GSS_C_AF_OSI 19127#define GSS_C_AF_X25 21128#define GSS_C_AF_NULLADDR 255129130/*131* Various Null values132*/133#define GSS_C_NO_NAME ((gss_name_t) 0)134#define GSS_C_NO_BUFFER ((gss_buffer_t) 0)135#define GSS_C_NO_OID ((gss_OID) 0)136#define GSS_C_NO_OID_SET ((gss_OID_set) 0)137#define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0)138#define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0)139#define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0)140#define GSS_C_EMPTY_BUFFER {0, NULL}141142/*143* Some alternate names for a couple of the above144* values. These are defined for V1 compatibility.145*/146#define GSS_C_NULL_OID GSS_C_NO_OID147#define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET148149/*150* Define the default Quality of Protection for per-message151* services. Note that an implementation that offers multiple152* levels of QOP may define GSS_C_QOP_DEFAULT to be either zero153* (as done here) to mean "default protection", or to a specific154* explicit QOP value. However, a value of 0 should always be155* interpreted by a GSS-API implementation as a request for the156* default protection level.157*/158#define GSS_C_QOP_DEFAULT 0159160/*161* Expiration time of 2^32-1 seconds means infinite lifetime for a162* credential or security context163*/164#define GSS_C_INDEFINITE 0xfffffffful165166/*167* The implementation must reserve static storage for a168* gss_OID_desc object containing the value169* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"170* "\x01\x02\x01\x01"},171* corresponding to an object-identifier value of172* {iso(1) member-body(2) United States(840) mit(113554)173* infosys(1) gssapi(2) generic(1) user_name(1)}. The constant174* GSS_C_NT_USER_NAME should be initialized to point175* to that gss_OID_desc.176*/177extern gss_OID GSS_C_NT_USER_NAME;178179/*180* The implementation must reserve static storage for a181* gss_OID_desc object containing the value182* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"183* "\x01\x02\x01\x02"},184* corresponding to an object-identifier value of185* {iso(1) member-body(2) United States(840) mit(113554)186* infosys(1) gssapi(2) generic(1) machine_uid_name(2)}.187* The constant GSS_C_NT_MACHINE_UID_NAME should be188* initialized to point to that gss_OID_desc.189*/190extern gss_OID GSS_C_NT_MACHINE_UID_NAME;191192/*193* The implementation must reserve static storage for a194* gss_OID_desc object containing the value195* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"196* "\x01\x02\x01\x03"},197* corresponding to an object-identifier value of198* {iso(1) member-body(2) United States(840) mit(113554)199* infosys(1) gssapi(2) generic(1) string_uid_name(3)}.200* The constant GSS_C_NT_STRING_UID_NAME should be201* initialized to point to that gss_OID_desc.202*/203extern gss_OID GSS_C_NT_STRING_UID_NAME;204205/*206* The implementation must reserve static storage for a207* gss_OID_desc object containing the value208* {6, (void *)"\x2b\x06\x01\x05\x06\x02"},209* corresponding to an object-identifier value of210* {iso(1) org(3) dod(6) internet(1) security(5)211* nametypes(6) gss-host-based-services(2)). The constant212* GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point213* to that gss_OID_desc. This is a deprecated OID value, and214* implementations wishing to support hostbased-service names215* should instead use the GSS_C_NT_HOSTBASED_SERVICE OID,216* defined below, to identify such names;217* GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym218* for GSS_C_NT_HOSTBASED_SERVICE when presented as an input219* parameter, but should not be emitted by GSS-API220* implementations221*/222extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X;223224/*225* The implementation must reserve static storage for a226* gss_OID_desc object containing the value227* {10, (void *)"\x2a\x86\x48\x86\xf7\x12"228* "\x01\x02\x01\x04"}, corresponding to an229* object-identifier value of {iso(1) member-body(2)230* Unites States(840) mit(113554) infosys(1) gssapi(2)231* generic(1) service_name(4)}. The constant232* GSS_C_NT_HOSTBASED_SERVICE should be initialized233* to point to that gss_OID_desc.234*/235extern gss_OID GSS_C_NT_HOSTBASED_SERVICE;236237/*238* The implementation must reserve static storage for a239* gss_OID_desc object containing the value240* {6, (void *)"\x2b\x06\01\x05\x06\x03"},241* corresponding to an object identifier value of242* {1(iso), 3(org), 6(dod), 1(internet), 5(security),243* 6(nametypes), 3(gss-anonymous-name)}. The constant244* and GSS_C_NT_ANONYMOUS should be initialized to point245* to that gss_OID_desc.246*/247extern gss_OID GSS_C_NT_ANONYMOUS;248249/*250* The implementation must reserve static storage for a251* gss_OID_desc object containing the value252* {6, (void *)"\x2b\x06\x01\x05\x06\x04"},253* corresponding to an object-identifier value of254* {1(iso), 3(org), 6(dod), 1(internet), 5(security),255* 6(nametypes), 4(gss-api-exported-name)}. The constant256* GSS_C_NT_EXPORT_NAME should be initialized to point257* to that gss_OID_desc.258*/259extern gss_OID GSS_C_NT_EXPORT_NAME;260261/*262* This name form shall be represented by the Object Identifier {iso(1)263* member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)264* krb5(2) krb5_name(1)}. The recommended symbolic name for this type265* is "GSS_KRB5_NT_PRINCIPAL_NAME".266*/267extern gss_OID GSS_KRB5_NT_PRINCIPAL_NAME;268269/*270* This name form shall be represented by the Object Identifier {iso(1)271* member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)272* generic(1) user_name(1)}. The recommended symbolic name for this273* type is "GSS_KRB5_NT_USER_NAME".274*/275extern gss_OID GSS_KRB5_NT_USER_NAME;276277/*278* This name form shall be represented by the Object Identifier {iso(1)279* member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)280* generic(1) machine_uid_name(2)}. The recommended symbolic name for281* this type is "GSS_KRB5_NT_MACHINE_UID_NAME".282*/283extern gss_OID GSS_KRB5_NT_MACHINE_UID_NAME;284285/*286* This name form shall be represented by the Object Identifier {iso(1)287* member-body(2) United States(840) mit(113554) infosys(1) gssapi(2)288* generic(1) string_uid_name(3)}. The recommended symbolic name for289* this type is "GSS_KRB5_NT_STRING_UID_NAME".290*/291extern gss_OID GSS_KRB5_NT_STRING_UID_NAME;292293/* Major status codes */294295#define GSS_S_COMPLETE 0296297/*298* Some "helper" definitions to make the status code macros obvious.299*/300#define GSS_C_CALLING_ERROR_OFFSET 24301#define GSS_C_ROUTINE_ERROR_OFFSET 16302#define GSS_C_SUPPLEMENTARY_OFFSET 0303#define GSS_C_CALLING_ERROR_MASK 0377ul304#define GSS_C_ROUTINE_ERROR_MASK 0377ul305#define GSS_C_SUPPLEMENTARY_MASK 0177777ul306307/*308* The macros that test status codes for error conditions.309* Note that the GSS_ERROR() macro has changed slightly from310* the V1 GSS-API so that it now evaluates its argument311* only once.312*/313#define GSS_CALLING_ERROR(x) \314(x & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))315#define GSS_ROUTINE_ERROR(x) \316(x & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))317#define GSS_SUPPLEMENTARY_INFO(x) \318(x & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))319#define GSS_ERROR(x) \320(x & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \321(GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))322323/*324* Now the actual status code definitions325*/326327/*328* Calling errors:329*/330#define GSS_S_CALL_INACCESSIBLE_READ \331(1ul << GSS_C_CALLING_ERROR_OFFSET)332#define GSS_S_CALL_INACCESSIBLE_WRITE \333(2ul << GSS_C_CALLING_ERROR_OFFSET)334#define GSS_S_CALL_BAD_STRUCTURE \335(3ul << GSS_C_CALLING_ERROR_OFFSET)336337/*338* Routine errors:339*/340#define GSS_S_BAD_MECH (1ul << GSS_C_ROUTINE_ERROR_OFFSET)341#define GSS_S_BAD_NAME (2ul << GSS_C_ROUTINE_ERROR_OFFSET)342#define GSS_S_BAD_NAMETYPE (3ul << GSS_C_ROUTINE_ERROR_OFFSET)343#define GSS_S_BAD_BINDINGS (4ul << GSS_C_ROUTINE_ERROR_OFFSET)344#define GSS_S_BAD_STATUS (5ul << GSS_C_ROUTINE_ERROR_OFFSET)345#define GSS_S_BAD_SIG (6ul << GSS_C_ROUTINE_ERROR_OFFSET)346#define GSS_S_BAD_MIC GSS_S_BAD_SIG347#define GSS_S_NO_CRED (7ul << GSS_C_ROUTINE_ERROR_OFFSET)348#define GSS_S_NO_CONTEXT (8ul << GSS_C_ROUTINE_ERROR_OFFSET)349#define GSS_S_DEFECTIVE_TOKEN (9ul << GSS_C_ROUTINE_ERROR_OFFSET)350#define GSS_S_DEFECTIVE_CREDENTIAL (10ul << GSS_C_ROUTINE_ERROR_OFFSET)351#define GSS_S_CREDENTIALS_EXPIRED (11ul << GSS_C_ROUTINE_ERROR_OFFSET)352#define GSS_S_CONTEXT_EXPIRED (12ul << GSS_C_ROUTINE_ERROR_OFFSET)353#define GSS_S_FAILURE (13ul << GSS_C_ROUTINE_ERROR_OFFSET)354#define GSS_S_BAD_QOP (14ul << GSS_C_ROUTINE_ERROR_OFFSET)355#define GSS_S_UNAUTHORIZED (15ul << GSS_C_ROUTINE_ERROR_OFFSET)356#define GSS_S_UNAVAILABLE (16ul << GSS_C_ROUTINE_ERROR_OFFSET)357#define GSS_S_DUPLICATE_ELEMENT (17ul << GSS_C_ROUTINE_ERROR_OFFSET)358#define GSS_S_NAME_NOT_MN (18ul << GSS_C_ROUTINE_ERROR_OFFSET)359360/*361* Supplementary info bits:362*/363#define GSS_S_CONTINUE_NEEDED \364(1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 0))365#define GSS_S_DUPLICATE_TOKEN \366(1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 1))367#define GSS_S_OLD_TOKEN \368(1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 2))369#define GSS_S_UNSEQ_TOKEN \370(1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 3))371#define GSS_S_GAP_TOKEN \372(1ul << (GSS_C_SUPPLEMENTARY_OFFSET + 4))373374/*375* NI_MAXSERV and NI_MAXHOST. The srv_principal argument for376* rpc_gss_ip_to_srv_principal should point to at least377* NI_MAXSERV + NI_MAXHOST + 1 bytes of storage. The "+ 1" is for the '@'.378* The NI_MAXHOST limit is checked for gss_ip_to_dns().379* These should be set to the same value as they are in <netdb.h>.380*/381#ifndef NI_MAXHOST382#define NI_MAXSERV 32383#define NI_MAXHOST 1025384#endif385386__BEGIN_DECLS387388/*389* Finally, function prototypes for the GSS-API routines.390*/391OM_uint32 gss_acquire_cred392(OM_uint32 *, /* minor_status */393const gss_name_t, /* desired_name */394OM_uint32, /* time_req */395const gss_OID_set, /* desired_mechs */396gss_cred_usage_t, /* cred_usage */397gss_cred_id_t *, /* output_cred_handle */398gss_OID_set *, /* actual_mechs */399OM_uint32 * /* time_rec */400);401402OM_uint32 gss_release_cred403(OM_uint32 *, /* minor_status */404gss_cred_id_t * /* cred_handle */405);406407OM_uint32 gss_init_sec_context408(OM_uint32 *, /* minor_status */409const gss_cred_id_t, /* initiator_cred_handle */410gss_ctx_id_t *, /* context_handle */411const gss_name_t, /* target_name */412const gss_OID, /* mech_type */413OM_uint32, /* req_flags */414OM_uint32, /* time_req */415const gss_channel_bindings_t,416/* input_chan_bindings */417const gss_buffer_t, /* input_token */418gss_OID *, /* actual_mech_type */419gss_buffer_t, /* output_token */420OM_uint32 *, /* ret_flags */421OM_uint32 * /* time_rec */422);423424OM_uint32 gss_init_sec_context_lucid_v1425(OM_uint32 *, /* minor_status */426const gss_cred_id_t, /* initiator_cred_handle */427gss_ctx_id_t *, /* context_handle */428const gss_name_t, /* target_name */429const gss_OID, /* mech_type */430OM_uint32, /* req_flags */431OM_uint32, /* time_req */432const gss_channel_bindings_t,433/* input_chan_bindings */434const gss_buffer_t, /* input_token */435gss_OID *, /* actual_mech_type */436gss_buffer_t, /* output_token */437OM_uint32 *, /* ret_flags */438OM_uint32 * /* time_rec */439);440441OM_uint32 gss_supports_lucid442(OM_uint32 *, /* minor_status */443OM_uint32 * /* vers */444);445446OM_uint32 gss_accept_sec_context447(OM_uint32 *, /* minor_status */448gss_ctx_id_t *, /* context_handle */449const gss_cred_id_t, /* acceptor_cred_handle */450const gss_buffer_t, /* input_token_buffer */451const gss_channel_bindings_t,452/* input_chan_bindings */453gss_name_t *, /* src_name */454gss_OID *, /* mech_type */455gss_buffer_t, /* output_token */456OM_uint32 *, /* ret_flags */457OM_uint32 *, /* time_rec */458gss_cred_id_t * /* delegated_cred_handle */459);460461OM_uint32 gss_accept_sec_context_lucid_v1462(OM_uint32 *, /* minor_status */463gss_ctx_id_t *, /* context_handle */464const gss_cred_id_t, /* acceptor_cred_handle */465const gss_buffer_t, /* input_token_buffer */466const gss_channel_bindings_t,467/* input_chan_bindings */468gss_name_t *, /* src_name */469gss_OID *, /* mech_type */470gss_buffer_t, /* output_token */471OM_uint32 *, /* ret_flags */472OM_uint32 *, /* time_rec */473gss_cred_id_t *, /* delegated_cred_handle */474gss_buffer_t, /* exported_name */475uid_t *, /* Unix cred */476gid_t *,477int *, /* Number of groups */478gid_t * /* groups list */479);480481OM_uint32 gss_delete_sec_context482(OM_uint32 *, /* minor_status */483gss_ctx_id_t *, /* context_handle */484gss_buffer_t /* output_token */485);486487OM_uint32 gss_get_mic488(OM_uint32 *, /* minor_status */489const gss_ctx_id_t, /* context_handle */490gss_qop_t, /* qop_req */491const gss_buffer_t, /* message_buffer */492gss_buffer_t /* message_token */493);494495OM_uint32 gss_verify_mic496(OM_uint32 *, /* minor_status */497const gss_ctx_id_t, /* context_handle */498const gss_buffer_t, /* message_buffer */499const gss_buffer_t, /* token_buffer */500gss_qop_t * /* qop_state */501);502503OM_uint32 gss_wrap504(OM_uint32 *, /* minor_status */505const gss_ctx_id_t, /* context_handle */506int, /* conf_req_flag */507gss_qop_t, /* qop_req */508const gss_buffer_t, /* input_message_buffer */509int *, /* conf_state */510gss_buffer_t /* output_message_buffer */511);512513OM_uint32 gss_unwrap514(OM_uint32 *, /* minor_status */515const gss_ctx_id_t, /* context_handle */516const gss_buffer_t, /* input_message_buffer */517gss_buffer_t, /* output_message_buffer */518int *, /* conf_state */519gss_qop_t * /* qop_state */520);521522OM_uint32 gss_display_status523(OM_uint32 *, /* minor_status */524OM_uint32, /* status_value */525int, /* status_type */526const gss_OID, /* mech_type */527OM_uint32 *, /* message_context */528gss_buffer_t /* status_string */529);530531OM_uint32 gss_import_name532(OM_uint32 *, /* minor_status */533const gss_buffer_t, /* input_name_buffer */534const gss_OID, /* input_name_type */535gss_name_t * /* output_name */536);537538OM_uint32 gss_export_name539(OM_uint32 *, /* minor_status */540const gss_name_t, /* input_name */541gss_buffer_t /* exported_name */542);543544OM_uint32 gss_release_name545(OM_uint32 *, /* minor_status */546gss_name_t * /* input_name */547);548549OM_uint32 gss_release_buffer550(OM_uint32 *, /* minor_status */551gss_buffer_t /* buffer */552);553554OM_uint32 gss_release_oid_set555(OM_uint32 *, /* minor_status */556gss_OID_set * /* set */557);558559OM_uint32 gss_wrap_size_limit (560OM_uint32 *, /* minor_status */561const gss_ctx_id_t, /* context_handle */562int, /* conf_req_flag */563gss_qop_t, /* qop_req */564OM_uint32, /* req_output_size */565OM_uint32 * /* max_input_size */566);567568OM_uint32 gss_create_empty_oid_set (569OM_uint32 *, /* minor_status */570gss_OID_set * /* oid_set */571);572573OM_uint32 gss_add_oid_set_member (574OM_uint32 *, /* minor_status */575const gss_OID, /* member_oid */576gss_OID_set * /* oid_set */577);578579OM_uint32 gss_test_oid_set_member (580OM_uint32 *, /* minor_status */581const gss_OID, /* member */582const gss_OID_set, /* set */583int * /* present */584);585586OM_uint32 gss_canonicalize_name (587OM_uint32 *, /* minor_status */588const gss_name_t, /* input_name */589const gss_OID, /* mech_type */590gss_name_t * /* output_name */591);592593/*594* Other extensions and helper functions.595*/596597OM_uint32 gss_set_cred_option598(OM_uint32 *, /* minor status */599gss_cred_id_t *, /* cred */600const gss_OID, /* option to set */601const gss_buffer_t /* option value */602);603604OM_uint32 gss_pname_to_uid605(OM_uint32 *, /* minor status */606const gss_name_t pname, /* principal name */607const gss_OID mech, /* mechanism to query */608uid_t *uidp /* pointer to UID for result */609);610611/*612* On entry, *numgroups is set to the maximum number of groups to return. On exit, *numgroups is set to the actual number of groups returned.613*/614OM_uint32 gss_pname_to_unix_cred615(OM_uint32 *, /* minor status */616const gss_name_t pname, /* principal name */617const gss_OID mech, /* mechanism to query */618uid_t *uidp, /* pointer to UID for result */619gid_t *gidp, /* pointer to GID for result */620int *numgroups, /* number of groups */621gid_t *groups /* pointer to group list */622);623624OM_uint32 gss_ip_to_dns625(OM_uint32 *, /* minor status */626char *ip_addr, /* IP host address string */627char *dns_name /* pointer to dns_name for result */628);629630/*631* Mbuf oriented message signing and encryption.632*633* Get_mic allocates an mbuf to hold the message checksum. Verify_mic634* may modify the passed-in mic but will not free it.635*636* Wrap and unwrap637* consume the message and generate a new mbuf chain with the638* result. The original message is freed on error.639*/640struct mbuf;641OM_uint32 gss_get_mic_mbuf642(OM_uint32 *, /* minor_status */643const gss_ctx_id_t, /* context_handle */644gss_qop_t, /* qop_req */645struct mbuf *, /* message_buffer */646struct mbuf ** /* message_token */647);648649OM_uint32 gss_verify_mic_mbuf650(OM_uint32 *, /* minor_status */651const gss_ctx_id_t, /* context_handle */652struct mbuf *, /* message_buffer */653struct mbuf *, /* token_buffer */654gss_qop_t * /* qop_state */655);656657OM_uint32 gss_wrap_mbuf658(OM_uint32 *, /* minor_status */659const gss_ctx_id_t, /* context_handle */660int, /* conf_req_flag */661gss_qop_t, /* qop_req */662struct mbuf **, /* message_buffer */663int * /* conf_state */664);665666OM_uint32 gss_unwrap_mbuf667(OM_uint32 *, /* minor_status */668const gss_ctx_id_t, /* context_handle */669struct mbuf **, /* message_buffer */670int *, /* conf_state */671gss_qop_t * /* qop_state */672);673674__END_DECLS675676#endif /* _KGSSAPI_GSSAPI_H_ */677678679