TSG-16531 PacketAdapter适配容器环境,使用mrzcpd收包,通过RAW Socket注RST包
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
#ifndef _INJECT_PKT_H
|
||||
#define _INJECT_PKT_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "public.h"
|
||||
|
||||
int inject_ipv4_pkt(char *ip4_addr, uint8_t *data, uint32_t len);
|
||||
int inject_ipv6_pkt(char *ip6_addr, uint8_t *data, uint32_t len);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
17
platform/include/packet_handle.h
Normal file
17
platform/include/packet_handle.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef _PACKET_HANDLE_H
|
||||
#define _PACKET_HANDLE_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
void packet_handle(const char *data, int len, struct metrics *metrics);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
20
platform/include/packet_stat.h
Normal file
20
platform/include/packet_stat.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef _PACKET_STAT_H
|
||||
#define _PACKET_STAT_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
struct packet_stat;
|
||||
struct packet_stat *packet_stat_create(const char *profile);
|
||||
void packet_stat_destory(struct packet_stat *handle);
|
||||
|
||||
void packet_stat_output(struct packet_stat *handle, struct metrics *metrics);
|
||||
int packet_stat_cycle(struct packet_stat *handle);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -6,9 +6,7 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include "public.h"
|
||||
|
||||
int run_daemon(void);
|
||||
int run_daemon(void);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user