diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-01 02:49:13 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-03 21:55:44 +0200 |
commit | 49b3b01f4cd6265380dd804279c2ced73a3a8220 (patch) | |
tree | da208fa205c8e57d937e1f9cd434ad9a991768b6 /zebra/zserv.h | |
parent | Merge pull request #4247 from mjstapp/fix_topotest_topo_only (diff) | |
download | frr-49b3b01f4cd6265380dd804279c2ced73a3a8220.tar.xz frr-49b3b01f4cd6265380dd804279c2ced73a3a8220.zip |
zebra: fix zapi msg debugging dumps
When we switched to a pthread per client, we lost the ability to
correlate zapi message debugs with their handlers in zlog, because the
message was logged when it was read off the zapi socket and not right
before it was processed. Move the zapi msg hexdump to happen right
before we call the message handler.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'zebra/zserv.h')
-rw-r--r-- | zebra/zserv.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/zebra/zserv.h b/zebra/zserv.h index 90fd19571..380f23916 100644 --- a/zebra/zserv.h +++ b/zebra/zserv.h @@ -240,6 +240,22 @@ extern struct zserv *zserv_find_client(uint8_t proto, unsigned short instance); */ extern void zserv_close_client(struct zserv *client); + +/* + * Log a ZAPI message hexdump. + * + * errmsg + * Error message to include with packet hexdump + * + * msg + * Message to log + * + * hdr + * Message header + */ +void zserv_log_message(const char *errmsg, struct stream *msg, + struct zmsghdr *hdr); + #if defined(HANDLE_ZAPI_FUZZING) extern void zserv_read_file(char *input); #endif |