diff --git a/libcw.project b/libcw.project index bcd8b76a..be77301b 100644 --- a/libcw.project +++ b/libcw.project @@ -262,6 +262,7 @@ + diff --git a/src/cw/algos.h b/src/cw/algos.h new file mode 100644 index 00000000..7d2affeb --- /dev/null +++ b/src/cw/algos.h @@ -0,0 +1,14 @@ +#ifndef __ALGOS_H +#define __ALGOS_H + +/** + * @defgroup ALGOS Algos + * @{ + */ + + +/** + * @} ALGOS + */ + +#endif /* __ALGOS_H */ \ No newline at end of file diff --git a/src/cw/bstr.h b/src/cw/bstr.h index 5090ec83..8ae05b46 100644 --- a/src/cw/bstr.h +++ b/src/cw/bstr.h @@ -19,10 +19,8 @@ /** * @file * @brief Definitions for bstr functions - * @defgroup Bstr BSTR * @brief BSTR is used to store binary strings. * We can see them anywhere. - * @{ */ #ifndef __BSTR_H @@ -32,6 +30,16 @@ #include #include +/** + * @addtogroup ALGOS + * @{ + */ + +/** + * @defgroup Bstr BSTR (Binary strings) + * @{ + */ + /** * @defgroup BSTRTypes Types * @{ @@ -82,6 +90,11 @@ extern int bstr_to_str(char *dst, bstr_t str,char * def); */ #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. */ #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) @@ -148,7 +157,9 @@ extern uint8_t * bstr16_create_from_cfgstr(const char * s); * The difference is, that the first four bytes of the * 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 -/**@}*/ +/**@} BSTR + */ +/** + * @} AGLOS + */ \ No newline at end of file diff --git a/src/cw/capwap.h b/src/cw/capwap.h index 30294225..60191e6c 100644 --- a/src/cw/capwap.h +++ b/src/cw/capwap.h @@ -39,11 +39,15 @@ /* 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 @@ -632,7 +636,9 @@ enum capwap_states { #endif - /** - *@} + * @} CAPWAP_DEFS + */ +/** + * @} CAPWAP */ diff --git a/src/cw/cw.h b/src/cw/cw.h index ebc98469..d144c465 100644 --- a/src/cw/cw.h +++ b/src/cw/cw.h @@ -12,6 +12,11 @@ #include "capwap.h" #include "msgset.h" +/** + * @addtogroup CAPWAP + * @{ + */ + /** * @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_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_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 diff --git a/src/cw/dbg.h b/src/cw/dbg.h index 791c42fb..dbedfd14 100644 --- a/src/cw/dbg.h +++ b/src/cw/dbg.h @@ -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); /** - *@} + *@} LOGDBG */ diff --git a/src/cw/ktv.h b/src/cw/ktv.h index 5151de5e..9c07d3f5 100644 --- a/src/cw/ktv.h +++ b/src/cw/ktv.h @@ -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 - * @} DATAMGMT + * @} ALGOS */ #endif /* __KVT_H */ diff --git a/src/cw/log.h b/src/cw/log.h index 78fff79f..f062746d 100644 --- a/src/cw/log.h +++ b/src/cw/log.h @@ -22,6 +22,11 @@ *@brief Definitions for logging and debugging. */ +/** + * @defgroup LOGDBG Logging & Debugging + * @{ + */ + #ifndef __CW_LOG_H #define __CW_LOG_H @@ -52,4 +57,8 @@ extern const char *cw_log_name; extern struct cw_LogWriter * cw_log_writers[]; +/** + * @} LOGDBG + */ + #endif diff --git a/src/cw/lw.h b/src/cw/lw.h index 7e2f83e3..ca5c6fbd 100644 --- a/src/cw/lw.h +++ b/src/cw/lw.h @@ -4,7 +4,7 @@ #include #include -#include "conn.h" +/*#include "conn.h"*/ #include "bstr.h" @@ -68,7 +68,7 @@ /** * Read a byte from input buffer * @param src Pointer to input buffer - * @return the byte red + * @return the byte reed */ #define lw_get_byte(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_bstr(uint8_t * dst, const bstr_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, uint8_t * data, int len, struct sockaddr *from); - -/** - * @} - */ +*/ + -/** - * @defgroup LWAPP_MISC Misc Functions - * @{ - */ extern uint16_t lw_checksum(uint8_t *d,int len); extern int lw_put_sockaddr(uint8_t *dst, struct sockaddr_storage *addr); -/** - * @} - */ +#define lw_foreach_elem(d,msg,len) for(d=msg; d