Commit Graph

15 Commits

Author SHA1 Message Date
Scott McCreary 0fae873352 Updated posix headers to remove commas from copyright line, to match the preferred coding guidelines.
Cleaned up some header style violations, making sure there are two blank lines after the header guards.
This fixes the posix header part of #2191.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-03 21:46:47 +00:00
Axel Dörfler 2b1c0755dd * Renamed the proprietary SIOC_* ioctls to B_SOCKET_* - no reason to pollute
global name space, and have ugly identifiers for nothing :-)
* Added a flags field to struct ifaliasreq. Added flags to mark an alias that
  is currently being configured, or has been automatically configured.
  Those flags aren't used yet, but they will replace IFF_CONFIGURING and
  friends.
* Implemented deleting addresses only from interfaces via ifconfig.
* Added more command aliases for delete to ifconfig ("del", and "delete", for
  more consistency with route).
* Fixed control_routes() to only release a reference to an address if it
  actually got one before.
* If an interface address is deleted, its routes are now removed as well.
* InterfaceAddress now holds a reference to its interface as planned.
* Implemented removing interfaces. Works quite nicely.
* When downing an interface, all of its routes are now removed. When upping
  it again, at least the default routes are added.
* datalink.cpp's get_interface_name_or_index() leaked a reference to the
  interface found.
* SIOCAIFADDR would also leak a reference when new addresses were added.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 15:51:54 +00:00
Axel Dörfler 9d771afb39 * Added Haiku specific socket ioctls to configure the interface aliases:
SIOC_IF_ALIAS_ADD, SIOC_IF_ALIAS_REMOVE, SIOC_IF_ALIAS_GET, SIOC_ALIAS_SET,
  and SIOC_IF_ALIAS_COUNT.
* Implemented all of those new ioctls, though they are yet untested.
* Added ifreq::ifr_data, and removed the hack in the FreeBSD compat if.h
  header.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-29 09:43:08 +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
Colin Günther 281f1ab86c Choosing an even number for SIOCEND as suggested by François. Thank you.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-10 20:51:26 +00:00
Colin Günther b56f3c65ff Add two more socket ioctl's as they are needed by the aironet (if_an.c) and
wavelan (if_wi.c) drivers I'm currently porting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-10 15:46:37 +00:00
Colin Günther ccc02f719a * Moved socket ioctls from FreeBSD compat layer into the corresponding Haiku
header. This shall ensure uniqueness of the ioctls.
* Added a special SIOCEND define to Haiku's sockio.h, so that drivers can define
  private ioctls as can be seen in src/add-ons/kernel/drivers/network/wlan/atheros/dev/ath/if_athioctl.h.
* Modified ioccom.h of the FreeBSD compat layer, to make use of the special
  SIOCEND define.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34612 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-10 11:11:03 +00:00
Axel Dörfler 0ca5323479 * Changed the enum into defines, so that apps can check whether or not they
exist (as mDNSResponder does, for example).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-15 15:28:49 +00:00
Axel Dörfler 2d55afcdf7 Support getting route information for a specific destination
using SIOCGETRT. Patch by Hugo Santos.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-01 12:06:16 +00:00
Axel Dörfler 5adca30a18 Merge of branches/team/network/new_stack - not yet complete as SVN does only support
replacing files when merging when you don't have deleted them manually (for some reason,
it only works as part of the merge operation, and we didn't copy the whole tree to
have "a fresh start" - next time we know better, at least if SVN still suffers from
that same limitation).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18456 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-08 12:33:33 +00:00
Philippe Houdoin 549b25ed0a Remove non-posix headers files, moved back to headers/private/net where they belong for
the moment.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4273 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-11 22:48:36 +00:00
beveloper 0b5170a447 modified to support building of libnet
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-03 00:02:40 +00:00
Philippe Houdoin d3dadb6b54 Forgot to move select.h and sockio.h from old /net_kit tree
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-28 19:53:43 +00:00
David Reid f9e588eeb1 The ioctl defines are just in socket.h now, so no need for a seperate file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-12 09:32:15 +00:00
ejakowatz 52a3801208 It is accomplished ...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-09 12:24:59 +00:00