History log of /haiku-fatelf/src/kits/network/libnetapi/NetworkAddress.cpp
Revision Date Author Comments
# ddf57b6c 18-Feb-2011 Axel Dörfler <axeld@pinc-software.de>

* 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


# 448e9976 11-Feb-2011 Axel Dörfler <axeld@pinc-software.de>

* We need to convert the endian of the passed in IPv4 address.


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


# 96a8b92d 05-Feb-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

cleanup of some bad language and style within bitfield counting optimization as per axel; made addr_bitcount static

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


# 0d6862d9 04-Feb-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

added optimized gcc builtin bit population count as per Axel's recommendation; the optimized function might be used for the ipv6 netmask length as well.. i just don't want to touch that double for loop without *LOTS* of testing; lets hope this isn't my first build-breaker

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


# 0a8ad865 09-Dec-2010 Axel Dörfler <axeld@pinc-software.de>

* Implemented operator<() for AF_LINK addresses as well; now NetworkStatus
actually marks the currently associated network.
* Removed unused code from NetworkDevice.cpp - doesn't look like we're going
to use it anymore.


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


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

* Added ability to parse link level addresses.


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


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

* 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


# 1691b94f 01-Dec-2010 Axel Dörfler <axeld@pinc-software.de>

* Implemented link level setters.


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


# 19b4490f 01-Dec-2010 Axel Dörfler <axeld@pinc-software.de>

* The constructors weren't defined in declaration order.
* Unflatten() will now check whether the size of the buffer was large enough
to hold a valid address.


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


# e6cec983 29-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* 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


# de739bbe 24-Nov-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Factorized a bit more, and update fStatus in some place it was missing
but make sense. Please review.


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


# 3342fa76 24-Nov-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Make SetToWildcard() actually set address to wildcard one.


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


# 1c9ad669 24-Nov-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Set AF_INET broadcast sockaddr length.


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


# 6a758693 23-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* 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


# 28de0904 18-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* 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


# 31a49a69 12-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Added support for printing AF_LINK addresses.


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


# 836c43f2 12-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* 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


# 23f20732 11-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* 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


# 54b6869f 11-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Forgot to implement the sockaddr* cast operator.


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


# 719c4707 09-Aug-2010 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Header defines the default value for Archive's second param. Fixes build bustage.


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


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

* 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


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

* Adapted headers after Stippi's suggestions - I won't add the const until I
know how I implement that function :-)
* Cleaned up libbnetapi.so Jamfile, removed non-Haiku target code.
* Added empty files to the build to see that the headers are compiling.


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


# ddf57b6cf65fe40299b8b7140bab10d305b5ce15 18-Feb-2011 Axel Dörfler <axeld@pinc-software.de>

* 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


# 448e9976cf973be0642c71c42d720e4e679d8618 11-Feb-2011 Axel Dörfler <axeld@pinc-software.de>

* We need to convert the endian of the passed in IPv4 address.


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


# 96a8b92d21d63385beb7ec32bf1d43262e7a381a 05-Feb-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

cleanup of some bad language and style within bitfield counting optimization as per axel; made addr_bitcount static

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


# 0d6862d9b9f3868b5d29463a1e8f644ac6a6155f 04-Feb-2011 Alexander von Gluck IV <kallisti5@unixzen.com>

added optimized gcc builtin bit population count as per Axel's recommendation; the optimized function might be used for the ipv6 netmask length as well.. i just don't want to touch that double for loop without *LOTS* of testing; lets hope this isn't my first build-breaker

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


# 0a8ad865de1af8292591f980c130a376ff6eb219 09-Dec-2010 Axel Dörfler <axeld@pinc-software.de>

* Implemented operator<() for AF_LINK addresses as well; now NetworkStatus
actually marks the currently associated network.
* Removed unused code from NetworkDevice.cpp - doesn't look like we're going
to use it anymore.


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


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

* Added ability to parse link level addresses.


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


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

* 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


# 1691b94fe3050ed66beb25b4c192852da2373270 01-Dec-2010 Axel Dörfler <axeld@pinc-software.de>

* Implemented link level setters.


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


# 19b4490fd23f50b0eb154cb7580e92ae4a108113 01-Dec-2010 Axel Dörfler <axeld@pinc-software.de>

* The constructors weren't defined in declaration order.
* Unflatten() will now check whether the size of the buffer was large enough
to hold a valid address.


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


# e6cec9839d45710cd9cb276212804b68ac39d7c2 29-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* 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


# de739bbef33567bc4555780e56e6f31ee14c6b41 24-Nov-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Factorized a bit more, and update fStatus in some place it was missing
but make sense. Please review.


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


# 3342fa76025d1303657f948234e0a28c98398607 24-Nov-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Make SetToWildcard() actually set address to wildcard one.


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


# 1c9ad66954b28b2c4a98975a9f2b99bb7a57748a 24-Nov-2010 Philippe Houdoin <philippe.houdoin@gmail.com>

Set AF_INET broadcast sockaddr length.


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


# 6a758693033c67eeada1e5911e307c7ab47df3f2 23-Nov-2010 Axel Dörfler <axeld@pinc-software.de>

* 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


# 28de0904dc85d031e430aca519738ac898577f8b 18-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* 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


# 31a49a69c73b5895ba20fd6b7aa00c7cc55e29e1 12-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Added support for printing AF_LINK addresses.


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


# 836c43f2b8f7519aeccdc30ec2804d0c66d56df4 12-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* 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


# 23f20732159676c101b3383087b1016a0692d265 11-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* 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


# 54b6869f514bbaf601c938c4294f5ecb49286a72 11-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Forgot to implement the sockaddr* cast operator.


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


# 719c470746c45f4a74711df786b7a2a7b78894c9 09-Aug-2010 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Header defines the default value for Archive's second param. Fixes build bustage.


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


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

* 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


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

* Adapted headers after Stippi's suggestions - I won't add the const until I
know how I implement that function :-)
* Cleaned up libbnetapi.so Jamfile, removed non-Haiku target code.
* Added empty files to the build to see that the headers are compiling.


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