feature: add debug_plugin for development debugging
This commit is contained in:
@@ -6,6 +6,7 @@ extern "C"
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "stellar/session.h"
|
||||
|
||||
@@ -131,8 +132,16 @@ const char *session_state_to_str(enum session_state state);
|
||||
const char *session_type_to_str(enum session_type type);
|
||||
const char *flow_direction_to_str(enum flow_direction dir);
|
||||
|
||||
int session_to_json(struct session *sess, char *buff, int size);
|
||||
void session_print(struct session *sess);
|
||||
// bref : 1, output session bref info
|
||||
// bref : 0, output session detail info
|
||||
int session_to_str(const struct session *sess, int bref, char *buff, int size);
|
||||
|
||||
static inline void session_print(const struct session *sess)
|
||||
{
|
||||
char buff[4096];
|
||||
session_to_str(sess, 0, buff, sizeof(buff));
|
||||
printf("%s\n", buff);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user