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); }
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); }
int init_pcap_mmap(void) { spinlock_init(&lock); return pcap_ops_group_register(&pcap_mmap_ops, PCAP_OPS_MMAP); }