{"id":16607565,"url":"https://github.com/davidgraeff/aspect-oriented-ipstack","last_synced_at":"2025-10-04T23:48:19.441Z","repository":{"id":6529505,"uuid":"7770588","full_name":"davidgraeff/aspect-oriented-ipstack","owner":"davidgraeff","description":"A highly configurable and easily extendable TCP/IP-Stack with IPv4, IPv6, UDP, TCP, ICMPv4, ICMPv6 support. This network stack is written in C++/AspectC++ and because it is build and designed around the idea of aspects, you may select your desired functionallity during build time in a very fine grained way. Usuable in plain C/C++ projects.","archived":false,"fork":false,"pushed_at":"2013-12-17T11:47:25.000Z","size":2592,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T09:44:26.724Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidgraeff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-23T08:23:11.000Z","updated_at":"2022-08-23T02:52:27.000Z","dependencies_parsed_at":"2022-07-10T17:47:25.902Z","dependency_job_id":null,"html_url":"https://github.com/davidgraeff/aspect-oriented-ipstack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidgraeff/aspect-oriented-ipstack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgraeff%2Faspect-oriented-ipstack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgraeff%2Faspect-oriented-ipstack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgraeff%2Faspect-oriented-ipstack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgraeff%2Faspect-oriented-ipstack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidgraeff","download_url":"https://codeload.github.com/davidgraeff/aspect-oriented-ipstack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgraeff%2Faspect-oriented-ipstack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278391192,"owners_count":25978944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T01:23:09.269Z","updated_at":"2025-10-04T23:48:19.404Z","avatar_url":"https://github.com/davidgraeff.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Aspect oriented IPstack for embedded systems\n============================================\n[![Build Status](https://travis-ci.org/davidgraeff/aspect-oriented-ipstack.png?branch=master)](https://travis-ci.org/davidgraeff/aspect-oriented-ipstack)\n\u003e A **highly configurable** and easily extendable TCP/IP-Stack with IPv4, IPv6, UDP, TCP, ICMPv4, ICMPv6 support.\nThis network stack is written in C++/AspectC++ and because it is build and designed around the idea of aspects,\nyou may select your desired functionallity during build time in a very fine grained way and on the same time\nthe code retains maintainability.\n\nThe *Aspect-IP-Stack* is plattform agnostic and supports little and big endian systems. It has been tested\non `x86 32-bit`/`x86 64-bit` as well as `arm 32-bit`, `msp430 16-bit` and `avr 8-bit` processors\n([Supported Platforms](doc/supported_platforms.md)).\n\nThere are two examples of integrating the IP-Stack into operating systems for embedded systems (CiAO-OS and Chibi-OS)\nand another example of using it as a linux userspace application on a tun-device. The last one allows us to easily\ndebug and measure the code and using test-driven development for an efficient and correct implementation.\n\nIf you already use the CMake buildsystem, integrating the IP-Stack is very easy and explained\n[here](doc/include_in_cmake_based_project.md). Use application aspects for easily interfere and\nmodify the ipstack without having explicit APIs to all and every function of this software.\n\nIf you do not use CMake nor AspectC++ in your project you still have the option of building a\nstatic library with a plain [**C++** / **C**](doc/aspectless_integration_api.md) Integration API\nfor using TCP and UDP sockets on IPv4/IPv6.\nYou find well documented examples in the linux userspace integration directory.\n\n\u003e Please use the ticket system of github for bugs and feature suggestions.\n\nWork in progress (September 2013):\n-------------------------------\nThis software is **NOT USABLE** in its current state. TODO:\n- Add linux userspace ipstack support via raw sockets or tun device.\n- Add API for non-multitasking support\n- Add API for management sockets in own task.\n- Add build system parts for adding own aspects outside of the libipstack/src directory.\n- Add documentation papers to /doc (e.g. APIs, example step-by-step).\n\nFeatures\n========\n* Highly configurable at build time\n* BSD-like (event based) [sockets API](doc/socket_api.md)\n* Own memory management for ressource restricted systems. We not not use the heap in the default configuration.\n* Only thin interface to your OS/APP has to be provided, IRQ/Multitask safe\n\n\u003ctable\u003e\n\u003cthead\u003e\n  \u003ctr\u003e\u003cth\u003eLink-Layer\u003c/th\u003e\u003cth\u003eIP-Layer\u003c/th\u003e\u003cth\u003eTransport-Layer\u003c/th\u003e\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n  \u003ctr valign=\"top\"\u003e\u003ctd\u003e\n  \u003cul\u003e\n    \u003cli\u003eEthernet\u003c/li\u003e\n    \u003cli\u003eIPv4 ARP\u003cbr\u003e(Address resolution protocol)\u003c/li\u003e\n  \u003c/ul\u003e\n  \u003c/td\u003e\n  \u003ctd\u003e\n    \u003cul\u003e\n    \u003cli\u003eSinglestack or Dualstack IPv4/IPv6\u003c/li\u003e\n    \u003cli\u003eICMPv4/v6 info/error messages\u003cbr\u003e(ping, etc)\u003c/li\u003e\n    \u003cli\u003eIPv6 NDP\u003cul\u003e\n      \u003cli\u003eAddress resolution\u003c/li\u003e\n      \u003cli\u003eAddress duplication check\u003c/li\u003e\n      \u003cli\u003eRouter discovery\u003c/li\u003e\n      \u003cli\u003eAutoconfiguration\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003eMLD (Multicast Listener Discovery) v1/v2\u003c/li\u003e\n    \u003c/ul\u003e\n\n  \u003c/td\u003e\n  \u003ctd\u003e\n    \u003cul\u003e\n    \u003cli\u003eUDP\u003c/li\u003e\n    \u003cli\u003eTCP\n      \u003cul\u003e\n      \u003cli\u003eSliding Window\u003c/li\u003e\n      \u003cli\u003eAvoid Silly Window Syndrome\u003c/li\u003e\n      \u003cli\u003eRound-Trip Time Estimation\u003c/li\u003e\n      \u003cli\u003eCongestion Control\u003c/li\u003e\n      \u003cli\u003eMSS\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\nConfigure to your needs\n=======================\nThe configuration of this software is done by the kconfig tool, developted and used by the linux-kernel community.\nWe're using a slightly modified version, the __kconfig-frontends__ packet (http://ymorin.is-a-geek.org/projects/kconfig-frontends).\n\n![Picture of kconfig](doc/kconfig.png)\n\nBuilding and execution of kconfig is integrated into the cmake buildsystem. It is even prepared for the case that\nyou already using kconfig for your os or application.\n\nBuilding: With/Without Aspect-oriented integration\n==================================================\nAfter building this software you have a static library that either has the integration with your\napp/os weaved in via aspects (see [_Aspect-oriented integration_](doc/aspect_integration_api.md))\nor provides a [**C++** / **C** Integration](doc/aspectless_integration_api.md) API.\nYou may obtain CMake for configuring the buildsystem at http://www.cmake.org.\nAdditionally you need the aspectc++ compiler from http://www.aspectc.org.\nWe only explain the graphical way of configuring the build system (`cmake-gui`), but you may also use\nthe command line version.\n* Create a directory called \"build\" (or any other name).\n* Start cmake-gui and select the top directory as source and the \"build\" directory as build directory.\n* Click __\"configure\"__.\n* A popup will appear and ask for the target build system.\n  We assume you are using `make` for buildsystem project files.\n\n![Picture of cmake](doc/cmake.png)\n\nYou will be presented with some build options.\n* __\"BUILD_ONLY_ONE_TASK\"__ will disable multitask support and is discussed in the section below.\n* __\"BUILD_WITH_ASPECTLESS_INTERFACE\"__ will provide the pure,\naspectless [**C++** / **C** Integration](doc/aspectless_integration_api.md) API.\n\nIf you are done with configuring the buildsystem click on __\"generate\"__. Depending on your selection in the first\npopup you have VisualStudio project files, make files or something else in your build directory.\n* Change to your build directory.\n* Execute `make`. This will download and build the kconfig-frontend and automatically open the configuration editor.\n* Configure the ipstack to your needs. Close the editor and save the changes.\n* Execute `make` again to build the examples if selected and the libipstack library.\n\nIf you want to reconfigure libipstack do this:\n* Change to your build directory.\n* Execute `make reconfigure`. This will open the configuration editor.\n* Configure the ipstack to your needs. Close the editor and save the changes.\n* Execute `make` again to build the examples if selected and the libipstack library.\n\nAbout multitasking support\n--------------------------\nThe ipstack is designed for multitasking systems. Usually there exists the system task\nwhere interaction with the hardware takes place and traffic is received. The second \nthe user task where traffic is generated and consumed. Places where tasks are used:\nFor example we do some busy-waiting while waiting for an arp or IPv6 neighbour response and for timing\ntcp traffic etc. Check out the CiAO-OS integration as an example: We reschedule before entering a busy\nloop to allow for a better usage of the remaining waiting time. We use the alarm/event support of the\noperating system to make the task sleep while waiting for the next packet or tcp timeout.\n\nBut we realize that on some very restricted systems multitasking support costs valuable space or uses limited ressources like timers.\nWe therefore provide the __\"BUILD_ONLY_ONE_TASK\"__ cmake option. What it does is:\n* Adding an _IP::periodic()_ method that has to be called periodically from your main loop.\n* You need to check reachability before sending with _IP::is_reachable(addr)_ because we no longer blocking the \"application-task\" while resolving link layer (e.g. ethernet) addresses.\n\nExample: Look at `integration/linux_userspace_without_aspects_multitask`.\n\nIntegrate in your buildsystem\n=============================\nIf your buildsystem is CMake based you just need to use `add_subdirectory(aspect-oriented-ipstack)` and make\nyour target depends on `libipstack`. Futher information can be found [here](doc/include_in_cmake_based_project.md).\nThis allows you to use aspects to weave in more complex integration like\nusing network cards capability of calculating checksums etc.\nFor other buildsystems you may prebuild the static library and just use it with the\naspectless [**C++** / **C** Integration](doc/aspectless_integration_api.md) API.\n\nExample applications\n====================\nWe provide some example applications and example integrations into projects/operating systems.\nThese applications listed below aren't executable on their own without an integration.\n\n__http_simple_server:__ Provides a very simple http server. Only one page\nis returned and the http headers and content are statically compiled in.\n\n__icmp_test:__ Only the ip management subsystem is enabled.\nThis application is for testing ICMPv4/v6, udp send/receive, tcp reset.\n\u003e You can ping by using:\n\u003e * ping 10.0.3.2 (for icmp ping, substitue with your configured IP)\n\u003e * ping6 fe80::6655:44ff:fe33:2211%tap0 (for icmp ping with ipv6 on tap0 device)\n\u003e * echoping -u 10.0.3.2 (for udp ping; use ipv4 addresses, ipv6 is not supported by echoping for udp)\n\u003e * sendip -p ipv6 -p udp -us 5070 -ud 7 -d \"Hello\" -v fe80::6655:44ff:fe33:2211 (for ipv6 udp ping)\n\u003e * telnet 10.0.3.2 (for testing the tcp reset capability; use ipv4 or ipv6 address)\n\u003e * Send udp to port 88 to get it printed out\n\u003e \n\u003e For full network interaction\n\u003e * activate ipv6 forwarding: sysctl -w net.ipv6.conf.all.forwarding=1\n\u003e * have an ipv6 capable router (or the \"radvd\" software)\n\n__tcp_speedtest:__ This application is for testing the TCP Speed.\n\u003e It is in one of three states:\n\u003e * listening for a command \n\u003e * receiving a predetermined amount of data as fast as possible\n\u003e * sending a predetermined amount of data as fast as possible\n\u003e \n\u003e It opens a tcp listen socket on port 1234 and starts in the listen-for-a-command state. Commands:\n\u003e * \"LISTEN\": The application sends back \"OK\"  and is ready to receive 1024*1024*100 Bytes (100 MByte)\n\u003e \tof data without further interpretation.\n\u003e * \"SEND\": The application begins immediatelly to send 1024*1024*100 Bytes (100 MByte) of random data.\n\u003e \n\u003e In the directory \"linux_host_program\" is a linux host program located for measuring tcp performance.\n\u003e Usage: _speedtest 10.0.3.2 1234 LISTEN_ or _speedtest 10.0.3.2 1234 SEND_.\n\n__telnet:__ Use the telnet application to test this example. An echo to every\nmessage is returned.\n\nExample integrations\n--------------------\n__linux_userspace_with_aspects:__ In this example we're using aspects to tie\nthe ipstack and the linux tun device together. Two threads are initialized.\nOne is for receiving traffic and feeding the ipstack buffers and the other one\nis for the application for generating and consuming traffic. All application\nexamples from above can be used with this type of integration.\n\n__linux_userspace_without_aspects:__ The same as above, but the application\nexample, tun-device and threads are tied together without aspects. This example\ndemonstrates how to compile the ipstack as a standalone static lib that can\nbe used from outside by just using the api methods.\n\n__linux_userspace_without_aspects_multitask:__ This example demonstrates the usage\nof the ip-stack without using a multitask system. The main loop is responsible for\nrouting incoming and outgoing traffic to and from the ipstack and at the same time\nprovide the application layer. We show how to use the IP::periodic() and\nIP::is_reachable(...) methods.\n\n__ciao_os:__ The ipstack originated as a research project and extension of the\nCiAO operating system for embedded systems. Therefore\nsupport and maintainance are best for this integration. CiAO implements AutoSar\nEvents and Alarms and is multitasking capable. Usually there exists the system task\nwhere traffic is received and the user task where traffic is generated and consumed.\nThe integration features IRQ-safeness, reschedules instead of inefficent waits and\ntask sleep if waiting for a packet.\n\n**chibi_os**: To showcase the ability of integrating this piece of software into\nanother system, we decided to extend chibi os by another ip-stack.\nEfficient multitasking support is implemented and the provided network drivers are used\nfor an [Arm 32Bit ENC28J60](doc/supported_platforms.md) based test board.\n\nCollaborate\n===========\nTo understand the project structure we provide some documentation as markdown readme files\nwithin the code tree and in the `doc` directory. A good starting point is [here](doc/collaborate_index.md).\nWe tried to organize source files in an intuitive manner, for example if you're looking for a detail of the IPv4\nimplementation, your first try should be the `ipv4` subdir. Design decisions are mainly explained in the\nresearch papers linked at the bottom of this text (in german). The best way to collaborate \nis to use github via forks and the issue tracker.\n\nLicense\n=======\nThe buildsystem, example and integration code is licensed under the terms of the BSL 2-clause license.\nThe ipstack source code is GPL3 licensed. Please be aware of the implication: Because this software\nis usally build as static library, your code have to be GPL3 compatible code.\n\nAuthors\n=======\nThis software originated as a research project at the [University of Dortmund, Germany](http://www.tu-dortmund.de)\nand has been created mainly by Christoph Borchert and David Gräff.\n* [Entwicklung eines aspektorientierten TCP/IP-Stacks für eingebettete Systeme](http://ess.cs.tu-dortmund.de/Teaching/Theses/2010/DA_Borchert_2010.pdf)\n* [IPv6: Aspektorientierte Erweiterung eines Netzwerkprotokoll-Stacks für eingebettete Systeme](http://ess.cs.tu-dortmund.de/Teaching/Theses/2012/BA_Graeff_2012.pdf)\n* [CiAO/IP: a highly configurable aspect-oriented IP stack](http://faculty.pucit.edu.pk/fawaz/cs533/lectures/smartphone/p435-borchert.pdf)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidgraeff%2Faspect-oriented-ipstack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidgraeff%2Faspect-oriented-ipstack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidgraeff%2Faspect-oriented-ipstack/lists"}