diff options
Diffstat (limited to 'src')
78 files changed, 673 insertions, 673 deletions
diff --git a/src/application.c b/src/application.c index 8f37c938..e7c8e0f9 100644 --- a/src/application.c +++ b/src/application.c @@ -22,7 +22,7 @@ */ /*! \file application.c - * \brief Routines for helping with the osmocom application setup. + * Routines for helping with the osmocom application setup. */ /*! \mainpage libosmocore Documentation @@ -90,7 +90,7 @@ static void sighup_hdlr(int signal) log_targets_reopen(); } -/*! \brief Ignore \ref SIGPIPE, \ref SIGALRM, \ref SIGHUP and \ref SIGIO */ +/*! Ignore \ref SIGPIPE, \ref SIGALRM, \ref SIGHUP and \ref SIGIO */ void osmo_init_ignore_signals(void) { /* Signals that by default would terminate */ @@ -106,7 +106,7 @@ void osmo_init_ignore_signals(void) #endif } -/*! \brief Initialize the osmocom logging framework +/*! Initialize the osmocom logging framework * \param[in] log_info Array of available logging sub-systems * \returns 0 on success, -1 in case of error * @@ -125,7 +125,7 @@ int osmo_init_logging(const struct log_info *log_info) return 0; } -/*! \brief Turn the current process into a background daemon +/*! Turn the current process into a background daemon * * This function will fork the process, exit the parent and set umask, * create a new session, close stdin/stdout/stderr and chdir to /tmp diff --git a/src/backtrace.c b/src/backtrace.c index 6cd798c5..0240a758 100644 --- a/src/backtrace.c +++ b/src/backtrace.c @@ -21,7 +21,7 @@ */ /*! \file backtrace.c - * \brief Routines realted to generating call back traces + * Routines realted to generating call back traces */ #include <stdio.h> @@ -60,7 +60,7 @@ static void _osmo_backtrace(int use_printf, int subsys, int level) free(strings); } -/*! \brief Generate and print a call back-trace +/*! Generate and print a call back-trace * * This function will generate a function call back-trace of the * current process and print it to stdout. */ @@ -69,7 +69,7 @@ void osmo_generate_backtrace(void) _osmo_backtrace(1, 0, 0); } -/*! \brief Generate and log a call back-trace +/*! Generate and log a call back-trace * \param[in] subsys Logging sub-system * \param[in] level Logging level * diff --git a/src/bitcomp.c b/src/bitcomp.c index 9c01246b..acf165e0 100644 --- a/src/bitcomp.c +++ b/src/bitcomp.c @@ -25,7 +25,7 @@ */ /*! \file bitcomp.c - * \brief Osmocom bit compression routines + * Osmocom bit compression routines */ #include <stdint.h> @@ -222,7 +222,7 @@ static const unsigned t4_make_up[2][15] = { } }; -/*! \brief Make-up codes for a given length +/*! Make-up codes for a given length * * \return Return proper make-up code word for an uninterrupted * sequence of b bits of length len according to modified ITU-T T.4 @@ -307,7 +307,7 @@ static inline int t4_rle(struct bitvec *bv, unsigned len, bool b) return bitvec_set_uint(bv, t4_term[b][len], t4_term_length[b][len]); } -/*! \brief encode bit vector in-place using T4 encoding +/*! encode bit vector in-place using T4 encoding * Assumes MSB first encoding. * \param[in] bv bit vector to be encoded * \return color code (if the encoding started with 0 or 1) or -1 on @@ -26,13 +26,13 @@ /*! \addtogroup bits * @{ - * \brief Osmocom bit level support code + * Osmocom bit level support code */ /*! \file bits.c */ -/*! \brief convert unpacked bits to packed bits, return length in bytes +/*! convert unpacked bits to packed bits, return length in bytes * \param[out] out output buffer of packed bits * \param[in] in input buffer of unpacked bits * \param[in] num_bits number of bits @@ -60,7 +60,7 @@ int osmo_ubit2pbit(pbit_t *out, const ubit_t *in, unsigned int num_bits) return outptr - out; } -/*! \brief Shift unaligned input to octet-aligned output +/*! Shift unaligned input to octet-aligned output * \param[out] out output buffer, unaligned * \param[in] in input buffer, octet-aligned * \param[in] num_nibbles number of nibbles @@ -87,7 +87,7 @@ void osmo_nibble_shift_right(uint8_t *out, const uint8_t *in, out[i] = (in[i - 1] & 0xF) << 4; } -/*! \brief Shift unaligned input to octet-aligned output +/*! Shift unaligned input to octet-aligned output * \param[out] out output buffer, octet-aligned * \param[in] in input buffer, unaligned * \param[in] num_nibbles number of nibbles @@ -108,7 +108,7 @@ void osmo_nibble_shift_left_unal(uint8_t *out, const uint8_t *in, out[i] = (in[i] & 0xF) << 4; } -/*! \brief convert unpacked bits to soft bits +/*! convert unpacked bits to soft bits * \param[out] out output buffer of soft bits * \param[in] in input buffer of unpacked bits * \param[in] num_bits number of bits @@ -120,7 +120,7 @@ void osmo_ubit2sbit(sbit_t *out, const ubit_t *in, unsigned int num_bits) out[i] = in[i] ? -127 : 127; } -/*! \brief convert soft bits to unpacked bits +/*! convert soft bits to unpacked bits * \param[out] out output buffer of unpacked bits * \param[in] in input buffer of soft bits * \param[in] num_bits number of bits @@ -132,7 +132,7 @@ void osmo_sbit2ubit(ubit_t *out, const sbit_t *in, unsigned int num_bits) out[i] = in[i] < 0; } -/*! \brief convert packed bits to unpacked bits, return length in bytes +/*! convert packed bits to unpacked bits, return length in bytes * \param[out] out output buffer of unpacked bits * \param[in] in input buffer of packed bits * \param[in] num_bits number of bits @@ -174,7 +174,7 @@ int osmo_pbit2ubit(ubit_t *out, const pbit_t *in, unsigned int num_bits) return cur - out; } -/*! \brief convert unpacked bits to packed bits (extended options) +/*! convert unpacked bits to packed bits (extended options) * \param[out] out output buffer of packed bits * \param[in] out_ofs offset into output buffer * \param[in] in input buffer of unpacked bits @@ -199,7 +199,7 @@ int osmo_ubit2pbit_ext(pbit_t *out, unsigned int out_ofs, return ((out_ofs + num_bits - 1) >> 3) + 1; } -/*! \brief convert packed bits to unpacked bits (extended options) +/*! convert packed bits to unpacked bits (extended options) * \param[out] out output buffer of unpacked bits * \param[in] out_ofs offset into output buffer * \param[in] in input buffer of packed bits @@ -221,7 +221,7 @@ int osmo_pbit2ubit_ext(ubit_t *out, unsigned int out_ofs, return out_ofs + num_bits; } -/*! \brief generalized bit reversal function +/*! generalized bit reversal function * \param[in] x the 32bit value to be reversed * \param[in] k the type of reversal requested * \returns the reversed 32bit dword @@ -242,7 +242,7 @@ uint32_t osmo_bit_reversal(uint32_t x, enum osmo_br_mode k) return x; } -/*! \brief reverse the bit-order in each byte of a dword +/*! reverse the bit-order in each byte of a dword * \param[in] x 32bit input value * \returns 32bit value where bits of each byte have been reversed * @@ -257,7 +257,7 @@ uint32_t osmo_revbytebits_32(uint32_t x) return x; } -/*! \brief reverse the bit order in a byte +/*! reverse the bit order in a byte * \param[in] x 8bit input value * \returns 8bit value where bits order has been reversed * @@ -272,7 +272,7 @@ uint32_t osmo_revbytebits_8(uint8_t x) return x; } -/*! \brief reverse bit-order of each byte in a buffer +/*! reverse bit-order of each byte in a buffer * \param[in] buf buffer containing bytes to be bit-reversed * \param[in] len length of buffer in bytes * diff --git a/src/bitvec.c b/src/bitvec.c index 41e4f64c..8ed7296a 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -24,7 +24,7 @@ /*! \addtogroup bitvec * @{ - * \brief Osmocom bit vector abstraction + * Osmocom bit vector abstraction */ /*! \file bitvec.c */ @@ -71,7 +71,7 @@ static uint8_t bitval2mask(enum bit_value bit, uint8_t bitnum) return bitval; } -/*! \brief check if the bit is 0 or 1 for a given position inside a bitvec +/*! check if the bit is 0 or 1 for a given position inside a bitvec * \param[in] bv the bit vector on which to check * \param[in] bitnr the bit number inside the bit vector to check * \return value of the requested bit @@ -93,7 +93,7 @@ enum bit_value bitvec_get_bit_pos(const struct bitvec *bv, unsigned int bitnr) return ZERO; } -/*! \brief check if the bit is L or H for a given position inside a bitvec +/*! check if the bit is L or H for a given position inside a bitvec * \param[in] bv the bit vector on which to check * \param[in] bitnr the bit number inside the bit vector to check * \return value of the requested bit @@ -116,7 +116,7 @@ enum bit_value bitvec_get_bit_pos_high(const struct bitvec *bv, return L; } -/*! \brief get the Nth set bit inside the bit vector +/*! get the Nth set bit inside the bit vector * \param[in] bv the bit vector to use * \param[in] n the bit number to get * \returns the bit number (offset) of the Nth set bit in \a bv @@ -136,7 +136,7 @@ unsigned int bitvec_get_nth_set_bit(const struct bitvec *bv, unsigned int n) return 0; } -/*! \brief set a bit at given position in a bit vector +/*! set a bit at given position in a bit vector * \param[in] bv bit vector on which to operate * \param[in] bitnr number of bit to be set * \param[in] bit value to which the bit is to be set @@ -163,7 +163,7 @@ inline int bitvec_set_bit_pos(struct bitvec *bv, unsigned int bitnr, return 0; } -/*! \brief set the next bit inside a bitvec +/*! set the next bit inside a bitvec * \param[in] bv bit vector to be used * \param[in] bit value of the bit to be set * \returns 0 on success, negative value on error @@ -179,7 +179,7 @@ inline int bitvec_set_bit(struct bitvec *bv, enum bit_value bit) return rc; } -/*! \brief get the next bit (low/high) inside a bitvec +/*! get the next bit (low/high) inside a bitvec * \return value of th next bit in the vector */ int bitvec_get_bit_high(struct bitvec *bv) { @@ -192,7 +192,7 @@ int bitvec_get_bit_high(struct bitvec *bv) return rc; } -/*! \brief set multiple bits (based on array of bitvals) at current pos +/*! set multiple bits (based on array of bitvals) at current pos * \param[in] bv bit vector * \param[in] bits array of \ref bit_value * \param[in] count number of bits to set @@ -210,7 +210,7 @@ int bitvec_set_bits(struct bitvec *bv, const enum bit_value *bits, unsigned int return 0; } -/*! \brief set multiple bits (based on numeric value) at current pos +/*! set multiple bits (based on numeric value) at current pos * \return 0 in case of success; negative in case of error */ int bitvec_set_uint(struct bitvec *bv, unsigned int ui, unsigned int num_bits) { @@ -228,7 +228,7 @@ int bitvec_set_uint(struct bitvec *bv, unsigned int ui, unsigned int num_bits) return 0; } -/*! \brief get multiple bits (num_bits) from beginning of vector (MSB side) +/*! get multiple bits (num_bits) from beginning of vector (MSB side) * \return 16bit signed integer retrieved from bit vector */ int16_t bitvec_get_int16_msb(const struct bitvec *bv, unsigned int num_bits) { @@ -241,7 +241,7 @@ int16_t bitvec_get_int16_msb(const struct bitvec *bv, unsigned int num_bits) return osmo_load16be(bv->data) >> (16 - num_bits); } -/*! \brief get multiple bits (based on numeric value) from current pos +/*! get multiple bits (based on numeric value) from current pos * \return integer value retrieved from bit vector */ int bitvec_get_uint(struct bitvec *bv, unsigned int num_bits) { @@ -260,7 +260,7 @@ int bitvec_get_uint(struct bitvec *bv, unsigned int num_bits) return ui; } -/*! \brief fill num_bits with \fill starting from the current position +/*! fill num_bits with \fill starting from the current position * \return 0 on success; negative otherwise (out of vector boundary) */ int bitvec_fill(struct bitvec *bv, unsigned int num_bits, enum bit_value fill) @@ -273,7 +273,7 @@ int bitvec_fill(struct bitvec *bv, unsigned int num_bits, enum bit_value fill) return 0; } -/*! \brief pad all remaining bits up to num_bits +/*! pad all remaining bits up to num_bits * \return 0 on success; negative otherwise */ int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit) { @@ -284,7 +284,7 @@ int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit) return bitvec_fill(bv, n, L); } -/*! \brief find first bit set in bit vector +/*! find first bit set in bit vector * \return 0 on success; negative otherwise */ int bitvec_find_bit_pos(const struct bitvec *bv, unsigned int n, enum bit_value val) @@ -299,7 +299,7 @@ int bitvec_find_bit_pos(const struct bitvec *bv, unsigned int n, return -1; } -/*! \brief get multiple bytes from current pos +/*! get multiple bytes from current pos * Assumes MSB first encoding. * \param[in] bv bit vector * \param[in] bytes array @@ -335,7 +335,7 @@ int bitvec_get_bytes(struct bitvec *bv, uint8_t *bytes, unsigned int count) return 0; } -/*! \brief set multiple bytes at current pos +/*! set multiple bytes at current pos * Assumes MSB first encoding. * \param[in] bv bit vector * \param[in] bytes array @@ -375,7 +375,7 @@ int bitvec_set_bytes(struct bitvec *bv, const uint8_t *bytes, unsigned int count return 0; } -/*! \brief Allocate a bit vector +/*! Allocate a bit vector * \param[in] size Number of bits in the vector * \param[in] ctx Context from which to allocate * \return pointer to allocated vector; NULL in case of error */ @@ -396,7 +396,7 @@ struct bitvec *bitvec_alloc(unsigned int size, TALLOC_CTX *ctx) return bv; } -/*! \brief Free a bit vector (release its memory) +/*! Free a bit vector (release its memory) * \param[in] bit vector to free */ void bitvec_free(struct bitvec *bv) { @@ -404,7 +404,7 @@ void bitvec_free(struct bitvec *bv) talloc_free(bv); } -/*! \brief Export a bit vector to a buffer +/*! Export a bit vector to a buffer * \param[in] bitvec (unpacked bits) * \param[out] buffer for the unpacked bits * \return number of bytes (= bits) copied */ @@ -417,7 +417,7 @@ unsigned int bitvec_pack(const struct bitvec *bv, uint8_t *buffer) return i; } -/*! \brief Copy buffer of unpacked bits into bit vector +/*! Copy buffer of unpacked bits into bit vector * \param[in] buffer unpacked input bits * \param[out] bv unpacked bit vector * \return number of bytes (= bits) copied */ @@ -430,7 +430,7 @@ unsigned int bitvec_unpack(struct bitvec *bv, const uint8_t *buffer) return i; } -/*! \brief read hexadecimap string into a bit vector +/*! read hexadecimap string into a bit vector * \param[in] src string containing hex digits * \param[out] bv unpacked bit vector * \return 0 in case of success; 1 in case of error @@ -451,7 +451,7 @@ int bitvec_unhex(struct bitvec *bv, const char *src) return 0; } -/*! \brief read part of the vector +/*! read part of the vector * \param[in] bv The boolean vector to work on * \param[in,out] read_index Where reading supposed to start in the vector * \param[in] len How many bits to read from vector @@ -475,7 +475,7 @@ uint64_t bitvec_read_field(struct bitvec *bv, unsigned int *read_index, unsigned return ui; } -/*! \brief write into the vector +/*! write into the vector * \param[in] bv The boolean vector to work on * \param[in,out] write_index Where writing supposed to start in the vector * \param[in] len How many bits to write @@ -498,7 +498,7 @@ int bitvec_write_field(struct bitvec *bv, unsigned int *write_index, uint64_t va return 0; } -/*! \brief convert enum to corresponding character +/*! convert enum to corresponding character * \param v input value (bit) * \return single character, either 0, 1, L or H */ char bit_value_to_char(enum bit_value v) @@ -512,7 +512,7 @@ char bit_value_to_char(enum bit_value v) } } -/*! \brief prints bit vector to provided string +/*! prints bit vector to provided string * It's caller's responsibility to ensure that we won't shoot him in the foot: * the provided buffer should be at lest cur_bit + 1 bytes long */ @@ -551,14 +551,14 @@ static inline unsigned leading_bits(uint8_t x, bool b) } return 7; } -/*! \brief force bit vector to all 0 and current bit to the beginnig of the vector */ +/*! force bit vector to all 0 and current bit to the beginnig of the vector */ void bitvec_zero(struct bitvec *bv) { bv->cur_bit = 0; memset(bv->data, 0, bv->data_len); } -/*! \brief Return number (bits) of uninterrupted bit run in vector starting from the MSB +/*! Return number (bits) of uninterrupted bit run in vector starting from the MSB * \param[in] bv The boolean vector to work on * \param[in] b The boolean, sequence of which is looked at from the vector start * \returns Number of consecutive bits of \p b in \p bv @@ -574,7 +574,7 @@ unsigned bitvec_rl(const struct bitvec *bv, bool b) return bv->cur_bit; } -/*! \brief Return number (bits) of uninterrupted bit run in vector +/*! Return number (bits) of uninterrupted bit run in vector * starting from the current bit * \param[in] bv The boolean vector to work on * \param[in] b The boolean, sequence of 1's or 0's to be checked @@ -619,7 +619,7 @@ unsigned bitvec_rl_curbit(struct bitvec *bv, bool b, int max_bits) |