Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
If the flag is not set, The flag is affected by the previously sent and
received packets, L2 header may be filled with ipv6
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
add ref count for ipv4 multicast and leave the multicast group when close
behavior alignment with linux.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)
------------------
How to test
From within nuttx/. Configure:
cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja
(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja
This uses ninja generator (install with sudo apt install ninja-build). To build:
$ cmake --build build
menuconfig:
$ cmake --build build -t menuconfig
--------------------------
2. cmake/build: reformat the cmake style by cmake-format
https://github.com/cheshirekow/cmake_format
$ pip install cmakelang
$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done
Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
Allocate the device buffer only if the protocol really need to send data.
not all protocols require the driver to prepare additional iob before
sending, especially UDP, each iob reserves l2/l3 header in advance
after prepare write buffer, net device could reuse this entry to send directly
Signed-off-by: chao an <anchao@xiaomi.com>
igmp/igmp_input.c: In function 'igmp_input':
igmp/igmp_input.c:201:31: warning: the comparison will always evaluate as 'false' for the address of 'grpaddr' will never be NULL [-Waddress]
201 | if (igmp->grpaddr == 0)
| ^~
In file included from nuttx/include/nuttx/net/netstats.h:67,
from igmp/igmp_input.c:53:
nuttx/include/nuttx/net/igmp.h:132:12: note: 'grpaddr' declared here
132 | uint16_t grpaddr[2]; /* 32-bit Group address */
| ^~~~~~~
Signed-off-by: chao an <anchao@xiaomi.com>
The following nxstyle errors are known.
They are a part of the copyright notice.
net/igmp/igmp_poll.c:22:82: error: Long line found
net/igmp/igmp_poll.c:29:82: error: Long line found
The following nxstyle errors are known.
They are a part of the copyright notice.
net/igmp/igmp_mcastmac.c:22:82: error: Long line found
net/igmp/igmp_mcastmac.c:29:82: error: Long line found
The following nxstyle errors are intentionally left
because they are a part of the copyright notice.
net/igmp/igmp_join.c:22:82: error: Long line found
net/igmp/igmp_join.c:29:82: error: Long line found
to save the preserved space(1KB) and also avoid the heap overhead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I694073f68e1bd63960cedeea1ddec441437be025
igmp/igmp_timer.c: In function ‘igmp_timeout’:
igmp/igmp_timer.c:163:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
163 | group = (FAR struct igmp_group_s *)arg;
| ^
igmp/igmp_timer.c: In function ‘igmp_startticks’:
igmp/igmp_timer.c:200:55: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
200 | ret = wd_start(group->wdog, ticks, igmp_timeout, 1, (uint32_t)group);
| ^
igmp/igmp_timer.c:200:38: warning: passing argument 3 of ‘wd_start’ from incompatible pointer type [-Wincompatible-pointer-types]
200 | ret = wd_start(group->wdog, ticks, igmp_timeout, 1, (uint32_t)group);
| ^~~~~~~~~~~~
| |
| void (*)(int, uint32_t, ...) {aka void (*)(int, unsigned int, ...)}
In file included from igmp/igmp_timer.c:50:
/home/xiaoxiang/mirtos/nuttx/include/nuttx/wdog.h:233:53: note: expected ‘wdentry_t’ {aka ‘void (*)(int, long unsigned int, ...)’} but argument is of type ‘void (*)(int, uint32_t, ...)’ {aka ‘void (*)(int, unsigned int, ...)’}
233 | int wd_start(WDOG_ID wdog, int32_t delay, wdentry_t wdentry, int argc, ...);
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I153355f85f583f5441d97a0b1278bce167eb3fd0
Build nucleo-144/f767-netnsh fail with below error:
In file included from igmp/igmp_initialize.c:54:
./igmp/igmp.h:130:3: error: unknown type name 'sem_t'
130 | sem_t sem; /* Used to wait for message transmission */
| ^~~~~
make[1]: *** [igmp_initialize.o] Error 1
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
* Simplify EINTR/ECANCEL error handling
1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx
* Unify the void cast usage
1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro