X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcasn1%2Fsilcber.h;h=8c0ec6942f7bd9e94f0cfe616d0bf821327f4f15;hb=e7b6c157b80152bf9fb9266e6bdd93f9fb0db776;hp=b4bec70e91accab05f78a3fd2191e9814a5f4e46;hpb=0f0340b9fbce9704cc7171f8f0104ce9103d2de6;p=silc.git diff --git a/lib/silcasn1/silcber.h b/lib/silcasn1/silcber.h index b4bec70e..8c0ec694 100644 --- a/lib/silcasn1/silcber.h +++ b/lib/silcasn1/silcber.h @@ -4,7 +4,7 @@ Author: Pekka Riikonen - Copyright (C) 2003 - 2005 Pekka Riikonen + Copyright (C) 2003 - 2007 Pekka Riikonen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,26 +35,51 @@ #ifndef SILCBER_H #define SILCBER_H +/****d* silcasn1/SilcBerAPI/SilcBerClass + * + * NAME + * + * typedef enum { ... } SilcBerClass; + * + * DESCRIPTION + * + * Defines the BER classes. + * + ***/ typedef enum { SILC_BER_CLASS_UNIVERSAL = 0x00, /* Universal */ SILC_BER_CLASS_APPLICATION = 0x01, /* Application */ SILC_BER_CLASS_CONTEXT = 0x02, /* Context-specific */ SILC_BER_CLASS_PRIVATE = 0x03, /* Private */ } SilcBerClass; +/***/ +/****d* silcasn1/SilcBerAPI/SilcBerEncoding + * + * NAME + * + * typedef enum { ... } SilcBerEncoding; + * + * DESCRIPTION + * + * Defines the BER encoding type. + * + ***/ typedef enum { SILC_BER_ENC_PRIMITIVE = 0x00, SILC_BER_ENC_CONSTRUCTED = 0x01, } SilcBerEncoding; +/***/ /****f* silcasn1/SilcBerAPI/silc_ber_encode * * SYNOPSIS * - * bool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, - * SilcBerEncoding encoding, SilcUInt32 tag, - * const unsigned char *data, SilcUInt32 data_len, - * bool indefinite); + * SilcBool + * silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, + * SilcBerEncoding encoding, SilcUInt32 tag, + * const unsigned char *data, SilcUInt32 data_len, + * SilcBool indefinite); * * DESCRIPTION * @@ -65,19 +90,20 @@ typedef enum { * include the length of the data in the BER block. * ***/ -bool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, - SilcBerEncoding encoding, SilcUInt32 tag, - const unsigned char *data, SilcUInt32 data_len, - bool indefinite); +SilcBool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, + SilcBerEncoding encoding, SilcUInt32 tag, + const unsigned char *data, SilcUInt32 data_len, + SilcBool indefinite); /****f* silcasn1/SilcBerAPI/silc_ber_decode * * SYNOPSIS * - * bool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, - * SilcBerEncoding *encoding, SilcUInt32 *tag, - * const unsigned char **data, SilcUInt32 *data_len, - * bool *indefinite, SilcUInt32 *identifier_len); + * SilcBool + * silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, + * SilcBerEncoding *encoding, SilcUInt32 *tag, + * const unsigned char **data, SilcUInt32 *data_len, + * SilcBool *indefinite, SilcUInt32 *identifier_len); * * DESCRIPTION * @@ -92,17 +118,17 @@ bool silc_ber_encode(SilcBuffer ber, SilcBerClass ber_class, * of the entire BER object is `identifier_len' + `data_len'. * ***/ -bool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, - SilcBerEncoding *encoding, SilcUInt32 *tag, - const unsigned char **data, SilcUInt32 *data_len, - bool *indefinite, SilcUInt32 *identifier_len); +SilcBool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, + SilcBerEncoding *encoding, SilcUInt32 *tag, + const unsigned char **data, SilcUInt32 *data_len, + SilcBool *indefinite, SilcUInt32 *identifier_len); /****f* silcasn1/SilcBerAPI/silc_ber_encoded_len * * SYNOPSIS * * SilcUInt32 silc_ber_encoded_len(SilcUInt32 tag, SilcUInt32 data_len, - * bool indefinite); + * SilcBool indefinite); * * DESCRIPTION * @@ -112,6 +138,6 @@ bool silc_ber_decode(SilcBuffer ber, SilcBerClass *ber_class, * ***/ SilcUInt32 silc_ber_encoded_len(SilcUInt32 tag, SilcUInt32 data_len, - bool indefinite); + SilcBool indefinite); #endif /* SILCBER_H */