Uses logic from apps/fsutils/ipcfg to obtain the IP address configuration from a file, if available. This only effects the behavior of netinit if CONFIG_FSUTILS_IPCFG is selected and if an IP configuration file is available on a file system. Otherwise, it reverts to the preceding behavior.
Also adds definitions to apps/include/fsutils/ipcfg.h to formalize a bit encoding of the prototype which was already in use, but not documented.
Also fixes some bad assertions (duplication of PR #420) and makes use of variable names consistent in ipcfg.h comments and in ipcfg_text implementation.
This commit adds structures, modifies function prototypes, and renames data to support the future addition of IPv6 support. This commit does NOT add that IPv6, only the hooks for backward compatible future support.
Highlights:
* TLS support (a hook to allow users to provide TLS implementation)
* ability to add extra request headers
* ability to use PUT method
* ability to report http status
* error handling improvements
Proposed on the ML while ago:
https://www.mail-archive.com/dev@nuttx.apache.org/msg03803.html
The original API is kept for now.
I plan to remove them after adapting the existing users.
(examples in this repo)
This commit adds support to access an IPv4 Configuration file similar to the Linux dhpc.client ipfcg file. This version, tailored for deeply embedded systems supports several options to tailor the file and file access to different environments. It supports:
- Writable as well as read-only configuration files.
- ASCII human readable files as well as smaller binary files.
- It supports using character driver access to constrained media (such as EEPROM).
- Add examples/ipcfg to exercise IPv4 Configuration File support
since it is moved to the central place in nuttx side instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I544d6110f1ca6460f7c82f970870aa9b1e7ab3dd
src/cwindowfactory.cxx: In member function 'void Twm4Nx::CWindowFactory::redrawIcons(const nxgl_rect_s*)':
src/cwindowfactory.cxx:461:38: warning: 'iconPos.nxgl_point_s::y' may be used uninitialized in this function [-Wmaybe-uninitialized]
461 | iconBounds.pt2.y = iconPos.y + iconSize.h - 1;
| ~~~~~~~~^
src/cwindowfactory.cxx:460:38: warning: 'iconPos.nxgl_point_s::x' may be used uninitialized in this function [-Wmaybe-uninitialized]
460 | iconBounds.pt2.x = iconPos.x + iconSize.w - 1;
| ~~~~~~~~^
nsh_netcmds.c:424:20: warning: 'nsh_addrconv' defined but not used [-Wunused-function]
static inline bool nsh_addrconv(FAR const char *hwstr,
^
nsh_netcmds.c:446:20: warning: 'nsh_sethwaddr' defined but not used [-Wunused-function]
static inline void nsh_sethwaddr(FAR const char *ifname,
^
nsh_envcmds.c:94:21: warning: 'nsh_getdirpath' defined but not used [-Wunused-function]
static inline char *nsh_getdirpath(FAR struct nsh_vtbl_s *vtbl,
^
In file included from bas.c:84:0:
bas.c: In function 'bas_interpreter':
bas_error.h:110:37: warning: left-hand operand of comma expression has no effect [-Wunused-value]
#define NOSUCHLINE STATIC+40, _("No such line")
^
bas.c:2425:52: note: in expansion of macro 'NOSUCHLINE'
FS_putChars(STDCHANNEL, (NOSUCHLINE));
^~~~~~~~~~
bas_fs.c:107:22: warning: 'g_vt100_colormap' defined but not used [-Wunused-const-variable=]
static const uint8_t g_vt100_colormap[8] =
^~~~~~~~~~~~~~~~
<stdout>:4048:16: warning: 'input' defined but not used [-Wunused-function]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I62610b4c90e67637250cbd0107c2935c8abc542f
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Check POLLHUP and POLLERR in telnet poll loop
to handle the remote end close correctly
Send "NVT"(network virtual terminal) as the default if getenv("TERM") return NULL
telnet should trigger the error handling if inet_pton return zero
since zero mean the string has format error
Don't return 1 in _environ_telnet to avoid trigger the compression
and remove the redundant TELNET_TELOPT_COMPRESS2 check
Change telnet_error_u to telnet_error_e required by the coding standard
Ensure telnet object get freed before the abnormal exit
Run all .c and .h files in last PR through nxstyle and fix all complaints.
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Wapi improvement (#16)
* wireless: add passphrase control
* wireless: add disconnect control
apps/netutils/dhcpd/dhcpd.c: Fix unused const variable
dhcpd.c:273:29: warning: 'g_anyipaddr' defined but not used [-Wunused-const-variable=]
static const uint8_t g_anyipaddr[4] = {0, 0, 0, 0};
apps/netutils/dhcpd: Make dhcpd interface configurable
apps/netutils/dhcpd: Lease address directly if hit in address range
apps/netutils/netinit: Initialize dhcpc_state
update the addresses only on request success
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro
Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>