示例#1
0
int init_pcap_mmap(int jumbo_support)
{
	spinlock_init(&lock);

	jumbo_frames = jumbo_support;

	return pcap_ops_group_register(&pcap_mmap_ops, PCAP_OPS_MMAP);
}
示例#2
0
文件: pcap_sg.c 项目: 3rl/netsniff-ng
int init_pcap_sg(void)
{
	unsigned long i;
	c = 0;
	memset(iov, 0, sizeof(iov));
	for (i = 0; i < IOVSIZ; ++i) {
		iov[i].iov_base = xmalloc_aligned(ALLSIZ, 64);
		iov[i].iov_len = ALLSIZ;
	}
	spinlock_init(&lock);
	return pcap_ops_group_register(&pcap_sg_ops, PCAP_OPS_SG);
}
示例#3
0
int init_pcap_mmap(void)
{
	spinlock_init(&lock);
	return pcap_ops_group_register(&pcap_mmap_ops, PCAP_OPS_MMAP);
}