History log of /haiku/headers/private/net/NetBufferUtilities.h
Revision Date Author Comments
# b9209765 23-Apr-2024 Augustin Cavalier <waddlesplash@gmail.com>

NetBufferUtilities: Add NetBufferDeleter.

As the name implies, it's an AutoDeleter for NetBuffers.


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

* Cleanup.


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


# bfb45f71 12-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

introduced a new helper class DatagramSocket which provides a consistent base interface and functionality for the implementation of datagram-based sockets.

- made the ipv4 raw, udp and link protocols use DatagramSocket.


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


# b342ed59 12-Apr-2007 Jérôme Duval <korli@users.berlios.de>

gcc4 is picky with in-template symbols, they must be qualified


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


# 6c353509 11-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

moved address selection logic to a new 'get_buffer_route'.

- IPv4 now assumes the addresses it is supplied in send_routed_data are already the appropriate ones.
- made the Data(), operator* and operator-> methods in NetBufferFieldReader const so we can use them in the same expression as the constructor.
- fixed an issue with UDP where the wrong source address could be used in the calculating the checksum.
- changed ipv4_print_address to use the more common 0.0.0.0 format.


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


# 87001e05 11-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

some NetBufferUtility revamp.

- introduced base NetBufferFieldReader which deals with obtaining a continuguous field to deal with.
- renamed Detach() to Sync() to better express the fact that we may be writing to the buffer.
- Fixed IPv4's and ICMP's checksum calculation as it assumed the underlying header was contiguous.
- ICMP is now able to reply to ICMP Echo Requests which were split across data nodes.
- in split_buffer(), make sure we were able to trim() the new buffer before damaging the original one.


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


# af56b5b2 10-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

fixed add_tcp_header() as it wasn't considering the possibility that prepending data would not result in a contiguous buffer. This would result in wrong checksums for apparent no reason.


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


# 3e30cbdb 20-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Added option to the NetBufferPrepend constructor to prepend an arbitrarily sized
piece of data, instead of the type size.


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


# c35b04de 02-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* Moved the TCPConnection class into its own file.
* Added some missing result checks, mostly for allocations.
* Fixed a wrong precendence with the ?: operator
* Some minor cleanup.
* Renamed sBufferModule to gBufferModule - the header expects it to be a global,
so it should be named like one.


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


# 81435928 15-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

* Fragmenting IP packets is now working as expected (there were several bugs
in the code before).
* Added a SetTo() method to NetBufferHeader.


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


# c22d69bf 08-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

* Completed the previous commit and merger of the team/network/new_stack branch.
* Removed ppp_up and pppcontrol from the image for now.


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


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

* Cleanup.


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


# bfb45f717c648c5cd68e84c8ca1f805d099ba3c5 12-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

introduced a new helper class DatagramSocket which provides a consistent base interface and functionality for the implementation of datagram-based sockets.

- made the ipv4 raw, udp and link protocols use DatagramSocket.


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


# b342ed59fb852d851564bfe1072de0c3888ec07d 12-Apr-2007 Jérôme Duval <korli@users.berlios.de>

gcc4 is picky with in-template symbols, they must be qualified


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


# 6c35350908905903b5c150154b0da9698ca8943a 11-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

moved address selection logic to a new 'get_buffer_route'.

- IPv4 now assumes the addresses it is supplied in send_routed_data are already the appropriate ones.
- made the Data(), operator* and operator-> methods in NetBufferFieldReader const so we can use them in the same expression as the constructor.
- fixed an issue with UDP where the wrong source address could be used in the calculating the checksum.
- changed ipv4_print_address to use the more common 0.0.0.0 format.


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


# 87001e059c8012ef40c462709833b5ae4212fb4a 11-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

some NetBufferUtility revamp.

- introduced base NetBufferFieldReader which deals with obtaining a continuguous field to deal with.
- renamed Detach() to Sync() to better express the fact that we may be writing to the buffer.
- Fixed IPv4's and ICMP's checksum calculation as it assumed the underlying header was contiguous.
- ICMP is now able to reply to ICMP Echo Requests which were split across data nodes.
- in split_buffer(), make sure we were able to trim() the new buffer before damaging the original one.


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


# af56b5b233a200d83b427d967bac7453f4043f6f 10-Apr-2007 Hugo Santos <hugosantos@nowhere.fake>

fixed add_tcp_header() as it wasn't considering the possibility that prepending data would not result in a contiguous buffer. This would result in wrong checksums for apparent no reason.


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


# 3e30cbdb1ea8508ca86c84529b6310b5b79d6740 20-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

Added option to the NetBufferPrepend constructor to prepend an arbitrarily sized
piece of data, instead of the type size.


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


# c35b04de314ab7f18763546366ea30eb8ae53997 02-Nov-2006 Axel Dörfler <axeld@pinc-software.de>

* Moved the TCPConnection class into its own file.
* Added some missing result checks, mostly for allocations.
* Fixed a wrong precendence with the ?: operator
* Some minor cleanup.
* Renamed sBufferModule to gBufferModule - the header expects it to be a global,
so it should be named like one.


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


# 81435928fb847df2c1906111e2c3408cfcbead7a 15-Oct-2006 Axel Dörfler <axeld@pinc-software.de>

* Fragmenting IP packets is now working as expected (there were several bugs
in the code before).
* Added a SetTo() method to NetBufferHeader.


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


# c22d69bf1f5f60f7ebddd79108a53c8f97f300fe 08-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

* Completed the previous commit and merger of the team/network/new_stack branch.
* Removed ppp_up and pppcontrol from the image for now.


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