From 2d2e2cca0dc1d62addc9c9fcb3a59f343fc3baf6 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 25 Apr 2016 12:11:20 +0200 Subject: Update doxygen annotations in libosmocore This adds and improves doxygen API descriptions all over libosmocore, reducing the 'white spots' that don't have any documentation. --- src/macaddr.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'src/macaddr.c') diff --git a/src/macaddr.c b/src/macaddr.c index a6e1304a..f83e0546 100644 --- a/src/macaddr.c +++ b/src/macaddr.c @@ -20,12 +20,24 @@ * */ +/*! \addtogroup utils + * @{ + */ + +/*! \file loggingrb.c */ + #include #include #include #include - +/*! \brief Parse a MAC address from human-readable notation + * This function parses an ethernet MAC address in the commonly-used + * hex/colon notation (00:00:00:00:00:00) and generates the binary + * representation from it. + * \param[out] out pointer to caller-allocated buffer of 6 bytes + * \param[in] in pointer to input data as string with hex/colon notation + */ int osmo_macaddr_parse(uint8_t *out, const char *in) { /* 00:00:00:00:00:00 */ @@ -54,7 +66,11 @@ int osmo_macaddr_parse(uint8_t *out, const char *in) #include #include - +/*! \brief Obtain the MAC address of a given network device + * \param[out] mac_out pointer to caller-allocated buffer of 6 bytes + * \param[in] dev_name string name of the network device + * \returns 0 in case of success; negative otherwise + */ int osmo_get_macaddr(uint8_t *mac_out, const char *dev_name) { int rc = -1; @@ -92,6 +108,11 @@ int osmo_get_macaddr(uint8_t *mac_out, const char *dev_name) #include #include +/*! \brief Obtain the MAC address of a given network device + * \param[out] mac_out pointer to caller-allocated buffer of 6 bytes + * \param[in] dev_name string name of the network device + * \returns 0 in case of success; negative otherwise + */ int osmo_get_macaddr(uint8_t *mac_out, const char *dev_name) { int fd, rc; @@ -114,3 +135,5 @@ int osmo_get_macaddr(uint8_t *mac_out, const char *dev_name) return 0; } #endif + +/*! @} */ -- cgit v1.2.3