[PATCH] libosmocore[master]: gsmtap: Add defintions for GSMTAP based remote logging

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Dec 2 21:39:22 UTC 2016


Review at  https://gerrit.osmocom.org/1356

gsmtap: Add defintions for GSMTAP based remote logging

Often it is useful to have log statements from the osmocom programs
synchronized with protocol traces.  So rather than having to open the
pcap file with GSMTAP or other protocol data side-by-side with the
textual log of one or more network elements, we simply pass the log
lines around as GSMTAP messages, which can then be displayed in-order
and interspersed with the protocol messages inside wireshark.

Change-Id: I33ab530e10ef0311b6f80b731e61894f20b4b3e7
---
M include/osmocom/core/gsmtap.h
1 file changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/1356/1

diff --git a/include/osmocom/core/gsmtap.h b/include/osmocom/core/gsmtap.h
index c35582e..bcfc7bd 100644
--- a/include/osmocom/core/gsmtap.h
+++ b/include/osmocom/core/gsmtap.h
@@ -45,6 +45,7 @@
 #define GSMTAP_TYPE_LTE_RRC	0x0d	/* LTE interface */
 #define GSMTAP_TYPE_LTE_MAC	0x0e	/* LTE MAC interface */ 
 #define GSMTAP_TYPE_LTE_MAC_FRAMED	0x0f	/* LTE MAC with context hdr */
+#define GSMTAP_TYPE_OSMOCORE_LOG	0x10	/* libosmocore logging */
 
 /* ====== DO NOT MAKE UNAPPROVED MODIFICATIONS HERE ===== */
 
@@ -255,3 +256,21 @@
 	uint8_t res;		/*!< reserved for future use (RFU) */
 
 } __attribute__((packed));
+
+/*! \brief Structure of the GTMTAP libosmocore logging header */
+struct gsmtap_osmocore_log_hdr {
+	struct {
+		uint32_t sec;
+		uint32_t usec;
+	} ts;
+	char proc_name[16];	/*!< name of process */
+	uint32_t pid;		/*!< process ID */
+	uint8_t level;		/*!< logging level */
+	uint8_t _pad[3];
+	/* TODO: color */
+	char subsys[16];	/*!< logging sub-system */
+	struct {
+		char name[32];	/*!< source file name */
+		uint32_t line_nr;/*!< line number */
+	} src_file;
+} __attribute__((packed));

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33ab530e10ef0311b6f80b731e61894f20b4b3e7
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list