Commit Graph

16 Commits

Author SHA1 Message Date
Axel Dörfler 62d3dbd618 * Added a soon to be used index field.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 10:48:59 +00:00
Axel Dörfler ef3f86e723 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 09:16:18 +00:00
Axel Dörfler 03e02ed983 * 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
2010-08-03 11:23:03 +00:00
Axel Dörfler 61729d9323 * 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
2010-07-28 17:38:23 +00:00
Axel Dörfler 74a4c33fda * Implemented a way to preserve header data while passing along a buffer to the
upper layers: you use the store_header() function to mark the header you want
  to preserve. All subsequent remove_header() calls won't claim the actual
  data, but only move the node start around.
* This header can then be restored by restore_header(). However, a call to
  prepend_data() will destroy the stored header. Also, if remove_header() cuts
  off a whole node, restoring the header won't succeed anymore.
* Discarded the no longer needed net_buffer::network_header field.
* Also discarded the hoplimit field which temporarily breaks the IPv6 build
  until Atis reworks it.
* IPv4 now also dumps the IP header in the send path if debug output is enabled.
* icmp_error_reply() might be called so early that the net_buffer's addresses
  do not point to the reply address; this is now detected, and the addresses are
  taken out of the IP header in that case.
* Improved dumping the net_buffer to also include its address, and flags.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-22 12:26:46 +00:00
Axel Dörfler 1978fb81ee * First part of ICMP support: this is based on the work by Ivo Vachkov (GSoC
2007), and Yin Qiu (GSoC 2008). And even though I needed to rewrite pretty
  much all of it because of the countless bugs and problems it had, it still
  shares the same architectural problems of introducing a domain dependent
  error mechanism to the upper layers, and needing the
  net_buffer::network_header hack. This I will rework later.
* net_buffer's append_size(), and prepend_size() will now gracefully handle
  buffers without a data node.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-21 12:00:27 +00:00
Axel Dörfler 8d1485fa06 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
2010-07-19 16:55:55 +00:00
Stephan Aßmus ae6b38b83e Patch by Andreas Faerber:
* Added "struct" to ancillary_data_container which fixes the build of the
  Bluetooth h2generic driver.
---
* Updated license header.
* Honour 80 char line width.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-22 11:59:26 +00:00
Ingo Weinhold 49e00d1f99 Moved the container management for ancillary data from the net_buffer
module to the stack module. There's a dedicated struct
ancillary_data_container, now. One can just set the container on a
net_buffer.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-02 14:37:16 +00:00
Ingo Weinhold 62d7da1f45 Added support for attaching ancillary data to a net_buffer. It's a naive
implementation ATM, since it malloc()s the required memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24940 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-12 09:19:44 +00:00
Hugo Santos a1deb55ef5 net_interface_private: added receive queue and splited device reading from packet processing. Delivering to self no longer is executed in the sender's context, which had some problems with TCP's locking.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 07:55:54 +00:00
Hugo Santos d3d38faf41 net_buffer: prevent modules from messing with metadata too much
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 03:48:57 +00:00
Hugo Santos 79a0d25245 net_buffer: preparing for better metadata management
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-23 03:48:23 +00:00
Axel Dörfler 224e38e302 Added function to append cloned data from another buffer (to be used by TCP).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-25 14:30:54 +00:00
Axel Dörfler 604d21a600 * Added an offset/sequence field to the net_buffer - this can and will be used
by the TCP implementation for its reorder and retransmit queues.
* The ipv4_fragment is no longer needed, as we can use the above field there
  as well - this saves one extra allocation per received fragment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-25 11:29:36 +00:00
Axel Dörfler c22d69bf1f * 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
2006-08-08 13:07:07 +00:00