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.
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>
Issue:
DHCP server will send DHCP offer/ack via broadcast packet if broadcast
flag is enabled in DHCP discover/request.
There's no retransmition mechanism for broadcast frame in 802.11 MAC
layer, thus transmit fail rate might be very high. This will increase DHCP fail rate.
Solution:
Disable broadcast flag by default
Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
recv request can only get maximum 1500 bytes payload in single response in
earlier design, this patch aggregrate more payloads(maximum 16k bytes)
into one response to make sure usrsock’s req/response mechanism is not
bottleneck during usrsock’s throughput test.
Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
Error: discover.c:210:13: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'in_addr_t' {aka 'unsigned int'} [-Werror=format=]
210 | ninfo("Received discover from %08lx'\n", srcaddr.sin_addr.s_addr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
| |
| in_addr_t {aka unsigned int}
discover.c:210:41: note: format string is defined here
210 | ninfo("Received discover from %08lx'\n", srcaddr.sin_addr.s_addr);
| ~~~~^
| |
| long unsigned int
| %08x
In file included from discover.c:25:
discover.c: In function 'discover_openlistener':
Error: discover.c:359:9: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t' {aka 'unsigned int'} [-Werror=format=]
359 | ninfo("serverip: %08lx\n", ntohl(g_state.serverip));
| ^~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
| |
| uint32_t {aka unsigned int}
discover.c:359:24: note: format string is defined here
359 | ninfo("serverip: %08lx\n", ntohl(g_state.serverip));
| ~~~~^
| |
| long unsigned int
| %08x
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This option, which resolves to -w when CONFIG_CYGWIN_WINTOOL is
configured, is now appended to INCDIR in tools/Config.mk.
See git commit # 5eae32577e5d5226e5d3027c169eeb369f83f77d in the main
Summary:
- I noticed that the webserver can not handle a directory.
- This commit fixes this issue.
Impact:
- None
Testing:
- Tested with spresense:wifi_smp
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
High performance websocket client/server
The goal of cwebsocket is to provide a portable,
high performance websocket client/server,
especially on low power embedded systems.
cwebsocket is currently in a development state. You may encounter bugs.
Report them for a timely fix.
Successful tests have been conducted on the following architectures:
x86
x86_64
ARM
cwebsocket is compliant with the following standards:
ANSI C
POSIX
RFC 6455
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
A return code of EINTR is perfectly normal, and isn't an error as such.
It's an indication that your program may need to do something because
a signal occurred, but if not, should re-call recv().
Signed-off-by: chao an <anchao@xiaomi.com>
dhcp6c.c:222:3: error: unknown type name ‘pthread_t’
222 | pthread_t thread;
| ^~~~~~~~~
dhcp6c.c: In function ‘dhcp6c_get_result’:
dhcp6c.c:415:7: warning: implicit declaration of function ‘netlib_prefix2ipv6netmask’ [-Wimplicit-function-declaration]
415 | netlib_prefix2ipv6netmask(presult->pl, &presult->netmask);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
dhcp6c.c: In function ‘dhcp6c_parse_ia’:
dhcp6c.c:1046:30: warning: unused variable ‘pdhcp6c’ [-Wunused-variable]
1046 | FAR struct dhcp6c_state_s *pdhcp6c = (FAR struct dhcp6c_state_s *)handle;
| ^~~~~~~
dhcp6c.c: In function ‘dhcp6c_precise_open’:
dhcp6c.c:1702:3: warning: missing braces around initializer [-Wmissing-braces]
1702 | {
| ^
......
1706 | {0},
| -
| {{0}}
dhcp6c.c:1796:43: error: ‘UDP_BINDTODEVICE’ undeclared (first use in this function); did you mean ‘SO_BINDTODEVICE’?
1796 | setsockopt(pdhcp6c->sockfd, SOL_SOCKET, UDP_BINDTODEVICE, ifname,
| ^~~~~~~~~~~~~~~~
| SO_BINDTODEVICE
dhcp6c.c:1796:43: note: each undeclared identifier is reported only once for each function it appears in
dhcp6c.c: In function ‘dhcp6c_request_async’:
dhcp6c.c:1886:9: warning: implicit declaration of function ‘pthread_create’; did you mean ‘timer_create’? [-Wimplicit-function-declaration]
1886 | ret = pthread_create(&pdhcp6c->thread, NULL, dhcp6c_run, pdhcp6c);
| ^~~~~~~~~~~~~~
| timer_create
Signed-off-by: chao an <anchao@xiaomi.com>
rename the UDP_BINDTODEVICE to SO_BINDTODEVICE to follow the linux
style to be compatible with non-UDP protocol binding requirements
Signed-off-by: chao.an <anchao@xiaomi.com>