Poster of Linux kernelThe best gift for a Linux geek


Section: C Library Functions (3)
Local index Up

BSD mandoc


krb5_storage krb5_storage_emem krb5_storage_from_data krb5_storage_from_fd krb5_storage_from_mem krb5_storage_set_flags krb5_storage_clear_flags krb5_storage_is_flags krb5_storage_set_byteorder krb5_storage_get_byteorder krb5_storage_set_eof_code krb5_storage_seek krb5_storage_read krb5_storage_write krb5_storage_free krb5_storage_to_data krb5_store_int32 krb5_ret_int32 krb5_store_uint32 krb5_ret_uint32 krb5_store_int16 krb5_ret_int16 krb5_store_uint16 krb5_ret_uint16 krb5_store_int8 krb5_ret_int8 krb5_store_uint8 krb5_ret_uint8 krb5_store_data krb5_ret_data krb5_store_string krb5_ret_string krb5_store_stringnl krb5_ret_stringnl krb5_store_stringz krb5_ret_stringz krb5_store_principal krb5_ret_principal krb5_store_keyblock krb5_ret_keyblock krb5_store_times krb5_ret_times krb5_store_address krb5_ret_address krb5_store_addrs krb5_ret_addrs krb5_store_authdata krb5_ret_authdata krb5_store_creds krb5_ret_creds - operates on the Kerberos datatype krb5_storage  


Kerberos 5 Library (libkrb5, -lkrb5)  


In krb5.h

struct krb5_storage;

Ft krb5_storage * Fn krb5_storage_from_fd int fd Ft krb5_storage * Fn krb5_storage_emem void Ft krb5_storage * Fn krb5_storage_from_mem void *buf size_t len Ft krb5_storage * Fn krb5_storage_from_data krb5_data *data Ft void Fn krb5_storage_set_flags krb5_storage *sp krb5_flags flags Ft void Fn krb5_storage_clear_flags krb5_storage *sp krb5_flags flags Ft krb5_boolean Fn krb5_storage_is_flags krb5_storage *sp krb5_flags flags Ft void Fn krb5_storage_set_byteorder krb5_storage *sp krb5_flags byteorder Ft krb5_flags Fn krb5_storage_get_byteorder krb5_storage *sp krb5_flags byteorder Ft void Fn krb5_storage_set_eof_code krb5_storage *sp int code Ft off_t Fn krb5_storage_seek krb5_storage *sp off_t offset int whence Ft krb5_ssize_t Fn krb5_storage_read krb5_storage *sp void *buf size_t len Ft krb5_ssize_t Fn krb5_storage_write krb5_storage *sp const void *buf size_t len Ft krb5_error_code Fn krb5_storage_free krb5_storage *sp Ft krb5_error_code Fn krb5_storage_to_data krb5_storage *sp krb5_data *data Ft krb5_error_code Fn krb5_store_int32 krb5_storage *sp int32_t value Ft krb5_error_code Fn krb5_ret_int32 krb5_storage *sp int32_t *value Ft krb5_error_code Fn krb5_ret_uint32 krb5_storage *sp uint32_t *value Ft krb5_error_code Fn krb5_store_uint32 krb5_storage *sp uint32_t value Ft krb5_error_code Fn krb5_store_int16 krb5_storage *sp int16_t value Ft krb5_error_code Fn krb5_ret_int16 krb5_storage *sp int16_t *value Ft krb5_error_code Fn krb5_store_uint16 krb5_storage *sp uint16_t value Ft krb5_error_code Fn krb5_ret_uint16 krb5_storage *sp u_int16_t *value Ft krb5_error_code Fn krb5_store_int8 krb5_storage *sp int8_t value Ft krb5_error_code Fn krb5_ret_int8 krb5_storage *sp int8_t *value Ft krb5_error_code Fn krb5_store_uint8 krb5_storage *sp u_int8_t value Ft krb5_error_code Fn krb5_ret_uint8 krb5_storage *sp u_int8_t *value Ft krb5_error_code Fn krb5_store_data krb5_storage *sp krb5_data data Ft krb5_error_code Fn krb5_ret_data krb5_storage *sp krb5_data *data Ft krb5_error_code Fn krb5_store_string krb5_storage *sp const char *s Ft krb5_error_code Fn krb5_ret_string krb5_storage *sp char **string Ft krb5_error_code Fn krb5_store_stringnl krb5_storage *sp const char *s Ft krb5_error_code Fn krb5_ret_stringnl krb5_storage *sp char **string Ft krb5_error_code Fn krb5_store_stringz krb5_storage *sp const char *s Ft krb5_error_code Fn krb5_ret_stringz krb5_storage *sp char **string Ft krb5_error_code Fn krb5_store_principal krb5_storage *sp krb5_const_principal p Ft krb5_error_code Fn krb5_ret_principal krb5_storage *sp krb5_principal *princ Ft krb5_error_code Fn krb5_store_keyblock krb5_storage *sp krb5_keyblock p Ft krb5_error_code Fn krb5_ret_keyblock krb5_storage *sp krb5_keyblock *p Ft krb5_error_code Fn krb5_store_times krb5_storage *sp krb5_times times Ft krb5_error_code Fn krb5_ret_times krb5_storage *sp krb5_times *times Ft krb5_error_code Fn krb5_store_address krb5_storage *sp krb5_address p Ft krb5_error_code Fn krb5_ret_address krb5_storage *sp krb5_address *adr Ft krb5_error_code Fn krb5_store_addrs krb5_storage *sp krb5_addresses p Ft krb5_error_code Fn krb5_ret_addrs krb5_storage *sp krb5_addresses *adr Ft krb5_error_code Fn krb5_store_authdata krb5_storage *sp krb5_authdata auth Ft krb5_error_code Fn krb5_ret_authdata krb5_storage *sp krb5_authdata *auth Ft krb5_error_code Fn krb5_store_creds krb5_storage *sp krb5_creds *creds Ft krb5_error_code Fn krb5_ret_creds krb5_storage *sp krb5_creds *creds  


The krb5_storage structure holds a storage element that is used for data manipulation. The structure contains no public accessible elements.

Fn krb5_storage_emem create a memory based krb5 storage unit that dynamicly resized to the ammount of data stored in. The storage never returns errors, on memory allocation errors exit(3) will be called.

Fn krb5_storage_from_data create a krb5 storage unit that will read is data from a krb5_data There is no copy made of the Fa data , so the caller must not free Fa data until the storage is freed.

Fn krb5_storage_from_fd create a krb5 storage unit that will read is data from a file descriptor. The descriptor must be seekable if Fn krb5_storage_seek is used. Caller must not free the file descriptor before the storage is freed.

Fn krb5_storage_from_mem create a krb5 storage unit that will read is data from a memory region. There is no copy made of the Fa data , so the caller must not free Fa data until the storage is freed.

Fn krb5_storage_set_flags and Fn krb5_storage_clear_flags modifies the behavior of the storage functions. Fn krb5_storage_is_flags tests if the Fa flags are set on the krb5_storage Valid flags to set, is and clear is are:

Stores the number of principal componets one too many when storing principal namees, used for compatibility with version 1 of file keytabs and version 1 of file credential caches.
Doesn't store the name type in when storing a principal name, used for compatibility with version 1 of file keytabs and version 1 of file credential caches.
Stores the keyblock type twice storing a keyblock, used for compatibility version 3 of file credential caches.
bitmask that can be used to and out what type of byte order order is used.
Store integers in in big endian byte order, this is the default mode.
Store integers in in little endian byte order.
Stores the integers in host byte order, used for compatibility with version 1 of file keytabs and version 1 and 2 of file credential caches.
Store the credential flags in a krb5_creds in the reverse bit order.

Fn krb5_storage_set_byteorder and Fn krb5_storage_get_byteorder modifies the byte order used in the storage for integers. The flags used is same as above. The valid flags are KRB5_STORAGE_BYTEORDER_BE KRB5_STORAGE_BYTEORDER_LE and KRB5_STORAGE_BYTEORDER_HOST

Fn krb5_storage_set_eof_code sets the error code that will be returned on end of file condition to Fa code .

Fn krb5_storage_seek seeks Fa offset bytes in the storage Fa sp . The Fa whence argument is one of

offset is from begining of storage.
offset is relative from current offset.
offset is from end of storage.

Fn krb5_storage_read reads Fa len (or less bytes in case of end of file) into Fa buf from the current offset in the storage Fa sp .

Fn krb5_storage_write writes Fa len or (less bytes in case of end of file) from Fa buf from the current offset in the storage Fa sp .

Fn krb5_storage_free frees the storage Fa sp .

Fn krb5_storage_to_data converts the data in storage Fa sp into a krb5_data structure. Fa data must be freed with Fn krb5_data_free by the caller when done with the Fa data .

All krb5_store and krb5_ret functions move the current offset forward when the functions returns.

Fn krb5_store_int32 , Fn krb5_ret_int32 , Fn krb5_store_uint32 , Fn krb5_ret_uint32 , Fn krb5_store_int16 , Fn krb5_ret_int16 , Fn krb5_store_uint16 , Fn krb5_ret_uint16 , Fn krb5_store_int8 , Fn krb5_ret_int8 Fn krb5_store_uint8 , and Fn krb5_ret_uint8 stores and reads an integer from Fa sp in the byte order specified by the flags set on the Fa sp .

Fn krb5_store_data and Fn krb5_ret_data store and reads a krb5_data. The length of the data is stored with Fn krb5_store_int32 .

Fn krb5_store_string and Fn krb5_ret_string store and reads a string by storing the length of the string with Fn krb5_store_int32 followed by the string itself.

Fn krb5_store_stringnl and Fn krb5_ret_stringnl store and reads a string by storing string followed by a '

Fn krb5_store_stringz and Fn krb5_ret_stringz store and reads a string by storing string followed by a NUL

Fn krb5_store_principal and Fn krb5_ret_principal store and reads a principal.

Fn krb5_store_keyblock and Fn krb5_ret_keyblock store and reads a krb5_keyblock

Fn krb5_store_times Fn krb5_ret_times store and reads krb5_times structure .

Fn krb5_store_address and Fn krb5_ret_address store and reads a krb5_address

Fn krb5_store_addrs and Fn krb5_ret_addrs store and reads a krb5_addresses

Fn krb5_store_authdata and Fn krb5_ret_authdata store and reads a krb5_authdata

Fn krb5_store_creds and Fn krb5_ret_creds store and reads a krb5_creds  


krb5(3), krb5_data3, kerberos(8)




This document was created by man2html, using the manual pages.
Time: 22:37:57 GMT, April 16, 2011