{"action":"opened","issue":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5704","repository_url":"https://api.github.com/repos/RIOT-OS/RIOT","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5704/labels{/name}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5704/comments","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/5704/events","html_url":"https://github.com/RIOT-OS/RIOT/issues/5704","id":168094355,"number":5704,"title":"RFC: network layer API","user":{"login":"miri64","id":675644,"avatar_url":"https://avatars.githubusercontent.com/u/675644?v=3","gravatar_id":"","url":"https://api.github.com/users/miri64","html_url":"https://github.com/miri64","followers_url":"https://api.github.com/users/miri64/followers","following_url":"https://api.github.com/users/miri64/following{/other_user}","gists_url":"https://api.github.com/users/miri64/gists{/gist_id}","starred_url":"https://api.github.com/users/miri64/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miri64/subscriptions","organizations_url":"https://api.github.com/users/miri64/orgs","repos_url":"https://api.github.com/users/miri64/repos","events_url":"https://api.github.com/users/miri64/events{/privacy}","received_events_url":"https://api.github.com/users/miri64/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/cleanup","name":"cleanup","color":"FF7c7c"},{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/GNRC","name":"GNRC","color":"d4c5f9"},{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/network","name":"network","color":"8f00cc"},{"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Request%20for%20Comments","name":"Request for Comments","color":"23F823"}],"state":"open","locked":false,"assignee":{"login":"haukepetersen","id":620834,"avatar_url":"https://avatars.githubusercontent.com/u/620834?v=3","gravatar_id":"","url":"https://api.github.com/users/haukepetersen","html_url":"https://github.com/haukepetersen","followers_url":"https://api.github.com/users/haukepetersen/followers","following_url":"https://api.github.com/users/haukepetersen/following{/other_user}","gists_url":"https://api.github.com/users/haukepetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/haukepetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haukepetersen/subscriptions","organizations_url":"https://api.github.com/users/haukepetersen/orgs","repos_url":"https://api.github.com/users/haukepetersen/repos","events_url":"https://api.github.com/users/haukepetersen/events{/privacy}","received_events_url":"https://api.github.com/users/haukepetersen/received_events","type":"User","site_admin":false},"assignees":[{"login":"haukepetersen","id":620834,"avatar_url":"https://avatars.githubusercontent.com/u/620834?v=3","gravatar_id":"","url":"https://api.github.com/users/haukepetersen","html_url":"https://github.com/haukepetersen","followers_url":"https://api.github.com/users/haukepetersen/followers","following_url":"https://api.github.com/users/haukepetersen/following{/other_user}","gists_url":"https://api.github.com/users/haukepetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/haukepetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haukepetersen/subscriptions","organizations_url":"https://api.github.com/users/haukepetersen/orgs","repos_url":"https://api.github.com/users/haukepetersen/repos","events_url":"https://api.github.com/users/haukepetersen/events{/privacy}","received_events_url":"https://api.github.com/users/haukepetersen/received_events","type":"User","site_admin":false},{"login":"OlegHahm","id":1590423,"avatar_url":"https://avatars.githubusercontent.com/u/1590423?v=3","gravatar_id":"","url":"https://api.github.com/users/OlegHahm","html_url":"https://github.com/OlegHahm","followers_url":"https://api.github.com/users/OlegHahm/followers","following_url":"https://api.github.com/users/OlegHahm/following{/other_user}","gists_url":"https://api.github.com/users/OlegHahm/gists{/gist_id}","starred_url":"https://api.github.com/users/OlegHahm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OlegHahm/subscriptions","organizations_url":"https://api.github.com/users/OlegHahm/orgs","repos_url":"https://api.github.com/users/OlegHahm/repos","events_url":"https://api.github.com/users/OlegHahm/events{/privacy}","received_events_url":"https://api.github.com/users/OlegHahm/received_events","type":"User","site_admin":false},{"login":"kaspar030","id":4679640,"avatar_url":"https://avatars.githubusercontent.com/u/4679640?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspar030","html_url":"https://github.com/kaspar030","followers_url":"https://api.github.com/users/kaspar030/followers","following_url":"https://api.github.com/users/kaspar030/following{/other_user}","gists_url":"https://api.github.com/users/kaspar030/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspar030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspar030/subscriptions","organizations_url":"https://api.github.com/users/kaspar030/orgs","repos_url":"https://api.github.com/users/kaspar030/repos","events_url":"https://api.github.com/users/kaspar030/events{/privacy}","received_events_url":"https://api.github.com/users/kaspar030/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-07-28T13:23:21Z","updated_at":"2016-07-28T13:23:21Z","closed_at":null,"body":"I finally came to write down some of my thoughts about how to re-arrange IPv6 (or more general the *network layer*), to make the going-ons in routing/NDP/6Lo-ND (I generalize all of them as *\"routing protocol\"* in the following) more tracable. The base-idea comes from [this paper](https://www.usenix.org/legacy/events/osdi06/tech/ee.html).\r\n\r\nThe base idea is that there are 3 interfaces of that there can be multiple implementations (and multiple instances) at runtime:\r\n\r\n![network-layer](https://cloud.githubusercontent.com/assets/675644/17212928/210fccbc-54d2-11e6-87c9-60e913f027fd.png)\r\n\r\nThe send function of the network layer has direct access to the forwarding engines. Other accesses are depending on the actual routing protocol.\r\n\r\nThe concept of interfaces is encoded in the **Addr** type, which could e.g. contain a type (e.g. IPv6, need not be gnrc_nettype necessarily), a data field (the IPv6 address), an interface identifier, and maybe the addresses length (e.g. for link-layer addresses).\r\n\r\nI've played through some well-known use-cases and found that all of them work-out quite well and clear with this API. Here are a two examples:\r\n\r\n1. Create default router list:\r\n    - IP6RouterDiscoveryEngine::init() on initialized interface\r\n         * send MAX_RS every RS_INTERVAL after rand([0 sec, MAX_RS_DELAY])\r\n    - RA received\r\n         * ND module executes RTR_FOUND with IP6RouterDiscoveryEngine::event() with RA as context and the router's link-local address as tgt\r\n         * tgt + info from RA are stored in default router list\r\n2. Send packet to non-existent neighbor:\r\n    - execute FIND_NEIGHBOR with **IP6AddressResolutionEngine::event() (packet as ctx, requested neighbor's IPv6 address as tgt)\r\n    - create INCOMPLETE NCE for tgt if NCE does not exists\r\n    - queue packet \r\n    - send NS to neighbor\r\n    - NA received\r\n        * ND module executes NEIGHBOR_FOUND with IP6AddressResolutionEngine::event() with NA as context and neighbor's address as tgt\r\n        * Update neighbor cache and timers\r\n\r\nLikewise should basically any timer event be executed as a **RoutingEngine**::event().\r\n\r\nOpen questions:\r\n- Should IPv6 interfaces be associated with **RoutingEngine**s? If yes, how?\r\n- Should the handler of timer events be the network layer thread (as it is currently the case) or an external event handler (a version of the dreaded libevent e.g.)."}}
{"actor":{"display_login":"miri64"}}