ChinaUnix.net
相关文章推荐:

LINUX PACKET MMAP

如题,怎么判断? 请教各位大侠。

by yjh777 - 内核源码 - 2010-04-06 16:36:49 阅读(2169) 回复(0)

相关讨论

HOWTO for the linux packet generator ------------------------------------ Date: 041221 Enable CONFIG_NET_PKTGEN to compile and build pktgen.o either in kernel or as module. Module is preferred. insmod pktgen if needed. Once running pktgen creates a thread on each CPU where each thread has affinty it's CPU. Monitoring and controlling is done via /pr...

by yanghoo - Linux文档专区 - 2009-04-05 00:39:35 阅读(848) 回复(0)

/* 这个函数主要是linux下的packet模块来捕获数据(pcap的功能太少了。)。但是我碰到的问题就是当进程执行到读取数据的时候,也就是recv的时候就会 一直暂停,根本就读取不到数据。 生成的lsf为 tcpdump -dd ip dst host 192.168.1.214(214是我自己的ip地址。) 大家帮我看看怎么解决问题。谢谢了 下面是代码: */ #include #include #include #include #include

by wojiaohesen - 内核源码 - 2009-03-11 09:28:35 阅读(2429) 回复(8)

10.3. Explicit matches Explicit matches are those that have to be specifically loaded with the -m or --match option. State matches, for example, demand the directive -m state prior to entering the actual match that you want to use. Some of these matches may be protocol specific . Some may be unconnected with any specific protocol - for example connection states. These might be NEW (the first packe...

by wenzk - Linux文档专区 - 2006-03-16 23:54:23 阅读(825) 回复(0)

一、自己画了个图,不知正确? 这是我的理解 注意 1.所有的物理内存要使用都要映射到内核空间 2.物理内存划分为页 3.页扩展机制,支持大于4G的物理内存,这时要用到三级分页(pgd 页全局目录Page Global Directory,pmd页中间目录 (Page Middle Directory),pte页表条目 (Page Table Entry)),不 需支持时,只需将 pmd 定义成“1”,返回两级分页机制 4.PAGE_OFFSET宏代表3G PAGE_SHIFT、PMD_SHIFT、PGD_SHIF...

by 罗克炬 - Linux文档专区 - 2008-12-20 19:09:23 阅读(1289) 回复(0)

本帖最后由 yjh777 于 2013-02-22 09:00 编辑 RT 看介绍,两者都是mmap一个大小可配置的ring buffer到用户空间 实现zero copy,并可以一次读取多个报文; 那么两者的主要区别在哪里? PF_RING 比 packet_mmap 有性能提升 是什么机制占主要作用? 九贱的 pf_ring 源代码分析: http://bbs.chinaunix.net/thread-1943951-1-1.html

by yjh777 - 内核源码 - 2013-03-18 14:32:48 阅读(3886) 回复(14)

请问packet mmap如何用,哪里有例子? 应用层可以通过这个进行零拷贝转发吗?就是从网卡收包之后用户层处理然后再转发出去,类似IPS,但是要性能高。packet mmap可不可认为就是零拷贝?

by bekars - 内核源码 - 2007-06-15 11:34:48 阅读(3065) 回复(0)

mmap函数是unix/linux下的系统调用,来看《Unix Netword programming》卷二12.2节对mmap的介绍: The mmap function maps either a file or a Posix shared memory object into the address space of a process.We use this function for three purposes: 1. with a regular file to provide memory-mapped I/O 2. with special files to provide anonymous memory mappings 3. with shm_open to provide Posix shared memory be...

by embededgood - Linux文档专区 - 2009-07-12 14:17:00 阅读(561) 回复(0)

原文地址: http://blog.chinaunix.net/u1/33226/showart_499264.html 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/56723/showart_1010342.html

by zsfly - Linux文档专区 - 2008-06-24 16:35:41 阅读(613) 回复(0)

文件: mmap-skelon.rar 大小: 99KB 下载: 下载 // linux Device Driver Template/Skeleton with mmap // Kernel Module #include #include #include #include #include #include #include #include #include #include #include #include #include #if linux_VERSION_CODE #endif #define SKELETON_MAJOR 240 #define SKELETON_NAME "skeleton" #define CASE1 1 #define CASE2 2 static unsigned int counter = 0; ...

by panhuachun - Linux文档专区 - 2008-03-18 19:24:59 阅读(1075) 回复(0)

linux Device Drivers, 2nd Edition By Alessandro Rubini & Jonathan Corbet 2nd Edition June 2001 0-59600-008-1, Order Number: 0081 586 pages, $39.95 Chapter 13 mmap and DMA Contents: Memory Management in linux The mmap Device Operation The kiobuf Interface Direct Memory Access and Bus Mastering Backward Compatibility Quick Reference This chapter delves into the area of linux memory management, wi...

by pascal4123 - Linux文档专区 - 2006-09-20 14:52:48 阅读(931) 回复(0)