History log of /haiku/headers/posix/netdb.h
Revision Date Author Comments
# 79bc16ba 27-Feb-2023 Augustin Cavalier <waddlesplash@gmail.com>

Rewrite <netdb.h> and drop a lot of non-standard stuff.

While the BSDs and glibc seem to have various _r functions,
they all return int for errors instead of a pointer, making ours
exactly backwards of theirs for error reporting and thus useless.
So, remove them from the header entirely. They are left in
for ABI backwards compatibility for the time being.

A few constants not used by anything in the tree (i.e. not actually
implemented by libnetwork/netresolv) were also dropped. Some deprecated
or non-standard functions were placed behind _DEFAULT_SOURCE or deleted
entirely.

The header itself is now organized approximately as the BSDs do,
although with various Haiku-isms instead of BSD-isms where appropriate.


# 6d36f6bf 27-Feb-2023 Augustin Cavalier <waddlesplash@gmail.com>

netdb: Drop definitions for getipnodeby...

We do not actually export them, or even have source for them in-tree.


# 7de1ebe0 14-Aug-2020 rofl0r <rofl0r@users.noreply.github.com>

netdb.h: fix prototype of gethostbyaddr()

first parameter should be const void*, in line with freebsd and linux etc.

https://xref.landonf.org/source/xref/freebsd-current/include/netdb.h#232

Change-Id: I5e953e8e7e49a6f09cd1143de6ca57eb98f77d73
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3147
Reviewed-by: Michael Lotz <mmlr@mlotz.ch>


# 2ed1a36d 02-Jul-2020 Augustin Cavalier <waddlesplash@gmail.com>

resolv.h & netdb.h: Clean up and simplify.

* Remove all functions and a number of constants that neither
glibc nor musl define or support (and even FreeBSD does not
declare a good number of these anymore.)
* Redeclare the primary flags in terms of (1 << X) instead
of raw 0x... for readability (the constants at the end
do NOT match up to their definitions in glibc, musl, and BSDs!)
* Remove usage of unneeded headers, and __BEGIN/END_DECLS.
* Replace non-Haiku license headers with the ones from FreeBSD,
which notably contain a removal of the advertising clause.

ABIs remain unchanged, but a small set of applications that
use these esoteric APIs may not compile anymore (are there
any remaining?)


# 69808176 27-Aug-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

Remove pthread.h include from netdb.h

- It is not needed in the .h, and makes gawk build fail.


# 50440c42 17-Jun-2015 Adrien Destugues <pulkomandy@gmail.com>

Remove gethostbyname_r and gethostbyaddr_r from headers

* They were not in BeOS.
* They are also not in netresolv, they are deprecated and getaddrinfo
should be used.


# 8d2aee6b 14-Jun-2015 Adrien Destugues <pulkomandy@gmail.com>

libbind: integrate "netresolv" patches from NetBSD.

libbind development was transferred to the NetBSD project at
http://wiki.netbsd.org/individual-software-releases/netresolv/

There isn't an official release yet, but they provide a set of patches
against the latest libbind release.

* Remove all files we don't use
* Merge the changes to the remaining files
* Add some new files we need
* Move getifaddrs implementation to libnetwork (instead of libbnetapi)
so it can be used by netresolv.

Fixes #8293 : netresolv uses getifaddrs to determine if there is a local
IPv6 address. If there is not, it will not return AAAA records.


# 173f54f1 19-Jul-2012 Matt Madia <mattmadia@gmail.com>

Updated copyright in headers. No functional change.


# 0fae8733 03-Nov-2010 Scott McCreary <scottmc2@gmail.com>

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


# 8154643e 26-Jun-2010 Rene Gollent <anevilyak@gmail.com>

Updated AI_* flags to match up with our implementation. Should fix #3945.



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


# d6ac23c0 10-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Moved the location of the "hosts" file to
B_COMMON_SETTINGS_DIRECTORY/network/hosts.
* Moved the location of the "services" file to
B_COMMON_DATA_DIRECTORY/network/services.
* Removed headers I forgot to remove.
* Made getnameinfo() use socklen_t internally as well.
* Removed _PATH_* constants from netdb.h that we don't deliver anymore.
* Automatic whitespace cleanup.


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


# b2cd5c48 19-Jan-2009 Axel Dörfler <axeld@pinc-software.de>

* Applied Scott's patch to remove the duplicate definitions, thus closing
bug #2237. Thanks!
* Cleaned up the file a bit (removed the _P() and fixed indentation).


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


# a2758a41 08-Jan-2007 Jérôme Duval <korli@users.berlios.de>

replaced size_t with socklen_t where appropriate following POSIX
Axel, I hope you don't mind :)


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


# 5adca30a 07-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

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


# ce823541 20-Dec-2005 Waldemar Kornewald <wkornew@nowhere.fake>

Removed #ifdef __cplusplus from networking headers. The check is already done in cdefs.h (__BEGIN_DECLS) which I committed yesterday.

Committed libnetwork.so. I actually wanted to port BSD's libc/net resolver, but that one uses too many unsupported functions, so I basically merged libbind.so and libsocket.so into one library.

Moved the libbind.so sources to libnetwork/dns.

Cleaned up native part of libbind.so a little bit more. Though, the ugly hack remains. We nbetter pthread/mutex support. Added TODO that we also shousctl() into the kernel and libroot.so.

Improved DEVNOTES a little bit.


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


# f7a223fa 19-Dec-2005 Waldemar Kornewald <wkornew@nowhere.fake>

Removed unneeded libbind files (were never compiled, anyway).

Moved some headers around and cleaned them up.

Fixed threading code in libbind.so. Don't know why I hadn't noticed this before. Now it is reliable, but uses an even uglier hack.


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


# 338b8dc3 29-Oct-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged changes from branch build_system_redesign at revision 14573.


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


# 39976174 12-May-2004 Philippe Houdoin <philippe.houdoin@gmail.com>

Remove non-POSIX sys/cdefs.h dependency.


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


# fde2fe1c 15-Apr-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Checking in headers for libbind.so.
Also updated our socket.h to be more compatible with BONE (we do not support SO_NONBLOCK which is needed for Mozilla).


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


# f8d0ea96 02-Feb-2004 Philippe Houdoin <philippe.houdoin@gmail.com>

Fix the h_errno issue of this thread-safe global variable, thanks to Thread Local Storage.


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


# 8c911f6c 17-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

h_errno is now declared in each file that uses it.


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


# 0fe962a8 16-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Last modification was wrong. The declaration of h_errno was needed to compile libnet.so.


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


# 917d6a9d 14-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Removed declaration of h_errno variable.


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


# 37514a93 25-Oct-2002 beveloper <beveloper@nowhere.fake>

added <netinet/in.h> include and C++ header guards


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


# 52a38012 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


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


# 50440c42209f339d870f8c4a0712205a8c9f42ec 17-Jun-2015 Adrien Destugues <pulkomandy@gmail.com>

Remove gethostbyname_r and gethostbyaddr_r from headers

* They were not in BeOS.
* They are also not in netresolv, they are deprecated and getaddrinfo
should be used.


# 8d2aee6bc8f64e410788506daa9d09d487594d05 14-Jun-2015 Adrien Destugues <pulkomandy@gmail.com>

libbind: integrate "netresolv" patches from NetBSD.

libbind development was transferred to the NetBSD project at
http://wiki.netbsd.org/individual-software-releases/netresolv/

There isn't an official release yet, but they provide a set of patches
against the latest libbind release.

* Remove all files we don't use
* Merge the changes to the remaining files
* Add some new files we need
* Move getifaddrs implementation to libnetwork (instead of libbnetapi)
so it can be used by netresolv.

Fixes #8293 : netresolv uses getifaddrs to determine if there is a local
IPv6 address. If there is not, it will not return AAAA records.


# 173f54f1473bd6a6511c5fc6dc899c91fb8dd667 19-Jul-2012 Matt Madia <mattmadia@gmail.com>

Updated copyright in headers. No functional change.


# 0fae873352b02792db93f721c1a2ff6b240c8ecc 03-Nov-2010 Scott McCreary <scottmc2@gmail.com>

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


# 8154643efe878367e298dce2f7a8e3c98c43df29 26-Jun-2010 Rene Gollent <anevilyak@gmail.com>

Updated AI_* flags to match up with our implementation. Should fix #3945.



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


# d6ac23c0107dd2334116ab9535239624d0c93363 10-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Moved the location of the "hosts" file to
B_COMMON_SETTINGS_DIRECTORY/network/hosts.
* Moved the location of the "services" file to
B_COMMON_DATA_DIRECTORY/network/services.
* Removed headers I forgot to remove.
* Made getnameinfo() use socklen_t internally as well.
* Removed _PATH_* constants from netdb.h that we don't deliver anymore.
* Automatic whitespace cleanup.


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


# b2cd5c48e703eb78455871099e8190949ff3c949 19-Jan-2009 Axel Dörfler <axeld@pinc-software.de>

* Applied Scott's patch to remove the duplicate definitions, thus closing
bug #2237. Thanks!
* Cleaned up the file a bit (removed the _P() and fixed indentation).


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


# a2758a418b9fa43fce8c86d2ea161652dfc7b838 08-Jan-2007 Jérôme Duval <korli@users.berlios.de>

replaced size_t with socklen_t where appropriate following POSIX
Axel, I hope you don't mind :)


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


# 5adca30a18617cc25bc50a9a12e2fe6539412ccb 07-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

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


# ce823541eccab44c42734c5415f8e385c70b2d0b 20-Dec-2005 Waldemar Kornewald <wkornew@nowhere.fake>

Removed #ifdef __cplusplus from networking headers. The check is already done in cdefs.h (__BEGIN_DECLS) which I committed yesterday.

Committed libnetwork.so. I actually wanted to port BSD's libc/net resolver, but that one uses too many unsupported functions, so I basically merged libbind.so and libsocket.so into one library.

Moved the libbind.so sources to libnetwork/dns.

Cleaned up native part of libbind.so a little bit more. Though, the ugly hack remains. We nbetter pthread/mutex support. Added TODO that we also shousctl() into the kernel and libroot.so.

Improved DEVNOTES a little bit.


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


# f7a223fa1b4106d58e9be4a6930983c175758e57 19-Dec-2005 Waldemar Kornewald <wkornew@nowhere.fake>

Removed unneeded libbind files (were never compiled, anyway).

Moved some headers around and cleaned them up.

Fixed threading code in libbind.so. Don't know why I hadn't noticed this before. Now it is reliable, but uses an even uglier hack.


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


# 338b8dc301721b1f472e8297a898d4eaa2f2ee3a 29-Oct-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Merged changes from branch build_system_redesign at revision 14573.


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


# 399761740c45e067296f0a5badd27547b04a6e4e 12-May-2004 Philippe Houdoin <philippe.houdoin@gmail.com>

Remove non-POSIX sys/cdefs.h dependency.


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


# fde2fe1c1c7c88254d6689600850f701df108ec2 15-Apr-2004 Waldemar Kornewald <wkornew@nowhere.fake>

Checking in headers for libbind.so.
Also updated our socket.h to be more compatible with BONE (we do not support SO_NONBLOCK which is needed for Mozilla).


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


# f8d0ea96413b24c68d569235f7e4d3e8081e90c2 02-Feb-2004 Philippe Houdoin <philippe.houdoin@gmail.com>

Fix the h_errno issue of this thread-safe global variable, thanks to Thread Local Storage.


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


# 8c911f6ce6cf7d46d73a72cb891040ba24ca9029 17-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

h_errno is now declared in each file that uses it.


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


# 0fe962a8b176dead232e2c5e38add7185f27b732 16-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Last modification was wrong. The declaration of h_errno was needed to compile libnet.so.


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


# 917d6a9d1fb33c984614fcfa95639d0e3c5a420a 14-Oct-2003 Waldemar Kornewald <wkornew@nowhere.fake>

Removed declaration of h_errno variable.


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


# 37514a9358ff64dfe2a95bb17413c636482e0b05 25-Oct-2002 beveloper <beveloper@nowhere.fake>

added <netinet/in.h> include and C++ header guards


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


# 52a380120846174213ccce9c4aab0dda17c72083 08-Jul-2002 ejakowatz <ejakowatz@nowhere.fake>

It is accomplished ...


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