百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
N

NtyTcp

> 包管理
开源

单线程用户态TCP/IP协议栈,epoll实现,包含服务器案例,并发测试案例

748 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

单线程用户态TCP/IP协议栈,epoll实现,包含服务器案例,并发测试案例

netmap install

$ git clone https://github.com/wangbojing/netmap.git

$ ./configure

$ make 

$ sudo make install

netmap 安装完成。

问题排查

1. 问题: configure --> /bin/sh^M。

你应该运行 .

$ dos2unix configure

$ dos2unix ./LINUX/configure

2. 问题: 无法创建 'bridge': 没有此文件或目录

$ make clean

$ cd build-apps/bridge

$ gcc -O2 -pipe -Werror -Wall -Wunused-function -I ../../sys -I ../../apps/include -Wextra    ../../apps/bridge/bridge.c  -lpthread -lrt    -o bridge

$ sudo make && make install

NtyTcp

netmap、dpdk、pf_ring、用户空间的 TCP 堆栈 编译:

$ sudo apt-get install libhugetlbfs-dev

$ make

更新 NtyTcp/include/nty_config.h


#define NTY_SELF_IP		"192.168.0.106" 	//your ip

#define NTY_SELF_IP_HEX	0x6A00A8C0 			//your ip hex.

#define NTY_SELF_MAC	"00:0c:29:58:6f:f4" //your mac

块服务器运行:

$ ./bin/nty_example_block_server

epoll 服务器运行:

$ ./bin/nty_example_epoll_rb_server

参考资料

  • Level-IP 和 saminiir 博客
  • Linux 内核 TCP/IP 堆栈 如果您发现发送电子邮件到 [email protected] 的问题。 此外,如果您也想成为 NtyTcper,可以发邮件至 [email protected]。

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Cdpdkepollip-hexnetmap

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类包管理
定价开源

> 相关工具

N
npm
Node.js 默认包管理器
P
pnpm
高效节省磁盘的 Node 包管理器
I
is-gif
Check if a Buffer/Uint8Array is a GIF image