diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-01-01 16:42:12 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-01-01 19:51:50 +0100 |
commit | 89c159c87348c0280dbc99f002a87f64d137646b (patch) | |
tree | 072190e60cc77556ab746bb65033f6eb34d42316 /src/protocol/protocol.h | |
parent | 022c45a26345a54880e48e3bc30adc60643270e1 (diff) |
add printing of DIAG_QSR_EXT_MSG_TERSE_F
Those are QSHRINK type messages where the format-string is not contained
in the message itself but would have to be provided from an external
source and looked up by a hash.
Diffstat (limited to 'src/protocol/protocol.h')
-rw-r--r-- | src/protocol/protocol.h | 47 |
1 files changed, 17 insertions, 30 deletions
diff --git a/src/protocol/protocol.h b/src/protocol/protocol.h index 53b9670..083c004 100644 --- a/src/protocol/protocol.h +++ b/src/protocol/protocol.h @@ -23,14 +23,17 @@ struct msgb; * Extended Message Service (DIAG_EXT_MSG_F) ***********************************************************************/ -struct ext_log_msg { - /* msg_hdr_type equivalent */ - uint8_t type; - uint8_t ts_type; /* timestamp tyoe */ - uint8_t num_args; /* number of arguments */ - uint8_t drop_cnt; /* dropped messages */ - uint64_t timestamp; /* More 32 bit but dm-commands.h */ +/* message header */ +struct diag_msg_hdr { + uint8_t cmd_code; + uint8_t ts_type; + uint8_t num_args; + uint8_t drop_cnt; + uint64_t timestamp; +} __attribute__((packed)); +struct ext_log_msg { + struct diag_msg_hdr hdr; /* msg_desc_type */ uint16_t line_nr; uint16_t subsys_id; @@ -39,31 +42,15 @@ struct ext_log_msg { int32_t params[0]; /* three params */ } __attribute__((packed)); +struct qsr_ext_msg_terse { + struct diag_msg_hdr hdr; -/* message header */ -struct diag_msg_hdr { - uint8_t cmd_code; - uint8_t timestamp_type; - uint8_t num_args; - uint8_t drop_count; - uint64_t ts; -} __attribute__((packed)); - -/* message descriptor */ -struct diag_msg_desc { - uint16_t line; + uint16_t line_nr; uint16_t subsys_id; - uint16_t subsys_mask; -} __attribute__((packed)); - -/* message header for DIAG_EXT_MSG_F */ -struct diag_msg_ext { - struct diag_msg_hdr hdr; - struct diag_msg_desc desc; - uint32_t args[0]; /* see hdr.num_args */ - /* followed by null-terminated strings */ -} __attribute__((packed)); - + uint32_t subsys_mask; + uint32_t hash; + int32_t params[0]; +}; /*********************************************************************** * Log Service (IAG_LOG_F) |