Support Stateless and Stateful. The renew6 is used as follows:
- Stateless: renew6 eth0
- Stateful: renew6 eth0 1
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
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
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>