From 28a0e7ba33d425cd2f16a9d1463719f0bf3e3147 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Sat, 17 Oct 2015 20:44:25 +0000 Subject: [PATCH] Improved comments. FossilOrigin-Name: 784a05d21ef55bdce15b838559e29912fc9ae1dba8426532c51c4ae097c41079 --- src/capwap/bstr.h | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/capwap/bstr.h b/src/capwap/bstr.h index 93798202..e8854ce7 100644 --- a/src/capwap/bstr.h +++ b/src/capwap/bstr.h @@ -19,7 +19,9 @@ /** * @file * @brief Definitions for bstr functions - * @defgroup Bstr BSTR Functions + * @defgroup Bstr BSTR + * @brief BSTR is used to store binary strings. + * We can see them anywhere. * @{ */ @@ -33,7 +35,7 @@ /** * bstr type * - * bstr_t serves as binary string where the first byte cponntains + * bstr_t serves as binary string where the first byte contains * the length of the string. */ typedef uint8_t* bstr_t; @@ -62,19 +64,42 @@ extern int bstr_to_str(char *dst, bstr_t str,char * def); #define bstr_size(len) (len+1) /** - * Max. length of a bstr_t string. + *@defgroup BstrConstants Types & Constants + *@{ + */ + +/** + * Maximum length of a bstr_t string. */ #define BSTR_MAX_LEN 254 + /** * The same as #bstr_t, but there are two bytes used * to describe the length of the string. */ typedef uint8_t *bstr16_t; +/**@}*/ + + +/** + * Return the length of a bstr16_t string. + */ #define bstr16_len(s) ( *((uint16_t*)(s)) ) +/** + * Return a pointer to the data of a bstr16_t string. + */ #define bstr16_data(s) (((uint8_t*)s)+2) + +/** + * Return the actual size of a bstr16_t string. That's the + * this objects needs in memory to be stored. + */ #define bstr16_size(l) (l+2) +/** + Maximum length of a #bstr16_t string +*/ #define BSTR16_MAX_LEN (0xffff-2) /*