raiden00pl
fdabc7eccc
netutils/netinit/Kconfig: cosmetics
2023-10-23 22:26:13 +08:00
raiden00pl
dbdd59e52f
remove empty netutils/usrsock_rpmsg
2023-10-23 22:26:13 +08:00
makejian
9fa9c5b0a2
netutils/dhcpc: Add configuration check for getrandom
...
Calling getrandom depends on 'CONFIG_DEV_URANDOM' or 'CONFIG_DEV_RANDOM'
depends on patch https://github.com/apache/nuttx/pull/10925
Signed-off-by: makejian <makejian@xiaomi.com>
2023-10-18 19:47:48 +08:00
liqinhui
79e8722743
dhcp6c: Add the renew6 command for dhcp6c.
...
Support Stateless and Stateful. The renew6 is used as follows:
- Stateless: renew6 eth0
- Stateful: renew6 eth0 1
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-12 10:15:55 +08:00
Petteri Aimonen
5a992d4e18
Add basic IEEE-1588 PTP server/client
...
What works:
- Basic server & client operation
- Transmission and reception of announce, sync and follow-up
Still missing:
- SO_TIMINGS for getting more precise packet timestamps
- Implementation of delay_req and delay_resp packets
- Status and stop interfaces for the daemon
2023-10-06 17:25:23 +08:00
daniellizewski
a4ab405faa
Fix typo in uint8_t
2023-09-21 10:45:17 +08:00
wangyingdong
2e5139eba4
dhcpd:Optimize the data area memory and reduce it by about 1k bytes
...
If a daemon app(e.ot_client) starts dhcpd by calling dhcpd_start and needs to shut it down after use,
then the global static variables ds_inpacket and ds_outpacket will always occupy the data area,
causing unnecessary waste.
Signed-off-by: wangyingdong <wangyingdong@xiaomi.com>
2023-09-13 21:49:49 +08:00
xuxin19
c230321cae
fix progname do not match issue
...
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-09-11 16:37:05 +08:00
wangmingrong
a9f0fc55d1
codecs: add md5_file API
...
Add the API for 'md5_file' to directly obtain the digest value by passing in the file path
Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2023-09-08 02:11:23 +08:00
zhanghongyu
956b935511
mqttc: add mbedtls MQTTC support
...
The mqttc demo under example path can not support mbedtls api.
Because of the MQTT-C source code already contains many types of
link examples, so we added the corresponding makefile to
support mbedtls mqttc connections publisher and posix mqttc
connections publisher and subscriber.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-09-01 23:21:34 +08:00
simbit18
17a497492a
Fix Kconfig style
...
Remove spaces from Kconfig files
Add TABs
Add comments
2023-09-01 01:21:54 +08:00
Petro Karashchenko
189d0c803f
net/ip: print ip addresses using ip4_addrN macro
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-08-22 01:36:42 +08:00
Xiang Xiao
7251645685
Fix some coding style issue
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-17 22:51:51 +03:00
Xiang Xiao
054cf3b1cb
Change all sizeof(arr)/sizeof(arr[0]) to nitems
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-17 22:51:51 +03:00
raiden00pl
6b98aec34a
wakaama: update wakaama to a commit that includes a fix for wakaama examples under NuttX
2023-08-09 00:02:46 +08:00
yangyalei
fd261d839d
test: modify stacksize and priority
...
Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-08-03 07:26:49 -07:00
zhanghongyu
768993fb15
ntpclient: change sendto/recv timeout to Kconfig
...
Change the timeout period of ntpclient to configurable to reduce the impact
The NTP packet is lost during the first TLS connection after the board is started.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-08-03 06:16:54 -07:00
simbit18
85988dc77f
Fix nuttx coding style
...
Remove TABs
2023-08-01 23:10:32 -07:00
dongjiuzhu1
fb7dafc7e0
netutils/rexec/rexecd: supports remote execution and interaction
...
using popen with r+,w+ mode to interact with the remote service on
the command line, supporting input and output until the local
voluntarily exits or the remote service ends.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-29 20:29:54 -07:00
raiden00pl
7b066ed0d8
netutils: add Eclipse Wakaama support
2023-07-27 09:33:10 -07:00
Xiang Xiao
8083b094c3
Kconfig: Simplify the conditional default statement
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-25 09:51:09 +08:00
chao an
7cfcb49213
cmake/apps: add more applications into cmake support
...
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-13 19:00:18 +02:00
zhanghongyu
bbb2b289cf
iptables: add iptables libary
...
Add xtables.c and xtables.h
In order to support the compilation of third-party utils, we encounter some
situations where the macro is not defined, refer to the common implementation
of other systems, add relevant definitions and empty function.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-07-13 15:52:36 +08:00
Xiang Xiao
dab972b907
Remove the const cast from the initialization of boardioc_symtab_s::symtab
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-08 16:01:52 +03:00
chao an
4d79a5cbaf
add initial cmake build system
...
Co-authored-by: Daniel Agar <daniel@agar.ca>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:52:02 +08:00
Mingjie Shen
e94e1e59f3
rexec: warn users about cleartext password transmission
...
Close apache/nuttx#9642 .
Signed-off-by: Mingjie Shen <shen497@purdue.edu>
2023-07-01 13:23:04 +08:00
SunJ
b8856479ef
netutils/iperf: Fix possible precision loss
...
Signed-off-by: SunJ <jsun@bouffalolab.com>
2023-06-17 17:12:45 +08:00
Zhe Weng
3e68694bdf
netutils/dhcpc: Set BOOTP BROADCAST flag when IPFORWARD is enabled
...
Socket binded to INADDR_ANY is not intended to receive unicast traffic before being fully configured, at least dhclient configured with socket-only won't do so on Linux and BSDs (https://github.com/isc-projects/dhcp/blob/v4_4_3/common/socket.c#L1201 ).
We can sometimes receive unicast traffic before being fully configured, it's good, but not always, so we need to set the broadcast flag under some situations.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-06-15 10:10:05 +08:00
Petro Karashchenko
aed0e2873e
apps: fix style issues in code
...
Add missing FAR and CODE to pointers
Remove FAR for non-pointer variables
Remove extra spaces and align the parameters
Add do {} while(0) wrapper in macro
Use nitems to calculate number of elements in arrays
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-06-11 18:47:50 +08:00
Roy Feng
ea0501387f
Add interface to configure DHCP daemon
2023-06-06 17:17:08 +08:00
Zhe Weng
f671c004df
netlib: set addr.sin_zero to 0 in netlib_set_ipv4dnsaddr
...
In dns_add_nameserver, the dns_check_nameserver is comparing addresses
with addrlen = sizeof(struct sockaddr_in) for IPv4 addresses, so the
trailing sin_zero field should be 0, otherwise it may fail to figure out
same nameserver address.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-05-22 17:09:33 +03:00
Xiang Xiao
7032c72f2f
Indent the define statement by two spaces
...
follow the code style convention
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-21 07:39:53 +03:00
simbit18
c356fe92bc
netutils/ping/Kconfig: Fix Kconfig style
...
Remove spaces from Kconfig file
2023-05-18 00:38:54 +08:00
Alan Carvalho de Assis
04243050f7
net/mqttc: Add support to detect MQTT connection
...
This is a fix implemented by Pieter Conradie as described here:
https://github.com/LiamBindle/MQTT-C/issues/163
2023-05-15 19:20:28 +03:00
zhanghongyu
44e5a5ecd7
dhcpc: adds errno to the dhcpc internal error
...
add errno to help analyze possible causes of dhcp failures
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-05-12 22:30:38 +08:00
Xiang Xiao
73701cd7cd
Replace all strncpy with strlcpy
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Xiang Xiao
7c37421266
Replace all sprintf with snprintf
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Xiang Xiao
134b8b538f
Replace all strcat with strlcat
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Tiago Medicci Serrano
b5fb80c0cd
apps/netutils/rtptools: fix warning while building with clang
...
The flag '-Wno-maybe-uninitialized' is not known by clang, so a
workaround substitutes it for '-Wno-uninitialized' when clang is
being used as C compiler.
2023-05-03 00:28:55 +08:00
Tiago Medicci Serrano
a6c41fbaeb
apps/netutils: Add RTP tools
2023-05-02 13:42:41 +08:00
wangchen
c2f75330f7
nshlib/netcmds:support to set MTU
...
Usage:ifconfig interfacename mtu ***
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2023-04-27 18:02:23 +08:00
Fotis Panagiotopoulos
c50ff7ff61
Fixes in asprintf usage.
2023-04-23 17:16:34 +08:00
Zhe Weng
f2819b71e5
netutils/iperf: Support RPMsg socket test
...
Usage:
iperf -s --rpmsg <name>
iperf -c <cpu> --rpmsg <name>
Note:
RPMsg with SOCK_DGRAM (`-u`) doesn't have server mode (bind) yet, iperf
may not work in this case before rpsock is enhanced.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:16:49 +08:00
Zhe Weng
213219f30a
netutils/iperf: Support local socket test
...
Usage:
iperf -s --local <path>
iperf -c <path> --local || iperf -c <whatever> --local <path>
Can combine with other options, e.g. '-u' will result in local
UDP (DGRAM).
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:16:49 +08:00
Zhe Weng
411c98acec
netutils/iperf: Split out sockaddr from general logic
...
We'll add local/rpmsg sockets later, they're mainly different in
sockaddr, we can reuse other current logic.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:16:49 +08:00
Zhe Weng
e3e3cc28a6
netutils/iperf: Use argtable's builtin glossary to print usage
...
Argtable's builtin glossary can produce same output and we do not need
to maintain two sets of help string. Then we're easier to add more
options to iperf.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:16:49 +08:00
Petro Karashchenko
700b0ed235
netutils/netlib: fix typos in comments
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-19 03:11:19 +08:00
Petro Karashchenko
f7448f848b
netutils/webserver: improve modularity of httpd single server
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-04-19 03:11:19 +08:00
Xiang Xiao
aa99d267b7
Change the private default signal number to 32
...
and remove the unused private signal number macro
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-05 03:38:24 -07:00
Petro Karashchenko
6833a8c0cc
netutils/pppd: fix indentations in ppp.h
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-26 08:33:05 -06:00
chao an
b3cfcee47d
netutils/iperf: guaranteed precision before division
...
Iperf test on photon/wlan
Before:
0.00- 1.08 sec 65536 Bytes 0.00 Mbits/sec
After:
0.00- 1.04 sec 74970 Bytes 0.58 Mbits/sec
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-22 11:47:01 -03:00
Zhe Weng
86d084fe21
netutils/ftpc: Cancel wdog on error state in ftpc_reconnect.
...
The timer is for connect timeout, but is not cancelled on connect error,
then it may be triggered after ftpc quit and cause heap-use-after-free.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-03-21 20:40:38 -03:00
simbit18
d3c3a6ebe0
apps/netutils/xmlrpc/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
7560a5e80d
apps/netutils/webserver/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
79b72c0302
apps/netutils/webclient/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
b2f1ab31c7
apps/netutils/thttpd/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
b2d24f7688
apps/netutils/tftpc/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
98a1618202
apps/netutils/telnetd/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
4b401d95b1
apps/netutils/telnetc/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
17103a6b3d
apps/netutils/smtp/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
27a17df69d
apps/netutils/rexecd/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
19d6f40767
apps/netutils/rexec/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
af4e177722
apps/netutils/pppd/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
257719d65a
apps/netutils/ntpclient/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
804762c72d
apps/netutils/netlib/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
e1357fa6c9
apps/netutils/netinit/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
6529e74326
apps/netutils/libcurl4nx/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
2c2577fc75
apps/netutils/ftpd/Make.defs: nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
8bc93e07ce
apps/netutils/ftpc/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
a75dd4be40
apps/netutils/esp8266/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
cf0ee4354c
apps/netutils/discover/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
585d0e083b
apps/netutils/dhcpd/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
5137e6f3db
apps/netutils/dhcpc/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
5736d2adfd
apps/netutils/dhcp6c/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
simbit18
6978a65293
apps/netutils/codecs/Make.defs: fix nxstyle
...
Add missing first line header
2023-03-20 14:17:07 +01:00
jturnsek
b67b56111a
Using poll instead of epoll by default
2023-03-10 14:59:16 +08:00
jturnsek
b13f70ca59
Nng library and pubsub example
2023-03-08 10:49:13 +08:00
Gustavo Henrique Nihei
f500c64962
Include missing headers throughout the repository
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-07 09:58:13 +08:00
Xiang Xiao
21bc466a2b
Remove the tail space char from all files
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-03 00:18:36 +02:00
zhangyuan21
5e4c4d7393
netutils/dhcpd: fixed simusb build issue
...
define dhcpd_arpupdate when CONFIG_NETUTILS_DHCPD_IGNOREBROADCAST undef
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-03-01 21:25:31 +08:00
lilei19
41f60bd669
change strcpy to strlcpy
...
Change-Id: I8b9429a3c225a82842fce136bdb14b8b135066d3
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-22 23:09:55 +08:00
Alan Carvalho de Assis
38eec3f0f0
netinit: Improve WiFi configuration
...
The current WiFi configuration expects user to look at symbols in
the wireless headers to configure it. This patch will improve it.
Notice that even those symbols that are bitfields are not allowed
to have more than 1 bit set at time.
2023-02-17 16:21:49 +08:00
zhanghongyu
96956ba83c
dhcpc: under STATE_HAVE_OFFER, dont send DECLINE when offer from same server
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-02-11 14:37:19 +08:00
Nathan Hartman
8e77b79f78
Kconfig: Make indent consistent with TABS
2023-02-10 14:11:48 +08:00
chao an
42d34fcef3
build/Kconfig: fix warnings detected by kconfiglib
...
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 19:45:36 +08:00
chao an
8ad4ae5508
net: fix compiler warning
...
sixlowpan_assocresp.c: In function ‘sixlowpan_assoc_resp’:
sixlowpan_assocresp.c:48:3: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
48 | strncpy(arg.ifr_name, ifname, IFNAMSIZ);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-08 00:35:39 +08:00
Xiang Xiao
a29d9ea9da
fsutils/examples: Include unistd.h explicitly
...
to get the prototypes or macros are defined in it
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-05 08:46:59 +02:00
Gustavo Henrique Nihei
b0da60e498
apps: Use MIN/MAX definitions from "sys/param.h"
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-02 00:35:14 +02:00
haopengxiang
f4e29f376d
netutils/cjson: fix unpackage error when local gerrit does not exist
...
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-01-31 22:21:41 +02:00
haopengxiang
5a9529185f
netutils/cjson: change cjson unpackname to cJSON
...
Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-01-29 20:42:26 +08:00
caofuqi1
248a9f772b
netutils/cjson: Enable cjson test
2023-01-26 08:12:19 +02:00
梁超众
fb638a13cc
remove userspace usrsock rpmsg client/server
...
Signed-off-by: 梁超众 <liangchaozhong@xiaomi.com>
2023-01-11 18:11:02 +08:00
田昕
2b2c4805a4
netutils/dhcpc:fix dhcp hostname len error in dhcpc_sendmsg
...
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2023-01-10 21:52:31 +08:00
Zhe Weng
2ad05e3062
ifconfig: Support prefixlen/CIDR for IPv6
...
Linux:
ifconfig eth0 [inet6] add 2022::2/96
FreeBSD:
ifconfig eth0 inet6 2022::2/96
ifconfig eth0 inet6 2022::2 prefixlen 96
NuttX newly supported:
ifconfig eth0 inet6 [add] 2022::2/96
ifconfig eth0 inet6 [add] 2022::2 prefixlen 96
Ref:
https://man7.org/linux/man-pages/man8/ifconfig.8.html
https://www.freebsd.org/cgi/man.cgi?ifconfig
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-29 17:33:59 +08:00
Zhe Weng
64f9dc100c
netutils: Add iptables in netlib.
...
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-29 14:26:41 +08:00
Xiang Xiao
d1e46c2d3e
compiler.h: Add _ between format|printf|syslog|scanf|strftime and like
...
align with other macro naming style
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-21 01:05:12 +02:00
Xiang Xiao
cfc005a460
arp: Remove the unnecessary inclusion of nuttx/net/arp
...
and change the remain inclusion to netinet/arp.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-16 22:11:10 +02:00
zhanghongyu
c7e8ade590
arp: change arptable get struct from arp_entry_s to arpreq
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-12-14 21:19:37 +08:00
zhanghongyu
df3121213e
cmd_arp: add device input for arp interface
...
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2022-12-14 21:19:37 +08:00
Masayuki Ishikawa
5592e38253
netutils: iperf: Fix the transfer bytes and the bandwidth overflow
...
Summary:
- I noticed that the iperf shows incorrect transfer bytes
in each period.
- Also, the bandwidth overflows sometimes.
- This commit fixes these issues.
Impact:
- None
Testing:
- Tested with qemu-armv8a:netnsh_smp on QEMU-7.1
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-12-12 21:45:52 +08:00