Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial IPv6 neighbor discovery and various performance tweaks #242

Merged
merged 4 commits into from
Aug 26, 2014

Conversation

alexandergall
Copy link
Contributor

I added a new app apps/ipv6/nd_light that performs rudimentary address resolution for a pre-configured next-hop address. It expects IPv6 packets on its "northbound" link, adds an Ethernet header with the discovered MAC address of the next hop and sends the packet out its "southbound" interface. Packets received from "south" are sent "north" unaltered (i.e. the Ethernet header is not stripped).

This set of commits also includes a few performance boosts. I also changed the semantics of the datagram class' push() method. Headers are now pushed in the "natural" order, i.e. inner-to-outer. This implies that the buffer holding the headers grows downwards. This has the added benefit that now new buffer has to be allocated as long as there is room at the bottom of iovec #0.

The header:copy() method of the protocol base class now takes an
additional argument "relocate", which, when set to true, will first
copy the header to the new location and then make it the active
storage of the header such that future manipulations will be reflected
in the new location.
The push() method now appends headers to the beginning of the packet
buffer of iovec #0.  This simplifies the contruction of packets and
avoids unnecessary buffer allocations if different apps push to the
same packet.  However, this change is incompatible to the previous
version.

All parse methods are now also available for datagrams created from
scratch to make the API more consistent and to avoid checks for
special cases.

A new constructor reuse() allows re-using an instance without putting
it on the freelist first.
A new app nd_light provides rudimentary support for address resolution
of a pre-configured "next-hop" address.  Once the MAC address has been
found, it is used for the lifetime of the process.
lukego added a commit that referenced this pull request Aug 26, 2014
Partial IPv6 neighbor discovery and various performance tweaks
@lukego lukego merged commit 3c1a6de into snabbco:master Aug 26, 2014
@alexandergall alexandergall deleted the datagram-new branch June 5, 2015 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants