Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

examples

Directory actions

More options

Directory actions

More options

Latest commit

 

History

History

examples

The PyTCP stack depends on the Linux TAP interface. The TAP interface is a virtual interface that,on the network end, can be 'plugged' into existing virtual network infrastructure via either Linuxbridge or Open vSwitch. On the internal end, the TAP interface can be used like any other NIC byprogramatically sending and receiving packets to/from it.If you wish to test the PyTCP stack in your local network, I'd suggest creating the following networksetup that will allow you to connect both the Linux kernel (essentially your Linux OS) and thePyTCP stack to your local network at the same time.<INTERNET> <---> [ROUTER] <---> (eth0)-[Linux bridge]-(br0) <---> [Linux kernel]                                            |                                            |--(tap7) <---> [PyTCP]After the example program (either client or service) starts the stack, it can comunicate with itvia simplified BSD Sockets like API interface. There is also the possibility of sending packetsdirectly by calling one of the '_*_phtx()' methods from PacketHandler class.Before running any of the examples, please make sure to: - Go to the stack root directory (it is called 'PyTCP'). - Run the 'sudo make bridge' command to create the 'br0' bridge if needed. - Run the 'sudo make tap' command to create the tap7 interface and assign it to the 'br0' bridge. - Run the 'make' command to create the proper virtual environment. - Run '. venv/bin/activate' command to start the stack virtual environment. - Execute any example, e.g., 'examples/run_stack.py'. - Hit Ctrl-C to stop it.

[8]ページ先頭

©2009-2025 Movatter.jp