Commit Graph

19 Commits

Author SHA1 Message Date
Michael Jung
b9d2e516ef libs/libc/netdb: Implemented the netdb functions getnameinfo(), getservbyport(), and getservbyport_r(). 2019-06-30 15:12:34 -06:00
Xiang Xiao
e26fa54252 libs/libc/netdb: Support the nameserver change notification then we can pass dns info from server to client in usrsock case. 2019-03-19 10:02:10 -06:00
Gregory Nutt
db2310bd5a lib_gethostbyaddrr.c edited online with Bitbucket 2019-03-11 03:55:08 +00:00
Kejun ZHOU
f33ed3c8c0 *Merged in zhoukejun/nuttx_nucleo-f767zi (pull request #838)
Add three patches  about STM32 intherupts and network loopback files

* Add the missing macro STM32_IRQ_NIRQS used by ./arch/arm/src/stm32f7/stm32_irq.c

    Signed-off-by: Kejun ZHOU <zhoukejun@outlook.com>

* The struct in_addr doesn't have the member sin_addr.

    Signed-off-by: Kejun ZHOU <zhoukejun@outlook.com>

* The function lib_lo_ipv6match() is for IPv6.
    Correct the function it calls from lib_lo_ipv4matchto() to lib_lo_ipv6match().
    Also add CONFIG_NET_IPv6 for configuration.

    Signed-off-by: Kejun ZHOU <zhoukejun@outlook.com>
2019-03-11 03:44:57 +00:00
Gregory Nutt
dc8c814ca3 Squashed commit of the following:
Fixed coding standard error in several files.  Use of while( is incorrect; a space is required between while and (.  Also ran tools/nxstyle and fix thoses complaints as well in most files.

    Changes to comply with coding standard.  Mostly focused on files with missing space after keyword in if(, switch(, and for(.  Offending files also got changes to comply with tools nxstyle.  If there were logs of nxstyle complaints, the file also got a taste of tools/indent.sh.  Still need to fix occurrences of while( with missing space.  There are a lot of them.
2019-02-27 08:41:08 -06:00
Gregory Nutt
efe65749ce Fix condition logic: The setup seems to support a network without sockets. That is not the case.
Squashed commit of the following:

    sched/sched/sched_getsockets.c:  Fix an error in conditional compilation.
    fs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NSOCKET_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    syscall/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    tools/:  Fixups for CONFIG_NSOCKET_DESCRIPTORS no longer used to disable sockets.
2019-02-11 15:47:25 -06:00
Juha Niskanen
3e7281e699 libs/libc/netdb: Support multiple IP addresses per hostname 2018-11-23 07:09:47 -06:00
uha Niskanen
23aa2839c3 libs/libc/netdb/lib_dnsquery.c: harden against DNS spoofing. This commit implements most of the RFC 5452 guidelines for making DNS more resilient. We now verify response matches against what was queried and use unpredictable query IDs. It is also checked that response come from correct DNS server. Also fixes a buffer overflow when querying hostnames longer than CONFIG_NETDB_DNSCLIENT_NAMESIZE. 2018-11-16 06:56:45 -06:00
Juha Niskanen
5129e4dd60 ibs/libc/netdb: Make DNS retries configurable 2018-11-14 06:30:49 -06:00
ligd
ec00670eb7 libs/libc/netdb/lib_dnsbind.c: Make DNS recevie timeout configurable. 2018-11-08 08:33:13 -06:00
Gregory Nutt
faefa6cd9f libs/libc/netdb/lib_getaddrinfo.c: Fix a warning found in build testing. 2018-10-02 11:16:47 -06:00
Anthony Merlino
5e69b6e09f Merged in antmerlino/nuttx/getaddrinfo-improvements (pull request #726)
A few improvements to getaddrinfo:

- Use the protocol and socktype hints in returned address
  - Ignore AI_PASSIVE argument if hostname is not NULL

Approved-by: GregoryN <gnutt@nuttx.org>
2018-09-25 17:00:57 +00:00
Gregory Nutt
1af1ac24a5 Review of previous PR: Add some comments. Change should not apply in the FLAT build mode. 2018-07-25 06:32:50 -06:00
Masayuki Ishikawa
5340027e4e Merged in masayuki2009/nuttx.nuttx/fix_build_error_with_protected_build (pull request #695)
libs/libc/netdb: Fix a link error in lib_gethostbynamer.c with protected build.

NOTE: g_lo_ipv4addr also exists in net/loopback/lo_globals.c which
can be linked with kernel build only.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-07-25 12:23:45 +00:00
Gregory Nutt
01b740c66b arch/arm/src/efm32: Support for common vector handling is forced for all EFM32 chips. Yes the architecture provides support for the old-style dedicated vector handling which can never be compiled. Furthermore, the old-style dedicated vector handling is deprecated in favor of common vector handling. The commit resolves this inconsistency be removing support for the dedicated vector handling from the EFM32 architecture support. 2018-06-19 13:37:00 -06:00
Gregory Nutt
e4e530e1bf libs/libc/netdb/lib_getaddrinfo.c: The 'port' argument to the static alloc_ai() function is always in network byte order. However, that static function was still calling HTTONS() on the port, incorrectly converting it back to host byte order. 2018-06-18 10:08:15 -06:00
Gregory Nutt
fd4398142c libs/libc/netdb: Remove another use of the restrict keyword. 2018-06-12 21:42:59 -06:00
Juha Niskanen
1f4a1eab6d libs/libc/netdb: Add getaddrinfo() and friends. 2018-06-08 07:07:21 -06:00
Gregory Nutt
cf99fb40c9 This commit moves all of the libraries under a common directory called libs/. This most certainly break libcxx and uClibc++ for now.
Squashed commit of the following:

    libs/libxx:  Fix some confusing in naming.  If the directory is called libxx, then the library must be libxx.a (unless perhaps LIBCXX is selected).
    libs/:  Fix paths in moved library directories.
    libs:  Brute force move of libc, libnx, and libxx to libs.  Cannot yet build it in that configuration.
2018-05-29 13:21:26 -06:00