carta
krb5_data_alloc(3)

krb5_data_alloc3

Operates on the kerberos datatype krb5_data

Part of krb5_data_free(3).

Usage

struct krb5_data;

void

void

void

void

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

Library

Kerberos 5 Library (libkrb5, -lkrb5)

Overview

The krb5_data structure holds a data element. The structure contains two public accessible elements length (the length of data) and data (the data itself). The structure must always be initiated and freed by the functions documented in this manual.

krb5_data_zero() resets the content of p.

krb5_data_free() free the data in p and reset the content of the structure with krb5_data_zero().

krb5_free_data_contents() works the same way as krb5_data_free. The diffrence is that krb5_free_data_contents is more portable (exists in MIT api).

krb5_free_data() frees the data in p and p itself.

krb5_data_alloc() allocates len bytes in p. Returns 0 or an error.

krb5_data_realloc() reallocates the length of p to the length in len. Returns 0 or an error.

krb5_data_copy() copies the data that have the length len into p. p is not freed so the calling function should make sure the p doesn't contain anything needs to be freed. Returns 0 or an error.

krb5_copy_data() copies the krb5_data in indata to outdata. outdata is not freed so the calling function should make sure the outdata doesn't contain anything needs to be freed. outdata should be freed using krb5_free_data(). Returns 0 or an error.

krb5_data_cmp() will compare two data object and check if they are the same in a simular way as memcmp does it. The return value can be used for sorting.

History

  • Debian 5.0 (Lenny): the text shown here
  • Debian 4.0 (Etch)
  • Debian 3.1 (Sarge)

From heimdal-dev 1.2.dfsg.1-2.1+lenny1 in Debian 5.0 (Lenny). Parsed by carta from the page's mdoc source.