https://github.com/wangbojing/ntytcp
单线程用户态TCP/IP协议栈,epoll实现,包含服务器案例,并发测试案例
https://github.com/wangbojing/ntytcp
dpdk epoll ip-hex netmap pf-ring tcpip userspace
Last synced: about 1 year ago
JSON representation
单线程用户态TCP/IP协议栈,epoll实现,包含服务器案例,并发测试案例
- Host: GitHub
- URL: https://github.com/wangbojing/ntytcp
- Owner: wangbojing
- License: mit
- Created: 2018-03-18T13:56:11.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-06-20T07:48:30.000Z (about 3 years ago)
- Last Synced: 2025-04-03T22:09:25.467Z (about 1 year ago)
- Topics: dpdk, epoll, ip-hex, netmap, pf-ring, tcpip, userspace
- Language: C
- Homepage:
- Size: 691 KB
- Stars: 701
- Watchers: 30
- Forks: 302
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

## netmap install
```
$ git clone https://github.com/wangbojing/netmap.git
$ ./configure
$ make
$ sudo make install
```
## netmap install complete.
#### Troubleshooting
### 1. problem : configure --> /bin/sh^M.
you should run .
```
$ dos2unix configure
$ dos2unix ./LINUX/configure
```
### 2. problem : cannot stat 'bridge': No such or directory
```
$ 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 Stack for Userspace
compile:
```
$ sudo apt-get install libhugetlbfs-dev
$ make
```
update 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
```
block server run:
```
$ ./bin/nty_example_block_server
```
epoll server run:
```
$ ./bin/nty_example_epoll_rb_server
```
## Reference
* [Level-IP](https://github.com/saminiir/level-ip) and [saminiir blog](http://www.saminiir.com/)
* [Linux kernel TCP/IP stack](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/net/ipv4)
if you discover bug to sending email to wangbojing@0voice.com.
also, want to be an NtyTcper, so you can sent email to wangbojing@0voice.com .