TSG-13630 tsg-service-chaining-engine使用mrzcpd捕获报文/回注报文
TSG-13685 tsg-service-chaining-engine使用VXLAN封装Steering/Mirroring的Package
This commit is contained in:
38
common/include/ctrl_packet.h
Normal file
38
common/include/ctrl_packet.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef _CTRL_PACKET_H
|
||||
#define _CTRL_PACKET_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum session_state
|
||||
{
|
||||
SESSION_STATE_OPENING = 1,
|
||||
SESSION_STATE_CLONING = 2,
|
||||
SESSION_STATE_ACTIVE = 3,
|
||||
SESSION_STATE_RESETALL = 4,
|
||||
};
|
||||
|
||||
struct ctrl_pkt_parser
|
||||
{
|
||||
char tsync[4];
|
||||
uint64_t session_id;
|
||||
enum session_state state;
|
||||
int policy_ids[32];
|
||||
int policy_id_num;
|
||||
};
|
||||
|
||||
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 void *data, size_t length);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user