[PATCH] libosmocore[master]: doxygen: unify use of \file across the board

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Jun 22 21:54:57 UTC 2017


Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/2987

to look at the new patch set (#3).

doxygen: unify use of \file across the board

Considering the various styles and implications found in the sources, edit
scores of files to follow the same API doc guidelines around the doxygen
grouping and the \file tag.

Many files now show a short description in the generated API doc that was so
far only available as C comment.

The guidelines and reasoning behind it is documented at
https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation

In some instances, remove file comments and add to the corresponding group
instead, to be shared among several files (e.g. bitvec).

Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
---
M include/osmocom/codec/codec.h
M include/osmocom/coding/gsm0503_coding.h
M include/osmocom/coding/gsm0503_interleaving.h
M include/osmocom/coding/gsm0503_mapping.h
M include/osmocom/coding/gsm0503_parity.h
M include/osmocom/coding/gsm0503_tables.h
M include/osmocom/core/backtrace.h
M include/osmocom/core/bitcomp.h
M include/osmocom/core/bits.h
M include/osmocom/core/bitvec.h
M include/osmocom/core/byteswap.h
M include/osmocom/core/conv.h
M include/osmocom/core/crc16.h
M include/osmocom/core/crcXXgen.h.tpl
M include/osmocom/core/crcgen.h
M include/osmocom/core/defs.h
M include/osmocom/core/endian.h
M include/osmocom/core/fsm.h
M include/osmocom/core/gsmtap.h
M include/osmocom/core/gsmtap_util.h
M include/osmocom/core/linuxlist.h
M include/osmocom/core/logging.h
M include/osmocom/core/loggingrb.h
M include/osmocom/core/macaddr.h
M include/osmocom/core/msgb.h
M include/osmocom/core/msgfile.h
M include/osmocom/core/panic.h
M include/osmocom/core/plugin.h
M include/osmocom/core/prim.h
M include/osmocom/core/process.h
M include/osmocom/core/rate_ctr.h
M include/osmocom/core/select.h
M include/osmocom/core/sercomm.h
M include/osmocom/core/serial.h
M include/osmocom/core/signal.h
M include/osmocom/core/socket.h
M include/osmocom/core/stat_item.h
M include/osmocom/core/stats.h
M include/osmocom/core/strrb.h
M include/osmocom/core/talloc.h
M include/osmocom/core/timer.h
M include/osmocom/core/timer_compat.h
M include/osmocom/core/utils.h
M include/osmocom/core/write_queue.h
M include/osmocom/crypt/auth.h
M include/osmocom/crypt/gprs_cipher.h
M include/osmocom/ctrl/control_cmd.h
M include/osmocom/ctrl/control_if.h
M include/osmocom/ctrl/control_vty.h
M include/osmocom/ctrl/ports.h
M include/osmocom/gprs/gprs_bssgp.h
M include/osmocom/gprs/gprs_bssgp_bss.h
M include/osmocom/gprs/gprs_msgb.h
M include/osmocom/gprs/gprs_ns.h
M include/osmocom/gprs/gprs_ns_frgre.h
M include/osmocom/gprs/gprs_rlc.h
M include/osmocom/gprs/protocol/gsm_04_60.h
M include/osmocom/gprs/protocol/gsm_08_16.h
M include/osmocom/gprs/protocol/gsm_08_18.h
M include/osmocom/gsm/a5.h
M include/osmocom/gsm/abis_nm.h
M include/osmocom/gsm/apn.h
M include/osmocom/gsm/bitvec_gsm.h
M include/osmocom/gsm/comp128.h
M include/osmocom/gsm/comp128v23.h
M include/osmocom/gsm/gan.h
M include/osmocom/gsm/gea.h
M include/osmocom/gsm/gsm0341.h
M include/osmocom/gsm/gsm0411_smc.h
M include/osmocom/gsm/gsm0411_smr.h
M include/osmocom/gsm/gsm0411_utils.h
M include/osmocom/gsm/gsm0480.h
M include/osmocom/gsm/gsm0502.h
M include/osmocom/gsm/gsm0808.h
M include/osmocom/gsm/gsm0808_utils.h
M include/osmocom/gsm/gsm23003.h
M include/osmocom/gsm/gsm48.h
M include/osmocom/gsm/gsm48_ie.h
M include/osmocom/gsm/gsm_utils.h
M include/osmocom/gsm/gsup.h
M include/osmocom/gsm/ipa.h
M include/osmocom/gsm/kasumi.h
M include/osmocom/gsm/l1sap.h
M include/osmocom/gsm/lapd_core.h
M include/osmocom/gsm/lapdm.h
M include/osmocom/gsm/meas_rep.h
M include/osmocom/gsm/mncc.h
M include/osmocom/gsm/oap.h
M include/osmocom/gsm/prim.h
M include/osmocom/gsm/protocol/gsm_03_40.h
M include/osmocom/gsm/protocol/gsm_03_41.h
M include/osmocom/gsm/protocol/gsm_04_08.h
M include/osmocom/gsm/protocol/gsm_04_08_gprs.h
M include/osmocom/gsm/protocol/gsm_04_11.h
M include/osmocom/gsm/protocol/gsm_04_12.h
M include/osmocom/gsm/protocol/gsm_04_14.h
M include/osmocom/gsm/protocol/gsm_04_80.h
M include/osmocom/gsm/protocol/gsm_08_58.h
M include/osmocom/gsm/protocol/gsm_09_02.h
M include/osmocom/gsm/protocol/gsm_12_21.h
M include/osmocom/gsm/protocol/gsm_23_003.h
M include/osmocom/gsm/protocol/gsm_44_318.h
M include/osmocom/gsm/protocol/ipaccess.h
M include/osmocom/gsm/protocol/smpp34_osmocom.h
M include/osmocom/gsm/rsl.h
M include/osmocom/gsm/rxlev_stat.h
M include/osmocom/gsm/sysinfo.h
M include/osmocom/gsm/tlv.h
M include/osmocom/sim/class_tables.h
M include/osmocom/sim/sim.h
M include/osmocom/vty/buffer.h
M include/osmocom/vty/command.h
M include/osmocom/vty/logging.h
M include/osmocom/vty/misc.h
M include/osmocom/vty/ports.h
M include/osmocom/vty/stats.h
M include/osmocom/vty/telnet_interface.h
M include/osmocom/vty/vector.h
M include/osmocom/vty/vty.h
M src/application.c
M src/backtrace.c
M src/bitcomp.c
M src/bits.c
M src/bitvec.c
M src/codec/gsm610.c
M src/codec/gsm620.c
M src/codec/gsm660.c
M src/codec/gsm690.c
M src/coding/gsm0503_coding.c
M src/coding/gsm0503_interleaving.c
M src/coding/gsm0503_mapping.c
M src/coding/gsm0503_parity.c
M src/coding/gsm0503_tables.c
M src/conv.c
M src/conv_acc.c
M src/conv_acc_generic.c
M src/conv_acc_sse.c
M src/conv_acc_sse_avx.c
M src/conv_acc_sse_impl.h
M src/crc16.c
M src/crcXXgen.c.tpl
M src/ctrl/control_cmd.c
M src/ctrl/control_if.c
M src/ctrl/control_vty.c
M src/ctrl/fsm_ctrl_commands.c
M src/fsm.c
M src/gb/common_vty.c
M src/gb/common_vty.h
M src/gb/gprs_bssgp.c
M src/gb/gprs_bssgp_bss.c
M src/gb/gprs_bssgp_util.c
M src/gb/gprs_bssgp_vty.c
M src/gb/gprs_ns.c
M src/gb/gprs_ns_frgre.c
M src/gb/gprs_ns_vty.c
M src/gsm/a5.c
M src/gsm/abis_nm.c
M src/gsm/apn.c
M src/gsm/auth_comp128v1.c
M src/gsm/auth_comp128v23.c
M src/gsm/auth_core.c
M src/gsm/auth_milenage.c
M src/gsm/comp128.c
M src/gsm/comp128v23.c
M src/gsm/gan.c
M src/gsm/gea.c
M src/gsm/gprs_cipher_core.c
M src/gsm/gprs_gea.c
M src/gsm/gprs_rlc.c
M src/gsm/gsm0341.c
M src/gsm/gsm0411_smc.c
M src/gsm/gsm0411_smr.c
M src/gsm/gsm0411_utils.c
M src/gsm/gsm0414.c
M src/gsm/gsm0480.c
M src/gsm/gsm0502.c
M src/gsm/gsm0808.c
M src/gsm/gsm0808_utils.c
M src/gsm/gsm48.c
M src/gsm/gsm48_ie.c
M src/gsm/gsm_04_08_gprs.c
M src/gsm/gsm_utils.c
M src/gsm/gsup.c
M src/gsm/ipa.c
M src/gsm/kasumi.c
M src/gsm/lapd_core.c
M src/gsm/lapdm.c
M src/gsm/milenage/aes-encblock.c
M src/gsm/milenage/aes-internal-enc.c
M src/gsm/milenage/aes-internal.c
M src/gsm/milenage/aes.h
M src/gsm/milenage/aes_i.h
M src/gsm/milenage/aes_wrap.h
M src/gsm/milenage/common.h
M src/gsm/milenage/milenage.c
M src/gsm/milenage/milenage.h
M src/gsm/oap.c
M src/gsm/rsl.c
M src/gsm/rxlev_stat.c
M src/gsm/sysinfo.c
M src/gsm/tlv_parser.c
M src/gsmtap_util.c
M src/logging.c
M src/logging_gsmtap.c
M src/logging_syslog.c
M src/loggingrb.c
M src/macaddr.c
M src/msgb.c
M src/msgfile.c
M src/panic.c
M src/plugin.c
M src/prim.c
M src/pseudotalloc/pseudotalloc.c
M src/pseudotalloc/talloc.h
M src/rate_ctr.c
M src/select.c
M src/sercomm.c
M src/serial.c
M src/signal.c
M src/sim/card_fs_isim.c
M src/sim/card_fs_sim.c
M src/sim/card_fs_tetra.c
M src/sim/card_fs_uicc.c
M src/sim/card_fs_usim.c
M src/sim/class_tables.c
M src/sim/core.c
M src/sim/gsm_int.h
M src/sim/reader.c
M src/sim/reader_pcsc.c
M src/sim/sim_int.h
M src/socket.c
M src/stat_item.c
M src/statistics.c
M src/stats.c
M src/stats_statsd.c
M src/strrb.c
M src/timer.c
M src/timer_gettimeofday.c
M src/utils.c
M src/vty/buffer.c
M src/vty/command.c
M src/vty/fsm_vty.c
M src/vty/logging_vty.c
M src/vty/stats_vty.c
M src/vty/telnet_interface.c
M src/vty/utils.c
M src/vty/vector.c
M src/vty/vty.c
M src/write_queue.c
M utils/osmo-arfcn.c
M utils/osmo-auc-gen.c
251 files changed, 874 insertions(+), 867 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/87/2987/3

diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h
index 3e9b688..3e62a01 100644
--- a/include/osmocom/codec/codec.h
+++ b/include/osmocom/codec/codec.h
@@ -1,3 +1,5 @@
+/*! \file codec.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/coding/gsm0503_coding.h b/include/osmocom/coding/gsm0503_coding.h
index a9c59e4..a2d4115 100644
--- a/include/osmocom/coding/gsm0503_coding.h
+++ b/include/osmocom/coding/gsm0503_coding.h
@@ -1,3 +1,7 @@
+/*! \file gsm0503_coding.h
+ *  GSM TS 05.03 coding
+ */
+
 #pragma once
 
 #include <stdint.h>
@@ -5,11 +9,7 @@
 
 /*! \addtogroup coding
  *  @{
- */
-
-/*! \file gsm0503_coding.h
- *  GSM TS 05.03 coding
- */
+ * \file gsm0503_coding.h */
 
 #define GSM0503_GPRS_BURSTS_NBITS	(116 * 4)
 #define GSM0503_EGPRS_BURSTS_NBITS	(348 * 4)
diff --git a/include/osmocom/coding/gsm0503_interleaving.h b/include/osmocom/coding/gsm0503_interleaving.h
index 1463fb3..05b5e27 100644
--- a/include/osmocom/coding/gsm0503_interleaving.h
+++ b/include/osmocom/coding/gsm0503_interleaving.h
@@ -1,14 +1,14 @@
+/*! \file gsm0503_interleaving.h
+ *  GSM TS 05.03 interleaving.
+ */
+
 #pragma once
 
 #include <osmocom/core/bits.h>
 
 /*! \addtogroup interleaving
  *  @{
- */
-
-/*! \file gsm0503_interleaving.h
- *  GSM TS 05.03 interleaving
- */
+ * \file gsm0503_interleaving.h */
 
 void gsm0503_xcch_deinterleave(sbit_t *cB, const sbit_t *iB);
 void gsm0503_xcch_interleave(const ubit_t *cB, ubit_t *iB);
diff --git a/include/osmocom/coding/gsm0503_mapping.h b/include/osmocom/coding/gsm0503_mapping.h
index 435c913..fbd3bfd 100644
--- a/include/osmocom/coding/gsm0503_mapping.h
+++ b/include/osmocom/coding/gsm0503_mapping.h
@@ -1,14 +1,14 @@
+/*! \file gsm0503_mapping.c
+ *  GSM TS 05.03 burst mapping.
+ */
+
 #pragma once
 
 #include <osmocom/core/bits.h>
 
 /*! \addtogroup mapping
  *  @{
- */
-
-/*! \file gsm0503_mapping.c
- *  GSM TS 05.03 burst mapping
- */
+ * \file gsm0503_mapping.h */
 
 void gsm0503_xcch_burst_unmap(sbit_t *iB, const sbit_t *eB,
 	sbit_t *hl, sbit_t *hn);
diff --git a/include/osmocom/coding/gsm0503_parity.h b/include/osmocom/coding/gsm0503_parity.h
index 2743bdb..28a5444 100644
--- a/include/osmocom/coding/gsm0503_parity.h
+++ b/include/osmocom/coding/gsm0503_parity.h
@@ -1,14 +1,14 @@
+/*! \file gsm0503_parity.h
+ *  GSM TS 05.03 parity.
+ */
+
 #pragma once
 
 #include <osmocom/core/crcgen.h>
 
 /*! \addtogroup parity
  *  @{
- */
-
-/*! \file gsm0503_parity.h
- *  GSM TS 05.03 parity
- */
+ * \file gsm0503_parity.h */
 
 const struct osmo_crc64gen_code gsm0503_fire_crc40;
 const struct osmo_crc16gen_code gsm0503_cs234_crc16;
diff --git a/include/osmocom/coding/gsm0503_tables.h b/include/osmocom/coding/gsm0503_tables.h
index f8c43c6..55c4ebe 100644
--- a/include/osmocom/coding/gsm0503_tables.h
+++ b/include/osmocom/coding/gsm0503_tables.h
@@ -1,3 +1,7 @@
+/*! \file gsm0503_tables.h
+ *  GSM TS 05.03 tables.
+ */
+
 #pragma once
 
 #include <stdint.h>
@@ -5,11 +9,7 @@
 
 /*! \addtogroup tables
  *  @{
- */
-
-/*! \file gsm0503_tables.h
- *  GSM TS 05.03 tables
- */
+ * \file gsm0503_tables.h */
 
 extern const ubit_t gsm0503_pdtch_hl_hn_ubit[4][8];
 extern const ubit_t gsm0503_pdtch_edge_hl_hn_ubit[3][8];
diff --git a/include/osmocom/core/backtrace.h b/include/osmocom/core/backtrace.h
index 0c9b6ef..d661dd0 100644
--- a/include/osmocom/core/backtrace.h
+++ b/include/osmocom/core/backtrace.h
@@ -1,3 +1,5 @@
+/*! \file backtrace.h */
+
 #pragma once
 
 void osmo_generate_backtrace(void);
diff --git a/include/osmocom/core/bitcomp.h b/include/osmocom/core/bitcomp.h
index a184a1c..dc356bd 100644
--- a/include/osmocom/core/bitcomp.h
+++ b/include/osmocom/core/bitcomp.h
@@ -1,8 +1,7 @@
-#pragma once
-
-/* bit compression routines */
-
-/* (C) 2016 sysmocom s.f.m.c. GmbH by Max Suraev <msuraev at sysmocom.de>
+/*! \file bitcomp.h
+ *  Osmocom bit compression routines. */
+/*
+ * (C) 2016 sysmocom s.f.m.c. GmbH by Max Suraev <msuraev at sysmocom.de>
  *
  * All Rights Reserved
  *
@@ -22,13 +21,11 @@
  *
  */
 
+#pragma once
+
 /*! \defgroup bitcomp Bit compression
  *  @{
- */
-
-/*! \file bitcomp.h
- *  Osmocom bit compression routines
- */
+ * \file bitcomp.h */
 
 #include <stdint.h>
 #include <stdbool.h>
diff --git a/include/osmocom/core/bits.h b/include/osmocom/core/bits.h
index 61af716..17fe1c6 100644
--- a/include/osmocom/core/bits.h
+++ b/include/osmocom/core/bits.h
@@ -1,3 +1,11 @@
+/*! \file bits.h
+ *  Osmocom bit level support code.
+ *
+ *  NOTE on the endianess of pbit_t:
+ *  Bits in a pbit_t are ordered MSB first, i.e. 0x80 is the first bit.
+ *  Bit i in a pbit_t array is array[i/8] & (1<<(7-i%8))
+ */
+
 #pragma once
 
 #include <stdint.h>
@@ -9,15 +17,7 @@
 
 /*! \defgroup bits soft, unpacked and packed bits
  *  @{
- */
-
-/*! \file bits.h
- *  Osmocom bit level support code
- *
- *  NOTE on the endianess of pbit_t:
- *  Bits in a pbit_t are ordered MSB first, i.e. 0x80 is the first bit.
- *  Bit i in a pbit_t array is array[i/8] & (1<<(7-i%8))
- */
+ * \file bits.h */
 
 typedef int8_t  sbit_t;		/*!< soft bit (-127...127) */
 typedef uint8_t ubit_t;		/*!< unpacked bit (0 or 1) */
diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h
index 9187ce2..d4c7d68 100644
--- a/include/osmocom/core/bitvec.h
+++ b/include/osmocom/core/bitvec.h
@@ -1,7 +1,3 @@
-#pragma once
-
-/* bit vector utility routines */
-
 /* (C) 2009 by Harald Welte <laforge at gnumonks.org>
  * (C) 2012 Ivan Klyuchnikov
  * (C) 2015 Sysmocom s.f.m.c. GmbH
@@ -24,21 +20,11 @@
  *
  */
 
+#pragma once
+
 /*! \defgroup bitvec Bit vectors
  *  @{
- */
-
-/*! \file bitvec.h
- *  Osmocom bit vector abstraction
- *
- *  These functions assume a MSB (most significant bit) first layout of the
- *  bits, so that for instance the 5 bit number abcde (a is MSB) can be
- *  embedded into a byte sequence like in xxxxxxab cdexxxxx. The bit count
- *  starts with the MSB, so the bits in a byte are numbered (MSB) 01234567 (LSB).
- *  Note that there are other incompatible encodings, like it is used
- *  for the EGPRS RLC data block headers (there the bits are numbered from LSB
- *  to MSB).
- */
+ * \file bitvec.h */
 
 #include <stdint.h>
 #include <osmocom/core/talloc.h>
diff --git a/include/osmocom/core/byteswap.h b/include/osmocom/core/byteswap.h
index 4274b8f..1ea5b3d 100644
--- a/include/osmocom/core/byteswap.h
+++ b/include/osmocom/core/byteswap.h
@@ -1,3 +1,5 @@
+/*! \file byteswap.h */
+
 #pragma once
 #include <stdint.h>
 #include <osmocom/core/endian.h>
diff --git a/include/osmocom/core/conv.h b/include/osmocom/core/conv.h
index 1888fe1..8b344f4 100644
--- a/include/osmocom/core/conv.h
+++ b/include/osmocom/core/conv.h
@@ -1,6 +1,6 @@
+/*! \file conv.h
+ * Osmocom convolutional encoder and decoder. */
 /*
- * conv.h
- *
  * Copyright (C) 2011  Sylvain Munaut <tnt at 246tNt.com>
  *
  * All Rights Reserved
@@ -22,11 +22,7 @@
 
 /*! \defgroup conv Convolutional encoding and decoding routines
  *  @{
- */
-
-/*! \file conv.h
- * Osmocom convolutional encoder and decoder
- */
+ * \file conv.h */
 
 #pragma once
 
diff --git a/include/osmocom/core/crc16.h b/include/osmocom/core/crc16.h
index f1564bd..52807af 100644
--- a/include/osmocom/core/crc16.h
+++ b/include/osmocom/core/crc16.h
@@ -1,4 +1,4 @@
-/*
+/*! \file crc16.h
  * This was copied from the linux kernel and adjusted for our types.
  */
 /*
diff --git a/include/osmocom/core/crcXXgen.h.tpl b/include/osmocom/core/crcXXgen.h.tpl
index 4718809..2c909f9 100644
--- a/include/osmocom/core/crcXXgen.h.tpl
+++ b/include/osmocom/core/crcXXgen.h.tpl
@@ -1,6 +1,6 @@
+/*! \file crcXXgen.h
+ * Osmocom generic CRC routines (for max XX bits poly) header. */
 /*
- * crcXXgen.h
- *
  * Copyright (C) 2011  Sylvain Munaut <tnt at 246tNt.com>
  *
  * All Rights Reserved
@@ -24,12 +24,7 @@
 
 /*! \addtogroup crcgen
  *  @{
- */
-
-/*! \file crcXXgen.h
- * Osmocom generic CRC routines (for max XX bits poly) header
- */
-
+ * \file crcXXgen.h.tpl */
 
 #include <stdint.h>
 #include <osmocom/core/bits.h>
diff --git a/include/osmocom/core/crcgen.h b/include/osmocom/core/crcgen.h
index b39b55d..d73e6e8 100644
--- a/include/osmocom/core/crcgen.h
+++ b/include/osmocom/core/crcgen.h
@@ -1,6 +1,6 @@
+/*! \file crcgen.h
+ * Osmocom generic CRC routines global header. */
 /*
- * crcgen.h
- *
  * Copyright (C) 2011  Sylvain Munaut <tnt at 246tNt.com>
  *
  * All Rights Reserved
@@ -24,11 +24,7 @@
 
 /*! \defgroup crcgen Osmocom generic CRC routines
  *  @{
- */
-
-/*! \file crcgen.h
- * Osmocom generic CRC routines global header
- */
+ * \file crcgen.h */
 
 #include <osmocom/core/crc8gen.h>
 #include <osmocom/core/crc16gen.h>
diff --git a/include/osmocom/core/defs.h b/include/osmocom/core/defs.h
index 88c41b9..5e5aa90 100644
--- a/include/osmocom/core/defs.h
+++ b/include/osmocom/core/defs.h
@@ -1,12 +1,12 @@
+/*! \file defs.h
+ *  General definitions that are meant to be included from header files.
+ */
+
 #pragma once
 
 /*! \defgroup utils General-purpose utility functions
  *  @{
- */
-
-/*! \file defs.h
- *  General definitions that are meant to be included from header files.
- */
+ * \file defs.h */
 
 /*! Check for gcc and version.
  *
diff --git a/include/osmocom/core/endian.h b/include/osmocom/core/endian.h
index 621f34e..6107b12 100644
--- a/include/osmocom/core/endian.h
+++ b/include/osmocom/core/endian.h
@@ -1,6 +1,5 @@
-#pragma once
-
-/**
+/*! \file endian.h
+ *
  * GNU and FreeBSD have various ways to express the
  * endianess but none of them is similiar enough. This
  * will create two defines that allows to decide on the
@@ -12,6 +11,8 @@
  *
  */
 
+#pragma once
+
 #if defined(__FreeBSD__)
 #include <sys/endian.h>
         #if BYTE_ORDER == LITTLE_ENDIAN
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h
index fb182f3..2fbb250 100644
--- a/include/osmocom/core/fsm.h
+++ b/include/osmocom/core/fsm.h
@@ -1,3 +1,7 @@
+/*! \file fsm.h
+ *  Finite State Machine
+ */
+
 #pragma once
 
 #include <stdint.h>
@@ -9,11 +13,7 @@
 
 /*! \defgroup fsm Finite State Machine abstraction
  *  @{
- */
-
-/*! \file fsm.h
- *  Finite State Machine
- */
+ * \file fsm.h */
 
 struct osmo_fsm_inst;
 
diff --git a/include/osmocom/core/gsmtap.h b/include/osmocom/core/gsmtap.h
index 0dc25bb..1e19315 100644
--- a/include/osmocom/core/gsmtap.h
+++ b/include/osmocom/core/gsmtap.h
@@ -1,8 +1,6 @@
-#pragma once
-
-/* gsmtap header, pseudo-header in front of the actua GSM payload */
-
-/* GSMTAP is a generic header format for GSM protocol captures,
+/*! \file gsmtap.h
+ * gsmtap header, pseudo-header in front of the actua GSM payload.
+ * GSMTAP is a generic header format for GSM protocol captures,
  * it uses the IANA-assigned UDP port number 4729 and carries
  * payload in various formats of GSM interfaces such as Um MAC
  * blocks or Um bursts.
@@ -11,6 +9,8 @@
  * (http://airprobe.org/) or OsmocomBB (http://bb.osmocom.org/)
  */
 
+#pragma once
+
 #include <stdint.h>
 
 /* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
diff --git a/include/osmocom/core/gsmtap_util.h b/include/osmocom/core/gsmtap_util.h
index b60257e..59b81e5 100644
--- a/include/osmocom/core/gsmtap_util.h
+++ b/include/osmocom/core/gsmtap_util.h
@@ -6,8 +6,7 @@
 
 /*! \defgroup gsmtap GSMTAP
  *  @{
- */
-/*! \file gsmtap_util.h */
+ * \file gsmtap_util.h */
 
 uint8_t chantype_rsl2gsmtap(uint8_t rsl_chantype, uint8_t rsl_link_id);
 
diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h
index 5098c5f..cb753d1 100644
--- a/include/osmocom/core/linuxlist.h
+++ b/include/osmocom/core/linuxlist.h
@@ -1,11 +1,4 @@
-#pragma once
-
-/*! \defgroup linuxlist Simple doubly linked list implementation
- *  @{
- */
-
-/*!
- * \file linuxlist.h
+/*! \file linuxlist.h
  *
  * Simple doubly linked list implementation.
  *
@@ -16,6 +9,12 @@
  * using the generic single-entry routines.
  */
 
+#pragma once
+
+/*! \defgroup linuxlist Simple doubly linked list implementation
+ *  @{
+ * \file linuxlist.h */
+
 #include <stddef.h>
 
 #ifndef inline
diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index bb5aa42..68a9c13 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -2,9 +2,7 @@
 
 /*! \defgroup logging Osmocom logging framework
  *  @{
- */
-
-/*! \file logging.h */
+ * \file logging.h */
 
 #include <stdio.h>
 #include <stdint.h>
diff --git a/include/osmocom/core/loggingrb.h b/include/osmocom/core/loggingrb.h
index dcd7917..a9fb404 100644
--- a/include/osmocom/core/loggingrb.h
+++ b/include/osmocom/core/loggingrb.h
@@ -1,5 +1,3 @@
-#pragma once
-
 /* (C) 2012-2013 by Katerina Barone-Adesi <kat.obsc at gmail.com>
  * All Rights Reserved
  *
@@ -19,13 +17,11 @@
  *
  */
 
+#pragma once
 
 /*! \defgroup loggingrb Osmocom ringbuffer-backed logging
  *  @{
- */
-
-/*! \file loggingrb.h
- */
+ * \file loggingrb.h */
 
 struct log_info;
 
diff --git a/include/osmocom/core/macaddr.h b/include/osmocom/core/macaddr.h
index 8de6238..83f0bde 100644
--- a/include/osmocom/core/macaddr.h
+++ b/include/osmocom/core/macaddr.h
@@ -1,3 +1,5 @@
+/*! \file macaddr.h */
+
 #pragma once
 
 int osmo_macaddr_parse(uint8_t *out, const char *in);
diff --git a/include/osmocom/core/msgb.h b/include/osmocom/core/msgb.h
index 7fad943..91b7ec7 100644
--- a/include/osmocom/core/msgb.h
+++ b/include/osmocom/core/msgb.h
@@ -27,9 +27,7 @@
 
 /*! \defgroup msgb Message buffers
  *  @{
- */
-
-/*! \file msgb.h */
+ * \file msgb.h */
 
 #define MSGB_DEBUG
 
diff --git a/include/osmocom/core/msgfile.h b/include/osmocom/core/msgfile.h
index cab97b2..800b431 100644
--- a/include/osmocom/core/msgfile.h
+++ b/include/osmocom/core/msgfile.h
@@ -1,3 +1,4 @@
+/*! \file msgfile.h */
 /*
  * (C) 2010 by Holger Hans Peter Freyther
  * (C) 2010 by On-Waves
diff --git a/include/osmocom/core/panic.h b/include/osmocom/core/panic.h
index 92c557f..2bb4240 100644
--- a/include/osmocom/core/panic.h
+++ b/include/osmocom/core/panic.h
@@ -2,9 +2,7 @@
 
 /*! \addtogroup utils
  *  @{
- */
-
-/*! \file panic.h */
+ * \file panic.h */
 
 #include <stdarg.h>
 
diff --git a/include/osmocom/core/plugin.h b/include/osmocom/core/plugin.h
index aef1dfc..6db8709 100644
--- a/include/osmocom/core/plugin.h
+++ b/include/osmocom/core/plugin.h
@@ -1,3 +1,5 @@
+/*! \file plugin.h */
+
 #pragma once
 
 int osmo_plugin_load_all(const char *directory);
diff --git a/include/osmocom/core/prim.h b/include/osmocom/core/prim.h
index 7288ba6..88ae08b 100644
--- a/include/osmocom/core/prim.h
+++ b/include/osmocom/core/prim.h
@@ -2,9 +2,7 @@
 
 /*! \defgroup prim Osmocom primitives
  *  @{
- */
-
-/*! \file prim.h */
+ * \file prim.h */
 
 #include <stdint.h>
 #include <osmocom/core/msgb.h>
diff --git a/include/osmocom/core/process.h b/include/osmocom/core/process.h
index 1dde021..8cfca8a 100644
--- a/include/osmocom/core/process.h
+++ b/include/osmocom/core/process.h
@@ -1,2 +1,3 @@
+/*! \file process.h */
 #warning "Update from osmocom/core/process.h to osmocom/core/application.h"
 #include <osmocom/core/application.h>
diff --git a/include/osmocom/core/rate_ctr.h b/include/osmocom/core/rate_ctr.h
index b75967a..74414e9 100644
--- a/include/osmocom/core/rate_ctr.h
+++ b/include/osmocom/core/rate_ctr.h
@@ -2,9 +2,7 @@
 
 /*! \defgroup rate_ctr Rate counters
  *  @{
- */
-
-/*! \file rate_ctr.h */
+ * \file rate_ctr.h */
 
 #include <stdint.h>
 
diff --git a/include/osmocom/core/select.h b/include/osmocom/core/select.h
index fe84c5b..9b5f372 100644
--- a/include/osmocom/core/select.h
+++ b/include/osmocom/core/select.h
@@ -1,3 +1,7 @@
+/*! \file select.h
+ *  select loop abstraction.
+ */
+
 #pragma once
 
 #include <osmocom/core/linuxlist.h>
@@ -5,11 +9,7 @@
 
 /*! \defgroup select Select loop abstraction
  *  @{
- */
-
-/*! \file select.h
- *  select loop abstraction
- */
+ * \file select.h */
 
 /*! Indicate interest in reading from the file descriptor */
 #define BSC_FD_READ	0x0001
diff --git a/include/osmocom/core/sercomm.h b/include/osmocom/core/sercomm.h
index cf15613..072f4d9 100644
--- a/include/osmocom/core/sercomm.h
+++ b/include/osmocom/core/sercomm.h
@@ -1,3 +1,7 @@
+/*! \file sercomm.h
+ *  Osmocom Sercomm HDLC (de)multiplex.
+ */
+
 #ifndef _SERCOMM_H
 #define _SERCOMM_H
 
@@ -5,11 +9,7 @@
 
 /*! \defgroup sercomm Seriall Communications (HDLC)
  *  @{
- */
-
-/*! \file sercomm.h
- *  Osmocom Sercomm HDLC (de)multiplex
- */
+ * \file sercomm.h */
 
 /*! A low sercomm_dlci means high priority.  A high DLCI means low priority */
 enum sercomm_dlci {
diff --git a/include/osmocom/core/serial.h b/include/osmocom/core/serial.h
index e3f7a9f..39614a4 100644
--- a/include/osmocom/core/serial.h
+++ b/include/osmocom/core/serial.h
@@ -1,6 +1,6 @@
+/*! \file serial.h
+ * Osmocom serial port helpers. */
 /*
- * serial.h
- *
  * Copyright (C) 2011  Sylvain Munaut <tnt at 246tNt.com>
  *
  * All Rights Reserved
@@ -22,11 +22,7 @@
 
 /*! \defgroup serial Utility functions to deal with serial ports
  *  @{
- */
-
-/*! \file serial.h
- * Osmocom serial port helpers
- */
+ * \file serial.h */
 
 #pragma once
 
diff --git a/include/osmocom/core/signal.h b/include/osmocom/core/signal.h
index d7132f9..ae78f15 100644
--- a/include/osmocom/core/signal.h
+++ b/include/osmocom/core/signal.h
@@ -4,8 +4,7 @@
 
 /*! \defgroup signal Intra-application signals
  *  @{
- */
-/*! \file signal.h */
+ * \file signal.h */
 
 /*! subsystem signaling numbers: we split the numberspace for
  * applications and libraries: from 0 to UINT_MAX/2 for applications,
diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h
index d6a5662..d2118ef 100644
--- a/include/osmocom/core/socket.h
+++ b/include/osmocom/core/socket.h
@@ -1,12 +1,11 @@
+/*! \file socket.h
+ *  Osmocom socket convenience functions. */
+
 #pragma once
 
 /*! \defgroup socket Socket convenience functions
  *  @{
- */
-
-/*! \file socket.h
- *  Osmocom socket convenience functions
- */
+ *  \file socket.h */
 
 #include <stdint.h>
 
diff --git a/include/osmocom/core/stat_item.h b/include/osmocom/core/stat_item.h
index 957918a..4cee8a8 100644
--- a/include/osmocom/core/stat_item.h
+++ b/include/osmocom/core/stat_item.h
@@ -2,9 +2,7 @@
 
 /*! \defgroup osmo_stat_item Statistics value item
  *  @{
- */
-
-/*! \file stat_item.h */
+ * \file stat_item.h */
 
 #include <stdint.h>
 
diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h
index 09b836a..161b34c 100644
--- a/include/osmocom/core/stats.h
+++ b/include/osmocom/core/stats.h
@@ -1,4 +1,6 @@
-/* (C) 2015 by Sysmocom s.f.m.c. GmbH
+/*! \file stats.h */
+/*
+ * (C) 2015 by Sysmocom s.f.m.c. GmbH
  *
  * All Rights Reserved
  *
diff --git a/include/osmocom/core/strrb.h b/include/osmocom/core/strrb.h
index 2b4d89f..b87239d 100644
--- a/include/osmocom/core/strrb.h
+++ b/include/osmocom/core/strrb.h
@@ -1,6 +1,7 @@
-#pragma once
-
-/* (C) 2012-2013 by Katerina Barone-Adesi <kat.obsc at gmail.com>
+/*! \file strrb.h
+ * Osmocom string ringbuffer handling routines. */
+/*
+ * (C) 2012-2013 by Katerina Barone-Adesi <kat.obsc at gmail.com>
  * All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify
@@ -19,13 +20,11 @@
  *
  */
 
+#pragma once
+
 /*! \defgroup osmo_strrb Osmocom ringbuffers for log strings
  *  @{
- */
-
-/*! \file strrb.h
- *  Osmocom string ringbuffer handling routines
- */
+ * \file strrb.h */
 
 #include <unistd.h>
 #include <stdbool.h>
diff --git a/include/osmocom/core/talloc.h b/include/osmocom/core/talloc.h
index df7ea7f..191a463 100644
--- a/include/osmocom/core/talloc.h
+++ b/include/osmocom/core/talloc.h
@@ -1,4 +1,5 @@
-/* Convenience wrapper.  libosmocore used to ship its own internal copy of
+/*! \file talloc.h
+ * Convenience wrapper.  libosmocore used to ship its own internal copy of
  * talloc, before libtalloc became a standard component on most systems */
 #pragma once
 #include <talloc.h>
diff --git a/include/osmocom/core/timer.h b/include/osmocom/core/timer.h
index a039ac8..40b39b9 100644
--- a/include/osmocom/core/timer.h
+++ b/include/osmocom/core/timer.h
@@ -1,3 +1,5 @@
+/*! \file timer.h
+ *  Osmocom timer handling routines. */
 /*
  * (C) 2008, 2009 by Holger Hans Peter Freyther <zecke at selfish.org>
  * All Rights Reserved
@@ -33,11 +35,7 @@
  *      - osmo_timers_update() will call the callbacks and
  *        remove the timers.
  *  @{
- */
-
-/*! \file timer.h
- *  Osmocom timer handling routines.
- */
+ * \file timer.h */
 
 #pragma once
 
diff --git a/include/osmocom/core/timer_compat.h b/include/osmocom/core/timer_compat.h
index 44259af..77d4ce0 100644
--- a/include/osmocom/core/timer_compat.h
+++ b/include/osmocom/core/timer_compat.h
@@ -1,3 +1,6 @@
+/*! \file timer_compat.h
+ *  Compatibility header with some helpers
+ */
 /*
  * (C) 2011 Sylvain Munaut <tnt at 246tNt.com>
  * All Rights Reserved
@@ -20,11 +23,7 @@
 
 /*! \defgroup timer Osmocom timers
  *  @{
- */
-
-/*! \file timer_compat.h
- *  Compatibility header with some helpers
- */
+ * \file timer_compat.h */
 
 #pragma once
 
diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h
index ce49cbe..855e653 100644
--- a/include/osmocom/core/utils.h
+++ b/include/osmocom/core/utils.h
@@ -5,9 +5,7 @@
 
 /*! \defgroup utils General-purpose utility functions
  *  @{
- */
-
-/*! \file utils.h */
+ * \file utils.h */
 
 /*! Determine number of elements in an array of static size */
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
diff --git a/include/osmocom/core/write_queue.h b/include/osmocom/core/write_queue.h
index 27d090d..2303f87 100644
--- a/include/osmocom/core/write_queue.h
+++ b/include/osmocom/core/write_queue.h
@@ -1,4 +1,5 @@
-/* Generic write queue implementation */
+/*! \file write_queue.h
+ * Generic write queue implementation */
 /*
  * (C) 2010 by Holger Hans Peter Freyther
  * (C) 2010 by On-Waves
@@ -24,10 +25,7 @@
 
 /*! \defgroup write_queue Osmocom msgb write queues
  *  @{
- */
-
-/*! \file write_queue.h
- */
+ * \file write_queue.h */
 
 #include <osmocom/core/select.h>
 #include <osmocom/core/msgb.h>
diff --git a/include/osmocom/crypt/auth.h b/include/osmocom/crypt/auth.h
index af4ae15..2f88a3a 100644
--- a/include/osmocom/crypt/auth.h
+++ b/include/osmocom/crypt/auth.h
@@ -2,9 +2,7 @@
 
 /*! \addtogroup auth
  *  @{
- */
-
-/*! \file auth.h */
+ * \file auth.h */
 
 #include <stdint.h>
 
diff --git a/include/osmocom/crypt/gprs_cipher.h b/include/osmocom/crypt/gprs_cipher.h
index c302f10..20f0514 100644
--- a/include/osmocom/crypt/gprs_cipher.h
+++ b/include/osmocom/crypt/gprs_cipher.h
@@ -1,3 +1,5 @@
+/*! \file gprs_cipher.h */
+
 #pragma once
 
 #include <osmocom/core/linuxlist.h>
diff --git a/include/osmocom/ctrl/control_cmd.h b/include/osmocom/ctrl/control_cmd.h
index 3cef9d8..77532e6 100644
--- a/include/osmocom/ctrl/control_cmd.h
+++ b/include/osmocom/ctrl/control_cmd.h
@@ -1,3 +1,5 @@
+/*! \file control_cmd.h */
+
 #pragma once
 
 #include <osmocom/core/msgb.h>
diff --git a/include/osmocom/ctrl/control_if.h b/include/osmocom/ctrl/control_if.h
index 4cd3369..6e49742 100644
--- a/include/osmocom/ctrl/control_if.h
+++ b/include/osmocom/ctrl/control_if.h
@@ -1,3 +1,5 @@
+/*! \file control_if.h */
+
 #pragma once
 
 #include <osmocom/core/write_queue.h>
diff --git a/include/osmocom/ctrl/control_vty.h b/include/osmocom/ctrl/control_vty.h
index d0ef69f..af9ee99 100644
--- a/include/osmocom/ctrl/control_vty.h
+++ b/include/osmocom/ctrl/control_vty.h
@@ -1,3 +1,5 @@
+/*! \file control_vty.h */
+
 #pragma once
 
 /* Add the 'ctrl' section to VTY, containing the 'bind' command. */
diff --git a/include/osmocom/ctrl/ports.h b/include/osmocom/ctrl/ports.h
index d28066e..f974daf 100644
--- a/include/osmocom/ctrl/ports.h
+++ b/include/osmocom/ctrl/ports.h
@@ -1,6 +1,4 @@
-#pragma once
-
-/*
+/*! \file ports.h
  * TCP port numbers used for CTRL interfaces in osmocom projects. See also the
  * osmocom wiki as well as the osmo-gsm-manuals, which should all be kept in
  * sync with this file:
@@ -8,6 +6,8 @@
  * https://git.osmocom.org/osmo-gsm-manuals/tree/common/chapters/port_numbers.adoc
  */
 
+#pragma once
+
 #define OSMO_CTRL_PORT_BTS	4238
 #define OSMO_CTRL_PORT_NITB_BSC	4249
 #define OSMO_CTRL_PORT_BSC_NAT	4250
diff --git a/include/osmocom/gprs/gprs_bssgp.h b/include/osmocom/gprs/gprs_bssgp.h
index 0e9f7d6..2dead69 100644
--- a/include/osmocom/gprs/gprs_bssgp.h
+++ b/include/osmocom/gprs/gprs_bssgp.h
@@ -1,3 +1,5 @@
+/*! \file gprs_bssgp.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gprs/gprs_bssgp_bss.h b/include/osmocom/gprs/gprs_bssgp_bss.h
index d79b210..9374e73 100644
--- a/include/osmocom/gprs/gprs_bssgp_bss.h
+++ b/include/osmocom/gprs/gprs_bssgp_bss.h
@@ -1,11 +1,7 @@
-#pragma once
-
-#include <osmocom/core/msgb.h>
-#include <osmocom/gprs/gprs_bssgp.h>
-
-/* GPRS BSSGP protocol implementation as per 3GPP TS 08.18 */
-
-/* (C) 2009-2012 by Harald Welte <laforge at gnumonks.org>
+/*! \file gprs_bssgp_bss.h
+ * GPRS BSSGP protocol implementation as per 3GPP TS 08.18 */
+/*
+ * (C) 2009-2012 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
@@ -24,6 +20,10 @@
  *
  */
 
+#pragma once
+
+#include <osmocom/core/msgb.h>
+#include <osmocom/gprs/gprs_bssgp.h>
 
 uint8_t *bssgp_msgb_tlli_put(struct msgb *msg, uint32_t tlli);
 
diff --git a/include/osmocom/gprs/gprs_msgb.h b/include/osmocom/gprs/gprs_msgb.h
index 9ccc9a5..43471e2 100644
--- a/include/osmocom/gprs/gprs_msgb.h
+++ b/include/osmocom/gprs/gprs_msgb.h
@@ -1,3 +1,5 @@
+/*! \file gprs_msgb.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gprs/gprs_ns.h b/include/osmocom/gprs/gprs_ns.h
index 5ecaed8..938ad99 100644
--- a/include/osmocom/gprs/gprs_ns.h
+++ b/include/osmocom/gprs/gprs_ns.h
@@ -1,3 +1,5 @@
+/*! \file gprs_ns.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gprs/gprs_ns_frgre.h b/include/osmocom/gprs/gprs_ns_frgre.h
index 72ef7d1..d48ce08 100644
--- a/include/osmocom/gprs/gprs_ns_frgre.h
+++ b/include/osmocom/gprs/gprs_ns_frgre.h
@@ -1,3 +1,5 @@
+/*! \file gprs_ns_frgre.h */
+
 #pragma once
 
 int gprs_ns_frgre_sendmsg(struct gprs_nsvc *nsvc, struct msgb *msg);
diff --git a/include/osmocom/gprs/gprs_rlc.h b/include/osmocom/gprs/gprs_rlc.h
index 5765281..05d3de6 100644
--- a/include/osmocom/gprs/gprs_rlc.h
+++ b/include/osmocom/gprs/gprs_rlc.h
@@ -1,3 +1,5 @@
+/*! \file gprs_rlc.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gprs/protocol/gsm_04_60.h b/include/osmocom/gprs/protocol/gsm_04_60.h
index 42028bd..96e9ab7 100644
--- a/include/osmocom/gprs/protocol/gsm_04_60.h
+++ b/include/osmocom/gprs/protocol/gsm_04_60.h
@@ -1,10 +1,11 @@
-#pragma once
-
-/* General Packet Radio Service (GPRS)
+/*! \file gsm_04_60.h
+ * General Packet Radio Service (GPRS).
  * Radio Link Control / Medium Access Control (RLC/MAC) protocol
  * 3GPP TS 04.60 version 8.27.0 Release 1999
  */
 
+#pragma once
+
 #include <stdint.h>
 
 #if OSMO_IS_LITTLE_ENDIAN == 1
diff --git a/include/osmocom/gprs/protocol/gsm_08_16.h b/include/osmocom/gprs/protocol/gsm_08_16.h
index c3dbe69..fc74336 100644
--- a/include/osmocom/gprs/protocol/gsm_08_16.h
+++ b/include/osmocom/gprs/protocol/gsm_08_16.h
@@ -1,16 +1,15 @@
-#pragma once
-
-/* GPRS Networks Service (NS) messages on the Gb interface
+/*! \file gsm_08_16.h
+ * GPRS Networks Service (NS) messages on the Gb interface.
  * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05)
  * 3GPP TS 48.016 version 6.5.0 Release 6 / ETSI TS 148 016 V6.5.0 (2005-11) */
+
+#pragma once
 
 #include <stdint.h>
 
 /*! \addtogroup libgb
  *  @{
- */
-
-/*! \file gprs_ns.h */
+ * \file gprs_ns.h */
 
 /*! Common header of GPRS NS */
 struct gprs_ns_hdr {
diff --git a/include/osmocom/gprs/protocol/gsm_08_18.h b/include/osmocom/gprs/protocol/gsm_08_18.h
index 8bc9a8e..3179455 100644
--- a/include/osmocom/gprs/protocol/gsm_08_18.h
+++ b/include/osmocom/gprs/protocol/gsm_08_18.h
@@ -1,3 +1,5 @@
+/*! \file gsm_08_18.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gsm/a5.h b/include/osmocom/gsm/a5.h
index 893fb02..fae3fdd 100644
--- a/include/osmocom/gsm/a5.h
+++ b/include/osmocom/gsm/a5.h
@@ -1,6 +1,6 @@
+/*! \file gsm/a5.h
+ *  Osmocom GSM A5 ciphering algorithm header. */
 /*
- * a5.h
- *
  * Copyright (C) 2011  Sylvain Munaut <tnt at 246tNt.com>
  *
  * All Rights Reserved
@@ -29,11 +29,7 @@
 
 /*! \defgroup a5 GSM A5 ciphering algorithm
  *  @{
- */
-
-/*! \file gsm/a5.h
- *  Osmocom GSM A5 ciphering algorithm header
- */
+ * \file a5.h */
 
 /*! Converts a frame number into the 22 bit number used in A5/x
  *  \param[in] fn The true framenumber
diff --git a/include/osmocom/gsm/abis_nm.h b/include/osmocom/gsm/abis_nm.h
index acddb7f..e031ee1 100644
--- a/include/osmocom/gsm/abis_nm.h
+++ b/include/osmocom/gsm/abis_nm.h
@@ -1,14 +1,12 @@
 #pragma once
 
-/*! \defgroup oml A-bis OML
- *  @{
- */
-
 #include <osmocom/gsm/tlv.h>
 #include <osmocom/gsm/gsm_utils.h>
 #include <osmocom/gsm/protocol/gsm_12_21.h>
 
-/*! \file abis_nm.h */
+/*! \defgroup oml A-bis OML
+ *  @{
+ * \file abis_nm.h */
 
 extern const char abis_nm_ipa_magic[13];
 extern const char abis_nm_osmo_magic[12];
diff --git a/include/osmocom/gsm/apn.h b/include/osmocom/gsm/apn.h
index b4ece3a..8d35324 100644
--- a/include/osmocom/gsm/apn.h
+++ b/include/osmocom/gsm/apn.h
@@ -1,3 +1,5 @@
+/*! \file apn.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gsm/bitvec_gsm.h b/include/osmocom/gsm/bitvec_gsm.h
index 20741ef..32f0cd2 100644
--- a/include/osmocom/gsm/bitvec_gsm.h
+++ b/include/osmocom/gsm/bitvec_gsm.h
@@ -5,8 +5,7 @@
 
 /*! \defgroup bitvec helpers for GSM
  *  @{
- */
-/*! \file bitvec_gsm.h */
+ * \file bitvec_gsm.h */
 
 void bitvec_add_range1024(struct bitvec *bv, const struct gsm48_range_1024 *r);
 
diff --git a/include/osmocom/gsm/comp128.h b/include/osmocom/gsm/comp128.h
index 8ff76b1..8626f4b 100644
--- a/include/osmocom/gsm/comp128.h
+++ b/include/osmocom/gsm/comp128.h
@@ -1,5 +1,5 @@
-/*
- * COMP128 header
+/*! \file comp128.h
+ * COMP128 header.
  *
  * See comp128.c for details
  */
diff --git a/include/osmocom/gsm/comp128v23.h b/include/osmocom/gsm/comp128v23.h
index 31d3933..affe8a2 100644
--- a/include/osmocom/gsm/comp128v23.h
+++ b/include/osmocom/gsm/comp128v23.h
@@ -1,5 +1,5 @@
-/*
- * COMP128v23 header
+/*! \file comp128v23.h
+ * COMP128v23 header.
  *
  * See comp128v23.c for details
  */
diff --git a/include/osmocom/gsm/gan.h b/include/osmocom/gsm/gan.h
index 6f2b535..efede1d 100644
--- a/include/osmocom/gsm/gan.h
+++ b/include/osmocom/gsm/gan.h
@@ -1,3 +1,5 @@
+/*! \file gan.h */
+
 #pragma once
 
 #include <osmocom/core/utils.h>
diff --git a/include/osmocom/gsm/gea.h b/include/osmocom/gsm/gea.h
index 3051101..5c23d2a 100644
--- a/include/osmocom/gsm/gea.h
+++ b/include/osmocom/gsm/gea.h
@@ -1,5 +1,5 @@
-/*
- * GEA3 header
+/*! \file gea.h
+ * GEA3 header.
  *
  * See gea.c for details
  */
diff --git a/include/osmocom/gsm/gsm0341.h b/include/osmocom/gsm/gsm0341.h
index 29ba3e1..2fc83e4 100644
--- a/include/osmocom/gsm/gsm0341.h
+++ b/include/osmocom/gsm/gsm0341.h
@@ -1,3 +1,5 @@
+/*! \file gsm0341.h */
+
 #pragma once
 
 #include <osmocom/gsm/protocol/gsm_03_41.h>
diff --git a/include/osmocom/gsm/gsm0411_smc.h b/include/osmocom/gsm/gsm0411_smc.h
index 89964fa..0cd1f94 100644
--- a/include/osmocom/gsm/gsm0411_smc.h
+++ b/include/osmocom/gsm/gsm0411_smc.h
@@ -1,3 +1,5 @@
+/*! \file gsm0411_smc.h */
+
 #pragma once
 
 #include <osmocom/core/timer.h>
diff --git a/include/osmocom/gsm/gsm0411_smr.h b/include/osmocom/gsm/gsm0411_smr.h
index bc908a7..19f9c5d 100644
--- a/include/osmocom/gsm/gsm0411_smr.h
+++ b/include/osmocom/gsm/gsm0411_smr.h
@@ -1,3 +1,5 @@
+/*! \file gsm0411_smr.h */
+
 #pragma once
 
 #include <osmocom/gsm/protocol/gsm_04_11.h>
diff --git a/include/osmocom/gsm/gsm0411_utils.h b/include/osmocom/gsm/gsm0411_utils.h
index 7005010..1c51111 100644
--- a/include/osmocom/gsm/gsm0411_utils.h
+++ b/include/osmocom/gsm/gsm0411_utils.h
@@ -1,3 +1,5 @@
+/*! \file gsm0411_utils.h */
+
 #pragma once
 
 #include <time.h>
diff --git a/include/osmocom/gsm/gsm0480.h b/include/osmocom/gsm/gsm0480.h
index 6ca23e9..672ffe5 100644
--- a/include/osmocom/gsm/gsm0480.h
+++ b/include/osmocom/gsm/gsm0480.h
@@ -1,3 +1,5 @@
+/*! \file gsm0480.h */
+
 #pragma once
 
 #include <osmocom/core/defs.h>
diff --git a/include/osmocom/gsm/gsm0502.h b/include/osmocom/gsm/gsm0502.h
index 6ee5a60..fe5cf7e 100644
--- a/include/osmocom/gsm/gsm0502.h
+++ b/include/osmocom/gsm/gsm0502.h
@@ -1,3 +1,5 @@
+/*! \file gsm0502.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gsm/gsm0808.h b/include/osmocom/gsm/gsm0808.h
index 9be229c..4369cab 100644
--- a/include/osmocom/gsm/gsm0808.h
+++ b/include/osmocom/gsm/gsm0808.h
@@ -1,4 +1,6 @@
-/* (C) 2009,2010 by Holger Hans Peter Freyther <zecke at selfish.org>
+/*! \file gsm0808.h */
+/*
+ * (C) 2009,2010 by Holger Hans Peter Freyther <zecke at selfish.org>
  * (C) 2009,2010 by On-Waves
  * All Rights Reserved
  *
diff --git a/include/osmocom/gsm/gsm0808_utils.h b/include/osmocom/gsm/gsm0808_utils.h
index 0937630..57ba171 100644
--- a/include/osmocom/gsm/gsm0808_utils.h
+++ b/include/osmocom/gsm/gsm0808_utils.h
@@ -1,4 +1,6 @@
-/* (C) 2016 by Sysmocom s.f.m.c. GmbH
+/*! \file gsm0808_utils.h */
+/*
+ * (C) 2016 by Sysmocom s.f.m.c. GmbH
  * All Rights Reserved
  *
  * Author: Philipp Maier
diff --git a/include/osmocom/gsm/gsm23003.h b/include/osmocom/gsm/gsm23003.h
index 29e646c..2bc7583 100644
--- a/include/osmocom/gsm/gsm23003.h
+++ b/include/osmocom/gsm/gsm23003.h
@@ -1,4 +1,7 @@
+/*! \file gsm23003.h */
+
 #pragma once
+
 #include <stdint.h>
 
 /* 23.003 Chapter 12.1 */
diff --git a/include/osmocom/gsm/gsm48.h b/include/osmocom/gsm/gsm48.h
index 6a52c2d..424748e 100644
--- a/include/osmocom/gsm/gsm48.h
+++ b/include/osmocom/gsm/gsm48.h
@@ -1,3 +1,5 @@
+/*! \file gsm48.h */
+
 #pragma once
 
 #include <osmocom/gsm/tlv.h>
diff --git a/include/osmocom/gsm/gsm48_ie.h b/include/osmocom/gsm/gsm48_ie.h
index 8445486..f7cc24e 100644
--- a/include/osmocom/gsm/gsm48_ie.h
+++ b/include/osmocom/gsm/gsm48_ie.h
@@ -1,3 +1,5 @@
+/*! \file gsm48_ie.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gsm/gsm_utils.h b/include/osmocom/gsm/gsm_utils.h
index e76d9ee..998f681 100644
--- a/include/osmocom/gsm/gsm_utils.h
+++ b/include/osmocom/gsm/gsm_utils.h
@@ -1,4 +1,5 @@
-/* GSM utility functions, e.g. coding and decoding */
+/*! \file gsm_utils.h
+ * GSM utility functions, e.g. coding and decoding. */
 /*
  * (C) 2008 by Daniel Willmann <daniel at totalueberwachung.de>
  * (C) 2009 by Holger Hans Peter Freyther <zecke at selfish.org>
diff --git a/include/osmocom/gsm/gsup.h b/include/osmocom/gsm/gsup.h
index 04b31d0..886ea5d 100644
--- a/include/osmocom/gsm/gsup.h
+++ b/include/osmocom/gsm/gsup.h
@@ -1,6 +1,7 @@
-/* Osmocom Generic Subscriber Update Protocol message encoder/decoder */
-
-/* (C) 2014 by sysmocom s.f.m.c. GmbH, Author: Jacob Erlbeck
+/*! \file gsup.h
+ * Osmocom Generic Subscriber Update Protocol message encoder/decoder. */
+/*
+ * (C) 2014 by sysmocom s.f.m.c. GmbH, Author: Jacob Erlbeck
  * (C) 2016 by Harald Welte <laforge at gnumonks.org>
  * All Rights Reserved
  *
diff --git a/include/osmocom/gsm/ipa.h b/include/osmocom/gsm/ipa.h
index cabee13..7e1d723 100644
--- a/include/osmocom/gsm/ipa.h
+++ b/include/osmocom/gsm/ipa.h
@@ -1,3 +1,5 @@
+/*! \file ipa.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gsm/kasumi.h b/include/osmocom/gsm/kasumi.h
index 222aece..d9de10b 100644
--- a/include/osmocom/gsm/kasumi.h
+++ b/include/osmocom/gsm/kasumi.h
@@ -1,5 +1,5 @@
-/*
- * KASUMI header
+/*! \file kasumi.h
+ * KASUMI header.
  *
  * See kasumi.c for details
  * The parameters are described in TS 135 202.
diff --git a/include/osmocom/gsm/l1sap.h b/include/osmocom/gsm/l1sap.h
index 322c7ec..01f61ce 100644
--- a/include/osmocom/gsm/l1sap.h
+++ b/include/osmocom/gsm/l1sap.h
@@ -1,3 +1,5 @@
+/*! \file l1sap.h */
+
 #pragma once
 
 #include <osmocom/core/prim.h>
diff --git a/include/osmocom/gsm/lapd_core.h b/include/osmocom/gsm/lapd_core.h
index 8d3a0f8..cfc357a 100644
--- a/include/osmocom/gsm/lapd_core.h
+++ b/include/osmocom/gsm/lapd_core.h
@@ -1,3 +1,6 @@
+/*! \file lapd_core.h
+ * primitive related stuff
+ */
 #pragma once
 
 #include <stdint.h>
@@ -8,10 +11,7 @@
 
 /*! \defgroup lapd LAPD implementation common part
  *  @{
- */
-
-/*! \file lapd_core.h
- * primitive related stuff
+ * \file lapd_core.h
  */
 
 /*! LAPD related primitives (L2<->L3 SAP)*/
diff --git a/include/osmocom/gsm/lapdm.h b/include/osmocom/gsm/lapdm.h
index ec14cdd..e01d065 100644
--- a/include/osmocom/gsm/lapdm.h
+++ b/include/osmocom/gsm/lapdm.h
@@ -5,9 +5,7 @@
 
 /*! \defgroup lapdm LAPDm implementation according to GSM TS 04.06
  *  @{
- */
-
-/*! \file lapdm.h */
+ * \file lapdm.h */
 
 /*! LAPDm mode/role */
 enum lapdm_mode {
diff --git a/include/osmocom/gsm/meas_rep.h b/include/osmocom/gsm/meas_rep.h
index 90c981d..79f9f06 100644
--- a/include/osmocom/gsm/meas_rep.h
+++ b/include/osmocom/gsm/meas_rep.h
@@ -1,3 +1,5 @@
+/*! \file meas_rep.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gsm/mncc.h b/include/osmocom/gsm/mncc.h
index 171db7a..f2450d9 100644
--- a/include/osmocom/gsm/mncc.h
+++ b/include/osmocom/gsm/mncc.h
@@ -1,3 +1,5 @@
+/*! \file mncc.h */
+
 #pragma once
 
 #include <osmocom/gsm/protocol/gsm_04_08.h>
diff --git a/include/osmocom/gsm/oap.h b/include/osmocom/gsm/oap.h
index fba22c7..ef83b79 100644
--- a/include/osmocom/gsm/oap.h
+++ b/include/osmocom/gsm/oap.h
@@ -1,6 +1,7 @@
-/* Osmocom Authentication Protocol message encoder/decoder */
-
-/* (C) 2015-2016 by sysmocom s.f.m.c. GmbH
+/*! \file oap.h
+ * Osmocom Authentication Protocol message encoder/decoder. */
+/*
+ * (C) 2015-2016 by sysmocom s.f.m.c. GmbH
  * All Rights Reserved
  *
  * Author: Neels Hofmeyr
diff --git a/include/osmocom/gsm/prim.h b/include/osmocom/gsm/prim.h
index 5f61dc7..386b7d8 100644
--- a/include/osmocom/gsm/prim.h
+++ b/include/osmocom/gsm/prim.h
@@ -1,3 +1,5 @@
+/*! \file prim.h */
+
 #pragma once
 
 #include <osmocom/core/prim.h>
diff --git a/include/osmocom/gsm/protocol/gsm_03_40.h b/include/osmocom/gsm/protocol/gsm_03_40.h
index 32d5c2c..a65203f 100644
--- a/include/osmocom/gsm/protocol/gsm_03_40.h
+++ b/include/osmocom/gsm/protocol/gsm_03_40.h
@@ -1,6 +1,7 @@
-#pragma once
+/*! \file gsm_03_40.h
+ * GSM TS 03.40. */
 
-/* GSM TS 03.40 */
+#pragma once
 
 /**
  * 9.1.2.5 Type Of Number
diff --git a/include/osmocom/gsm/protocol/gsm_03_41.h b/include/osmocom/gsm/protocol/gsm_03_41.h
index 40051cd..2e0ad69 100644
--- a/include/osmocom/gsm/protocol/gsm_03_41.h
+++ b/include/osmocom/gsm/protocol/gsm_03_41.h
@@ -1,3 +1,6 @@
+/*! \file gsm_03_41.h
+ * GSM TS 03.41 definitions also TS 23.041. */
+
 #pragma once
 
 #include <stdint.h>
@@ -8,8 +11,6 @@
 #ifndef OSMO_IS_LITTLE_ENDIAN
  #define OSMO_IS_LITTLE_ENDIAN 0
 #endif
-
-/* GSM TS 03.41 definitions also TS 23.041*/
 
 #define GSM341_MAX_PAYLOAD	(GSM412_MSG_LEN-sizeof(struct gsm341_ms_message))
 #define GSM341_MAX_CHARS	(GSM341_MAX_PAYLOAD*8/7)
diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h
index 90b6cf1..643f046 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -1,3 +1,6 @@
+/*! \file gsm_04_08.h
+ * GSM TS 04.08  definitions. */
+
 #pragma once
 
 #include <stdint.h>
@@ -6,7 +9,6 @@
 #include <osmocom/core/utils.h>
 #include <osmocom/core/endian.h>
 
-/* GSM TS 04.08  definitions */
 struct gsm_lchan;
 
 /* Chapter 10.5.1.5 */
diff --git a/include/osmocom/gsm/protocol/gsm_04_08_gprs.h b/include/osmocom/gsm/protocol/gsm_04_08_gprs.h
index def8dfc..13820a7 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08_gprs.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08_gprs.h
@@ -1,3 +1,5 @@
+/*! \file gsm_04_08_gprs.h */
+
 #ifndef _GSM48_GPRS_H
 #define _GSM48_GPRS_H
 
diff --git a/include/osmocom/gsm/protocol/gsm_04_11.h b/include/osmocom/gsm/protocol/gsm_04_11.h
index 651adca..31f25ac 100644
--- a/include/osmocom/gsm/protocol/gsm_04_11.h
+++ b/include/osmocom/gsm/protocol/gsm_04_11.h
@@ -1,3 +1,5 @@
+/*! \file gsm_04_11.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gsm/protocol/gsm_04_12.h b/include/osmocom/gsm/protocol/gsm_04_12.h
index 30d6e4f..826e69b 100644
--- a/include/osmocom/gsm/protocol/gsm_04_12.h
+++ b/include/osmocom/gsm/protocol/gsm_04_12.h
@@ -1,8 +1,9 @@
+/*! \file gsm_04_12.h
+ * GSM TS 04.12 definitions for Short Message Service Cell Broadcast. */
+
 #pragma once
 
 #include <stdint.h>
-
-/* GSM TS 04.12 definitions for Short Message Service Cell Broadcast */
 
 #define GSM412_MSG_LEN		88	/* TS 04.12 Section 3.1 */
 #define GSM412_BLOCK_LEN	22	/* TS 04.12 Section 3.1 */
diff --git a/include/osmocom/gsm/protocol/gsm_04_14.h b/include/osmocom/gsm/protocol/gsm_04_14.h
index 421b56f..6f7d92c 100644
--- a/include/osmocom/gsm/protocol/gsm_04_14.h
+++ b/include/osmocom/gsm/protocol/gsm_04_14.h
@@ -1,3 +1,5 @@
+/*! \file gsm_04_14.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gsm/protocol/gsm_04_80.h b/include/osmocom/gsm/protocol/gsm_04_80.h
index 2aebb46..e204c50 100644
--- a/include/osmocom/gsm/protocol/gsm_04_80.h
+++ b/include/osmocom/gsm/protocol/gsm_04_80.h
@@ -1,6 +1,7 @@
-#pragma once
+/*! \file gsm_04_80.h
+ * GSM TS 04.80  definitions (Supplementary Services Specification, Formats and Coding). */
 
-/* GSM TS 04.80  definitions (Supplementary Services Specification, Formats and Coding) */
+#pragma once
 
 /* Section 3.4 */
 #define GSM0480_MTYPE_RELEASE_COMPLETE	0x2A
diff --git a/include/osmocom/gsm/protocol/gsm_08_58.h b/include/osmocom/gsm/protocol/gsm_08_58.h
index c76cf3b..bc70b93 100644
--- a/include/osmocom/gsm/protocol/gsm_08_58.h
+++ b/include/osmocom/gsm/protocol/gsm_08_58.h
@@ -1,9 +1,8 @@
-#pragma once
-
-/* GSM Radio Signalling Link messages on the A-bis interface 
+/*! \file gsm_08_58.h
+ * GSM Radio Signalling Link messages on the A-bis interface.
  * 3GPP TS 08.58 version 8.6.0 Release 1999 / ETSI TS 100 596 V8.6.0 */
-
-/* (C) 2008 by Harald Welte <laforge at gnumonks.org>
+/*
+ * (C) 2008 by Harald Welte <laforge at gnumonks.org>
  * All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify
@@ -22,13 +21,13 @@
  *
  */
 
+#pragma once
+
 #include <stdint.h>
 
 /*! \addtogroup rsl
  *  @{
- */
-
-/*! \file gsm_08_58.h */
+ * \file gsm_08_58.h */
 
 /*! RSL common header */
 struct abis_rsl_common_hdr {
diff --git a/include/osmocom/gsm/protocol/gsm_09_02.h b/include/osmocom/gsm/protocol/gsm_09_02.h
index 3f68b45..0b54fb7 100644
--- a/include/osmocom/gsm/protocol/gsm_09_02.h
+++ b/include/osmocom/gsm/protocol/gsm_09_02.h
@@ -1,7 +1,8 @@
+/*! \file gsm_09_02.h
+ * GSM TS 09.02  definitions (MAP). */
+
 #ifndef PROTO_GSM_09_02_H
 #define PROTO_GSM_09_02_H
-
-/* GSM TS 09.02  definitions (MAP) */
 
 /* Section 17.7.4 */
 /* SS-Status */
diff --git a/include/osmocom/gsm/protocol/gsm_12_21.h b/include/osmocom/gsm/protocol/gsm_12_21.h
index 1bdee9c..3ef3603 100644
--- a/include/osmocom/gsm/protocol/gsm_12_21.h
+++ b/include/osmocom/gsm/protocol/gsm_12_21.h
@@ -1,9 +1,5 @@
-#pragma once
-
-/* GSM Network Management messages on the A-bis interface 
- * 3GPP TS 12.21 version 8.0.0 Release 1999 / ETSI TS 100 623 V8.0.0 */
-
-/* (C) 2008-2009 by Harald Welte <laforge at gnumonks.org>
+/*
+ * (C) 2008-2009 by Harald Welte <laforge at gnumonks.org>
  * All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify
@@ -22,11 +18,11 @@
  *
  */
 
+#pragma once
+
 /*! \addtogroup oml
  *  @{
- */
-
-/*! \file gsm_12_21.h */
+ * \file gsm_12_21.h */
 
 #include <stdint.h>
 #include <stdbool.h>
diff --git a/include/osmocom/gsm/protocol/gsm_23_003.h b/include/osmocom/gsm/protocol/gsm_23_003.h
index a2109b6..94243fe 100644
--- a/include/osmocom/gsm/protocol/gsm_23_003.h
+++ b/include/osmocom/gsm/protocol/gsm_23_003.h
@@ -1,3 +1,5 @@
+/*! \file gsm_23_003.h */
+
 #pragma once
 
 /* Chapter 2.2 */
diff --git a/include/osmocom/gsm/protocol/gsm_44_318.h b/include/osmocom/gsm/protocol/gsm_44_318.h
index 5d7f878..76e8396 100644
--- a/include/osmocom/gsm/protocol/gsm_44_318.h
+++ b/include/osmocom/gsm/protocol/gsm_44_318.h
@@ -1,8 +1,9 @@
+/*! \file gsm_44_318.h
+ * Definitions according to 3GPP TS 44.318 6.8.0 Release 6. */
+
 #pragma once
 
 #include <stdint.h>
-
-/* Definitions according to 3GPP TS 44.318 6.8.0 Release 6 */
 
 /* Table 11.1.1.2.1: Protocol Discriminator */
 enum gan_pdisc {
diff --git a/include/osmocom/gsm/protocol/ipaccess.h b/include/osmocom/gsm/protocol/ipaccess.h
index ba6cb3b..0f5d54f 100644
--- a/include/osmocom/gsm/protocol/ipaccess.h
+++ b/include/osmocom/gsm/protocol/ipaccess.h
@@ -1,3 +1,5 @@
+/*! \file ipaccess.h */
+
 #pragma once
 
 #include <stdint.h>
diff --git a/include/osmocom/gsm/protocol/smpp34_osmocom.h b/include/osmocom/gsm/protocol/smpp34_osmocom.h
index cff6adb..7c72ac8 100644
--- a/include/osmocom/gsm/protocol/smpp34_osmocom.h
+++ b/include/osmocom/gsm/protocol/smpp34_osmocom.h
@@ -1,5 +1,7 @@
+/*! \file smpp34_osmocom.h
+ * Osmocom SMPP extensions. */
+
 #pragma once
-/* Osmocom SMPP extensions */
 
 /* Osmocom specific new TLV definitions */
 
diff --git a/include/osmocom/gsm/rsl.h b/include/osmocom/gsm/rsl.h
index 93e27a1..3d9c66f 100644
--- a/include/osmocom/gsm/rsl.h
+++ b/include/osmocom/gsm/rsl.h
@@ -7,9 +7,7 @@
 
 /*! \defgroup rsl RSL
  *  @{
- */
-
-/*! \file rsl.h */
+ * \file rsl.h */
 
 void rsl_init_rll_hdr(struct abis_rsl_rll_hdr *dh, uint8_t msg_type);
 
diff --git a/include/osmocom/gsm/rxlev_stat.h b/include/osmocom/gsm/rxlev_stat.h
index 7183b17..7aa35cd 100644
--- a/include/osmocom/gsm/rxlev_stat.h
+++ b/include/osmocom/gsm/rxlev_stat.h
@@ -1,3 +1,5 @@
+/*! \file rxlev_stat.h */
+
 #pragma once
 
 #define NUM_RXLEVS 32
diff --git a/include/osmocom/gsm/sysinfo.h b/include/osmocom/gsm/sysinfo.h
index f3e0f22..8e26f99 100644
--- a/include/osmocom/gsm/sysinfo.h
+++ b/include/osmocom/gsm/sysinfo.h
@@ -1,3 +1,5 @@
+/*! \file sysinfo.h */
+
 #pragma once
 
 #include <stdbool.h>
diff --git a/include/osmocom/gsm/tlv.h b/include/osmocom/gsm/tlv.h
index fa3b656..c356840 100644
--- a/include/osmocom/gsm/tlv.h
+++ b/include/osmocom/gsm/tlv.h
@@ -9,8 +9,7 @@
 
 /*! \defgroup tlv GSM L3 compatible TLV parser
  *  @{
- */
-/*! \file tlv.h */
+ * \file tlv.h */
 
 /* Terminology / wording
 		tag	length		value	(in bits)
diff --git a/include/osmocom/sim/class_tables.h b/include/osmocom/sim/class_tables.h
index ad89d94..d5be39d 100644
--- a/include/osmocom/sim/class_tables.h
+++ b/include/osmocom/sim/class_tables.h
@@ -1,7 +1,6 @@
-#pragma once
-
-/* simtrace - tables determining APDU case for card emulation
- *
+/*! \file class_tables.h
+ * simtrace - tables determining APDU case for card emulation. */
+/*
  * (C) 2016 by Harald Welte <laforge at gnumonks.org>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -18,6 +17,8 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#pragma once
+
 #include <stdint.h>
 
 struct osim_cla_ins_case {
diff --git a/include/osmocom/sim/sim.h b/include/osmocom/sim/sim.h
index eb95480..680cad1 100644
--- a/include/osmocom/sim/sim.h
+++ b/include/osmocom/sim/sim.h
@@ -1,3 +1,7 @@
+/*! \file sim.h
+ * Routines for helping with SIM (ISO/IEC 7816-4 more generally) communication.
+ */
+
 #ifndef _OSMOCOM_SIM_H
 #define _OSMOCOM_SIM_H
 
@@ -5,11 +9,6 @@
 #include <osmocom/core/linuxlist.h>
 
 #define APDU_HDR_LEN	5
-
-/*!
- * \file sim.h
- * Routines for helping with SIM (ISO/IEC 7816-4 more generally) communication.
- */
 
 /*! command-response pairs cases
  *
diff --git a/include/osmocom/vty/buffer.h b/include/osmocom/vty/buffer.h
index 56c28f0..b5cce8a 100644
--- a/include/osmocom/vty/buffer.h
+++ b/include/osmocom/vty/buffer.h
@@ -1,5 +1,6 @@
+/*! \file buffer.h
+ * Buffering to output and input. */
 /*
- * Buffering to output and input.
  * Copyright (C) 1998 Kunihiro Ishiguro
  *
  * This file is part of GNU Zebra.
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h
index 9a072d7..0fa5175 100644
--- a/include/osmocom/vty/command.h
+++ b/include/osmocom/vty/command.h
@@ -1,5 +1,6 @@
+/*! \file command.h
+ * Zebra configuration command interface routine. */
 /*
- * Zebra configuration command interface routine
  * Copyright (C) 1997, 98 Kunihiro Ishiguro
  *
  * This file is part of GNU Zebra.
@@ -28,8 +29,7 @@
 
 /*! \defgroup command VTY Command
  *  @{
- */
-/*! \file command.h */
+ * \file command.h */
 
 /*! Host configuration variable */
 struct host {
diff --git a/include/osmocom/vty/logging.h b/include/osmocom/vty/logging.h
index 544d117..9bafb98 100644
--- a/include/osmocom/vty/logging.h
+++ b/include/osmocom/vty/logging.h
@@ -1,3 +1,5 @@
+/*! \file logging.h */
+
 #pragma once
 
 #define LOGGING_STR	"Configure log message to this terminal\n"
diff --git a/include/osmocom/vty/misc.h b/include/osmocom/vty/misc.h
index b3fb644..545955c 100644
--- a/include/osmocom/vty/misc.h
+++ b/include/osmocom/vty/misc.h
@@ -1,3 +1,5 @@
+/*! \file misc.h */
+
 #pragma once
 
 #include <osmocom/vty/vty.h>
diff --git a/include/osmocom/vty/ports.h b/include/osmocom/vty/ports.h
index a6043b3..8f8ef75 100644
--- a/include/osmocom/vty/ports.h
+++ b/include/osmocom/vty/ports.h
@@ -1,6 +1,4 @@
-#pragma once
-
-/*
+/*! \file ports.h
  * TCP port numbers used for VTY interfaces in osmocom projects. See also the
  * osmocom wiki as well as the osmo-gsm-manuals, which should all be kept in
  * sync with this file:
@@ -8,6 +6,8 @@
  * https://git.osmocom.org/osmo-gsm-manuals/tree/common/chapters/port_numbers.adoc
  */
 
+#pragma once
+
 /* 4238 used by osmo-bts control interface */
 #define OSMO_VTY_PORT_STP	4239
 #define OSMO_VTY_PORT_PCU	4240	/* also: osmo_pcap_client */
diff --git a/include/osmocom/vty/stats.h b/include/osmocom/vty/stats.h
index 3851b4d..7629928 100644
--- a/include/osmocom/vty/stats.h
+++ b/include/osmocom/vty/stats.h
@@ -1,3 +1,5 @@
+/*! \file stats.h */
+
 #pragma once
 
 void osmo_stats_vty_add_cmds();
diff --git a/include/osmocom/vty/telnet_interface.h b/include/osmocom/vty/telnet_interface.h
index bca9156..d653466 100644
--- a/include/osmocom/vty/telnet_interface.h
+++ b/include/osmocom/vty/telnet_interface.h
@@ -1,5 +1,7 @@
-/* minimalistic telnet/network interface it might turn into a wire interface */
-/* (C) 2009 by Holger Hans Peter Freyther <zecke at selfish.org>
+/*! \file telnet_interface.h
+ * minimalistic telnet/network interface it might turn into a wire interface */
+/*
+ * (C) 2009 by Holger Hans Peter Freyther <zecke at selfish.org>
  * All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify
@@ -27,9 +29,7 @@
 
 /*! \defgroup telnet_interface Telnet Interface
  *  @{
- */
-
-/*! \file telnet_interface.h */
+ * \file telnet_interface.h */
 
 /*! A telnet connection */
 struct telnet_connection {
diff --git a/include/osmocom/vty/vector.h b/include/osmocom/vty/vector.h
index c00804d..0a639ad 100644
--- a/include/osmocom/vty/vector.h
+++ b/include/osmocom/vty/vector.h
@@ -1,5 +1,6 @@
+/*! \file vector.h
+ * Generic vector interface header. */
 /*
- * Generic vector interface header.
  * Copyright (C) 1997, 98 Kunihiro Ishiguro
  *
  * This file is part of GNU Zebra.
diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h
index d59f5d4..544e1fa 100644
--- a/include/osmocom/vty/vty.h
+++ b/include/osmocom/vty/vty.h
@@ -5,8 +5,7 @@
 
 /*! \defgroup vty VTY (Virtual TTY) interface
  *  @{
- */
-/*! \file vty.h */
+ * \file vty.h */
 
 /* GCC have printf type attribute check.  */
 #ifdef __GNUC__
diff --git a/src/application.c b/src/application.c
index e7c8e0f..aec3fd7 100644
--- a/src/application.c
+++ b/src/application.c
@@ -1,4 +1,5 @@
-/* Utility functions to setup applications */
+/*! \file application.c
+ *  Routines for helping with the osmocom application setup. */
 /*
  * (C) 2010 by Harald Welte <laforge at gnumonks.org>
  * (C) 2011 by Holger Hans Peter Freyther
@@ -19,10 +20,6 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- */
-
-/*! \file application.c
- *  Routines for helping with the osmocom application setup.
  */
 
 /*! \mainpage libosmocore Documentation
diff --git a/src/backtrace.c b/src/backtrace.c
index 0240a75..5ce7482 100644
--- a/src/backtrace.c
+++ b/src/backtrace.c
@@ -1,3 +1,5 @@
+/*! \file backtrace.c
+ *  Routines related to generating call back traces. */
 /*
  * (C) 2009 by Holger Hans Peter Freyther <zecke at selfish.org>
  * (C) 2012 by Harald Welte <laforge at gnumonks.org>
@@ -18,10 +20,6 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- */
-
-/*! \file backtrace.c
- *  Routines realted to generating call back traces
  */
 
 #include <stdio.h>
diff --git a/src/bitcomp.c b/src/bitcomp.c
index acf165e..94f60eb 100644
--- a/src/bitcomp.c
+++ b/src/bitcomp.c
@@ -1,6 +1,7 @@
-/* bit compression routines */
-
-/* (C) 2016 sysmocom s.f.m.c. GmbH by Max Suraev <msuraev at sysmocom.de>
+/*! \file bitcomp.c
+ * Osmocom bit compression routines */
+/*
+ * (C) 2016 sysmocom s.f.m.c. GmbH by Max Suraev <msuraev at sysmocom.de>
  *
  * All Rights Reserved
  *
@@ -22,11 +23,7 @@
 
 /*! \defgroup bitcomp Bit compression
  *  @{
- */
-
-/*! \file bitcomp.c
- *  Osmocom bit compression routines
- */
+ * \file bitcomp.c */
 
 #include <stdint.h>
 #include <stdbool.h>
diff --git a/src/bits.c b/src/bits.c
index 45ac8e2..af09441 100644
--- a/src/bits.c
+++ b/src/bits.c
@@ -26,11 +26,9 @@
 
 /*! \addtogroup bits
  *  @{
- *  Osmocom bit level support code
- */
-
-/*! \file bits.c */
-
+ *  Osmocom bit level support code.
+ *
+ * \file bits.c */
 
 /*! convert unpacked bits to packed bits, return length in bytes
  *  \param[out] out output buffer of packed bits
diff --git a/src/bitvec.c b/src/bitvec.c
index 8ed7296..f07b42c 100644
--- a/src/bitvec.c
+++ b/src/bitvec.c
@@ -1,5 +1,3 @@
-/* bit vector utility routines */
-
 /* (C) 2009 by Harald Welte <laforge at gnumonks.org>
  * (C) 2012 Ivan Klyuchnikov
  * (C) 2015 by Sysmocom s.f.m.c. GmbH
@@ -24,10 +22,17 @@
 
 /*! \addtogroup bitvec
  *  @{
- *  Osmocom bit vector abstraction
- */
-
-/*! \file bitvec.c */
+ *  Osmocom bit vector abstraction utility routines.
+ *
+ *  These functions assume a MSB (most significant bit) first layout of the
+ *  bits, so that for instance the 5 bit number abcde (a is MSB) can be
+ *  embedded into a byte sequence like in xxxxxxab cdexxxxx. The bit count
+ *  starts with the MSB, so the bits in a byte are numbered (MSB) 01234567 (LSB).
+ *  Note that there are other incompatible encodings, like it is used
+ *  for the EGPRS RLC data block headers (there the bits are numbered from LSB
+ *  to MSB).
+ *
+ * \file bitvec.c */
 
 #include <errno.h>
 #include <stdint.h>
diff --git a/src/codec/gsm610.c b/src/codec/gsm610.c
index df56583..d5a2110 100644
--- a/src/codec/gsm610.c
+++ b/src/codec/gsm610.c
@@ -1,5 +1,5 @@
-/* GSM 06.10 - GSM FR codec */
-
+/*! \file gsm610.c
+ * GSM 06.10 - GSM FR codec. */
 /*
  * (C) 2010 Sylvain Munaut <tnt at 246tNt.com>
  *
diff --git a/src/codec/gsm620.c b/src/codec/gsm620.c
index 3064748..b1a0b31 100644
--- a/src/codec/gsm620.c
+++ b/src/codec/gsm620.c
@@ -1,5 +1,5 @@
-/* GSM 06.20 - GSM HR codec */
-
+/*! \file gsm620.c
+ * GSM 06.20 - GSM HR codec. */
 /*
  * (C) 2010 Sylvain Munaut <tnt at 246tNt.com>
  *
diff --git a/src/codec/gsm660.c b/src/codec/gsm660.c
index 6c9215f..2f5c6a2 100644
--- a/src/codec/gsm660.c
+++ b/src/codec/gsm660.c
@@ -1,5 +1,5 @@
-/* GSM 06.60 - GSM EFR Codec */
-
+/*! \file gsm660.c
+ * GSM 06.60 - GSM EFR Codec. */
 /*
  * (C) 2010 Sylvain Munaut <tnt at 246tNt.com>
  *
diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c
index 74655bf..1ee74d0 100644
--- a/src/codec/gsm690.c
+++ b/src/codec/gsm690.c
@@ -1,5 +1,5 @@
-/* GSM 06.90 - GSM AMR Codec */
-
+/*! \file gsm690.c
+ * GSM 06.90 - GSM AMR Codec. */
 /*
  * (C) 2010 Sylvain Munaut <tnt at 246tNt.com>
  *
diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c
index bb86b2c..5213dc5 100644
--- a/src/coding/gsm0503_coding.c
+++ b/src/coding/gsm0503_coding.c
@@ -100,9 +100,8 @@
  *  various other modules (mapping, parity, interleaving) in order to
  *  implement the complete channel coding (and decoding) chain for the
  *  various channel types as defined in TS 05.03 / 45.003.
- */
-
-/*! \file gsm0503_coding.c */
+ *
+ * \file gsm0503_coding.c */
 
 /*
  * EGPRS coding limits
diff --git a/src/coding/gsm0503_interleaving.c b/src/coding/gsm0503_interleaving.c
index 19e6847..b42f242 100644
--- a/src/coding/gsm0503_interleaving.c
+++ b/src/coding/gsm0503_interleaving.c
@@ -29,16 +29,12 @@
 
 /*! \addtogroup interleaving
  *  @{
- *  GSM TS 05.03 interleaving
+ * GSM TS 05.03 interleaving
  *
- *  This module contains interleaving / de-interleaving routines for
- *  various channel types, as defined in 3GPP TS 05.03 / 45.003
- */
-
-/*! \file gsm0503_interleaving.c */
-
-/*
- * GSM xCCH interleaving and burst mapping
+ * This module contains interleaving / de-interleaving routines for
+ * various channel types, as defined in 3GPP TS 05.03 / 45.003.
+ *
+ * GSM xCCH interleaving and burst mapping:
  *
  * Interleaving:
  *
@@ -57,7 +53,30 @@
  *      e(B, 58) = h_n(B)
  *
  * Where hl(B) and hn(B) are bits in burst B indicating flags.
- */
+ *
+ * GSM TCH HR/AHS interleaving and burst mapping:
+ *
+ * Interleaving:
+ *
+ * Given 288 coded input bits, form 4 blocks of 114 bits,
+ * where even bits of the first 2 blocks and odd bits of the last 2 blocks
+ * are used:
+ *
+ *      i(B, j) = c(n, k)       k = 0, ..., 227
+ *                              n = 0, ..., N, N + 1, ...
+ *                              B = B_0 + 2n + b
+ *                              j, b = table[k];
+ *
+ * Mapping on Burst:
+ *
+ *      e(B, j) = i(B, j)
+ *      e(B, 59 + j) = i(B, 57 + j)     j = 0, ..., 56
+ *      e(B, 57) = h_l(B)
+ *      e(B, 58) = h_n(B)
+ *
+ * Where hl(B) and hn(B) are bits in burst B indicating flags.
+ *
+ * \file gsm0503_interleaving.c */
 
 /*! De-Interleave burst bits according to TS 05.03 4.1.4
  *  \param[out] cB caller-allocated output buffer for 456 soft coded bits
@@ -632,30 +651,6 @@
 		iB[B * 114 + j] = cB[k];
 	}
 }
-
-/*
- * GSM TCH HR/AHS interleaving and burst mapping
- *
- * Interleaving:
- *
- * Given 288 coded input bits, form 4 blocks of 114 bits,
- * where even bits of the first 2 blocks and odd bits of the last 2 blocks
- * are used:
- *
- *      i(B, j) = c(n, k)       k = 0, ..., 227
- *                              n = 0, ..., N, N + 1, ...
- *                              B = B_0 + 2n + b
- *                              j, b = table[k];
- *
- * Mapping on Burst:
- *
- *      e(B, j) = i(B, j)
- *      e(B, 59 + j) = i(B, 57 + j)     j = 0, ..., 56
- *      e(B, 57) = h_l(B)
- *      e(B, 58) = h_n(B)
- *
- * Where hl(B) and hn(B) are bits in burst B indicating flags.
- */
 
 /*! GSM TCH HR/AHS De-Interleaving and burst mapping
  *  \param[out] cB caller-allocated buffer for 228 unpacked output bits
diff --git a/src/coding/gsm0503_mapping.c b/src/coding/gsm0503_mapping.c
index 15fd1b6..d414769 100644
--- a/src/coding/gsm0503_mapping.c
+++ b/src/coding/gsm0503_mapping.c
@@ -32,9 +32,8 @@
  *
  *  This module contains burst mapping routines as specified in 3GPP TS
  *  05.03 / 45.003.
- */
-
-/*! \file gsm0503_mapping.c */
+ *
+ * \file gsm0503_mapping.c */
 
 void gsm0503_xcch_burst_unmap(sbit_t *iB, const sbit_t *eB,
 	sbit_t *hl, sbit_t *hn)
diff --git a/src/coding/gsm0503_parity.c b/src/coding/gsm0503_parity.c
index cc81702..b57caa3 100644
--- a/src/coding/gsm0503_parity.c
+++ b/src/coding/gsm0503_parity.c
@@ -31,9 +31,8 @@
  *
  *  This module contains parity/crc code definitions for the various
  *  parity/crc schemes as defined in 3GPP TS 05.03 / 45.003
- */
-
-/*! \file gsm0503_parity.c */
+ *
+ * \file gsm0503_parity.c */
 
 /*! GSM (SACCH) parity (FIRE code)
  *
diff --git a/src/coding/gsm0503_tables.c b/src/coding/gsm0503_tables.c
index 32d12ea..dda8cad 100644
--- a/src/coding/gsm0503_tables.c
+++ b/src/coding/gsm0503_tables.c
@@ -27,14 +27,13 @@
 /*! \addtogroup tables
  *  @{
  *
- *  GSM TS 05.03 tables
+ *  GSM TS 05.03 tables.
  *
  *  This module contains various tables defining parts of 3GPP TS 05.03
  *  / 45.003, primarily for the purpose of (de)puncturing, interleaving,
  *  etc.
- */
-
-/*! \file gsm0503_tables.c */
+ *
+ * \file gsm0503_tables.c */
 
 const ubit_t gsm0503_pdtch_hl_hn_ubit[4][8] = {
 	{ 1,1, 1,1, 1,1, 1,1 },
diff --git a/src/conv.c b/src/conv.c
index 38ce173..420acca 100644
--- a/src/conv.c
+++ b/src/conv.c
@@ -1,8 +1,6 @@
+/*! \file conv.c
+ * Generic convolutional encoding / decoding. */
 /*
- * conv.c
- *
- * Generic convolutional encoding / decoding
- *
  * Copyright (C) 2011  Sylvain Munaut <tnt at 246tNt.com>
  *
  * All Rights Reserved
@@ -24,10 +22,10 @@
 
 /*! \addtogroup conv
  *  @{
- *  Osmocom convolutional encoder and decoder
- */
+ *  Osmocom convolutional encoder and decoder.
+ *
+ * \file conv.c */
 
-/*! \file conv.c */
 #include "config.h"
 #ifdef HAVE_ALLOCA_H
 #include <alloca.h>
diff --git a/src/conv_acc.c b/src/conv_acc.c
index 13b220b..048bbb1 100644
--- a/src/conv_acc.c
+++ b/src/conv_acc.c
@@ -1,6 +1,6 @@
+/*! \file conv_acc.c
+ * Accelerated Viterbi decoder implementation. */
 /*
- * Accelerated Viterbi decoder implementation
- *
  * Copyright (C) 2013, 2014 Thomas Tsou <tom at tsou.cc>
  *
  * All Rights Reserved
diff --git a/src/conv_acc_generic.c b/src/conv_acc_generic.c
index a4787e3..228f3e2 100644
--- a/src/conv_acc_generic.c
+++ b/src/conv_acc_generic.c
@@ -1,7 +1,7 @@
-/*
+/*! \file conv_acc_generic.c
  * Accelerated Viterbi decoder implementation
- * for generic architectures without SSE support
- *
+ * for generic architectures without SSE support. */
+/*
  * Copyright (C) 2013, 2014 Thomas Tsou <tom at tsou.cc>
  *
  * All Rights Reserved
diff --git a/src/conv_acc_sse.c b/src/conv_acc_sse.c
index bcc9d48..e9bbde1 100644
--- a/src/conv_acc_sse.c
+++ b/src/conv_acc_sse.c
@@ -1,7 +1,7 @@
-/*
+/*! \file conv_acc_sse.c
  * Accelerated Viterbi decoder implementation
- * for architectures with only SSE3 available
- *
+ * for architectures with only SSE3 available. */
+/*
  * Copyright (C) 2013, 2014 Thomas Tsou <tom at tsou.cc>
  *
  * All Rights Reserved
diff --git a/src/conv_acc_sse_avx.c b/src/conv_acc_sse_avx.c
index 2ad353a..c399719 100644
--- a/src/conv_acc_sse_avx.c
+++ b/src/conv_acc_sse_avx.c
@@ -1,7 +1,7 @@
-/*
+/*! \file conv_acc_sse_avx.c
  * Accelerated Viterbi decoder implementation
- * for architectures with both SSE3 and AVX2 support
- *
+ * for architectures with both SSE3 and AVX2 support. */
+/*
  * Copyright (C) 2013, 2014 Thomas Tsou <tom at tsou.cc>
  *
  * All Rights Reserved
diff --git a/src/conv_acc_sse_impl.h b/src/conv_acc_sse_impl.h
index a62f910..e6eaaa6 100644
--- a/src/conv_acc_sse_impl.h
+++ b/src/conv_acc_sse_impl.h
@@ -1,8 +1,8 @@
-/*
- * Accelerated Viterbi decoder implementation
+/*! \file conv_acc_sse_impl.h
+ * Accelerated Viterbi decoder implementation:
  * Actual definitions which are being included
- * from both conv_acc_sse.c and conv_acc_sse_avx.c
- *
+ * from both conv_acc_sse.c and conv_acc_sse_avx.c. */
+/*
  * Copyright (C) 2013, 2014 Thomas Tsou <tom at tsou.cc>
  *
  * All Rights Reserved
diff --git a/src/crc16.c b/src/crc16.c
index 7d523b6..b5cb956 100644
--- a/src/crc16.c
+++ b/src/crc16.c
@@ -1,4 +1,4 @@
-/*
+/*! \file crc16.c
  * This was copied from the linux kernel and adjusted for our types.
  */
 /*
diff --git a/src/crcXXgen.c.tpl b/src/crcXXgen.c.tpl
index 9c63052..e92a538 100644
--- a/src/crcXXgen.c.tpl
+++ b/src/crcXXgen.c.tpl
@@ -1,8 +1,6 @@
+/*! \file crcXXgen.c
+ * Osmocom generic CRC routines (for max XX bits poly). */
 /*
- * crcXXgen.c
- *
- * Generic CRC routines (for max XX bits poly)
- *
  * Copyright (C) 2011  Sylvain Munaut <tnt at 246tNt.com>
  *
  * All Rights Reserved
@@ -24,12 +22,9 @@
 
 /*! \addtogroup crcgen
  *  @{
- *  Osmocom generic CRC routines
- */
-
-/*! \file crcXXgen.c
- * Osmocom generic CRC routines (for max XX bits poly)
- */
+ *  Osmocom generic CRC routines (for max XX bits poly).
+ *
+ *  \file crcXXgen.c.tpl */
 
 #include <stdint.h>
 
diff --git a/src/ctrl/control_cmd.c b/src/ctrl/control_cmd.c
index d706995..836bb71 100644
--- a/src/ctrl/control_cmd.c
+++ b/src/ctrl/control_cmd.c
@@ -1,5 +1,6 @@
-/* SNMP-like status interface
- *
+/*! \file control_cmd.c
+ * SNMP-like status interface. */
+/*
  * (C) 2010-2011 by Daniel Willmann <daniel at totalueberwachung.de>
  * (C) 2010-2011 by On-Waves
  *
diff --git a/src/ctrl/control_if.c b/src/ctrl/control_if.c
index 5d04cdf..47efb25 100644
--- a/src/ctrl/control_if.c
+++ b/src/ctrl/control_if.c
@@ -1,5 +1,6 @@
-/* SNMP-like status interface
- *
+/*! \file control_if.c
+ * SNMP-like status interface. */
+/*
  * (C) 2010-2011 by Daniel Willmann <daniel at totalueberwachung.de>
  * (C) 2010-2011 by On-Waves
  *
diff --git a/src/ctrl/control_vty.c b/src/ctrl/control_vty.c
index a67dbe2..a968bc0 100644
--- a/src/ctrl/control_vty.c
+++ b/src/ctrl/control_vty.c
@@ -1,5 +1,6 @@
-/* VTY configuration for Control interface
- *
+/*! \file control_vty.c
+ * VTY configuration for Control interface. */
+/*
  * (C) 2016 by sysmocom s.m.f.c. GmbH <info at sysmocom.de>
  *
  * All Rights Reserved
diff --git a/src/ctrl/fsm_ctrl_commands.c b/src/ctrl/fsm_ctrl_commands.c
index 6c3ecde..38fbd1e 100644
--- a/src/ctrl/fsm_ctrl_commands.c
+++ b/src/ctrl/fsm_ctrl_commands.c
@@ -1,3 +1,5 @@
+/*! \file fsm_ctrl_commands.c */
+
 #include <string.h>
 #include <errno.h>
 
diff --git a/src/fsm.c b/src/fsm.c
index 27389a7..d62fd79 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -1,5 +1,6 @@
-/* Osmocom generic Finite State Machine implementation
- *
+/*! \file fsm.c
+ * Osmocom generic Finite State Machine implementation. */
+/*
  * (C) 2016 by Harald Welte <laforge at gnumonks.org>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -82,9 +83,8 @@
  *
  *  In order to attach private state to the \ref osmo_fsm_inst, it
  *  offers an opaque priv pointer.
- */
-
-/*! \file fsm.c */
+ *
+ * \file fsm.c */
 
 LLIST_HEAD(osmo_g_fsms);
 static bool fsm_log_addr = true;
diff --git a/src/gb/common_vty.c b/src/gb/common_vty.c
index 5848a11..5de5135 100644
--- a/src/gb/common_vty.c
+++ b/src/gb/common_vty.c
@@ -1,5 +1,7 @@
-/* OpenBSC VTY common helpers */
-/* (C) 2009-2012 by Harald Welte <laforge at gnumonks.org>
+/*! \file common_vty.c
+ * OpenBSC VTY common helpers. */
+/*
+ * (C) 2009-2012 by Harald Welte <laforge at gnumonks.org>
  * (C) 2009-2010 by Holger Hans Peter Freyther
  * All Rights Reserved
  *
diff --git a/src/gb/common_vty.h b/src/gb/common_vty.h
index 8c6b9ab..a0674a7 100644
--- a/src/gb/common_vty.h
+++ b/src/gb/common_vty.h
@@ -1,3 +1,5 @@
+/*! \file common_vty.h */
+
 #include <osmocom/vty/command.h>
 #include <osmocom/core/logging.h>
 
diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index 142f589..518198f 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -1,6 +1,7 @@
-/* GPRS BSSGP protocol implementation as per 3GPP TS 08.18 */
-
-/* (C) 2009-2017 by Harald Welte <laforge at gnumonks.org>
+/*! \file gprs_bssgp.c
+ * GPRS BSSGP protocol implementation as per 3GPP TS 08.18. */
+/*
+ * (C) 2009-2017 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
diff --git a/src/gb/gprs_bssgp_bss.c b/src/gb/gprs_bssgp_bss.c
index f41c4a4..d9f04c5 100644
--- a/src/gb/gprs_bssgp_bss.c
+++ b/src/gb/gprs_bssgp_bss.c
@@ -1,6 +1,7 @@
-/* GPRS BSSGP protocol implementation as per 3GPP TS 08.18 */
-
-/* (C) 2009-2017 by Harald Welte <laforge at gnumonks.org>
+/*! \file gprs_bssgp_bss.c
+ * GPRS BSSGP protocol implementation as per 3GPP TS 08.18. */
+/*
+ * (C) 2009-2017 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
diff --git a/src/gb/gprs_bssgp_util.c b/src/gb/gprs_bssgp_util.c
index 88916c1..78a11a3 100644
--- a/src/gb/gprs_bssgp_util.c
+++ b/src/gb/gprs_bssgp_util.c
@@ -1,6 +1,7 @@
-/* GPRS BSSGP protocol implementation as per 3GPP TS 08.18 */
-
-/* (C) 2009-2017 by Harald Welte <laforge at gnumonks.org>
+/*! \file gprs_bssgp_util.c
+ * GPRS BSSGP protocol implementation as per 3GPP TS 08.18. */
+/*
+ * (C) 2009-2017 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
diff --git a/src/gb/gprs_bssgp_vty.c b/src/gb/gprs_bssgp_vty.c
index f3f354c..703d130 100644
--- a/src/gb/gprs_bssgp_vty.c
+++ b/src/gb/gprs_bssgp_vty.c
@@ -1,6 +1,7 @@
-/* VTY interface for our GPRS BSS Gateway Protocol (BSSGP) implementation */
-
-/* (C) 2010 by Harald Welte <laforge at gnumonks.org>
+/*! \file gprs_bssgp_vty.c
+ * VTY interface for our GPRS BSS Gateway Protocol (BSSGP) implementation. */
+/*
+ * (C) 2010 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c
index 51d1c3c..d20ed23 100644
--- a/src/gb/gprs_ns.c
+++ b/src/gb/gprs_ns.c
@@ -1,7 +1,8 @@
-/* GPRS Networks Service (NS) messages on the Gb interface
- * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05) */
-
-/* (C) 2009-2012 by Harald Welte <laforge at gnumonks.org>
+/*! \file gprs_ns.c
+ * GPRS Networks Service (NS) messages on the Gb interface.
+ * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05). */
+/*
+ * (C) 2009-2012 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
@@ -22,11 +23,7 @@
 
 /*! \addtogroup libgb
  *  @{
- */
-
-/*! \file gprs_ns.c */
-
-/*!
+ *
  * GPRS Networks Service (NS) messages on the Gb interface
  * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05) 
  *
@@ -36,30 +33,31 @@
  * do much, apart from providing congestion notification and status indication.
  *
  * Terms:
- * 	NS		Network Service
- *	NSVC		NS Virtual Connection
- *	NSEI		NS Entity Identifier
- *	NSVL		NS Virtual Link
- *	NSVLI		NS Virtual Link Identifier
- *	BVC		BSSGP Virtual Connection
- *	BVCI		BSSGP Virtual Connection Identifier
- *	NSVCG		NS Virtual Connection Goup
- *	Blocked		NS-VC cannot be used for user traffic
- *	Alive		Ability of a NS-VC to provide communication
  *
- *  There can be multiple BSSGP virtual connections over one (group of) NSVC's.  BSSGP will
+ * 	NS		Network Service
+ * 	NSVC		NS Virtual Connection
+ * 	NSEI		NS Entity Identifier
+ * 	NSVL		NS Virtual Link
+ * 	NSVLI		NS Virtual Link Identifier
+ * 	BVC		BSSGP Virtual Connection
+ * 	BVCI		BSSGP Virtual Connection Identifier
+ * 	NSVCG		NS Virtual Connection Goup
+ * 	Blocked		NS-VC cannot be used for user traffic
+ * 	Alive		Ability of a NS-VC to provide communication
+ *
+ * There can be multiple BSSGP virtual connections over one (group of) NSVC's.  BSSGP will
  * therefore identify the BSSGP virtual connection by a BVCI passed down to NS.
  * NS then has to firgure out which NSVC's are responsible for this BVCI.
  * Those mappings are administratively configured.
- */
-
-/* This implementation has the following limitations:
- *  o Only one NS-VC for each NSE: No load-sharing function
- *  o NSVCI 65535 and 65534 are reserved for internal use
- *  o Only UDP is supported as of now, no frame relay support
- *  o The IP Sub-Network-Service (SNS) as specified in 48.016 is not implemented
- *  o There are no BLOCK and UNBLOCK timers (yet?)
- */
+ *
+ * This implementation has the following limitations:
+ * - Only one NS-VC for each NSE: No load-sharing function
+ * - NSVCI 65535 and 65534 are reserved for internal use
+ * - Only UDP is supported as of now, no frame relay support
+ * - The IP Sub-Network-Service (SNS) as specified in 48.016 is not implemented
+ * - There are no BLOCK and UNBLOCK timers (yet?)
+ *
+ * \file gprs_ns.c */
 
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/src/gb/gprs_ns_frgre.c b/src/gb/gprs_ns_frgre.c
index 285a9a0..52145ff 100644
--- a/src/gb/gprs_ns_frgre.c
+++ b/src/gb/gprs_ns_frgre.c
@@ -1,9 +1,9 @@
-/* GPRS Networks Service (NS) messages on the Gb interface
- * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05) */
-
-/* NS-over-FR-over-GRE implementation */
-
-/* (C) 2009-2010 by Harald Welte <laforge at gnumonks.org>
+/*! \file gprs_ns_frgre.c
+ * NS-over-FR-over-GRE implementation.
+ * GPRS Networks Service (NS) messages on the Gb interface,
+ * 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05). */
+/*
+ * (C) 2009-2010 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c
index bdccb3f..e320ba2 100644
--- a/src/gb/gprs_ns_vty.c
+++ b/src/gb/gprs_ns_vty.c
@@ -1,6 +1,7 @@
-/* VTY interface for our GPRS Networks Service (NS) implementation */
-
-/* (C) 2009-2010 by Harald Welte <laforge at gnumonks.org>
+/*! \file gprs_ns_vty.c
+ * VTY interface for our GPRS Networks Service (NS) implementation. */
+/*
+ * (C) 2009-2010 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
diff --git a/src/gsm/a5.c b/src/gsm/a5.c
index f21554f..e906b6d 100644
--- a/src/gsm/a5.c
+++ b/src/gsm/a5.c
@@ -1,12 +1,11 @@
-/*
- * a5.c
- *
- * Full reimplementation of A5/1,2 (split and threadsafe)
+/*! \file a5.c
+ * Full reimplementation of A5/1,2 (split and threadsafe).
  *
  * The logic behind the algorithm is taken from "A pedagogical implementation
  * of the GSM A5/1 and A5/2 "voice privacy" encryption algorithms." by
  * Marc Briceno, Ian Goldberg, and David Wagner.
- *
+ */
+/*
  * Copyright (C) 2011  Sylvain Munaut <tnt at 246tNt.com>
  *
  * All Rights Reserved
@@ -29,9 +28,8 @@
 /*! \addtogroup crypto
  *  @{
  *  Osmocom GSM/GPRS ciphering algorithm implementation
- */
-
-/*! \file gsm/a5.c */
+ *
+ * \file gsm/a5.c */
 
 #include <errno.h>
 #include <string.h>
diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c
index 287973b..c59ebb7 100644
--- a/src/gsm/abis_nm.c
+++ b/src/gsm/abis_nm.c
@@ -1,7 +1,5 @@
-/* GSM Network Management (OML) messages on the A-bis interface
- * 3GPP TS 12.21 version 8.0.0 Release 1999 / ETSI TS 100 623 V8.0.0 */
-
-/* (C) 2008-2011 by Harald Welte <laforge at gnumonks.org>
+/*
+ * (C) 2008-2011 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
@@ -22,11 +20,10 @@
 
 /*! \addtogroup oml
  *  @{
- * GSM Network Management (OML) messages on the A-bis interface
+ * GSM Network Management (OML) messages on the A-bis interface.
  * 3GPP TS 12.21 version 8.0.0 Release 1999 / ETSI TS 100 623 V8.0.0
- */
-
-/*! \file abis_nm.c */
+ *
+ * \file abis_nm.c */
 
 #include <stdint.h>
 #include <errno.h>
diff --git a/src/gsm/apn.c b/src/gsm/apn.c
index ccf36b9..8d4b2bf 100644
--- a/src/gsm/apn.c
+++ b/src/gsm/apn.c
@@ -1,3 +1,5 @@
+/*! \file apn.c */
+
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
diff --git a/src/gsm/auth_comp128v1.c b/src/gsm/auth_comp128v1.c
index 3b645d2..1dddef3 100644
--- a/src/gsm/auth_comp128v1.c
+++ b/src/gsm/auth_comp128v1.c
@@ -1,7 +1,7 @@
-
-/* GSM/GPRS/3G authentication core infrastructure */
-
-/* (C) 2010-2011 by Harald Welte <laforge at gnumonks.org>
+/*! \file auth_comp128v1.c
+ * GSM/GPRS/3G authentication core infrastructure */
+/*
+ * (C) 2010-2011 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
diff --git a/src/gsm/auth_comp128v23.c b/src/gsm/auth_comp128v23.c
index b0900af..4d23769 100644
--- a/src/gsm/auth_comp128v23.c
+++ b/src/gsm/auth_comp128v23.c
@@ -1,9 +1,8 @@
-/* registers COMP128 version 2 and 3 A3/A8 algorithms for the
- * GSM/GPRS/3G authentication core infrastructure
- *
- */
-
-/* (C) 2010-2011 by Harald Welte <laforge at gnumonks.org>
+/*! \file auth_comp128v23.c
+ * registers COMP128 version 2 and 3 A3/A8 algorithms for the
+ * GSM/GPRS/3G authentication core infrastructure. */
+/*
+ * (C) 2010-2011 by Harald Welte <laforge at gnumonks.org>
  * (C) 2013 by Kévin Redon <kevredon at mail.tsaitgaist.info>
  *
  * All Rights Reserved
diff --git a/src/gsm/auth_core.c b/src/gsm/auth_core.c
index 1bdd4a8..4156695 100644
--- a/src/gsm/auth_core.c
+++ b/src/gsm/auth_core.c
@@ -1,5 +1,3 @@
-/* GSM/GPRS/3G authentication core infrastructure */
-
 /* (C) 2010-2012 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
@@ -33,9 +31,8 @@
 /*! \addtogroup auth
  *  @{
  *  GSM/GPRS/3G authentication core infrastructure
- */
-
-/* \file auth_core.c */
+ *
+ * \file auth_core.c */
 
 static LLIST_HEAD(osmo_auths);
 
diff --git a/src/gsm/auth_milenage.c b/src/gsm/auth_milenage.c
index 41e538d..8d50990 100644
--- a/src/gsm/auth_milenage.c
+++ b/src/gsm/auth_milenage.c
@@ -1,6 +1,7 @@
-/* GSM/GPRS/3G authentication core infrastructure */
-
-/* (C) 2011 by Harald Welte <laforge at gnumonks.org>
+/*! \file auth_milenage.c
+ * GSM/GPRS/3G authentication core infrastructure */
+/*
+ * (C) 2011 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
diff --git a/src/gsm/comp128.c b/src/gsm/comp128.c
index 78f0e07..0fcc67d 100644
--- a/src/gsm/comp128.c
+++ b/src/gsm/comp128.c
@@ -1,6 +1,5 @@
-/*
- * COMP128 implementation
- *
+/*! \file comp128.c
+ *  COMP128 v1; common/old GSM Authentication Algorithm (A3/A8).
  *
  * This code is inspired by original code from :
  *  Marc Briceno <marc at scard.org>, Ian Goldberg <iang at cs.berkeley.edu>,
@@ -11,7 +10,38 @@
  * A comment snippet from the original code is included below, it describes
  * where the doc came from and how the algorithm was reverse engineered.
  *
+ * This code derived from a leaked document from the GSM standards.
+ * Some missing pieces were filled in by reverse-engineering a working SIM.
+ * We have verified that this is the correct COMP128 algorithm.
  *
+ * The first page of the document identifies it as
+ *
+ * 	_Technical Information: GSM System Security Study_.
+ * 	10-1617-01, 10th June 1988.
+ *
+ * The bottom of the title page is marked
+ *
+ * 	Racal Research Ltd.
+ * 	Worton Drive, Worton Grange Industrial Estate,
+ * 	Reading, Berks. RG2 0SB, England.
+ * 	Telephone: Reading (0734) 868601   Telex: 847152
+ *
+ * The relevant bits are in Part I, Section 20 (pages 66--67).  Enjoy!
+ *
+ * Note: There are three typos in the spec (discovered by
+ * reverse-engineering).
+ * - First, "z = (2 * x[n] + x[n]) mod 2^(9-j)" should clearly read
+ *   "z = (2 * x[m] + x[n]) mod 2^(9-j)".
+ * - Second, the "k" loop in the "Form bits from bytes" section is severely
+ *   botched: the k index should run only from 0 to 3, and clearly the range
+ *   on "the (8-k)th bit of byte j" is also off (should be 0..7, not 1..8,
+ *   to be consistent with the subsequent section).
+ * - Third, SRES is taken from the first 8 nibbles of x[], not the last 8 as
+ *   claimed in the document.  (And the document doesn't specify how Kc is
+ *   derived, but that was also easily discovered with reverse engineering.)
+ * All of these typos have been corrected in the following code.
+ */
+/*
  * (C) 2009 by Sylvain Munaut <tnt at 246tNt.com>
  *
  * All Rights Reserved
@@ -32,49 +62,12 @@
  *
  */
 
-/*
- * --- SNIP ---
- *
- * This code derived from a leaked document from the GSM standards.
- * Some missing pieces were filled in by reverse-engineering a working SIM.
- * We have verified that this is the correct COMP128 algorithm.
- *
- * The first page of the document identifies it as
- * 	_Technical Information: GSM System Security Study_.
- * 	10-1617-01, 10th June 1988.
- * The bottom of the title page is marked
- * 	Racal Research Ltd.
- * 	Worton Drive, Worton Grange Industrial Estate,
- * 	Reading, Berks. RG2 0SB, England.
- * 	Telephone: Reading (0734) 868601   Telex: 847152
- * The relevant bits are in Part I, Section 20 (pages 66--67).  Enjoy!
- *
- * Note: There are three typos in the spec (discovered by
- * reverse-engineering).
- * First, "z = (2 * x[n] + x[n]) mod 2^(9-j)" should clearly read
- * "z = (2 * x[m] + x[n]) mod 2^(9-j)".
- * Second, the "k" loop in the "Form bits from bytes" section is severely
- * botched: the k index should run only from 0 to 3, and clearly the range
- * on "the (8-k)th bit of byte j" is also off (should be 0..7, not 1..8,
- * to be consistent with the subsequent section).
- * Third, SRES is taken from the first 8 nibbles of x[], not the last 8 as
- * claimed in the document.  (And the document doesn't specify how Kc is
- * derived, but that was also easily discovered with reverse engineering.)
- * All of these typos have been corrected in the following code.
- *
- * --- /SNIP ---
- */
-
 #include <string.h>
 #include <stdint.h>
 
 /*! \addtogroup auth
  *  @{
- */
-
-/*! \file comp128.c
- *  COMP128 v1; common/old GSM Authentication Algorithm (A3/A8)
- */
+ * \file comp128.c */
 
 /* The compression tables (just copied ...) */
 static const uint8_t table_0[512] = {
diff --git a/src/gsm/comp128v23.c b/src/gsm/comp128v23.c
index 1797ebc..12f8a4c 100644
--- a/src/gsm/comp128v23.c
+++ b/src/gsm/comp128v23.c
@@ -1,11 +1,11 @@
-/* COMP128 version 2 and 3 implementation
+/*! \file comp128v23.c
+ * COMP128 version 2 and 3 implementation, common algorithm used for GSM Authentication (A3/A8).
  *
  * This code is a C conversion of the original code from
  * http://www.hackingprojects.net/
- *
  */
-
-/* (C) 2013 by Kévin Redon <kevredon at mail.tsaitgaist.info>
+/*
+ * (C) 2013 by Kévin Redon <kevredon at mail.tsaitgaist.info>
  *
  * All Rights Reserved
  *
@@ -30,11 +30,7 @@
 
 /*! \addtogroup auth
  *  @{
- */
-
-/*! \file comp128v23.c
- *  COMP128 v2 / v3; Common Algorithm used for GSM Authentication (A3/A8)
- */
+ * \file comp128v23.c */
 
 static const uint8_t table0[256] = {
 	197, 235, 60, 151, 98, 96, 3, 100, 248, 118, 42, 117, 172, 211, 181, 203, 61,
diff --git a/src/gsm/gan.c b/src/gsm/gan.c
index d357b7e..fae93f1 100644
--- a/src/gsm/gan.c
+++ b/src/gsm/gan.c
@@ -1,4 +1,7 @@
-/* (C) 2012 by Harald Welte <laforge at gnumonks.org>
+/*! \file gan.c
+ *  Generic Access Network (GAN) / UMA according to TS 44.318. */
+/*
+ * (C) 2012 by Harald Welte <laforge at gnumonks.org>
  * All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify
@@ -20,11 +23,6 @@
 #include <osmocom/core/utils.h>
 
 #include <osmocom/gsm/protocol/gsm_44_318.h>
-
-/*! \file gan.c
- *  Generic Access Network (GAN) / UMA according to TS 44.318
- */
-
 
 const struct value_string gan_msgt_vals[] = {
 	{ GA_MT_RC_DISCOVERY_REQUEST,	"GA-RC DISCOVERY REQUEST" },
diff --git a/src/gsm/gea.c b/src/gsm/gea.c
index d4e599c..d95c03e 100644
--- a/src/gsm/gea.c
+++ b/src/gsm/gea.c
@@ -1,8 +1,6 @@
+/*! \file gea.c
+ * Implementation of GEA3 and GEA4. */
 /*
- * gea.c
- *
- * Implementation of GEA3 and GEA4
- *
  * Copyright (C) 2016 by Sysmocom s.f.m.c. GmbH
  *
  * All Rights Reserved
@@ -32,10 +30,7 @@
 
 /*! \addtogroup crypto
  *  @{
- */
-
-/*! \file gsm/gea.c */
-
+ * \file gsm/gea.c */
 
 /*! Performs the GEA4 algorithm as in 3GPP TS 55.226 V9.0.0
  *  \param[in,out] out Buffer for gamma for encrypted/decrypted
diff --git a/src/gsm/gprs_cipher_core.c b/src/gsm/gprs_cipher_core.c
index b833048..fc68c40 100644
--- a/src/gsm/gprs_cipher_core.c
+++ b/src/gsm/gprs_cipher_core.c
@@ -1,6 +1,7 @@
-/* GPRS LLC cipher core infrastructure */
-
-/* (C) 2010 by Harald Welte <laforge at gnumonks.org>
+/*! \file gprs_cipher_core.c
+ * GPRS LLC cipher core infrastructure */
+/*
+ * (C) 2010 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
diff --git a/src/gsm/gprs_gea.c b/src/gsm/gprs_gea.c
index 836ee68..db3f2cc 100644
--- a/src/gsm/gprs_gea.c
+++ b/src/gsm/gprs_gea.c
@@ -1,8 +1,6 @@
+/*! \file gprs_gea.c
+ * GEA 3 & 4 plugin */
 /*
- * gprs_gea.c
- *
- * GEA 3 & 4 plugin
- *
  * Copyright (C) 2016 by Sysmocom s.f.m.c. GmbH
  *
  * All Rights Reserved
diff --git a/src/gsm/gprs_rlc.c b/src/gsm/gprs_rlc.c
index 4b32947..b213b26 100644
--- a/src/gsm/gprs_rlc.c
+++ b/src/gsm/gprs_rlc.c
@@ -1,13 +1,13 @@
+/*! \file gsm/gprs_rlc.c
+ *  helper functions for (E)GPRS RLC according to 3GPP TS 44.060.
+ */
+
 #include <errno.h>
 #include <string.h>
 
 #include <osmocom/gprs/gprs_rlc.h>
 #include <osmocom/coding/gsm0503_coding.h>
 #include <osmocom/gprs/protocol/gsm_04_60.h>
-
-/*! \file gsm/gprs_rlc.c
- *  helper functions for (E)GPRS RLC according to 3GPP TS 44.060
- */
 
 #define EGPRS_CPS_TYPE1_TBL_SZ		29
 #define EGPRS_CPS_TYPE2_TBL_SZ		8
diff --git a/src/gsm/gsm0341.c b/src/gsm/gsm0341.c
index 0e3e453..05a0b4a 100644
--- a/src/gsm/gsm0341.c
+++ b/src/gsm/gsm0341.c
@@ -1,3 +1,4 @@
+/*! \file gsm0341.c */
 /*
  * (C) 2014 by Harald Welte <laforge at gnumonks.org>
  * All Rights Reserved
diff --git a/src/gsm/gsm0411_smc.c b/src/gsm/gsm0411_smc.c
index dab83eb..7414e95 100644
--- a/src/gsm/gsm0411_smc.c
+++ b/src/gsm/gsm0411_smc.c
@@ -1,8 +1,9 @@
-/* Point-to-Point (PP) Short Message Service (SMS)
+/*! \file gsm0411_smc.c
+ * Point-to-Point (PP) Short Message Service (SMS).
  * Support on Mobile Radio Interface
- * 3GPP TS 04.11 version 7.1.0 Release 1998 / ETSI TS 100 942 V7.1.0 */
-
-/* (C) 2008 by Daniel Willmann <daniel at totalueberwachung.de>
+ * 3GPP TS 04.11 version 7.1.0 Release 1998 / ETSI TS 100 942 V7.1.0. */
+/*
+ * (C) 2008 by Daniel Willmann <daniel at totalueberwachung.de>
  * (C) 2009 by Harald Welte <laforge at gnumonks.org>
  * (C) 2010 by Holger Hans Peter Freyther <zecke at selfish.org>
  * (C) 2010 by On-Waves
diff --git a/src/gsm/gsm0411_smr.c b/src/gsm/gsm0411_smr.c
index d120f2d..67bb249 100644
--- a/src/gsm/gsm0411_smr.c
+++ b/src/gsm/gsm0411_smr.c
@@ -1,8 +1,9 @@
-/* Point-to-Point (PP) Short Message Service (SMS)
+/*! \file gsm0411_smr.c
+ * Point-to-Point (PP) Short Message Service (SMS).
  * Support on Mobile Radio Interface
  * 3GPP TS 04.11 version 7.1.0 Release 1998 / ETSI TS 100 942 V7.1.0 */
-
-/* (C) 2008 by Daniel Willmann <daniel at totalueberwachung.de>
+/*
+ * (C) 2008 by Daniel Willmann <daniel at totalueberwachung.de>
  * (C) 2009 by Harald Welte <laforge at gnumonks.org>
  * (C) 2010 by Holger Hans Peter Freyther <zecke at selfish.org>
  * (C) 2010 by On-Waves
diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c
index ef67930..7c7164c 100644
--- a/src/gsm/gsm0411_utils.c
+++ b/src/gsm/gsm0411_utils.c
@@ -1,8 +1,9 @@
-/* Point-to-Point (PP) Short Message Service (SMS)
+/*! \file gsm0411_utils.c
+ * Point-to-Point (PP) Short Message Service (SMS).
  * Support on Mobile Radio Interface
- * 3GPP TS 04.11 version 7.1.0 Release 1998 / ETSI TS 100 942 V7.1.0 */
-
-/* (C) 2008 by Daniel Willmann <daniel at totalueberwachung.de>
+ * 3GPP TS 04.11 version 7.1.0 Release 1998 / ETSI TS 100 942 V7.1.0. */
+/*
+ * (C) 2008 by Daniel Willmann <daniel at totalueberwachung.de>
  * (C) 2009 by Harald Welte <laforge at gnumonks.org>
  * (C) 2010-2013 by Holger Hans Peter Freyther <zecke at selfish.org>
  * (C) 2010 by On-Waves
diff --git a/src/gsm/gsm0414.c b/src/gsm/gsm0414.c
index 84d393d..616d7d9 100644
--- a/src/gsm/gsm0414.c
+++ b/src/gsm/gsm0414.c
@@ -1,3 +1,5 @@
+/*! \file gsm0414.c */
+
 #include <osmocom/gsm/protocol/gsm_04_14.h>
 #include <osmocom/core/utils.h>
 
diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index 3c23f6f..557aa14 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -1,5 +1,5 @@
-/* Format functions for GSM 04.80 */
-
+/*! \file gsm0480.c
+ * Format functions for GSM 04.80. */
 /*
  * (C) 2010 by Holger Hans Peter Freyther <zecke at selfish.org>
  * (C) 2009 by Mike Haben <michael.haben at btinternet.com>
diff --git a/src/gsm/gsm0502.c b/src/gsm/gsm0502.c
index df1d8e9..6b69893 100644
--- a/src/gsm/gsm0502.c
+++ b/src/gsm/gsm0502.c
@@ -1,6 +1,7 @@
-/* Paging helper code */
-
-/* (C) 2009 by Holger Hans Peter Freyther <zecke at selfish.org>
+/*! \file gsm0502.c
+ * Paging helper code */
+/*
+ * (C) 2009 by Holger Hans Peter Freyther <zecke at selfish.org>
  * All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/src/gsm/gsm0808.c b/src/gsm/gsm0808.c
index f595dd6..a8a5e45 100644
--- a/src/gsm/gsm0808.c
+++ b/src/gsm/gsm0808.c
@@ -1,4 +1,6 @@
-/* (C) 2009,2010 by Holger Hans Peter Freyther <zecke at selfish.org>
+/*! \file gsm0808.c */
+/*
+ * (C) 2009,2010 by Holger Hans Peter Freyther <zecke at selfish.org>
  * (C) 2009,2010 by On-Waves
  * All Rights Reserved
  *
diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c
index 715cabf..a8c83f1 100644
--- a/src/gsm/gsm0808_utils.c
+++ b/src/gsm/gsm0808_utils.c
@@ -1,4 +1,6 @@
-/* (C) 2016 by Sysmocom s.f.m.c. GmbH
+/*! \file gsm0808_utils.c */
+/*
+ * (C) 2016 by Sysmocom s.f.m.c. GmbH
  * All Rights Reserved
  *
  * Author: Philipp Maier
diff --git a/src/gsm/gsm48.c b/src/gsm/gsm48.c
index 227dbef..f69eee2 100644
--- a/src/gsm/gsm48.c
+++ b/src/gsm/gsm48.c
@@ -1,7 +1,8 @@
-/* GSM Mobile Radio Interface Layer 3 messages
+/*! \file gsm48.c
+ * GSM Mobile Radio Interface Layer 3 messages
  * 3GPP TS 04.08 version 7.21.0 Release 1998 / ETSI TS 100 940 V7.21.0 */
-
-/* (C) 2008-2010 by Harald Welte <laforge at gnumonks.org>
+/*
+ * (C) 2008-2010 by Harald Welte <laforge at gnumonks.org>
  * (C) 2008, 2009 by Holger Hans Peter Freyther <zecke at selfish.org>
  *
  * All Rights Reserved
diff --git a/src/gsm/gsm48_ie.c b/src/gsm/gsm48_ie.c
index d3a868d..105acba 100644
--- a/src/gsm/gsm48_ie.c
+++ b/src/gsm/gsm48_ie.c
@@ -1,7 +1,8 @@
-/* GSM Mobile Radio Interface Layer 3 messages
- * 3GPP TS 04.08 version 7.21.0 Release 1998 / ETSI TS 100 940 V7.21.0 */
-
-/* (C) 2008 by Harald Welte <laforge at gnumonks.org>
+/*! \file gsm48_ie.c
+ * GSM Mobile Radio Interface Layer 3 messages.
+ * 3GPP TS 04.08 version 7.21.0 Release 1998 / ETSI TS 100 940 V7.21.0. */
+/*
+ * (C) 2008 by Harald Welte <laforge at gnumonks.org>
  * (C) 2009-2010 by Andreas Eversberg
  *
  * All Rights Reserved
diff --git a/src/gsm/gsm_04_08_gprs.c b/src/gsm/gsm_04_08_gprs.c
index 7bcef4e..43da27e 100644
--- a/src/gsm/gsm_04_08_gprs.c
+++ b/src/gsm/gsm_04_08_gprs.c
@@ -1,4 +1,6 @@
-/* (C) 2009-2016 by Harald Welte <laforge at gnumonks.org>
+/*! \file gsm_04_08_gprs.c */
+/*
+ * (C) 2009-2016 by Harald Welte <laforge at gnumonks.org>
  * (C) 2010      by On-Waves
  * (C) 2014-2015 by Sysmocom s.f.m.c. GmbH
  *
diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c
index fd16e98..5a4ceb3 100644
--- a/src/gsm/gsm_utils.c
+++ b/src/gsm/gsm_utils.c
@@ -1,3 +1,4 @@
+/*! \file gsm_utils.c */
 /*
  * (C) 2008 by Daniel Willmann <daniel at totalueberwachung.de>
  * (C) 2009,2013 by Holger Hans Peter Freyther <zecke at selfish.org>
diff --git a/src/gsm/gsup.c b/src/gsm/gsup.c
index 780198c..2629eb7 100644
--- a/src/gsm/gsup.c
+++ b/src/gsm/gsup.c
@@ -1,5 +1,5 @@
-/* Osmocom Generic Subscriber Update Protocol message encoder/decoder */
-
+/*! \file gsup.c
+ * Osmocom Generic Subscriber Update Protocol message encoder/decoder. */
 /*
  * (C) 2014 by sysmocom s.f.m.c. GmbH
  * (C) 2015 by Holger Hans Peter Freyther
diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c
index 2c7cf58..bc84850 100644
--- a/src/gsm/ipa.c
+++ b/src/gsm/ipa.c
@@ -1,6 +1,7 @@
-/* OpenBSC Abis input driver for ip.access */
-
-/* (C) 2009-2017 by Harald Welte <laforge at gnumonks.org>
+/*! \file ipa.c
+ * OpenBSC Abis input driver for ip.access */
+/*
+ * (C) 2009-2017 by Harald Welte <laforge at gnumonks.org>
  * (C) 2010 by Holger Hans Peter Freyther
  * (C) 2010 by On-Waves
  *
diff --git a/src/gsm/kasumi.c b/src/gsm/kasumi.c
index d5d78a7..c3a028b 100644
--- a/src/gsm/kasumi.c
+++ b/src/gsm/kasumi.c
@@ -1,6 +1,7 @@
-/* Kasumi cipher and KGcore functions */
-
-/* (C) 2013 by Max <Max.Suraev at fairwaves.ru>
+/*! \file kasumi.c
+ * Kasumi cipher and KGcore functions. */
+/*
+ * (C) 2013 by Max <Max.Suraev at fairwaves.ru>
  *
  * All Rights Reserved
  *
diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c
index 4ad7556..166bf9a 100644
--- a/src/gsm/lapd_core.c
+++ b/src/gsm/lapd_core.c
@@ -1,6 +1,7 @@
-/* LAPD core implementation */
-
-/* (C) 2010-2011 by Harald Welte <laforge at gnumonks.org>
+/*! \file lapd_core.c
+ * LAPD core implementation */
+/*
+ * (C) 2010-2011 by Harald Welte <laforge at gnumonks.org>
  * (C) 2010-2011 by Andreas Eversberg <jolly at eversberg.eu>
  *
  * All Rights Reserved
@@ -23,12 +24,9 @@
 
 /*! \addtogroup lapd
  *  @{
- *  Osmocom LAPD core, used for Q.921, LAPDm and others
- */
-
-/*! \file lapd_core.c */
-
-/*!
+ *
+ * Osmocom LAPD core, used for Q.921, LAPDm and others.
+ *
  * Notes on Buffering: rcv_buffer, tx_queue, tx_hist, send_buffer, send_queue
  *
  * RX data is stored in the rcv_buffer (pointer). If the message is complete, it
@@ -62,6 +60,7 @@
  * will not trigger T200. It will be stoped, when T200 is started in MF EST
  * state. It will also be stoped when leaving MF EST state.
  *
+ * \file lapd_core.c
  */
 
 /* Enable this to test content resolution on network side:
diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c
index 1152e0d..db950a6 100644
--- a/src/gsm/lapdm.c
+++ b/src/gsm/lapdm.c
@@ -1,6 +1,7 @@
-/* GSM LAPDm (TS 04.06) implementation */
-
-/* (C) 2010-2011 by Harald Welte <laforge at gnumonks.org>
+/*! \file lapdm.c
+ * GSM LAPDm (TS 04.06) implementation. */
+/*
+ * (C) 2010-2011 by Harald Welte <laforge at gnumonks.org>
  * (C) 2010-2011 by Andreas Eversberg <jolly at eversberg.eu>
  *
  * All Rights Reserved
@@ -23,10 +24,7 @@
 
 /*! \addtogroup lapdm
  *  @{
- *  GSM LAPDm (TS 04.06) implementation
- */
-
-/*! \file lapdm.c */
+ * \file lapdm.c */
 
 #include <stdio.h>
 #include <stdint.h>
diff --git a/src/gsm/milenage/aes-encblock.c b/src/gsm/milenage/aes-encblock.c
index 8f35caa..c4aa260 100644
--- a/src/gsm/milenage/aes-encblock.c
+++ b/src/gsm/milenage/aes-encblock.c
@@ -1,6 +1,6 @@
+/*! \file aes-encblock.c
+ * AES encrypt_block. */
 /*
- * AES encrypt_block
- *
  * Copyright (c) 2003-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/src/gsm/milenage/aes-internal-enc.c b/src/gsm/milenage/aes-internal-enc.c
index 8726aa7..4c00f96 100644
--- a/src/gsm/milenage/aes-internal-enc.c
+++ b/src/gsm/milenage/aes-internal-enc.c
@@ -1,5 +1,5 @@
-/*
- * AES (Rijndael) cipher - encrypt
+/*! \file aes-internal-enc.c
+ * AES (Rijndael) cipher - encrypt.
  *
  * Modifications to public domain implementation:
  * - support only 128-bit keys
@@ -8,7 +8,8 @@
  * - added option (AES_SMALL_TABLES) for reducing code size by about 8 kB at
  *   cost of reduced throughput (quite small difference on Pentium 4,
  *   10-25% when using -O1 or -O2 optimization)
- *
+ */
+/*
  * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/src/gsm/milenage/aes-internal.c b/src/gsm/milenage/aes-internal.c
index 4161220..60c520c 100644
--- a/src/gsm/milenage/aes-internal.c
+++ b/src/gsm/milenage/aes-internal.c
@@ -1,5 +1,5 @@
-/*
- * AES (Rijndael) cipher
+/*! \file aes-internal.c
+ * AES (Rijndael) cipher.
  *
  * Modifications to public domain implementation:
  * - support only 128-bit keys
@@ -8,7 +8,8 @@
  * - added option (AES_SMALL_TABLES) for reducing code size by about 8 kB at
  *   cost of reduced throughput (quite small difference on Pentium 4,
  *   10-25% when using -O1 or -O2 optimization)
- *
+ */
+/*
  * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/src/gsm/milenage/aes.h b/src/gsm/milenage/aes.h
index 7e97f61..ce42b20 100644
--- a/src/gsm/milenage/aes.h
+++ b/src/gsm/milenage/aes.h
@@ -1,5 +1,6 @@
+/*! \file aes.h
+ * AES functions */
 /*
- * AES functions
  * Copyright (c) 2003-2006, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/src/gsm/milenage/aes_i.h b/src/gsm/milenage/aes_i.h
index 5d89abc..6df019a 100644
--- a/src/gsm/milenage/aes_i.h
+++ b/src/gsm/milenage/aes_i.h
@@ -1,5 +1,6 @@
+/*! \file aes_i.h
+ * AES (Rijndael) cipher. */
 /*
- * AES (Rijndael) cipher
  * Copyright (c) 2003-2005, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/src/gsm/milenage/aes_wrap.h b/src/gsm/milenage/aes_wrap.h
index afa1451..7d4d5d9 100644
--- a/src/gsm/milenage/aes_wrap.h
+++ b/src/gsm/milenage/aes_wrap.h
@@ -1,12 +1,13 @@
-/*
- * AES-based functions
+/*! \file aes_wrap.h
+ * AES-based functions.
  *
  * - AES Key Wrap Algorithm (128-bit KEK) (RFC3394)
  * - One-Key CBC MAC (OMAC1) hash with AES-128
  * - AES-128 CTR mode encryption
  * - AES-128 EAX mode encryption/decryption
  * - AES-128 CBC
- *
+ */
+/*
  * Copyright (c) 2003-2007, Jouni Malinen <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/src/gsm/milenage/common.h b/src/gsm/milenage/common.h
index aaf82b9..2aa50fb 100644
--- a/src/gsm/milenage/common.h
+++ b/src/gsm/milenage/common.h
@@ -1,3 +1,4 @@
+/*! \file common.h */
 
 #include <stdint.h>
 #include <stdlib.h>
diff --git a/src/gsm/milenage/milenage.c b/src/gsm/milenage/milenage.c
index b43f986..012b399 100644
--- a/src/gsm/milenage/milenage.c
+++ b/src/gsm/milenage/milenage.c
@@ -1,5 +1,6 @@
+/*! \file milenage.c
+ * 3GPP AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208) */
 /*
- * 3GPP AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208)
  * Copyright (c) 2006-2007 <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/src/gsm/milenage/milenage.h b/src/gsm/milenage/milenage.h
index 6fb779c..1a4364d 100644
--- a/src/gsm/milenage/milenage.h
+++ b/src/gsm/milenage/milenage.h
@@ -1,5 +1,7 @@
+/*! \file milenage.h
+ * UMTS AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208).
+ */
 /*
- * UMTS AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208)
  * Copyright (c) 2006-2007 <j at w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/src/gsm/oap.c b/src/gsm/oap.c
index 88c98f7..b07eafc 100644
--- a/src/gsm/oap.c
+++ b/src/gsm/oap.c
@@ -1,6 +1,7 @@
-/* Osmocom Authentication Protocol message encoder/decoder */
-
-/* (C) 2015-2016 by sysmocom s.f.m.c. GmbH
+/*! \file oap.c
+ * Osmocom Authentication Protocol message encoder/decoder */
+/*
+ * (C) 2015-2016 by sysmocom s.f.m.c. GmbH
  * All Rights Reserved
  *
  * Author: Neels Hofmeyr
diff --git a/src/gsm/rsl.c b/src/gsm/rsl.c
index 4a1f733..e33ea10 100644
--- a/src/gsm/rsl.c
+++ b/src/gsm/rsl.c
@@ -1,7 +1,5 @@
-/* GSM Radio Signalling Link messages on the A-bis interface 
- * 3GPP TS 08.58 version 8.6.0 Release 1999 / ETSI TS 100 596 V8.6.0 */
-
-/* (C) 2008-2010 by Harald Welte <laforge at gnumonks.org>
+/*
+ * (C) 2008-2010 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
@@ -30,10 +28,10 @@
 
 /*! \addtogroup rsl
  *  @{
- *  GSM Radio Signalling Link (TS 08.58)
- */
-
-/*! \file rsl.c */
+ * GSM Radio Signalling Link messages on the A-bis interface.
+ * 3GPP TS 08.58 version 8.6.0 Release 1999 / ETSI TS 100 596 V8.6.0.
+ *
+ * \file rsl.c */
 
 /*! Size for RSL \ref msgb_alloc */
 #define RSL_ALLOC_SIZE		200
diff --git a/src/gsm/rxlev_stat.c b/src/gsm/rxlev_stat.c
index d226861..2ff0ac8 100644
--- a/src/gsm/rxlev_stat.c
+++ b/src/gsm/rxlev_stat.c
@@ -1,6 +1,7 @@
-/* Rx Level statistics */
-
-/* (C) 2010 by Harald Welte <laforge at gnumonks.org>
+/*! \file rxlev_stat.c
+ * Rx Level statistics */
+/*
+ * (C) 2010 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
diff --git a/src/gsm/sysinfo.c b/src/gsm/sysinfo.c
index 201acfc..b73bb0c 100644
--- a/src/gsm/sysinfo.c
+++ b/src/gsm/sysinfo.c
@@ -1,7 +1,8 @@
-/* GSM 04.08 System Information (SI) encoding and decoding
+/*! \file sysinfo.c
+ * GSM 04.08 System Information (SI) encoding and decoding.
  * 3GPP TS 04.08 version 7.21.0 Release 1998 / ETSI TS 100 940 V7.21.0 */
-
-/* (C) 2008-2010 by Harald Welte <laforge at gnumonks.org>
+/*
+ * (C) 2008-2010 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c
index d9072c9..b1b1034 100644
--- a/src/gsm/tlv_parser.c
+++ b/src/gsm/tlv_parser.c
@@ -39,9 +39,8 @@
  *  particular type.  Types are e.g. TV (Tag + single byte value), Tag +
  *  fixed-length value, TLV with 8bit length, TLV with 16bit length, TLV
  *  with variable-length length field, etc.
- */
-
-/*! \file tlv_parser.c */
+ *
+ * \file tlv_parser.c */
 
 struct tlv_definition tvlv_att_def;
 struct tlv_definition vtvlv_gan_att_def;
diff --git a/src/gsmtap_util.c b/src/gsmtap_util.c
index 62bbd57..561cdb3 100644
--- a/src/gsmtap_util.c
+++ b/src/gsmtap_util.c
@@ -1,4 +1,5 @@
-/* GSMTAP support code in libmsomcore */
+/*! \file gsmtap_util.c
+ * GSMTAP support code in libosmocore. */
 /*
  * (C) 2010-2011 by Harald Welte <laforge at gnumonks.org>
  *
@@ -43,9 +44,9 @@
 
 /*! \addtogroup gsmtap
  *  @{
- *  GSMTAP utility routines. Encapsulates GSM messages over UDP
- */
-/*! \file gsmtap_util.c */
+ *  GSMTAP utility routines. Encapsulates GSM messages over UDP.
+ *
+ * \file gsmtap_util.c */
 
 
 /*! convert RSL channel number to GSMTAP channel type
diff --git a/src/logging.c b/src/logging.c
index 964128b..c8b86b1 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -1,6 +1,7 @@
-/* Debugging/Logging support code */
-
-/* (C) 2008-2010 by Harald Welte <laforge at gnumonks.org>
+/*! \file logging.c
+ * Debugging/Logging support code. */
+/*
+ * (C) 2008-2010 by Harald Welte <laforge at gnumonks.org>
  * (C) 2008 by Holger Hans Peter Freyther <zecke at selfish.org>
  * All Rights Reserved
  *
@@ -23,9 +24,8 @@
 /* \addtogroup logging
  * @{
  * libosmocore Logging sub-system
- */
-
-/* \file logging.c */
+ *
+ * \file logging.c */
 
 #include "../config.h"
 
diff --git a/src/logging_gsmtap.c b/src/logging_gsmtap.c
index 9e5884b..d0aa47b 100644
--- a/src/logging_gsmtap.c
+++ b/src/logging_gsmtap.c
@@ -1,6 +1,12 @@
-/* GSMTAP network logging support code */
-
-/* (C) 2016 by Harald Welte <laforge at gnumonks.org>
+/*! \file logging_gsmtap.c
+ *  libosmocore log output encapsulated in GSMTAP.
+ *
+ *  Encapsulating the log output inside GSMTAP frames allows us to
+ *  observer protocol traces (of Um, Abis, A or any other interface in
+ *  the Osmocom world) with synchronous interspersed log messages.
+ */
+/*
+ * (C) 2016 by Harald Welte <laforge at gnumonks.org>
  * All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify
@@ -21,15 +27,7 @@
 
 /*! \addtogroup logging
  *  @{
- */
-
-/*! \file logging_gsmtap.c
- *  libosmocore log output encapsulated in GSMTAP
- *
- *  Encapsulating the log output inside GSMTAP frames allows us to
- *  observer protocol traces (of Um, Abis, A or any other interface in
- *  the Osmocom world) with synchronous interspersed log messages.
- */
+ * \file logging_gsmtap.c */
 
 #include "../config.h"
 
diff --git a/src/logging_syslog.c b/src/logging_syslog.c
index a80a31e..d0d6a96 100644
--- a/src/logging_syslog.c
+++ b/src/logging_syslog.c
@@ -1,6 +1,7 @@
-/* Syslog logging support code */
-
-/* (C) 2011 by Harald Welte <laforge at gnumonks.org>
+/*! \file logging_syslog.c
+ * Syslog logging support code. */
+/*
+ * (C) 2011 by Harald Welte <laforge at gnumonks.org>
  * All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify
@@ -21,11 +22,7 @@
 
 /*! \addtogroup logging
  *  @{
- */
-
-/*! \file logging_syslog.c
- *  libosmocore logging output via syslog
- */
+ * \file logging_syslog.c */
 
 #include "../config.h"
 
diff --git a/src/loggingrb.c b/src/loggingrb.c
index 64033fc..5127a2f 100644
--- a/src/loggingrb.c
+++ b/src/loggingrb.c
@@ -1,6 +1,7 @@
-/* Ringbuffer-backed logging support code */
-
-/* (C) 2012-2013 by Katerina Barone-Adesi
+/*! \file loggingrb.c
+ * Ringbuffer-backed logging support code. */
+/*
+ * (C) 2012-2013 by Katerina Barone-Adesi
  * All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify
@@ -21,11 +22,7 @@
 
 /*! \addtogroup logging
  *  @{
- */
-
-/*! \file loggingrb.c
- *  libosmocore logging backend for a ring-buffer of last log messages
- */
+ * \file loggingrb.c */
 
 #include <osmocom/core/strrb.h>
 #include <osmocom/core/logging.h>
diff --git a/src/macaddr.c b/src/macaddr.c
index 6a1588d..5c68d05 100644
--- a/src/macaddr.c
+++ b/src/macaddr.c
@@ -1,3 +1,5 @@
+/*! \file macaddr.c
+ *  MAC address utility routines. */
 /*
  * (C) 2013-2014 by Harald Welte <laforge at gnumonks.org>
  * (C) 2014 by Holger Hans Peter Freyther
@@ -22,11 +24,7 @@
 
 /*! \addtogroup utils
  *  @{
- */
-
-/*! \file macaddr.c
- *  MAC address utility routines
- */
+ * \file macaddr.c */
 
 #include "config.h"
 
diff --git a/src/msgb.c b/src/msgb.c
index bad98f4..2e9f4a2 100644
--- a/src/msgb.c
+++ b/src/msgb.c
@@ -20,6 +20,7 @@
 
 /*! \addtogroup msgb
  *  @{
+ *
  *  libosmocore message buffers, inspired by Linux kernel skbuff
  *
  *  Inspired by the 'struct skbuff' of the Linux kernel, we implement a
@@ -46,9 +47,9 @@
  *  	* prepending (pushing) and appending (putting) data
  *  	* copying / resizing
  *  	* hex-dumping to a string for debug purposes
+ *
+ * \file msgb.c
  */
-
-/*! \file msgb.c */
 
 #include <unistd.h>
 #include <string.h>
diff --git a/src/msgfile.c b/src/msgfile.c
index bf36bf3..8517099 100644
--- a/src/msgfile.c
+++ b/src/msgfile.c
@@ -1,6 +1,6 @@
+/*! \file msgfile.c
+ * Parse a simple file with messages, e.g used for USSD messages. */
 /*
- * Parse a simple file with messages, e.g used for USSD messages
- *
  * (C) 2010 by Holger Hans Peter Freyther
  * (C) 2010 by On-Waves
  * All Rights Reserved
diff --git a/src/panic.c b/src/panic.c
index 251fdad..2a8b1ae 100644
--- a/src/panic.c
+++ b/src/panic.c
@@ -1,4 +1,5 @@
-/* Panic handling */
+/*! \file panic.c
+ *  Routines for panic handling. */
 /*
  * (C) 2010 by Sylvain Munaut <tnt at 246tNt.com>
  *
@@ -22,11 +23,7 @@
 
 /*! \addtogroup utils
  *  @{
- */
-
-/*! \file panic.c
- *  Routines for panic handling
- */
+ * \file panic.c */
 
 #include <osmocom/core/panic.h>
 #include <osmocom/core/backtrace.h>
diff --git a/src/plugin.c b/src/plugin.c
index b6a5a48..264171c 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -1,6 +1,7 @@
-/* plugin infrastructure */
-
-/* (C) 2010 by Harald Welte <laforge at gnumonks.org>
+/*! \file plugin.c
+ *  Routines for loading and managing shared library plug-ins. */
+/*
+ * (C) 2010 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
@@ -22,12 +23,7 @@
 
 /*! \addtogroup utils
  *  @{
- */
-
-/*! \file plugin.c
- *  Routines for loading and managing shared library plug-ins.
- */
-
+ * \file plugin.c */
 
 #include "../config.h"
 
diff --git a/src/prim.c b/src/prim.c
index f39527f..2035581 100644
--- a/src/prim.c
+++ b/src/prim.c
@@ -1,3 +1,5 @@
+/*! \file prim.c */
+
 #include <osmocom/core/utils.h>
 #include <osmocom/core/prim.h>
 
diff --git a/src/pseudotalloc/pseudotalloc.c b/src/pseudotalloc/pseudotalloc.c
index bc7a491..b77ffe9 100644
--- a/src/pseudotalloc/pseudotalloc.c
+++ b/src/pseudotalloc/pseudotalloc.c
@@ -1,7 +1,7 @@
-/* overly simplistic talloc replacement for deeply embedded
+/*! \file pseudotalloc.c
+ * overly simplistic talloc replacement for deeply embedded
  * microcontrollers.  Obviously this has none of the properties of real
- * talloc, it is particualrly not hierarchical at all */
-
+ * talloc, it is particualrly not hierarchical at all. */
 
 #include "talloc.h"
 #include <string.h>
diff --git a/src/pseudotalloc/talloc.h b/src/pseudotalloc/talloc.h
index f4c0a74..3ce9f37 100644
--- a/src/pseudotalloc/talloc.h
+++ b/src/pseudotalloc/talloc.h
@@ -1,8 +1,9 @@
-#pragma once
-
-/* overly simplistic talloc replacement for deeply embedded
+/*! \file talloc.h
+ * overly simplistic talloc replacement for deeply embedded
  * microcontrollers.  Obviously this has none of the properties of real
- * talloc, it is particualrly not hierarchical at all */
+ * talloc, it is particualrly not hierarchical at all. */
+
+#pragma once
 
 #include <stdlib.h>
 #include <stdarg.h>
diff --git a/src/rate_ctr.c b/src/rate_ctr.c
index 068d491..2985bbb 100644
--- a/src/rate_ctr.c
+++ b/src/rate_ctr.c
@@ -1,5 +1,3 @@
-/* utility routines for keeping conters about events and the event rates */
-
 /* (C) 2009-2010 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
@@ -22,11 +20,9 @@
 
 /*! \addtogroup rate_ctr
  *  @{
- *  conters about events and their event rates
- */
-
-/*! \file rate_ctr.c */
-
+ *  Counters about events and their event rates.
+ *
+ * \file rate_ctr.c */
 
 #include <stdint.h>
 #include <string.h>
diff --git a/src/select.c b/src/select.c
index 575fd77..f7ee424 100644
--- a/src/select.c
+++ b/src/select.c
@@ -1,7 +1,9 @@
-/* select filedescriptor handling, taken from:
+/*! \file select.c
+ * select filedescriptor handling.
+ * Taken from:
  * userspace logging daemon for the iptables ULOG target
- * of the linux 2.4 netfilter subsystem.
- *
+ * of the linux 2.4 netfilter subsystem. */
+/*
  * (C) 2000-2009 by Harald Welte <laforge at gnumonks.org>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -37,9 +39,8 @@
 /*! \addtogroup select
  *  @{
  *  select() loop abstraction
- */
-
-/*! \file select.c */
+ *
+ * \file select.c */
 
 static int maxfd = 0;
 static LLIST_HEAD(osmo_fds);
diff --git a/src/sercomm.c b/src/sercomm.c
index d02b39e..07b1aa0 100644
--- a/src/sercomm.c
+++ b/src/sercomm.c
@@ -1,5 +1,3 @@
-/* Serial communications layer, based on HDLC */
-
 /* (C) 2010,2017 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
@@ -22,11 +20,9 @@
 
 /*! \addtogroup sercomm
  *  @{
- *  Serial communications layer, based on HDLC
- */
-
-/*! \file sercomm.c
- */
+ *  Serial communications layer, based on HDLC.
+ *
+ * \file sercomm.c */
 
 #include "config.h"
 
diff --git a/src/serial.c b/src/serial.c
index b8c347b..dddad88 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -1,8 +1,6 @@
+/*! \file serial.c
+ * Utility functions to deal with serial ports */
 /*
- * serial.c
- *
- * Utility functions to deal with serial ports
- *
  * Copyright (C) 2011  Sylvain Munaut <tnt at 246tNt.com>
  *
  * All Rights Reserved
@@ -25,9 +23,8 @@
 /*! \addtogroup serial
  *  @{
  *  Osmocom serial port helpers
- */
-
-/*! \file serial.c */
+ *
+ * \file serial.c */
 
 #include <errno.h>
 #include <fcntl.h>
diff --git a/src/signal.c b/src/signal.c
index 301b021..0c56465 100644
--- a/src/signal.c
+++ b/src/signal.c
@@ -1,5 +1,7 @@
-/* Generic signalling/notification infrastructure */
-/* (C) 2009 by Holger Hans Peter Freyther <zecke at selfish.org>
+/*! \file signal.c
+ * Generic signalling/notification infrastructure. */
+/*
+ * (C) 2009 by Holger Hans Peter Freyther <zecke at selfish.org>
  * All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify
@@ -27,10 +29,9 @@
 
 /*! \addtogroup signal
  *  @{
- *  Generic signalling/notification infrastructure
- */
-
-/*! \file signal.c */
+ *  Generic signalling/notification infrastructure.
+ *
+ * \file signal.c */
 
 
 void *tall_sigh_ctx;
diff --git a/src/sim/card_fs_isim.c b/src/sim/card_fs_isim.c
index 339e862..1073429 100644
--- a/src/sim/card_fs_isim.c
+++ b/src/sim/card_fs_isim.c
@@ -1,4 +1,5 @@
-/* 3GPP ISIM specific structures / routines */
+/*! \file card_fs_isim.c
+ * 3GPP ISIM specific structures / routines. */
 /*
  * (C) 2014 by Harald Welte <laforge at gnumonks.org>
  *
diff --git a/src/sim/card_fs_sim.c b/src/sim/card_fs_sim.c
index 432c945..1411129 100644
--- a/src/sim/card_fs_sim.c
+++ b/src/sim/card_fs_sim.c
@@ -1,4 +1,5 @@
-/* classic SIM card specific structures/routines */
+/*! \file card_fs_sim.c
+ * classic SIM card specific structures/routines. */
 /*
  * (C) 2012-2014 by Harald Welte <laforge at gnumonks.org>
  *
diff --git a/src/sim/card_fs_tetra.c b/src/sim/card_fs_tetra.c
index 657e55f..80f3284 100644
--- a/src/sim/card_fs_tetra.c
+++ b/src/sim/card_fs_tetra.c
@@ -1,4 +1,5 @@
-/* TETRA SIM card specific structures/routines */
+/*! \file card_fs_tetra.c
+ * TETRA SIM card specific structures/routines. */
 /*
  * (C) 2014 by Harald Welte <laforge at gnumonks.org>
  *
diff --git a/src/sim/card_fs_uicc.c b/src/sim/card_fs_uicc.c
index 27afe34..8ff8936 100644
--- a/src/sim/card_fs_uicc.c
+++ b/src/sim/card_fs_uicc.c
@@ -1,4 +1,5 @@
-/* ETSI UICC specific structures / routines */
+/*! \file card_fs_uicc.c
+ * ETSI UICC specific structures / routines. */
 /*
  * (C) 2012 by Harald Welte <laforge at gnumonks.org>
  *
diff --git a/src/sim/card_fs_usim.c b/src/sim/card_fs_usim.c
index 22c193f..9e9fc87 100644
--- a/src/sim/card_fs_usim.c
+++ b/src/sim/card_fs_usim.c
@@ -1,4 +1,5 @@
-/* 3GPP USIM specific structures / routines */
+/*! \file card_fs_usim.c
+ * 3GPP USIM specific structures / routines. */
 /*
  * (C) 2012-2014 by Harald Welte <laforge at gnumonks.org>
  *
diff --git a/src/sim/class_tables.c b/src/sim/class_tables.c
index c3e18d8..fcf67f0 100644
--- a/src/sim/class_tables.c
+++ b/src/sim/class_tables.c
@@ -1,5 +1,6 @@
-/* simtrace - tables determining APDU case for card emulation
- *
+/*! \file class_tables.c
+ * simtrace - tables determining APDU case for card emulation. */
+/*
  * (C) 2016 by Harald Welte <laforge at gnumonks.org>
  *
  *  This program is free software; you can redistribute it and/or modify
diff --git a/src/sim/core.c b/src/sim/core.c
index 15a1563..8da839c 100644
--- a/src/sim/core.c
+++ b/src/sim/core.c
@@ -1,4 +1,5 @@
-/* Core routines for SIM/UICC/USIM access */
+/*! \file core.c
+ * Core routines for SIM/UICC/USIM access. */
 /*
  * (C) 2012 by Harald Welte <laforge at gnumonks.org>
  *
diff --git a/src/sim/gsm_int.h b/src/sim/gsm_int.h
index 54a2fbf..42ccca7 100644
--- a/src/sim/gsm_int.h
+++ b/src/sim/gsm_int.h
@@ -1,3 +1,5 @@
+/*! \file gsm_int.h */
+
 #include <sys/types.h>
 #include <osmocom/sim/sim.h>
 
diff --git a/src/sim/reader.c b/src/sim/reader.c
index e7169b5..f39829b 100644
--- a/src/sim/reader.c
+++ b/src/sim/reader.c
@@ -1,4 +1,5 @@
-/* Card reader abstraction for libosmosim */
+/*! \file reader.c
+ * Card reader abstraction for libosmosim. */
 /*
  * (C) 2012 by Harald Welte <laforge at gnumonks.org>
  *
diff --git a/src/sim/reader_pcsc.c b/src/sim/reader_pcsc.c
index f020142..5b29638 100644
--- a/src/sim/reader_pcsc.c
+++ b/src/sim/reader_pcsc.c
@@ -1,4 +1,5 @@
-/* PC/SC Card reader backend for libosmosim */
+/*! \file reader_pcsc.c
+ * PC/SC Card reader backend for libosmosim. */
 /*
  * (C) 2012 by Harald Welte <laforge at gnumonks.org>
  *
diff --git a/src/sim/sim_int.h b/src/sim/sim_int.h
index 7b07b83..885011e 100644
--- a/src/sim/sim_int.h
+++ b/src/sim/sim_int.h
@@ -1,3 +1,5 @@
+/*! \file sim_int.h */
+
 #ifndef _SIM_INT_H
 
 #include <osmocom/sim/sim.h>
diff --git a/src/socket.c b/src/socket.c
index f033912..b74edd4 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -23,10 +23,9 @@
 
 /*! \addtogroup socket
  *  @{
- *  Osmocom socket convenience functions
- */
-
-/*! \file socket.c */
+ *  Osmocom socket convenience functions.
+ *
+ * \file socket.c */
 
 #ifdef HAVE_SYS_SOCKET_H
 
diff --git a/src/stat_item.c b/src/stat_item.c
index 3b67ba0..c073a3e 100644
--- a/src/stat_item.c
+++ b/src/stat_item.c
@@ -1,6 +1,7 @@
-/* utility routines for keeping conters about events and the event rates */
-
-/* (C) 2015 by Sysmocom s.f.m.c. GmbH
+/*! \file stat_item.c
+ * utility routines for keeping conters about events and the event rates. */
+/*
+ * (C) 2015 by Sysmocom s.f.m.c. GmbH
  * (C) 2009-2010 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
@@ -23,10 +24,7 @@
 
 /*! \addtogroup osmo_stat_item
  *  @{
- */
-
-/*! \file stat_item.c */
-
+ * \file stat_item.c */
 
 #include <stdint.h>
 #include <string.h>
diff --git a/src/statistics.c b/src/statistics.c
index ad069ce..fc808f5 100644
--- a/src/statistics.c
+++ b/src/statistics.c
@@ -1,6 +1,7 @@
-/* utility routines for keeping some statistics */
-
-/* (C) 2009 by Harald Welte <laforge at gnumonks.org>
+/*! \file statistics.c
+ * utility routines for keeping some statistics. */
+/*
+ * (C) 2009 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
diff --git a/src/stats.c b/src/stats.c
index a523259..b39ec53 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -1,3 +1,4 @@
+/*! \file stats.c */
 /*
  * (C) 2015 by Sysmocom s.f.m.c. GmbH
  *
diff --git a/src/stats_statsd.c b/src/stats_statsd.c
index 342bb88..6e7be73 100644
--- a/src/stats_statsd.c
+++ b/src/stats_statsd.c
@@ -1,3 +1,4 @@
+/*! \file stats_statsd.c */
 /*
  * (C) 2015 by Sysmocom s.f.m.c. GmbH
  *
diff --git a/src/strrb.c b/src/strrb.c
index 0c56be2..6bfb179 100644
--- a/src/strrb.c
+++ b/src/strrb.c
@@ -1,7 +1,21 @@
-/* Ringbuffer implementation, tailored for logging.
+/*! \file strrb.c
+ * Ringbuffer implementation, tailored for logging.
  * This is a lossy ringbuffer. It keeps up to N of the newest messages,
  * overwriting the oldest as newer ones come in.
  *
+ * Ringbuffer assumptions, invarients, and notes:
+ * - start is the index of the first used index slot in the ring buffer.
+ * - end is the index of the next index slot in the ring buffer.
+ * - start == end => buffer is empty
+ * - Consequence: the buffer can hold at most size - 1 messages
+ *   (if this were not the case, full and empty buffers would be indistinguishable
+ *   given the conventions in this implementation).
+ * - Whenever the ringbuffer is full, start is advanced. The second oldest
+ *   message becomes unreachable by valid indexes (end is not a valid index)
+ *   and the oldest message is overwritten (if there was a message there, which
+ *   is the case unless this is the first time the ringbuffer becomes full).
+ */
+/*
  * (C) 2012-2013, Katerina Barone-Adesi <kat.obsc at gmail.com>
  * All Rights Reserved
  *
@@ -23,11 +37,7 @@
 
 /*! \addtogroup utils
  *  @{
- */
-
-/*! \file strrb.c
- *  Lossy string ringbuffer for logging; keeps newest messages.
- */
+ * \file strrb.c */
 
 #include <stdio.h>
 #include <string.h>
@@ -35,19 +45,6 @@
 
 #include <osmocom/core/strrb.h>
 #include <osmocom/core/talloc.h>
-
-/* Ringbuffer assumptions, invarients, and notes:
- * - start is the index of the first used index slot in the ring buffer.
- * - end is the index of the next index slot in the ring buffer.
- * - start == end => buffer is empty
- * - Consequence: the buffer can hold at most size - 1 messages
- * (if this were not the case, full and empty buffers would be indistinguishable
- * given the conventions in this implementation).
- * - Whenever the ringbuffer is full, start is advanced. The second oldest
- * message becomes unreachable by valid indexes (end is not a valid index)
- * and the oldest message is overwritten (if there was a message there, which
- * is the case unless this is the first time the ringbuffer becomes full).
-*/
 
 /*! Create an empty, initialized osmo_strrb.
  *  \param[in] ctx The talloc memory context which should own this.
@@ -57,7 +54,6 @@
  * This function creates and initializes a ringbuffer.
  * Note that the ringbuffer stores at most rb_size - 1 messages.
  */
-
 struct osmo_strrb *osmo_strrb_create(TALLOC_CTX * ctx, size_t rb_size)
 {
 	struct osmo_strrb *rb = NULL;
diff --git a/src/timer.c b/src/timer.c
index e18195a..bf46c24 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -27,9 +27,8 @@
 /*! \addtogroup timer
  *  @{
  *  Osmocom timer abstraction; modelled after linux kernel timers
- */
-
-/*! \file timer.c */
+ *
+ * \file timer.c */
 
 #include <assert.h>
 #include <string.h>
diff --git a/src/timer_gettimeofday.c b/src/timer_gettimeofday.c
index 3a2ae9a..1bf714e 100644
--- a/src/timer_gettimeofday.c
+++ b/src/timer_gettimeofday.c
@@ -22,10 +22,7 @@
 
 /*! \addtogroup timer
  *  @{
- */
-
-/*! \file timer_gettimeofday.c
- */
+ * \file timer_gettimeofday.c */
 
 #include <stdbool.h>
 #include <sys/time.h>
diff --git a/src/utils.c b/src/utils.c
index 2bd4c19..9e3414b 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -34,9 +34,8 @@
 /*! \addtogroup utils
  * @{
  * various utility routines
- */
-
-/*! \file utils.c */
+ *
+ * \file utils.c */
 
 static char namebuf[255];
 
diff --git a/src/vty/buffer.c b/src/vty/buffer.c
index 8862da9..1935aa1 100644
--- a/src/vty/buffer.c
+++ b/src/vty/buffer.c
@@ -1,5 +1,6 @@
+/*! \file buffer.c
+ * Buffering of output and input. */
 /*
- * Buffering of output and input.
  * Copyright (C) 1998 Kunihiro Ishiguro
  *
  * This file is part of GNU Zebra.
diff --git a/src/vty/command.c b/src/vty/command.c
index a0824d3..33862c0 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -44,8 +44,8 @@
 /*! \addtogroup command
  *  @{
  *  VTY command handling
- */
-/*! \file command.c */
+ *
+ * \file command.c */
 
 #define CONFIGFILE_MASK 022
 
diff --git a/src/vty/fsm_vty.c b/src/vty/fsm_vty.c
index acc8ca6..345be66 100644
--- a/src/vty/fsm_vty.c
+++ b/src/vty/fsm_vty.c
@@ -1,5 +1,7 @@
-/* Osmocom FSM introspection via VTY */
-/* (C) 2016 by Harald Welte <laforge at gnumonks.org>
+/*! \file fsm_vty.c
+ * Osmocom FSM introspection via VTY. */
+/*
+ * (C) 2016 by Harald Welte <laforge at gnumonks.org>
  * All Rights Reserved
  *
  * This program is free software; you can redistribute it and/or modify
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c
index 4cb1379..758f0b9 100644
--- a/src/vty/logging_vty.c
+++ b/src/vty/logging_vty.c
@@ -1,5 +1,7 @@
-/* OpenBSC logging helper for the VTY */
-/* (C) 2009-2010 by Harald Welte <laforge at gnumonks.org>
+/*! \file logging_vty.c
+ * OpenBSC logging helper for the VTY. */
+/*
+ * (C) 2009-2010 by Harald Welte <laforge at gnumonks.org>
  * (C) 2009-2014 by Holger Hans Peter Freyther
  * All Rights Reserved
  *
diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c
index 0557820..57cdd30 100644
--- a/src/vty/stats_vty.c
+++ b/src/vty/stats_vty.c
@@ -1,5 +1,7 @@
-/* OpenBSC stats helper for the VTY */
-/* (C) 2009-2010 by Harald Welte <laforge at gnumonks.org>
+/*! \file stats_vty.c
+ * OpenBSC stats helper for the VTY. */
+/*
+ * (C) 2009-2010 by Harald Welte <laforge at gnumonks.org>
  * (C) 2009-2014 by Holger Hans Peter Freyther
  * (C) 2015      by Sysmocom s.f.m.c. GmbH
  * All Rights Reserved
diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c
index d59516c..f82a7ff 100644
--- a/src/vty/telnet_interface.c
+++ b/src/vty/telnet_interface.c
@@ -1,4 +1,5 @@
-/* minimalistic telnet/network interface it might turn into a wire interface */
+/*! \file telnet_interface.c
+ * minimalistic telnet/network interface it might turn into a wire interface */
 /* (C) 2009 by Holger Hans Peter Freyther <zecke at selfish.org>
  * All Rights Reserved
  *
@@ -44,8 +45,8 @@
  *  access.  This telnet server gets linked into each libosmovty-using
  *  process in order to enable interactive command-line introspection,
  *  interaction and configuration.
- */
-/*! \file telnet_interface.c */
+ *
+ * \file telnet_interface.c */
 
 /* per connection data */
 LLIST_HEAD(active_connections);
diff --git a/src/vty/utils.c b/src/vty/utils.c
index 267d76e..9d1bdf9 100644
--- a/src/vty/utils.c
+++ b/src/vty/utils.c
@@ -1,6 +1,7 @@
-/* utility routines for printing common objects in the Osmocom world */
-
-/* (C) 2009-2010 by Harald Welte <laforge at gnumonks.org>
+/*! \file utils.c
+ * Utility routines for printing common objects in the Osmocom world. */
+/*
+ * (C) 2009-2010 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *
@@ -35,8 +36,6 @@
 #include <osmocom/core/statistics.h>
 
 #include <osmocom/vty/vty.h>
-
-/* \file utils.c */
 
 /*! \addtogroup rate_ctr
  *  @{
diff --git a/src/vty/vector.c b/src/vty/vector.c
index c21bca7..ee07cbd 100644
--- a/src/vty/vector.c
+++ b/src/vty/vector.c
@@ -1,4 +1,6 @@
-/* Generic vector interface routine
+/*! \file vector.c
+ * Generic vector interface routine. */
+/*
  * Copyright (C) 1997 Kunihiro Ishiguro
  *
  * This file is part of GNU Zebra.
diff --git a/src/vty/vty.c b/src/vty/vty.c
index 6e60eb7..644d4ed 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -68,8 +68,7 @@
 
 /* \addtogroup vty
  * @{
- */
-/*! \file vty.c */
+ * \file vty.c */
 
 #define SYSCONFDIR "/usr/local/etc"
 
diff --git a/src/write_queue.c b/src/write_queue.c
index d929774..203815b 100644
--- a/src/write_queue.c
+++ b/src/write_queue.c
@@ -1,4 +1,3 @@
-/* Generic write queue implementation */
 /*
  * (C) 2010-2016 by Holger Hans Peter Freyther
  * (C) 2010 by On-Waves
@@ -27,10 +26,9 @@
 
 /*! \addtogroup write_queue
  *  @{
- *  write queue for writing \ref msgb to sockets/fd's
- */
-
-/*! \file write_queue.c */
+ *  Write queue for writing \ref msgb to sockets/fds.
+ *
+ * \file write_queue.c */
 
 /*! Select loop function for write queue handling
  *  \param[in] fd osmocom file descriptor
diff --git a/utils/osmo-arfcn.c b/utils/osmo-arfcn.c
index 5103c97..61108f8 100644
--- a/utils/osmo-arfcn.c
+++ b/utils/osmo-arfcn.c
@@ -1,4 +1,5 @@
-/* Utility program for ARFCN / frequency calculations */
+/*! \file osmo-arfcn.c
+ * Utility program for ARFCN / frequency calculations. */
 /*
  * (C) 2011 by Harald Welte <laforge at gnumonks.org>
  *
diff --git a/utils/osmo-auc-gen.c b/utils/osmo-auc-gen.c
index 6b1e623..76c4927 100644
--- a/utils/osmo-auc-gen.c
+++ b/utils/osmo-auc-gen.c
@@ -1,6 +1,7 @@
-/* GSM/GPRS/3G authentication testing tool */
-
-/* (C) 2010-2012 by Harald Welte <laforge at gnumonks.org>
+/*! \file osmo-auc-gen.c
+ * GSM/GPRS/3G authentication testing tool. */
+/*
+ * (C) 2010-2012 by Harald Welte <laforge at gnumonks.org>
  *
  * All Rights Reserved
  *

-- 
To view, visit https://gerrit.osmocom.org/2987
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
Gerrit-PatchSet: 3
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list