Commit Graph

13 Commits

Author SHA1 Message Date
Mark Hellegers e1c98ceaf7 Add support for TLS SNI
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2016-06-20 19:42:24 -04:00
Axel Dörfler 7720614300 Revert "Move getifaddrs to libnetwork again."
This reverts commit 31ea76548a.

Adrien, please try again without clobbering the otherwise nice
BNetworkInterface API!

Conflicts:
	src/kits/network/getifaddrs.cpp
2015-02-05 11:07:53 +01:00
Adrien Destugues 31ea76548a Move getifaddrs to libnetwork again.
* BNetworkInterfaceAddress is moved to libnetwork. It is modified to not
use BNetworkAddress (which is in libbnetapi) and instead use sockaddr
and sockaddr_storage directly. All callers are adjusted to this.
* Some support code is shared between BNetworkInterface and
BNetworkInterfaceAddress, move it to libnetwork but in the BPrivate
namespace.
2015-01-21 10:07:03 +01:00
Axel Dörfler ddf57b6cf6 * Reverted back to the original version of BNetworkAddress::SetAddress();
in_addr_t is now in network endian again. Thanks, Philippe!
* Made SetToLoopback(), and SetToLocal() a bit more useful (although the latter
  isn't implemented yet).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-18 21:09:21 +00:00
Axel Dörfler 8faecc1d5e * Added ability to parse link level addresses.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-09 00:06:45 +00:00
Axel Dörfler d5a09773bf * Fixed size of sdl_type/sdl_e_type, the former is only a uint8, and the latter
a uint16.
* sdl_e_type is stored in network order now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39778 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-08 23:42:47 +00:00
Axel Dörfler e6cec9839d * BNetworkAddress isn't really BArchivable material, switched to BFlattenable
instead.
* Also actually implemented the serializing functionality this time, as usual
  completely untested, though :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-29 20:29:37 +00:00
Axel Dörfler 6a75869303 * Added SetAddress() methods for IPv4, and IPv6 addresses.
* Improved API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 21:00:05 +00:00
Axel Dörfler 28de0904dc * Added non-const sockaddr casts.
* Automatic whitespace cleanup.
* This also fixes the build; I wanted to commit this earlier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 15:41:33 +00:00
Axel Dörfler 836c43f2b8 * Factored out a BNetworkAddressResolver from BNetworkAddress, that also allows
to iterate over all possible addresses, as suggested privately by Rene.
* Added flags to the resolving methods that allow more control over the
  addresses returned.
* Added setters to BNetworkAddress that accept a service name instead of port
  number, renamed PortName() to ServiceName().
* Made the sockaddr* cast operators return a const sockaddr as it was supposed
  to be, although I should probably add non-const ones as well.
* This also simplified the code somewhat.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-12 11:27:14 +00:00
Axel Dörfler 23f2073215 * Implemented SetToMask(), and added PrefixLength() method, mostly reusing
code from ifconfig.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38026 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 13:53:31 +00:00
Axel Dörfler c2808ea7b2 * Adapted API as needed, and implemented most of the C++ API - it's completely
untested at this point, though.
* Will port ifconfig, NetworkStatus, and the Network preferences application
  later in order to test the API.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-09 16:31:40 +00:00
Axel Dörfler ff1b1ac7ff * Introduced first draft of a C++ network API. Comments welcome (I haven't
started implementing it yet, anyway).
* Note that BNetworkAddress is supposed to replace BNetAddress -- the latter
  does not provide enough space for a struct sockaddr_storage, and has a very
  IPv4 specific and incapable API, anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-06 08:08:02 +00:00