Improved doxy documentation

FossilOrigin-Name: 180207c76a560f2b409dbc95bc5b1b57e2f7616a277cb987edfc8747328a4f80
This commit is contained in:
7u83@mail.ru 2018-03-25 09:14:37 +00:00
parent f136a0f401
commit b57056b094
12 changed files with 98 additions and 50 deletions

View File

@ -262,6 +262,7 @@
<File Name="src/cw/lw_put_bstr.c"/> <File Name="src/cw/lw_put_bstr.c"/>
<File Name="src/cw/mavl_get_node_cmp..c"/> <File Name="src/cw/mavl_get_node_cmp..c"/>
<File Name="src/cw/cw_ktv_read_struct.c"/> <File Name="src/cw/cw_ktv_read_struct.c"/>
<File Name="src/cw/algos.h"/>
</VirtualDirectory> </VirtualDirectory>
</VirtualDirectory> </VirtualDirectory>
<Description/> <Description/>

14
src/cw/algos.h Normal file
View File

@ -0,0 +1,14 @@
#ifndef __ALGOS_H
#define __ALGOS_H
/**
* @defgroup ALGOS Algos
* @{
*/
/**
* @} ALGOS
*/
#endif /* __ALGOS_H */

View File

@ -19,10 +19,8 @@
/** /**
* @file * @file
* @brief Definitions for bstr functions * @brief Definitions for bstr functions
* @defgroup Bstr BSTR
* @brief BSTR is used to store binary strings. * @brief BSTR is used to store binary strings.
* We can see them anywhere. * We can see them anywhere.
* @{
*/ */
#ifndef __BSTR_H #ifndef __BSTR_H
@ -32,6 +30,16 @@
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
/**
* @addtogroup ALGOS
* @{
*/
/**
* @defgroup Bstr BSTR (Binary strings)
* @{
*/
/** /**
* @defgroup BSTRTypes Types * @defgroup BSTRTypes Types
* @{ * @{
@ -82,6 +90,11 @@ extern int bstr_to_str(char *dst, bstr_t str,char * def);
*/ */
#define BSTR_MAX_LEN 254 #define BSTR_MAX_LEN 254
/**
* Maximum length of a #bstr16_t string
*/
#define BSTR16_MAX_LEN (0xffff-2)
/**@}*/ /**@}*/
@ -115,10 +128,6 @@ typedef uint8_t *bstr16_t;
* size this objects needs in memory to be stored. * size this objects needs in memory to be stored.
*/ */
#define bstr16_size(l) (l+2) #define bstr16_size(l) (l+2)
/**
Maximum length of a #bstr16_t string
*/
#define BSTR16_MAX_LEN (0xffff-2)
/* /*
static inline int bstr16_ncpy(uint8_t *dst,uint8_t*src,uint16_t len) static inline int bstr16_ncpy(uint8_t *dst,uint8_t*src,uint16_t len)
@ -148,7 +157,9 @@ extern uint8_t * bstr16_create_from_cfgstr(const char * s);
* The difference is, that the first four bytes of the * The difference is, that the first four bytes of the
* string data containing a vendor id. * string data containing a vendor id.
*/ */
typedef uint8_t * bstrv_t;
/*typedef uint8_t * bstrv_t;*/
/** /**
*@} *@}
@ -181,5 +192,9 @@ uint8_t * bstrv_create(uint32_t vendor_id, uint8_t *data, uint8_t len);
#endif #endif
/**@}*/ /**@} BSTR
*/
/**
* @} AGLOS
*/

View File

@ -39,11 +39,15 @@
/* capwap version and iana number */ /* capwap version and iana number */
/** /**
*@defgroup CAPWAP CAPWAP Defintions from RFC5415 * @defgroup CAPWAP CAPWAP
*@{ * @{
*/ */
/**
* @defgroup CAPWAP_DEFS Definitions from RFC5415
* @{
*/
/** /**
*@defgroup CAPWAPConstants CAPWAP General Constants *@defgroup CAPWAPConstants CAPWAP General Constants
@ -632,7 +636,9 @@ enum capwap_states {
#endif #endif
/** /**
*@} * @} CAPWAP_DEFS
*/
/**
* @} CAPWAP
*/ */

View File

@ -12,6 +12,11 @@
#include "capwap.h" #include "capwap.h"
#include "msgset.h" #include "msgset.h"
/**
* @addtogroup CAPWAP
* @{
*/
/** /**
* @defgroup CW CW * @defgroup CW CW
* @{ * @{
@ -300,7 +305,7 @@ int cw_put_image_data(uint8_t * dst, FILE * infile);
int cw_addelem(uint8_t * dst, uint16_t type, uint8_t * data, uint16_t len); int cw_addelem(uint8_t * dst, uint16_t type, uint8_t * data, uint16_t len);
int cw_addelem_bstr(uint8_t * dst, uint16_t type, const bstr_t bstr); int cw_addelem_bstr(uint8_t * dst, uint16_t type, const bstr_t bstr);
int cw_put_elem_result_code(uint8_t * dst, uint32_t code); int cw_put_elem_result_code(uint8_t * dst, uint32_t code);
int cw_put_version(uint8_t * dst, uint16_t subelem_id, bstrv_t v); /*int cw_put_version(uint8_t * dst, uint16_t subelem_id, bstrv_t v);*/
@ -516,4 +521,9 @@ char *cw_strdup(const char *s);
*@} *@}
*/ */
/**
*@} CAPWAP
*/
#endif #endif

View File

@ -39,7 +39,7 @@
/** /**
*@defgroup DBG DBG *@addtogroup LOGDBG
*@{ *@{
*/ */
@ -231,5 +231,5 @@ void cw_dbg_ktv_dump(mavl_t ktv, uint32_t dbglevel,
int cw_dbg_is_level(int level); int cw_dbg_is_level(int level);
/** /**
*@} *@} LOGDBG
*/ */

View File

@ -8,13 +8,13 @@
/** /**
* @addtogroup DATAMGMT Data Structures & Algos * @addtogroup ALGOS
* @{ * @{
*/ */
/** /**
* @defgroup KTV Key-Type-Value-Store * @defgroup KTV KTV Store (Key-Type-Value-Store)
* @{ * @{
*/ */
@ -141,7 +141,7 @@ extern const cw_Type_t * cw_ktv_std_types[];
/** /**
* @} KTV * @} KTV
* @} DATAMGMT * @} ALGOS
*/ */
#endif /* __KVT_H */ #endif /* __KVT_H */

View File

@ -22,6 +22,11 @@
*@brief Definitions for logging and debugging. *@brief Definitions for logging and debugging.
*/ */
/**
* @defgroup LOGDBG Logging & Debugging
* @{
*/
#ifndef __CW_LOG_H #ifndef __CW_LOG_H
#define __CW_LOG_H #define __CW_LOG_H
@ -52,4 +57,8 @@ extern const char *cw_log_name;
extern struct cw_LogWriter * cw_log_writers[]; extern struct cw_LogWriter * cw_log_writers[];
/**
* @} LOGDBG
*/
#endif #endif

View File

@ -4,7 +4,7 @@
#include <stdint.h> #include <stdint.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include "conn.h" /*#include "conn.h"*/
#include "bstr.h" #include "bstr.h"
@ -68,7 +68,7 @@
/** /**
* Read a byte from input buffer * Read a byte from input buffer
* @param src Pointer to input buffer * @param src Pointer to input buffer
* @return the byte red * @return the byte reed
*/ */
#define lw_get_byte(src)\ #define lw_get_byte(src)\
(*(uint8_t*)(src)) (*(uint8_t*)(src))
@ -93,10 +93,6 @@
/* the following functions are defined as static inline and not as
macro to avoid any side effects */
int lw_put_data(uint8_t*dst,const uint8_t*data,uint16_t len); int lw_put_data(uint8_t*dst,const uint8_t*data,uint16_t len);
int lw_put_bstr(uint8_t * dst, const bstr_t b); int lw_put_bstr(uint8_t * dst, const bstr_t b);
int lw_put_bstr16(uint8_t * dst, const bstr16_t b); int lw_put_bstr16(uint8_t * dst, const bstr16_t b);
@ -108,34 +104,21 @@ int lw_put_vendor(uint8_t * dst, uint32_t vendorid,
/*
/**
* @defgroup LWAPP_IN_HANDLER Input Handlers
* @{
*/
int lw_in_vendor_specific(struct conn *conn, struct cw_action_in *a, int lw_in_vendor_specific(struct conn *conn, struct cw_action_in *a,
uint8_t * data, int len, struct sockaddr *from); uint8_t * data, int len, struct sockaddr *from);
*/
/**
* @}
*/
/**
* @defgroup LWAPP_MISC Misc Functions
* @{
*/
extern uint16_t lw_checksum(uint8_t *d,int len); extern uint16_t lw_checksum(uint8_t *d,int len);
extern int lw_put_sockaddr(uint8_t *dst, struct sockaddr_storage *addr); extern int lw_put_sockaddr(uint8_t *dst, struct sockaddr_storage *addr);
/**
* @}
*/
#define lw_foreach_elem(d,msg,len) for(d=msg; d<msg+len; d=d+3+LWMSGELEM_GET_LEN(d))
/** /**
* @} * @} LW
*/ */
#endif #endif

View File

@ -195,7 +195,7 @@
*/ */
#define lw_foreach_elem(d,msg,len) for(d=msg; d<msg+len; d=d+3+LWMSGELEM_GET_LEN(d))
/* /*

View File

@ -23,7 +23,7 @@
/** /**
* @addtogroup DATAMGMT * @addtogroup ALGOS
* @{ * @{
* *
* @defgroup MAVL Mavl Tree * @defgroup MAVL Mavl Tree
@ -275,7 +275,7 @@ void * mavl_add_ptr ( mavl_t tree, const void *ptr );
/** /**
* @} MAVL * @} MAVL
* *
* @} DATAMGMT * @} ALGOS
* *
*/ */

View File

@ -29,10 +29,18 @@
/** /**
* @defgroup MLIST MLIST * @addtogroup ALGOS
* @{ * @{
*/ */
/**
* @defgroup MLIST Mlist
* @{
*/
/** /**
* Element of an mlist. * Element of an mlist.
* It's a simple connected list, just with pone connection to the * It's a simple connected list, just with pone connection to the
@ -88,10 +96,12 @@ extern struct mlistelem *mlist_find(mlist_t l, struct mlistelem *start, void *da
#define mlist_create_conststr() mlist_create(NULL,NULL,sizeof(const char*)) #define mlist_create_conststr() mlist_create(NULL,NULL,sizeof(const char*))
mlistelem_t * mlist_append_ptr (mlist_t list, void * ptr); mlistelem_t * mlist_append_ptr (mlist_t list, void * ptr);
/** /**
* @} * @} MLIST
*/
/**
* @} ALGOS
*/ */
#endif #endif