Git Product home page Git Product logo

unetstack's Introduction

Userspace network stack.

This is an extremely small network stack implementation, which works on top of new netchannels interface [1].
It was used as a base for Linux 2.6 netchannels alternative TCP/IP stack implementation 
which was proven to be faster than existing Linux socket code.

Project is being actively developed, so there are no stable API, documentation 
or some other interesting things. For usage examples please see main() function
in packet.c file.

Supported features:

    * TCP/UDP sending and receiving.
    * timestamp, window scaling, MSS TCP options.
    * PAWS.
    * slow start and congestion control.
    * socket-like interface.
    * IP processing code.
    * complete retransmit algorithm.
    * fast retransmit support.
    * data split to MSS sized chunks.
    * correct recv processing for bulk sending (although can stuck, which requires some tuning).
    * support for TCP listen state (only point-to-point mode, i.e. no new data channels are created, 
	when new client is connected, instead state is changed according to protocol 
	(TCP state is changed to ESTABLISHED).
    * ability to work with netchannels and packet socket.

Project homepage:
http://tservice.net.ru/~s0mbre/old/?section=projects&item=unetstack

1. Netchannel subsystem.
http://tservice.net.ru/~s0mbre/old/?section=projects&item=netchannel

Compilation options.
make DEBUG=1 will enable huge amount of debug information
make NETCHANNEL=1 will use kernel netchannel subsystem instead of packet socket

Command line parameters.
-s saddr - source address of netchannel
-d daddr - destination address
-S sport - source port
-D dport - destination port

-p proto - protocol number (-6 - tcp (default), -17 - udp)

-l - create listen netchannel

-L - maximum number of packets in the netchannel kernel queue. Default 1024.

-b size - size of the message being sent by example code

-e eth_dst_addr - (used with packet socket) - remote ethernet address in 00:11:22:33:44:FF form
-i eth_out_index - (used with packet socket) - index of the device, which is used to send data,
	usually 'lo' has 1, 'ethN' has N+1. If you renamed devices, then use 'ip addr' utility to find
	this index (first number in the output lines).

-h - help

Examples.

TCP session:
sudo ./stack -s 192.168.4.81 -S 12345 -d 192.168.0.48 -D 22 -i 2 -e 00:11:09:61:EB:0E

This will create a TCP connection between 192.168.4.81:12345 and 192.168.0.24:22 via eth0 device.
Remote mac address (of the machine which owns 192.168.0.48 IP address) is 00:11:09:61:EB:0E.

unetstack's People

Contributors

bioothod avatar

Watchers

James Cloos avatar JasonCC avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.