summaryrefslogtreecommitdiff
path: root/include/MESA/stream_inc/gdev_keepalive.h
blob: 8211c400cb5f9904e1c43ced1cc4c18cb793604f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifdef __cplusplus
extern "C" {
#endif

#include "stream_inc/stream_base.h"


enum gdev_keepalive_opt_t{
	GDEV_KEEPALIVE_OPT_SERVICE_CTRL, 	/* ��������ij��ҵ����Ƿ񱣻� opt_val is struct gdev_keepalive_service_ctrl */
	GDEV_KEEPALIVE_OPT_GLOBAL_SWITCH,   /* ȫ���Ա����, opt_val is int */
	GDEV_KEEPALIVE_OPT_RCV_PKT_PPS,		/* �յ��ı��������/��, opt_val is long */
	GDEV_KEEPALIVE_OPT_SND_PKT_PPS,		/* �յ��ı��������/��, opt_val is long */
};

struct gdev_keepalive_service_ctrl{
	int service_num; /* ҵ���, service number */
	int keepalive_switch; /* 1:����, enable keepalive;  0:������, disable keepalive */
};


int gdev_keepalive_set_opt(const SAPP_TLV_T *tlv_value);

int gdev_keepalive_get_opt(SAPP_TLV_T *tlv_value);


/* ��Դ�˿ڻ�ȡ��ǰ������ҵ��� */
unsigned char vxlan_sport_map_to_service_id(unsigned short sport_host_order);

/* ��vxlan_id��ȡ��ǰ������ҵ��� */
unsigned char vxlan_id_map_to_service_id(int vxlan_id_host_order);


#ifdef __cplusplus
}
#endif