Ouss4
c8d83e0a88
net/can/can_setsockopt&can_getsockopt.c: Initialiaze ret variable to
...
eliminate any warning.
2020-06-15 12:20:32 -06:00
Ouss4
155903fc54
net/can/can.h: Add can_setsockopt and can_getsockopt prototypes.
2020-06-15 12:20:32 -06:00
Gregory Nutt
5e6d9944d7
net/socket/getsockopt.c: Eliminate warning
...
##[error]socket/getsockopt.c:362:7: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
int ret;
^~~
2020-06-15 16:10:47 +01:00
Peter van der Perk
b5c5948e1c
NXStyle fixes
2020-06-15 08:07:19 -06:00
Peter van der Perk
55d9e5f7af
net: Add SocketCAN support
2020-06-15 08:07:19 -06:00
Alan C. Assis
089a633c76
Fix wrong space instead of TAB
2020-06-15 07:13:21 -06:00
Alan C. Assis
7609b67496
Fix issues reported on PR #1233
2020-06-15 07:13:21 -06:00
Alan C. Assis
6ff18a7f3b
Rename NETDEV_WBIM_FORMAT with NETDEV_WWAM_FORMAT
2020-06-15 07:13:21 -06:00
Alan C. Assis
e1be7ace4b
Fix netdev and add Apache license to the file
2020-06-15 07:13:21 -06:00
Adam Porter
07c0faff59
Add support to CDC-MBIM USB host driver
...
This driver was created by Adam Porter and posted on NuttX
mailing list at Google Group on Nov 14 2019
2020-06-15 07:13:21 -06:00
Jukka Laitinen
17e45820c6
net/inet/inet_sockif.c: Fix long lines
...
Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-06-01 21:54:06 +08:00
Jukka Laitinen
1f8de344dd
net/inet/inet_sockif.c: Fix debugassert compilation
...
Should derefer addrlen pointer, instead of comparing whether
the pointer itself is > 0
Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-06-01 21:54:06 +08:00
Xiang Xiao
7e5b0f81e9
build: Replace -I with INCDIR
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 20:20:12 +01:00
Xiang Xiao
23668a4b9b
build: Remove the empty variable assignment
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-24 08:24:13 -06:00
Xiang Xiao
dd61d3d9f9
build: Remve the unnecessary .gitignore
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-23 18:00:40 +01:00
Gregory Nutt
154a87993f
fs/vfs/fd_open.c: fs_fdopen() must not set errno
...
Functions within the OS must never set the errno value. fs_fdopen() was setting the errno value. Now, after some parameter changes, it reports errors via a negated errno integer return value as do most all other internal OS functions.
2020-05-23 15:22:09 +08:00
Xiang Xiao
1a95cce1a3
build: Move .config check to the top Makefile
...
remove the workaround to handle the inexistence of .config/Make.defs
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-20 17:57:34 +01:00
Masayuki Ishikawa
c7500c5c9d
net: tcp: Fix port info in warning message in tcp_input.c
...
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-19 13:36:45 +08:00
Gregory Nutt
57bc329aac
Run nxstyle all .c and .h files modified by PR.
2020-05-17 14:01:00 -03:00
Gregory Nutt
a569006fd8
sched/: Make more naming consistent
...
Rename various functions per the quidelines of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
nxsem_setprotocol -> nxsem_set_protocol
nxsem_getprotocol -> nxsem_get_protocol
nxsem_getvalue -> nxsem_get_value
2020-05-17 14:01:00 -03:00
Gregory Nutt
35efcee5c9
net/netdev/netdev_register.c: Add some comments.
...
This commit adds some short comments to explain some perplexing logic of PR #1047 .
2020-05-15 15:48:00 +01:00
chao.an
87af256ad6
net/udp: fix nxstyle warning
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-15 07:27:01 -06:00
chao.an
7a62a59dec
net/conn: generate port base dynamically
...
In some extreme scenarios(eg. crash, reboot, reset, etc...),
an established connection cannot guarantee that the port can be
closed properly, if we try to reconnect quickly after reset, the
connection will fail since the current port is same as the
previous one, the previous port connection has been hold on server side.
dynamically apply for the port base to avoid duplication.
Change-Id: I0089244b2707ea61f553a4dae09c7af3649c70bd
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-15 07:27:01 -06:00
YAMAMOTO Takashi
573f02791f
netdev_ioctl: Update a comment
2020-05-14 11:26:03 -06:00
chao.an
a5868864bc
net: remove unnecessary spaces
...
minor style fix
Change-Id: I06b6fe48628440490090b89a39baf01481f79b79
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-14 07:54:57 -06:00
chao.an
9cc2f50405
netdev/register: configurable net packet size
...
Change-Id: I2af571a0273e67a06c1b4543eac3ded7cfdd8060
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-14 07:54:57 -06:00
chao.an
03f462c5cd
net/sockopt: fix nxstyle warning
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-14 07:53:15 -06:00
chao.an
608436a75f
net/sockopt: do not set the errno to SO_ERROR
...
SO_ERROR is used to report asynchronous errors that are the result
of events within the network stack and not synchronous errors that
are the result of a library call(send/recv/connect)
Synchronous results are reported via errno.
Linux Programmer's Manual
...
NAME
getsockopt, setsockopt - get and set options on sockets
...
RETURN VALUE
...
On error, -1 is returned, and errno is set appropriately
Change-Id: I1a1a05a684dff8672aaf47eabee157ac0d275c2d
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-14 07:53:15 -06:00
Xiang Xiao
63e3054ced
Don't need monitor IOB buffer empty event for POLLOUT implementation
...
It's enough to check the buffer available in the net event handler
Change-Id: I2d7c7a03675cf6eff6ffb42a81b7c7245253e92c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-13 06:50:07 -06:00
Xiang Xiao
517974787f
Rename clock_systime[r|spec] to clock_systime_[ticks|timespec]
...
follow up the new naming convention:
https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-10 14:35:50 -06:00
Gregory Nutt
4b44b628ea
Run nxstyle against all .c and .h files modified by this PR.
...
All complaints fixed except for those that were not possible to fix:
- Used of Mixed case identifier in ESP32 files. These are references to Expressif ROM functions which are outside of the scope of NuttX.
2020-05-09 14:19:08 -03:00
Gregory Nutt
a4218e2144
include/nuttx/sched.h: Make naming of all internal names consistent:
...
1. Add internal scheduler functions should begin with nxsched_, not sched_
2. Follow the consistent naming patter of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-09 14:19:08 -03:00
chao.an
0887203c57
tcp/conn: request arp before the 3-way handshake
...
Since the request address was not properly resolved before the handshake,
every time of connection, the handshake data will be overwitten into
arp packet and retransmitted until the next tcp timer.
Request the arp address before the handshake to avoid the retransmission.
Change-Id: I80118b9a8096c126c8e16cdf2f7b3d98fca92437
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-09 07:25:03 -06:00
Masayuki Ishikawa
75a8883f07
net: netdev: Fix netdev_vioctl()
...
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-09 02:10:23 +01:00
Xiang Xiao
b7d922960f
Fix nxstyle issue
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-08 07:20:49 -06:00
Xiang Xiao
d9d2fc0d0a
debug: Reduce CONFIG_CPP_HAVE_VARARGS usage
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-05 08:27:58 -06:00
Xiang Xiao
6604cdb3f2
fs: Remove all LIBC_IOCTL_VARIADIC related stuff
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-05 08:27:58 -06:00
Xiang Xiao
390f9a5fb7
fs/vfs: Add nx_dup and nx_dup2 function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-04 07:20:02 -06:00
Xiang Xiao
5b839061f9
net/usrsock: fix error: variable 'pos' is used uninitialized
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-29 07:10:44 -06:00
Gregory Nutt
9400cf2cd1
sched/group: On task creation, do not clone uninitialized descriptors.
...
Sockets are created in two steps:
1. The socket is allocated, then
2. The socket is initialized.
In SMP mode, there is a possibility that a pthread executing one CPU may create a new task while a pthread on another CPU has allocated the socket but not yet initialized it. This commit updates the socket clone test to assure that the socket is both allocated and initailized.
Without the change, it is possible that uninitialized sockets could be cloned, leading to errors later in the newly started task.
2020-04-28 21:27:05 +01:00
Xiang Xiao
b432ae5598
Fix nxstyle warning
2020-04-16 11:50:18 -06:00
chao.an
9131ae1f1f
netdev/carrier: monitor the driver status
2020-04-16 11:50:04 -06:00
chao.an
10acadb64b
netlink: add netlink route notify support
2020-04-16 11:49:53 -06:00
Xiang Xiao
6f1c86d934
netlink: Fix the compiler warning in netlink_add_broadcast
...
netlink/netlink_conn.c: In function 'netlink_add_broadcast':
netlink/netlink_conn.c:319:45: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
319 | if (conn->groups & (1 << (group - 1)) == 0)
| ~~~~~~~~~~~~~~~~~~~^~~~
2020-04-16 11:49:40 -06:00
liuhaitao
9ac3a0d4d8
Fix sixlowpan_framer.c build warnings under macos
...
sixlowpan/sixlowpan_framer.c:104:20: warning: unused function 'sixlowpan_saddrnull'
[-Wunused-function]
static inline bool sixlowpan_saddrnull(FAR const uint8_t *saddr)
^
sixlowpan/sixlowpan_framer.c:124:20: warning: unused function 'sixlowpan_eaddrnull'
[-Wunused-function]
static inline bool sixlowpan_eaddrnull(FAR const uint8_t *eaddr)
^
2 warnings generated.
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-17 01:38:40 +08:00
liuhaitao
2353e46ee9
Fix sixlowpan_utils.c nxstyle complaints
...
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-16 22:03:28 +08:00
liuhaitao
7afd8c6a21
Fix sixlowpan build break with -Werror option under macos
...
sixlowpan/sixlowpan_utils.c:535:20: error: unused function 'sixlowpan_issaddrbased' [-Werror,-Wunused-function]
static inline bool sixlowpan_issaddrbased(const net_ipv6addr_t ipaddr,
^
sixlowpan/sixlowpan_utils.c:543:20: error: unused function 'sixlowpan_iseaddrbased' [-Werror,-Wunused-function]
static inline bool sixlowpan_iseaddrbased(const net_ipv6addr_t ipaddr,
^
2 errors generated.
make[1]: *** [sixlowpan_utils.o] Error 1
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-16 22:03:28 +08:00
Xiang Xiao
bd39813883
netlink: Add netlink_add_broadcast function
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I1bee7933dca1bdd118d0034a564b4306e1ae5684
2020-04-16 17:40:03 +08:00
chao.an
755265506c
netlink: replace the operation handle to connection
...
Change-Id: Ie55d65823fe7eb7e917349c095cf8fd4f6326e8f
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-04-16 17:39:37 +08:00
chao.an
16c0c61e3e
netlink/route: reuse response terminator
...
Change-Id: I19c3d97b088231d96909d415d286c728ffe83881
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-04-16 17:39:06 +08:00