blob: 0c2cf3e10c8b6d40083b7b19db09950acc4d3d44 [file] [log] [blame]
Harald Weltefaea7542016-12-24 01:21:03 +01001#pragma once
2
3#include "diag_io.h"
Harald Welte84ec50f2016-12-24 10:16:00 +01004#include "protocol/protocol.h"
Harald Weltefaea7542016-12-24 01:21:03 +01005
6typedef void diag_log_handler(struct log_hdr *lh, struct msgb *msg);
7
8struct diag_log_dispatch_tbl {
9 uint16_t code;
10 diag_log_handler *handler;
11};
12
13/* called by input whenever a LOG message is registered */
14void diag_log_handle(struct diag_instance *di, struct msgb *msg);
15
16/* called by individual modules to register their own decoders */
17void diag_log_reg_dispatch(const struct diag_log_dispatch_tbl *tbl, unsigned int size);
18
19void diag_log_enable_all_supported_family(struct diag_instance *di, uint8_t family);
20void diag_log_enable_all_supported(struct diag_instance *di);
21
22/* functions for log configuration */
23struct msgb *gen_log_config_set_mask(uint32_t equip_id, uint32_t last_item);
24int log_config_set_mask_bit(struct msgb *msg, uint32_t bit_in);
Harald Welte0442fea2017-01-20 12:04:10 +010025
26void diag_log_hdl_default(struct log_hdr *lh, struct msgb *msg);