diff options
| author | yangwei <[email protected]> | 2023-08-14 16:01:46 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2023-08-15 13:46:04 +0800 |
| commit | d0493e0bf333ebf72ce29ceb760b3243d808ba23 (patch) | |
| tree | a2d54f0857a7c92b06e9d1cb3f23cda49165c750 /include/public | |
| parent | 1ada79ef90474fb3c84c53aace7c0f59a6ad7697 (diff) | |
🐞 fix(stream_inject.h): remove legacy inject interface
Diffstat (limited to 'include/public')
| -rw-r--r-- | include/public/stream_inc/stream_inject.h | 151 |
1 files changed, 2 insertions, 149 deletions
diff --git a/include/public/stream_inc/stream_inject.h b/include/public/stream_inc/stream_inject.h index dd72cd4..0654dbe 100644 --- a/include/public/stream_inc/stream_inject.h +++ b/include/public/stream_inc/stream_inject.h @@ -9,9 +9,6 @@ extern "C" {
#endif
-#define STREAM_INJECT_H_VERSION (20191120)
-
-
/*
CHN : ����GK��غ���
ENG : to force terminate a stream;
@@ -25,8 +22,6 @@ extern "C" { -1 : error.
*/
int MESA_kill_tcp(struct streaminfo *stream, const void *raw_pkt);
-int MESA_kill_tcp_synack(struct streaminfo *stream, const void *raw_pkt);
-int MESA_kill_connection(struct streaminfo *stream, const void *ext_raw_pkt);
struct rst_tcp_para{
unsigned char th_flags; /* TCPͷ����־λ, ��ѡֵΪ[TH_RST, TH_RST|TH_ACK] */
@@ -91,9 +86,7 @@ int MESA_rst_tcp(struct streaminfo *stream, struct rst_tcp_para *paras, int para -1 : error.
-2 : feedback_buf or feedback_buf_len error.
*/
-int MESA_kill_tcp_feedback(struct streaminfo *stream, const void *raw_pkt, char *feedback_buf, int *feedback_buf_len);
-int MESA_kill_tcp_synack_feedback(struct streaminfo *stream, const void *raw_pkt, char *feedback_buf, int *feedback_buf_len);
-int MESA_kill_connection_feedback(struct streaminfo *stream, const void *raw_pkt, char *feedback_buf, int *feedback_buf_len);
+
int MESA_send_smart_offload(const struct streaminfo *pstream, const void *raw_pkt, int thread_num);
/*
@@ -133,147 +126,7 @@ int MESA_dir_human_to_link(int human_dir); >0: ���͵����ݰ�ʵ���ܳ���(payload_len + �ײ��ͷ����);
*/
int MESA_inject_pkt(struct streaminfo *stream, const char *payload, int payload_len, const void *raw_pkt, UCHAR snd_routedir);
-
-/*
- ���������ܵ�MESA_inject_pkt_feedback����, ����ͬMESA_inject_pkt().
- ��ʵ�ʷ��͵����ݰ�copy��feedback_buf�ռ���, ������feedback_buf_lenΪʵ�����ݰ�����.
-
- ע��: feedback_buf_lenΪ���봫����, �����ʾfeedback_buf����, ������ʾʵ�ʷ��͵����ݰ�����.
-
- return value:
- >= 0: success.
- -1 : error.
- -2 : feedback_buf or feedback_buf_len error.
-*/
-int MESA_inject_pkt_feedback(struct streaminfo *stream, const char *payload, int payload_len,
- const void *ext_raw_pkt, UCHAR snd_routedir,
- char *feedback_buf, int *feedback_buf_len);
-
-int MESA_sendpacket_ethlayer(int thread_index,const char *buf, int buf_len, unsigned int target_id);//papp online, shuihu
-
-/* �����ѹ���õ�����IP��, У��͵Ⱦ���������� */
-int MESA_sendpacket_iplayer(int thread_index,const char *buf, int buf_len, __uint8_t dir);
-
-/* �����ѹ���õ�����IPv4��, ����vxlan����, options��������vxlan��ص�ѡ�� */
-int MESA_sendpacket_iplayer_options(int thread_index,const char *data, int data_len, u_int8_t dir, SAPP_TLV_T *options, int opt_num);
-
-/* �����ѹ���õ�����IPv6��, У��͵Ⱦ����������, ����vxlan����, options��������vxlan��ص�ѡ�� */
-int MESA_sendpacket_ipv6_layer_options(int thread_index,const char *data, int data_len, u_int8_t dir, SAPP_TLV_T *options, int opt_num);
-/* ����ָ������IP��, ��ָ����������, У�����ƽ̨�Զ�����,
- sip, dip������. */
-int MESA_fakepacket_send_ipv4(int thread_index,__uint8_t ttl,__uint8_t protocol,
- u_int32_t sip_host_order, u_int32_t dip_host_order,
- const char *payload, int payload_len,__uint8_t dir);
-
-int MESA_fakepacket_send_ipv4_options(const struct streaminfo *stream, uint8_t protocol,
- uint32_t sip_host_order, uint32_t dip_host_order,
- const char *payload, int payload_len, uint8_t dir,
- SAPP_TLV_T *options, int opt_num);
-
-int MESA_fakepacket_send_ipv4_detail(int thread_index,u_int8_t ttl,
- u_int8_t protocol,u_int32_t sip, u_int32_t dip, u_int16_t ipid,
- const char *payload, int payload_len,u_int8_t dir);
-
-int MESA_fakepacket_send_ipv6_options(const struct streaminfo *stream, uint8_t protocol,
- struct in6_addr *sip, struct in6_addr *dip,
- const char *payload, int payload_len, uint8_t dir,
- SAPP_TLV_T *options, int opt_num);
-/* ����ָ������TCP��, ��ָ����������, У�����ƽ̨�Զ�����,
- sip, dip,sport,dport,sseq,sack��������. */
-int MESA_fakepacket_send_tcp(int thread_index,u_int sip_host_order,u_int dip_host_order,
- u_short sport_host_order,u_short dport_host_order,
- u_int sseq_host_order,u_int sack_host_order,
- u_char control,const char* payload,int payload_len, u_int8_t dir);
-
-int MESA_fakepacket_send_tcp_detail(int thread_index,u_int sip_host_order,u_int dip_host_order,
- u_short ipid, u_char ip_ttl,
- u_short sport_host_order,u_short dport_host_order,
- u_int sseq_host_order,u_int sack_host_order,
- u_char control, u_short tcp_win, const char* payload,int payload_len, u_int8_t dir);
-int MESA_fakepacket_send_tcp_options(const struct streaminfo *stream,
- u_int sip_host_order,u_int dip_host_order,
- u_short sport_host_order,u_short dport_host_order,
- u_int sseq_host_order,u_int sack_host_order,
- u_char control,
- const char* payload,int payload_len, u_int8_t dir,
- SAPP_TLV_T *options, int opt_num);
-int MESA_fakepacket_send_ipv6_tcp_options(const struct streaminfo *stream,
- struct in6_addr *sip, struct in6_addr *dip,
- u_short sport_host_order,u_short dport_host_order,
- u_int sseq_host_order,u_int sack_host_order,
- u_char control,
- const char* payload,int payload_len, u_int8_t dir,
- SAPP_TLV_T *options, int opt_num);
-/* ����ָ������UDP��, ��ָ����������, У�����ƽ̨�Զ�����,
- sip, dip,sport,dport��������. */
-int MESA_fakepacket_send_udp(int thread_index, u_int sip_host_order, u_int dip_host_order,
- u_short sport_host_order,u_short dport_host_order,
- const char *payload, int payload_len,u_int8_t dir);
-
-int MESA_fakepacket_send_udp_detail(int thread_index, u_int sip_host_order, u_int dip_host_order,
- u_short ipid, u_int8_t ip_ttl, u_short sport_host_order,u_short dport_host_order,
- const char *payload, int payload_len,u_int8_t dir);
-int MESA_fakepacket_send_udp_options(const struct streaminfo *stream,
- u_int sip_host_order, u_int dip_host_order,
- u_short sport_host_order,u_short dport_host_order,
- const char *payload, int payload_len,u_int8_t dir,
- SAPP_TLV_T *options, int opt_num);
-int MESA_fakepacket_send_ipv6_udp_options(const struct streaminfo *stream,
- struct in6_addr *sip, struct in6_addr *dip,
- u_short sport_host_order,u_short dport_host_order,
- const char *payload, int payload_len,u_int8_t dir,
- SAPP_TLV_T *options, int opt_num);
-/*
- ת��/���͵�ǰ���������ݰ�,
- target_id: ����ָ��ת��/����Ŀ��, �������ļ�conf->send_raw_pkt.confָ������Ŀ���������豸��.
-*/
-int sapp_forward_current_pkt(const struct streaminfo *stream, unsigned int target_id);
-
-enum sapp_send_pkt_opt_type{
- SAPP_SEND_OPT_IP_ID = 0x10,
- SAPP_SEND_OPT_IP_TTL = 0x11,
-
- SAPP_SEND_OPT_TCP_WIN = 0x20,
-
- SAPP_SEND_OPT_GDEV_DMAC = 0x1101, /* GDEV-DMAC, �������������DMAC */
- SAPP_SEND_OPT_GDEV_SMAC = 0x1102, /* local-SMAC, �������������SMAC */
- SAPP_SEND_OPT_GDEV_DIP = 0x1103, /* GDEV-DIP, network order */
- SAPP_SEND_OPT_GDEV_SIP = 0x1104, /* local-SIP, network order */
- SAPP_SEND_OPT_GDEV_UDP_DPORT=0x1105, /* GDEV udp dst port, network order */
- SAPP_SEND_OPT_GDEV_UDP_SPORT= 0x1106, /* local udp src port, network order */
- SAPP_SEND_OPT_VXLAN_FLAGS = 0x1201, /* vxlan ��־λ */
- SAPP_SEND_OPT_VXLAN_VPN_ID = 0x1202, /* vxlan vlan_id/vpn_id */
- SAPP_SEND_OPT_VXLAN_LINK_ID = 0x1203, /* vxlan ��·id */
- SAPP_SEND_OPT_VXLAN_LINK_ENCAP_TYPE = 0x1204, /* vxlanԭʼ�����װ��ʽ */
- SAPP_SEND_OPT_VXLAN_ONLINE_TEST_FLAG = 0x1205, /* vxlan���߲���λ */
- SAPP_SEND_OPT_VXLAN_LINK_DIR = 0x1206, /* vxlan��·����λ */
- SAPP_SEND_OPT_INNER_LINK_ENCAP_TYPE = 1301, /* �ڲ�����װ��ʽ */
- SAPP_SEND_OPT_INNER_SMAC = 0x1302, /* �ڲ�ԴMAC */
- SAPP_SEND_OPT_INNER_DMAC = 0x1303, /* �ڲ�Ŀ��MAC */
- SAPP_SEND_OPT_INNER_VLANID = 0x1304, /* �ڲ������VLAN������ */
- SAPP_SEND_OPT_VIRTUAL_LINK_ID = 0x1305, /* ����������·�ţ� ͬʱ��Ҫ��TUNNAT_CZ_ACTION_ENCAP_VIRTUAL_LINK_ID*/
- SAPP_SEND_OPT_REHASH_INDEX = 0x1306, /*����rehash index�� ͬʱ��Ҫ��TUNNAT_CZ_ACTION_ENCAP_VIRTUAL_LINK_ID*/
-};
-
-int MESA_fakepacket_send_ipv4_options(const struct streaminfo *stream, uint8_t protocol,
- uint32_t sip_host_order, uint32_t dip_host_order,
- const char *payload, int payload_len, uint8_t dir,
- SAPP_TLV_T *options, int opt_num);
-
-int MESA_fakepacket_send_tcp_options(const struct streaminfo *stream,
- u_int sip_host_order,u_int dip_host_order,
- u_short sport_host_order,u_short dport_host_order,
- u_int sseq_host_order,u_int sack_host_order,
- u_char control,
- const char* payload,int payload_len, u_int8_t dir,
- SAPP_TLV_T *options, int opt_num);
-
-int MESA_fakepacket_send_udp_options(const struct streaminfo *stream,
- u_int sip_host_order, u_int dip_host_order,
- u_short sport_host_order,u_short dport_host_order,
- const char *payload, int payload_len,u_int8_t dir,
- SAPP_TLV_T *options, int opt_num);
-
+
#ifdef __cplusplus
}
#endif
|
