将kni合并到tfe中

This commit is contained in:
wangmenglan
2023-04-18 16:03:57 +08:00
parent 48c303e856
commit 11a46269f1
34 changed files with 6301 additions and 26 deletions

View File

@@ -0,0 +1,44 @@
#ifndef _TFE_CTRL_PACKET_H
#define _TFE_CTRL_PACKET_H
#ifdef __cpluscplus
extern "C"
{
#endif
#include <stdint.h>
enum session_state
{
SESSION_STATE_OPENING = 1,
SESSION_STATE_CLOSING = 2,
SESSION_STATE_ACTIVE = 3,
SESSION_STATE_RESETALL = 4,
};
struct ctrl_pkt_parser
{
char tsync[4];
uint64_t session_id;
enum session_state state;
char method[32];
uint64_t tfe_policy_ids[32];
int tfe_policy_id_num;
uint64_t sce_policy_ids[32];
int sce_policy_id_num;
struct tfe_cmsg *cmsg;
};
const char *session_state_to_string(enum session_state state);
void ctrl_packet_parser_init(struct ctrl_pkt_parser *handler);
// return 0 : success
// return -1 : error
int ctrl_packet_parser_parse(struct ctrl_pkt_parser *handler, const char *data, size_t length);
void ctrl_packet_parser_dump(struct ctrl_pkt_parser *handler);
#ifdef __cpluscplus
}
#endif
#endif