Commit Graph

1058 Commits

Author SHA1 Message Date
meijian
e25f89d2d6 app/netstatistics: Add net statistics api for user
Signed-off-by: meijian <meijian@xiaomi.com>
2024-09-12 13:38:38 +08:00
Alexey Matveev
0fc0cb2888 Thttpd Fix: wrong calc offset 2024-09-09 19:45:03 +08:00
meijian
c91a1817aa netlib/setroute: fix dhcpd stack-overflow when calls netlib_set_dripv4addr with debug info-level
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-26 01:54:46 +08:00
zhangshuai39
6d52a0fbc1 netutils/netlib: Encapsulate the dhcp configuration network code and modify at all calling locations
The DHCP configuration network code is called multiple times, so it is encapsulated

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2024-08-23 22:10:04 +08:00
liqinhui
c326677f7a netlib: Delete the redundancy code.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 01:24:29 +08:00
liqinhui
f4141998dd netlib: Use the netlib_add_ipv6addr to set the IPv6 address after obtaining the address.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 01:24:29 +08:00
SPRESENSE
fb17471673 netutils/webclient: Fix the coding style 2024-08-20 15:23:59 +08:00
SPRESENSE
66f6e5f048 netutils/webclient: Fix bug that the socket is not close
Fix to close socket when it fails to resolve hostname.
2024-08-20 15:23:59 +08:00
meijian
a9ff36b2a4 nng/clock: fix the timer clock is affected by UTC update bug
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-19 16:49:57 -03:00
meijian
68577f76f0 netutils/nng: add cmake for nng
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-19 16:49:57 -03:00
meijian
35a26eafea netutils/nng: fix nng compile warnings on some platforms
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-19 16:49:57 -03:00
meijian
8fa5fd8adc netutils: porting NNG-v1.5.2 for nuttx
1.fix build warings
2.add thread name for nuttx
3.add config to set thread stack-size
4.fix urandom memleak

Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-19 16:49:57 -03:00
zhanghongyu
acf9e3679e netutils/iptables: add cmake support.
add cmake support for xtables.c, solves the problem of missing symbols
when compiling with cmake

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-20 02:48:49 +08:00
meijian
2e929bdf15 netutils/mqttc: add cmake support
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-20 02:48:22 +08:00
zhanghongyu
972594604c libcoap: fix makefile compile error after menuconfig
correct the LIBCOAP_VERSION format

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-20 02:46:43 +08:00
Alan Carvalho de Assis
6b9d51793f Fix error caused by netinit code assuming CONFIG_NETINIT_DNS was enabled
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-07-07 10:35:49 +08:00
Zhe Weng
3022f836dc netlib/ip6tables: Add functions for ip6tables & filter table
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-06-21 10:16:01 +08:00
Zhe Weng
4283e57013 netlib/iptables: Add functions for filter table
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-06-21 10:16:01 +08:00
Zhe Weng
9fcde632a7 netlib/iptables: Change matching to memcmp all related structs
Compare both the struct ipt_ip, the match and the target, to support
more entry types other than NAT entry.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-06-21 10:16:01 +08:00
raiden00pl
b32cf5f0b7 libcurl4nx: fix compilation 2024-06-06 03:21:19 +08:00
raiden00pl
c644ef477b cmake: add missing netlib_set_ipv4dnsaddr.c file 2024-06-06 03:21:19 +08:00
meijian
8d1bb4cfe8 [app][netlink_route] fix get route netlink bugs
Signed-off-by: meijian <meijian@xiaomi.com>
2024-05-14 22:06:47 +08:00
zhanghongyu
c6051e4c41 connectedhomeip: supports specifying CHIP_ROOT from the cmake parameter.
support CI compilation for the matter community
https://github.com/project-chip/connectedhomeip/pull/31236

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-05-07 14:53:26 +08:00
simbit18
dadbea7e3b fix nxstyle
fix Relative file path does not match actual file.
Add missing Apache Foundation copyright header
2024-04-30 00:02:31 +08:00
meijian
255df7c01f [ping] fix ping error busyloop add goto wait
Signed-off-by: meijian <meijian@xiaomi.com>
2024-04-22 23:03:39 +02:00
meijian
a7cffe03b5 [ping] fix ping early return when ping is interrupted by ifdown
During a long ping, the tester will repeatedly switch the dev interface on and off.
When the interface is down and ping is in sendto sem_wait state,ifdown will trigger event of sendto and post sem.
in func of sendto_eventhandler:
if ((flags & NETDEV_DOWN) != 0)
{
  nerr("ERROR: Interface is down\n");
  pstate->snd_result = -ENETUNREACH;
  goto end_wait;
}

Signed-off-by: meijian <meijian@xiaomi.com>
2024-04-22 23:03:39 +02:00
meijian
c0c9a6007c [ping] fix ping early return when ping is interrupted by ifdown and poll return
During a long ping, the tester will repeatedly switch the dev interface on and off.
When the interface is down and ping is in poll sem_wait state,ifdown will trigger event of poll and post sem.
The poll will return and revent is 0x18 POLLHUP | POLLERR.Then recvfrom will process and return error to stop ping.
if ((flags & NETDEV_DOWN) != 0)
{
  eventset |= (POLLHUP | POLLERR);
}

Signed-off-by: meijian <meijian@xiaomi.com>
2024-04-22 23:03:39 +02:00
Filipe Cavalcanti
ad7f69d25e Add support for protocol buffers (nanopb)
Adding nanopb download and compilation

Improvements and example running

Working distclean

Check for win/linux/mac
2024-04-22 10:46:39 -03:00
Michael Jung
3dc64d9a26 netutils/dhcp6c: Fix printf-style format strings
Signed-off-by: Michael Jung <michael.jung@secore.ly>
2024-04-20 12:01:19 -03:00
Zhe Weng
7e7b108ef9 netutils/netlib: Add netfilter conntrack functions
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-04-18 09:57:01 +08:00
simbit18
000a8bcdf1 Fix nuttx coding style
fix
error: Relative file path does not match actual file
error: Long line found
error: Operator/assignment must be preceded with whitespace
error: Missing blank line after comment
2024-04-18 09:56:48 +08:00
zhanghongyu
e2805fc9c4 matter: use a fixed version of pigweed
Otherwise, the compilation may fail due to changes in the pigweed code

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-03-26 01:19:37 +08:00
Adam Comley
c15a6970c9 Derive MAC Address from board unique_id 2024-03-21 22:46:28 +08:00
Sebastien Lorquet
8cb0bf3eab dhcpc: reset the state of the "cancel" variable when restarting the async dhcpc thread. 2024-03-20 02:25:33 +08:00
xuxin19
38d30f9984 matter cmake:fix matter_generate_args_tmp_file call error
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-03-15 01:26:22 +08:00
Peter van der Perk
2d6f5f230e netinit: Add check mount path retry option for delayed mounts 2024-02-28 10:21:40 +08:00
zhanghongyu
9c48a8d4fc iperf: add parameters to support dynamic device bind
In addition to the CONFIG_NETUTILS_IPERFTEST_DEVNAME configuration, you can specify network cards by parameter to support devices with multiple network interface

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-01-17 00:54:31 -08:00
zhanghongyu
d9f467dd8e libcoap: add cmake script
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-01-06 04:32:41 -08:00
zhanghongyu
ce735f4136 libcoap: add makefile and Kconfig
server:
when ipv6 is enable:
ap> coap_server
only ipv4 is enable, we need to specify the ip address of the network card:
ap> coap_server -A [ipv4 address]

client:
ap> coap_client -m get coap://[ipv4/6 address]/time
Dec 26 06:41:12

Other Examples:
	coap_client -m get coap://[::1]/
	coap_client -m get coap://[::1]/.well-known/core
	coap_client -m get coap+tcp://[::1]/.well-known/core
	coap_client -m get coap://%2Funix%2Fdomain%2Fpath%2Fdgram/.well-known/core
	coap_client -m get coap+tcp://%2Funix%2Fdomain%2Fpath%2Fstream/.well-known/core
	coap_client -m get coaps://[::1]/.well-known/core
	coap_client -m get coaps+tcp://[::1]/.well-known/core
	coap_client -m get coaps://%2Funix%2Fdomain%2Fpath%2Fdtls/.well-known/core
	coap_client -m get coaps+tcp://%2Funix%2Fdomain%2Fpath%2Ftls/.well-known/core
	coap_client -m get -T cafe coap://[::1]/time
	echo -n 1000 | coap-client -m put -T cafe coap://[::1]/time -f -

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-01-06 04:32:41 -08:00
Zhe Weng
9489659890 netutils/ping: Optimize stack usage of icmp_ping
Can reduce 88~144 Bytes on ARMv7-A depending on optimization level.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-01-02 19:47:23 +01:00
Petteri Aimonen
fcd0729e21 ptpd: Fix reserved word 'class'
When ptpd.h is included in C++ code, the use of identifier 'class'
caused a compilation error. Changed to "clockclass".
2023-12-07 18:26:39 -08:00
liqinhui
91a697a3f4 renew6: Optimize the process of obtaining an IPv6 address.
If Managed Address Congfiguration flag in the Router Advertisement
Messsage is set, we would obtain the IPv6 address though the stateful
DHCPv6 procedure.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-12-07 06:26:50 -08:00
Petteri Aimonen
6dd9adbb5b ptpd: Code quality improvements 2023-12-04 00:30:26 -08:00
Petteri Aimonen
af6e4d2cb9 ptpd: Code style and FAR pointer fixes 2023-11-24 20:15:38 -08:00
Petteri Aimonen
0adce22400 ptpd: Implement status & stop interfaces 2023-11-24 20:15:38 -08:00
Petteri Aimonen
efc6cfddb4 ptpd: Fix compilation error when debug messages disabled
The debug macros did not get declared in all setups.
2023-11-24 20:15:38 -08:00
Petteri Aimonen
e2168abe9a ptpd: Implement delay reqs, fix timing bugs
Fixed bug where negative offsets were not properly handled because
clock_timespec_subtract clamps values to zero.

Implement support for SO_TIMESTAMP to get accurate packet
reception timestamp.

Implemented delay requests for measuring packet transfer delay.

Implemented clock drift estimation to bring the clocks closer to
sync and to filter out measurement jitter.
2023-11-24 20:15:38 -08:00
Petteri Aimonen
8dbf26016a ptpd: Re-join multicast group after timeout
If multicast PTP packets are not being received, rejoin the multicast group.
This automatically recovers from situations such as rebooting a network switch.
2023-11-24 20:15:38 -08:00
zhanghongyu
ae59177279 matter: download chip and dependent source for open source version
The community version needs to dynamically fetch the matter source code at compile time and apply the required nuttx adaptation patch

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-11-23 00:19:37 -08:00
zhanghongyu
72e67e9d6d jsoncpp: add cmake scripts for jsoncpp
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-11-23 00:19:37 -08:00