diff options
Diffstat (limited to 'src/stream_base.h')
| -rw-r--r-- | src/stream_base.h | 72 |
1 files changed, 53 insertions, 19 deletions
diff --git a/src/stream_base.h b/src/stream_base.h index 2311cee..33a1a24 100644 --- a/src/stream_base.h +++ b/src/stream_base.h @@ -1,9 +1,10 @@ #ifndef _APP_STREAM_BASE_H_
#define _APP_STREAM_BASE_H_
-#define STREAM_BASE_H_VERSION (20170616)
+#define STREAM_BASE_H_VERSION (20201009)
#include <sys/types.h>
+#include <linux/if_ether.h>
#include <stdlib.h>
#include <string.h>
@@ -87,6 +88,11 @@ enum addr_type_t{ #define APP_STATE_FAWPKT 0x00
#define APP_STATE_DROPPKT 0x10
+
+#define APP_STATE_KILL_FOLLOW 0x40 /* ǿ��CLOSE��ǰ������������в�� */
+#define APP_STATE_KILL_OTHER 0x80 /* ǿ��CLOSE����ǰ���������в�� */
+
+
/* CHN : �������Ͷ��� */
/* ENG : stream type */
enum stream_type_t{
@@ -112,13 +118,14 @@ enum stream_type_t{ enum stream_carry_tunnel_t{
STREAM_TUNNLE_NON = 0, /* default is 0, not tunnel; Ĭ��Ϊ0, ������; */
STREAM_TUNNLE_6OVER4 = 1 << 0,
- STREAM_TUNNLE_4OVER6 = 1 << 1,
- STREAM_TUNNLE_GRE = 1 << 2,
+ STREAM_TUNNLE_4OVER6 = 1 << 1,
+ STREAM_TUNNLE_GRE = 1 << 2,
STREAM_TUNNLE_IP_IN_IP = 1 << 3,
STREAM_TUNNLE_PPTP = 1 << 4,
STREAM_TUNNLE_L2TP = 1 << 5,
- STREAM_TUNNLE_TEREDO = 1 << 6,
+ STREAM_TUNNLE_TEREDO = 1 << 6,
STREAM_TUNNEL_GPRS_TUNNEL = 1 << 7,
+ STREAM_TUNNEL_MULTI_MAC = 1 << 8, /* is obsoulte */
};
typedef struct raw_ipfrag_list{
@@ -179,15 +186,15 @@ struct layer_addr_gre #define VLAN_ID_MASK (0x0FFF)
#define VLAN_TAG_LEN (4)
-struct layer_addr_vlan
-{
- UINT16 vlan_id; /* network order */
-};
+#define MAX_VLAN_ADDR_LAYER (3)
-#define VLAN_ID_LEN 4
-struct tuplevlan
+struct layer_addr_vlan
{
- UCHAR vlan_id[VLAN_ID_LEN];
+ UINT16 vlan_id; /* network order, old value, to be obsoleted */
+ UCHAR src_vlan_layer_num;
+ UCHAR dst_vlan_layer_num;
+ UINT32 src_vlan_pkt[MAX_VLAN_ADDR_LAYER]; /* network order */
+ UINT32 dst_vlan_pkt[MAX_VLAN_ADDR_LAYER]; /* network order */
};
struct layer_addr_pppoe_session
@@ -209,8 +216,16 @@ struct layer_addr_pppoe_session struct layer_addr_mac
{
- UCHAR dst_mac[MAC_ADDR_LEN]; /* network order */
- UCHAR src_mac[MAC_ADDR_LEN]; /* network order */
+ /*
+ C2S��S2C�������Բ�ͬ����·���豸, �ᵼ�����������mac��ַȫ��һ��, ����ע��ʱ�����ô�ͳ��ʽ, ���ĵߵ�src��dst,
+ �Ķ�������, mirrorģʽ��, ���Ǵ洢��src_addr��,
+ API��ͬ��, ABI������ǰ���ݵ�, �ṹ���ڴ�ֲ���֮ǰ��һ��.
+ */
+ struct ethhdr src_addr;
+ struct ethhdr dst_addr;
+
+ //UCHAR dst_mac[MAC_ADDR_LEN]; /* network order */
+ //UCHAR src_mac[MAC_ADDR_LEN]; /* network order */
};
struct layer_addr_ipv4
@@ -276,8 +291,14 @@ struct layer_addr_l2tp #define MAX_MPLS_ADDR_LAYER 4
struct layer_addr_mpls
{
- unsigned int mpls_pkt[MAX_MPLS_ADDR_LAYER];
- char mpls_layer_num;
+ unsigned int src_mpls_pkt[MAX_MPLS_ADDR_LAYER];
+ unsigned int dest_mpls_pkt[MAX_MPLS_ADDR_LAYER];
+ char src_mpls_layer_num;
+ char dest_mpls_layer_num;
+ char src_has_ctrl_word;
+ char dst_has_ctrl_word;
+ unsigned int src_mpls_ctrl_word; /* refer to RFC4623 */
+ unsigned int dst_mpls_ctrl_word; /* refer to RFC4623 */
};
struct layer_addr_pptp
@@ -288,9 +309,9 @@ struct layer_addr_pptp struct layer_addr_gtp
{
- unsigned long long source;
+ unsigned long long source; /* From Client */
unsigned int src_seq;
- unsigned long long dest;
+ unsigned long long dest; /* From Server */
unsigned int dest_seq;
}__attribute__ ((aligned (1)));
@@ -327,7 +348,9 @@ struct layer_addr struct layer_addr_pptp *pptp;
struct layer_addr_mac_in_mac *mimac;
struct layer_addr_gtp *gtp;
- void *paddr;
+ struct layer_addr_mpls *mpls;
+
+ void *paddr;
};
};
@@ -399,6 +422,18 @@ struct streaminfo };
+typedef struct {
+ unsigned int type;
+ unsigned int length;
+ union{
+ char char_value;
+ short short_value;
+ int int_value;
+ long long_value;
+ char array_value[8];
+ void *ptr_value; /* more than 8bytes data, or complex struct. */
+ };
+}SAPP_TLV_T;
#ifdef __cplusplus
extern "C" {
@@ -517,4 +552,3 @@ const raw_ipfrag_list_t *ip_plug_get_raw_ipfrag_list(int thread_num, enum addr_t #endif
#endif
-
|
