.TH "krb5_storage" 3 "Tue Jul 11 2017" "Version 7.4.0" "HeimdalKerberos5library" \" -*- nroff -*- .ad l .nh .SH NAME krb5_storage \- Heimdal Kerberos 5 storage functions .SS "Functions" .in +1c .ti -1c .RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_storage_set_flags\fP (krb5_storage *sp, krb5_flags flags)" .br .ti -1c .RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_storage_clear_flags\fP (krb5_storage *sp, krb5_flags flags)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL \fBkrb5_storage_is_flags\fP (krb5_storage *sp, krb5_flags flags)" .br .ti -1c .RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_storage_set_byteorder\fP (krb5_storage *sp, krb5_flags byteorder)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_flags KRB5_LIB_CALL \fBkrb5_storage_get_byteorder\fP (krb5_storage *sp)" .br .ti -1c .RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_storage_set_max_alloc\fP (krb5_storage *sp, size_t size)" .br .ti -1c .RI "KRB5_LIB_FUNCTION off_t KRB5_LIB_CALL \fBkrb5_storage_seek\fP (krb5_storage *sp, off_t offset, int whence)" .br .ti -1c .RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_storage_truncate\fP (krb5_storage *sp, off_t offset)" .br .ti -1c .RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_storage_fsync\fP (krb5_storage *sp)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL \fBkrb5_storage_read\fP (krb5_storage *sp, void *buf, size_t len)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL \fBkrb5_storage_write\fP (krb5_storage *sp, const void *buf, size_t len)" .br .ti -1c .RI "KRB5_LIB_FUNCTION void KRB5_LIB_CALL \fBkrb5_storage_set_eof_code\fP (krb5_storage *sp, int code)" .br .ti -1c .RI "KRB5_LIB_FUNCTION int KRB5_LIB_CALL \fBkrb5_storage_get_eof_code\fP (krb5_storage *sp)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_storage_free\fP (krb5_storage *sp)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_storage_to_data\fP (krb5_storage *sp, krb5_data *data)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_int32\fP (krb5_storage *sp, int32_t value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_int64\fP (krb5_storage *sp, int64_t value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_uint32\fP (krb5_storage *sp, uint32_t value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_uint64\fP (krb5_storage *sp, uint64_t value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_int64\fP (krb5_storage *sp, int64_t *value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_uint64\fP (krb5_storage *sp, uint64_t *value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_int32\fP (krb5_storage *sp, int32_t *value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_uint32\fP (krb5_storage *sp, uint32_t *value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_int16\fP (krb5_storage *sp, int16_t value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_uint16\fP (krb5_storage *sp, uint16_t value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_int16\fP (krb5_storage *sp, int16_t *value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_uint16\fP (krb5_storage *sp, uint16_t *value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_int8\fP (krb5_storage *sp, int8_t value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_uint8\fP (krb5_storage *sp, uint8_t value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_int8\fP (krb5_storage *sp, int8_t *value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_uint8\fP (krb5_storage *sp, uint8_t *value)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_data\fP (krb5_storage *sp, krb5_data data)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_data\fP (krb5_storage *sp, krb5_data *data)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_string\fP (krb5_storage *sp, const char *s)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_string\fP (krb5_storage *sp, char **string)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_stringz\fP (krb5_storage *sp, const char *s)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_stringz\fP (krb5_storage *sp, char **string)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_principal\fP (krb5_storage *sp, krb5_const_principal p)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_principal\fP (krb5_storage *sp, krb5_principal *princ)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_keyblock\fP (krb5_storage *sp, krb5_keyblock p)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_keyblock\fP (krb5_storage *sp, krb5_keyblock *p)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_times\fP (krb5_storage *sp, krb5_times times)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_times\fP (krb5_storage *sp, krb5_times *times)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_address\fP (krb5_storage *sp, krb5_address p)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_address\fP (krb5_storage *sp, krb5_address *adr)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_addrs\fP (krb5_storage *sp, krb5_addresses p)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_addrs\fP (krb5_storage *sp, krb5_addresses *adr)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_authdata\fP (krb5_storage *sp, krb5_authdata auth)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_authdata\fP (krb5_storage *sp, krb5_authdata *auth)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_creds\fP (krb5_storage *sp, krb5_creds *creds)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_creds\fP (krb5_storage *sp, krb5_creds *creds)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_store_creds_tag\fP (krb5_storage *sp, krb5_creds *creds)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL \fBkrb5_ret_creds_tag\fP (krb5_storage *sp, krb5_creds *creds)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL \fBkrb5_storage_emem\fP (void)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL \fBkrb5_storage_from_fd\fP (int fd_in)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL \fBkrb5_storage_from_mem\fP (void *buf, size_t len)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL \fBkrb5_storage_from_data\fP (krb5_data *data)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL \fBkrb5_storage_from_readonly_mem\fP (const void *buf, size_t len)" .br .ti -1c .RI "KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL \fBkrb5_storage_from_socket\fP (krb5_socket_t sock_in)" .br .in -1c .SH "Detailed Description" .PP .SH "Function Documentation" .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_address (krb5_storage * sp, krb5_address * adr)" Read a address block from the storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIadr\fP the address block read from storage .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_addrs (krb5_storage * sp, krb5_addresses * adr)" Read a addresses block from the storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIadr\fP the addresses block read from storage .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_authdata (krb5_storage * sp, krb5_authdata * auth)" Read a auth data from the storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIauth\fP the auth data block read from storage .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_creds (krb5_storage * sp, krb5_creds * creds)" Read a credentials block from the storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIcreds\fP the credentials block read from storage .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_creds_tag (krb5_storage * sp, krb5_creds * creds)" Read a tagged credentials block from the storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIcreds\fP the credentials block read from storage .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_data (krb5_storage * sp, krb5_data * data)" Parse a data from the storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to read from .br \fIdata\fP the parsed data .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int16 (krb5_storage * sp, int16_t * value)" Read a int16 from storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value read from the buffer .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int32 (krb5_storage * sp, int32_t * value)" Read a int32 from storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value read from the buffer .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int64 (krb5_storage * sp, int64_t * value)" Read a int64 from storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value read from the buffer .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int8 (krb5_storage * sp, int8_t * value)" Read a int8 from storage .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value read from the buffer .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_keyblock (krb5_storage * sp, krb5_keyblock * p)" Read a keyblock from the storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIp\fP the keyblock read from storage, free using \fBkrb5_free_keyblock()\fP .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_principal (krb5_storage * sp, krb5_principal * princ)" Parse principal from the storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to read from .br \fIprinc\fP the parsed principal .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_string (krb5_storage * sp, char ** string)" Parse a string from the storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to read from .br \fIstring\fP the parsed string .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_stringz (krb5_storage * sp, char ** string)" Parse zero terminated string from the storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to read from .br \fIstring\fP the parsed string .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_times (krb5_storage * sp, krb5_times * times)" Read a times block from the storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fItimes\fP the times block read from storage .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint16 (krb5_storage * sp, uint16_t * value)" Read a int16 from storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value read from the buffer .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint32 (krb5_storage * sp, uint32_t * value)" Read a uint32 from storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value read from the buffer .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint64 (krb5_storage * sp, uint64_t * value)" Read a uint64 from storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value read from the buffer .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint8 (krb5_storage * sp, uint8_t * value)" Read a uint8 from storage .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value read from the buffer .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_clear_flags (krb5_storage * sp, krb5_flags flags)" Clear the flags on a storage buffer .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to clear the flags on .br \fIflags\fP the flags to clear .RE .PP .SS "KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_emem (void)" Create a elastic (allocating) memory storage backend\&. Memory is allocated on demand\&. Free returned krb5_storage with \fBkrb5_storage_free()\fP\&. .PP \fBReturns:\fP .RS 4 A krb5_storage on success, or NULL on out of memory error\&. .RE .PP \fBSee also:\fP .RS 4 \fBkrb5_storage_from_mem()\fP .PP \fBkrb5_storage_from_readonly_mem()\fP .PP \fBkrb5_storage_from_fd()\fP .PP \fBkrb5_storage_from_data()\fP .PP \fBkrb5_storage_from_socket()\fP .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_storage_free (krb5_storage * sp)" Free a krb5 storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to free\&. .RE .PP \fBReturns:\fP .RS 4 An Kerberos 5 error code\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_data (krb5_data * data)" Create a fixed size memory storage block .PP \fBReturns:\fP .RS 4 A krb5_storage on success, or NULL on out of memory error\&. .RE .PP \fBSee also:\fP .RS 4 krb5_storage_mem() .PP \fBkrb5_storage_from_mem()\fP .PP \fBkrb5_storage_from_readonly_mem()\fP .PP \fBkrb5_storage_from_fd()\fP .RE .PP .SS "KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_fd (int fd_in)" .PP \fBReturns:\fP .RS 4 A krb5_storage on success, or NULL on out of memory error\&. .RE .PP \fBSee also:\fP .RS 4 \fBkrb5_storage_emem()\fP .PP \fBkrb5_storage_from_mem()\fP .PP \fBkrb5_storage_from_readonly_mem()\fP .PP \fBkrb5_storage_from_data()\fP .PP \fBkrb5_storage_from_socket()\fP .RE .PP .SS "KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_mem (void * buf, size_t len)" Create a fixed size memory storage block .PP \fBReturns:\fP .RS 4 A krb5_storage on success, or NULL on out of memory error\&. .RE .PP \fBSee also:\fP .RS 4 krb5_storage_mem() .PP \fBkrb5_storage_from_readonly_mem()\fP .PP \fBkrb5_storage_from_data()\fP .PP \fBkrb5_storage_from_fd()\fP .PP \fBkrb5_storage_from_socket()\fP .RE .PP .SS "KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_readonly_mem (const void * buf, size_t len)" Create a fixed size memory storage block that is read only .PP \fBReturns:\fP .RS 4 A krb5_storage on success, or NULL on out of memory error\&. .RE .PP \fBSee also:\fP .RS 4 krb5_storage_mem() .PP \fBkrb5_storage_from_mem()\fP .PP \fBkrb5_storage_from_data()\fP .PP \fBkrb5_storage_from_fd()\fP .RE .PP .SS "KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_socket (krb5_socket_t sock_in)" .PP \fBReturns:\fP .RS 4 A krb5_storage on success, or NULL on out of memory error\&. .RE .PP \fBSee also:\fP .RS 4 \fBkrb5_storage_emem()\fP .PP \fBkrb5_storage_from_mem()\fP .PP \fBkrb5_storage_from_readonly_mem()\fP .PP \fBkrb5_storage_from_data()\fP .PP \fBkrb5_storage_from_fd()\fP .RE .PP .SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_fsync (krb5_storage * sp)" Sync the storage buffer to its backing store\&. If there is no backing store this function will return success\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to sync .RE .PP \fBReturns:\fP .RS 4 A Kerberos 5 error code .RE .PP .SS "KRB5_LIB_FUNCTION krb5_flags KRB5_LIB_CALL krb5_storage_get_byteorder (krb5_storage * sp)" Return the current byteorder for the buffer\&. See \fBkrb5_storage_set_byteorder()\fP for the list or byte order contants\&. .SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_get_eof_code (krb5_storage * sp)" Get the return code that will be used when end of storage is reached\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage .RE .PP \fBReturns:\fP .RS 4 storage error code .RE .PP .SS "KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_storage_is_flags (krb5_storage * sp, krb5_flags flags)" Return true or false depending on if the storage flags is set or not\&. NB testing for the flag 0 always return true\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to check flags on .br \fIflags\fP The flags to test for .RE .PP \fBReturns:\fP .RS 4 true if all the flags are set, false if not\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL krb5_storage_read (krb5_storage * sp, void * buf, size_t len)" Read to the storage buffer\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to read from .br \fIbuf\fP the buffer to store the data in .br \fIlen\fP the length to read .RE .PP \fBReturns:\fP .RS 4 The length of data read (can be shorter then len), or negative on error\&. .RE .PP .SS "KRB5_LIB_FUNCTION off_t KRB5_LIB_CALL krb5_storage_seek (krb5_storage * sp, off_t offset, int whence)" Seek to a new offset\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to seek in\&. .br \fIoffset\fP the offset to seek .br \fIwhence\fP relateive searching, SEEK_CUR from the current position, SEEK_END from the end, SEEK_SET absolute from the start\&. .RE .PP \fBReturns:\fP .RS 4 The new current offset .RE .PP .SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_byteorder (krb5_storage * sp, krb5_flags byteorder)" Set the new byte order of the storage buffer\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to set the byte order for\&. .br \fIbyteorder\fP the new byte order\&. .RE .PP The byte order are: KRB5_STORAGE_BYTEORDER_BE, KRB5_STORAGE_BYTEORDER_LE and KRB5_STORAGE_BYTEORDER_HOST\&. .SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_eof_code (krb5_storage * sp, int code)" Set the return code that will be used when end of storage is reached\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage .br \fIcode\fP the error code to return on end of storage .RE .PP .SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_flags (krb5_storage * sp, krb5_flags flags)" Add the flags on a storage buffer by or-ing in the flags to the buffer\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to set the flags on .br \fIflags\fP the flags to set .RE .PP .SS "KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_max_alloc (krb5_storage * sp, size_t size)" Set the max alloc value .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer set the max allow for .br \fIsize\fP maximum size to allocate, use 0 to remove limit .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_storage_to_data (krb5_storage * sp, krb5_data * data)" Copy the contnent of storage .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to copy to a data .br \fIdata\fP the copied data, free with \fBkrb5_data_free()\fP .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_truncate (krb5_storage * sp, off_t offset)" Truncate the storage buffer in sp to offset\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to truncate\&. .br \fIoffset\fP the offset to truncate too\&. .RE .PP \fBReturns:\fP .RS 4 An Kerberos 5 error code\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL krb5_storage_write (krb5_storage * sp, const void * buf, size_t len)" Write to the storage buffer\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIbuf\fP the buffer to write to the storage buffer .br \fIlen\fP the length to write .RE .PP \fBReturns:\fP .RS 4 The length of data written (can be shorter then len), or negative on error\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_address (krb5_storage * sp, krb5_address p)" Write a address block to storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIp\fP the address block to write\&. .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_addrs (krb5_storage * sp, krb5_addresses p)" Write a addresses block to storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIp\fP the addresses block to write\&. .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_authdata (krb5_storage * sp, krb5_authdata auth)" Write a auth data block to storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIauth\fP the auth data block to write\&. .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_creds (krb5_storage * sp, krb5_creds * creds)" Write a credentials block to storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIcreds\fP the creds block to write\&. .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_creds_tag (krb5_storage * sp, krb5_creds * creds)" Write a tagged credentials block to storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIcreds\fP the creds block to write\&. .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_data (krb5_storage * sp, krb5_data data)" Store a data to the storage\&. The data is stored with an int32 as lenght plus the data (not padded)\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIdata\fP the buffer to store\&. .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int16 (krb5_storage * sp, int16_t value)" Store a int16 to storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value to store .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int32 (krb5_storage * sp, int32_t value)" Store a int32 to storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value to store .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int64 (krb5_storage * sp, int64_t value)" Store a int64 to storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value to store .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int8 (krb5_storage * sp, int8_t value)" Store a int8 to storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value to store .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_keyblock (krb5_storage * sp, krb5_keyblock p)" Store a keyblock to the storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIp\fP the keyblock to write .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_principal (krb5_storage * sp, krb5_const_principal p)" Write a principal block to storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIp\fP the principal block to write\&. .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_string (krb5_storage * sp, const char * s)" Store a string to the buffer\&. The data is formated as an len:uint32 plus the string itself (not padded)\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIs\fP the string to store\&. .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_stringz (krb5_storage * sp, const char * s)" Store a zero terminated string to the buffer\&. The data is stored one character at a time until a NUL is stored\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fIs\fP the string to store\&. .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_times (krb5_storage * sp, krb5_times times)" Write a times block to storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage buffer to write to .br \fItimes\fP the times block to write\&. .RE .PP \fBReturns:\fP .RS 4 0 on success, a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint16 (krb5_storage * sp, uint16_t value)" Store a uint16 to storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value to store .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint32 (krb5_storage * sp, uint32_t value)" Store a uint32 to storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value to store .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint64 (krb5_storage * sp, uint64_t value)" Store a uint64 to storage, byte order is controlled by the settings on the storage, see \fBkrb5_storage_set_byteorder()\fP\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value to store .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SS "KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint8 (krb5_storage * sp, uint8_t value)" Store a uint8 to storage\&. .PP \fBParameters:\fP .RS 4 \fIsp\fP the storage to write too .br \fIvalue\fP the value to store .RE .PP \fBReturns:\fP .RS 4 0 for success, or a Kerberos 5 error code on failure\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for HeimdalKerberos5library from the source code\&.