History log of /haiku/src/add-ons/kernel/network/datalink_protocols/ipv6_datagram/ipv6_datagram.cpp
Revision Date Author Comments
# 9ef39f3c 18-May-2023 Jérôme Duval <jerome.duval@gmail.com>

icmp6,ipv6_datagram: disable tracing

Change-Id: Idb7593c3463c79dc4caff27b427e970c7fe94a8b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6453
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>


# 64a48a55 27-Jan-2023 Christof Meerwald <cmeerw@cmeerw.org>

kernel/network: Fix neighbor advertisement hoplimit

All neighbor discovery messages need to be sent with a hop limit of
255, but some messages, like solicited neighbor advertisements, are
unicast messages. So need to set the hop limit for both multicast and
unicast messages.

Fixes #14562

Change-Id: I84fba8acbb5833c65d6113c8a7e0cc821a706881
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6038
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 88864ff1 26-Jan-2023 Christof Meerwald <cmeerw@cmeerw.org>

kernel/network: Reply with a ICMPv6 neighbor advertisment

Send a neighbor advertisment when we have received a neighbor
solicitation.

Change-Id: Ie552a8e81d3f06b2dbfaab83ad5a30bac8962224
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6037
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 1029af17 01-Sep-2021 Augustin Cavalier <waddlesplash@gmail.com>

Add missing includes following previous commit.

All these files were making use of headers included indirectly
through AutoLock.h that are now no longer following the previous commit.


# c4718ea9 12-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

Missing std::nothrow on new

Forgot to add this when migrating to BOpenHashTable.


# f5acc807 09-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

ipv6 datagram: migrate to BOpenHashTable.


# e929cd2f 12-Jan-2014 Jonathan Schleifer <js@webkeks.org>

ipv6 datagram: Fix Clang complaining about a flexible array member.

Interestingly, [0] should be as invalid in C++ as [] in this case, yet
Clang refuses [], but accepts [0].

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>


# 077c84eb 05-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: atomic_*() functions rework

* No need for the atomically changed variables to be declared as
volatile.
* Drop support for atomically getting and setting unaligned data.
* Introduce atomic_get_and_set[64]() which works the same as
atomic_set[64]() used to. atomic_set[64]() does not return the
previous value anymore.


# 79a1c3c6 18-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Another missed printf string (CID 715659).


# 54490bbd 08-Dec-2010 Axel Dörfler <axeld@pinc-software.de>

* sockaddr_dl::sdl_e_type is now always stored in network order.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39777 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3794b8e5 10-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Applied Atis latest changes to the IPv6 related modules. This brings them back
into a working state after the latest stack changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38021 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 03e02ed9 03-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Introduced a datalink layer (2) independent way of specifying the packet
type one wants to receive. Changed ipv6_datagram to use that (but note that
it currently does not compile).
* Header cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37868 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61729d93 28-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* Reworked the complete stack to allow more than one address per network
interface - this caused quite a number of changes.
* Network interfaces, and its addresses are now reference counted (not yet
complete, though, InterfaceAddresses need to hold references to their
interface as well).
* There are two known regressions of this commit that I will fix later:
- you cannot remove interfaces anymore
- IPv4 multicast was broken anyway, but now it's disabled, too.
* Moved a device_interfaces.cpp|h out of interfaces.cpp.
* The datalink layer chain is now instantiated per domain per interface,
not just per interface anymore.
* When a buffer reaches the network layer, it has no known interface yet, ie.
the ipv4|6|whatever modules need to set this manually.
* Added more debug output, and some new debugger commands, the control option
is now printed in clear text.
* Added hash_address() function to the address modules. Added "const" to
set_to_defaults() where needed.
* Fixed net_buffer's restore header functions offset use as reported by Atis.
* Improved buffer dump output, use the domain module to print the address if
available.
* Moved net_buffer::type into the union, as it's not needed by the upper layers
anymore.
* Moved IPv6 specific code from {add|remove}_default_route() to where it
belongs, but disabled it for the time being.
* Completely discarded useless ipv4_datagram module.
* Added ping6 to the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37794 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b216fbd0 28-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* Applied next work in progress patch by Atis that takes into account most of
my comments so far. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37793 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d1485fa 19-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

Work in progress commit by Atis Elsts (I'm posting his ChangeLog comments
directly here), I made only a few style changes:
* introduced 'has_broadcast_address' field in
struct net_address_module_info
- REVIEW: the name, and the status of this field for UNIX and L2CAP
families
* ipv6 address family support
* ipv6 address printing
* ipv6 protocol support
* ipv6 multicast support
- TODO: add and remove multicast routes in a more proper way
- TODO: support MLD
* ipv6 datalink protocol support
* icmpv6 protocol support (EchoRequest and EchoResponse messages)
* ipv6 neigbor discovery protocol support
(Advertisement and Solicitation messages)
- TODO: only the very basic support is present,
the protocol state machine is by no means completed
- TODO: replying to Solicitation does not work too good ATM
(visible, when pinging Haiku from outside)
* added Jenkin's hash algorith
* minor changes in existing IPv4 code - cleanup function
ipv4_get_loopback_address(), written by myself
* add tests: raw, udp, tcp/udp, mullicast sender
* add 'hoplimit' field in struct net_buffer
- TODO: this is just a hack, more generic approach would be better.
* add 'receive_data' function pointer in
struct net_datalink_protocol_module_info
- TODO: this is also more like a hack, to support information
passing from ICMPv6 to IPv6_datagram level.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37604 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c4718ea973dc20d96ddf1c8b164ed5ca514b8ca5 12-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

Missing std::nothrow on new

Forgot to add this when migrating to BOpenHashTable.


# f5acc807f82189e0321ff57ebf840e531ac196aa 09-Jan-2015 Adrien Destugues <pulkomandy@gmail.com>

ipv6 datagram: migrate to BOpenHashTable.


# e929cd2f8f6fc3b4173d1eb48ddb73d1937c2bd2 12-Jan-2014 Jonathan Schleifer <js@webkeks.org>

ipv6 datagram: Fix Clang complaining about a flexible array member.

Interestingly, [0] should be as invalid in C++ as [] in this case, yet
Clang refuses [], but accepts [0].

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>


# 077c84eb27b25430428d356f3d13afabc0cc0d13 05-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: atomic_*() functions rework

* No need for the atomically changed variables to be declared as
volatile.
* Drop support for atomically getting and setting unaligned data.
* Introduce atomic_get_and_set[64]() which works the same as
atomic_set[64]() used to. atomic_set[64]() does not return the
previous value anymore.


# 79a1c3c6b8fca564bb1770832d8de15921d3e0f3 18-Aug-2012 Alex Smith <alex@alex-smith.me.uk>

Another missed printf string (CID 715659).


# 54490bbd5026c6de84f0cfe1fc841b1a07924700 08-Dec-2010 Axel Dörfler <axeld@pinc-software.de>

* sockaddr_dl::sdl_e_type is now always stored in network order.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39777 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3794b8e560f691d50598e0dccf2b6aeba8e178eb 10-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Applied Atis latest changes to the IPv6 related modules. This brings them back
into a working state after the latest stack changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38021 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 03e02ed9836f03018a146f791ee65a3ec3ab7842 03-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Introduced a datalink layer (2) independent way of specifying the packet
type one wants to receive. Changed ipv6_datagram to use that (but note that
it currently does not compile).
* Header cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37868 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 61729d9323a555b9025ef6ebeb85dc1627f8acf7 28-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* Reworked the complete stack to allow more than one address per network
interface - this caused quite a number of changes.
* Network interfaces, and its addresses are now reference counted (not yet
complete, though, InterfaceAddresses need to hold references to their
interface as well).
* There are two known regressions of this commit that I will fix later:
- you cannot remove interfaces anymore
- IPv4 multicast was broken anyway, but now it's disabled, too.
* Moved a device_interfaces.cpp|h out of interfaces.cpp.
* The datalink layer chain is now instantiated per domain per interface,
not just per interface anymore.
* When a buffer reaches the network layer, it has no known interface yet, ie.
the ipv4|6|whatever modules need to set this manually.
* Added more debug output, and some new debugger commands, the control option
is now printed in clear text.
* Added hash_address() function to the address modules. Added "const" to
set_to_defaults() where needed.
* Fixed net_buffer's restore header functions offset use as reported by Atis.
* Improved buffer dump output, use the domain module to print the address if
available.
* Moved net_buffer::type into the union, as it's not needed by the upper layers
anymore.
* Moved IPv6 specific code from {add|remove}_default_route() to where it
belongs, but disabled it for the time being.
* Completely discarded useless ipv4_datagram module.
* Added ping6 to the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37794 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b216fbd0774446feb184ec1be17bb52bcbd75bbe 28-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

* Applied next work in progress patch by Atis that takes into account most of
my comments so far. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37793 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d1485fa06b26cb13b0417e3cdafd5b45520a567 19-Jul-2010 Axel Dörfler <axeld@pinc-software.de>

Work in progress commit by Atis Elsts (I'm posting his ChangeLog comments
directly here), I made only a few style changes:
* introduced 'has_broadcast_address' field in
struct net_address_module_info
- REVIEW: the name, and the status of this field for UNIX and L2CAP
families
* ipv6 address family support
* ipv6 address printing
* ipv6 protocol support
* ipv6 multicast support
- TODO: add and remove multicast routes in a more proper way
- TODO: support MLD
* ipv6 datalink protocol support
* icmpv6 protocol support (EchoRequest and EchoResponse messages)
* ipv6 neigbor discovery protocol support
(Advertisement and Solicitation messages)
- TODO: only the very basic support is present,
the protocol state machine is by no means completed
- TODO: replying to Solicitation does not work too good ATM
(visible, when pinging Haiku from outside)
* added Jenkin's hash algorith
* minor changes in existing IPv4 code - cleanup function
ipv4_get_loopback_address(), written by myself
* add tests: raw, udp, tcp/udp, mullicast sender
* add 'hoplimit' field in struct net_buffer
- TODO: this is just a hack, more generic approach would be better.
* add 'receive_data' function pointer in
struct net_datalink_protocol_module_info
- TODO: this is also more like a hack, to support information
passing from ICMPv6 to IPv6_datagram level.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37604 a95241bf-73f2-0310-859d-f6bbb57e9c96