1 Star 0 Fork 0

202108010516-曾蕴焘/oflops

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
channel_info.h 938 Bytes
一键复制 编辑 原始数据 按行查看 历史
#ifndef CHANNEL_INFO_H
#define CHANNEL_INFO_H
struct channel_info;
#include <pcap.h>
#include "context.h"
#include "test_module.h"
#include "pcap_track.h"
#include "msgbuf.h"
typedef struct channel_info {
char * dev;
pcap_t * pcap_handle;
int pcap_fd; // fd for pcap filter
int raw_sock; // raw ethernet access fd
int sock; // UDP socket
int ifindex; // index of this device
int of_port;//the port on the switch side
int packet_len; // length of packet for equally chunked data transfer (0: don't chunk)
struct ptrack_list * timestamps;
struct msgbuf * outgoing;
struct traf_gen_det *det;
struct pcap_dump_t *dump;
oid inOID[MAX_OID_LEN];
size_t inOID_len;
oid outOID[MAX_OID_LEN];
size_t outOID_len;
} channel_info;
int channel_info_init(struct channel_info * channel, char * dev);
void setup_channel(struct oflops_context *ctx,
struct test_module *mod, enum oflops_channel_name ch);
#endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zeng-yuntao/oflops.git
git@gitee.com:zeng-yuntao/oflops.git
zeng-yuntao
oflops
oflops
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385