anchao
d24b879e63
Revert "net/socketpair: move socketpair implement into socket internal"
...
This reverts commit a66e18bc53 .
Reason for revert: <N/A>
Change-Id: I3b707a2f6f52fb4a9eb2ab649b686b955b879d65
2021-06-17 20:23:59 +08:00
chao.an
a66e18bc53
net/socketpair: move socketpair implement into socket internal
...
Change-Id: I1c6d7178e2631e43d9fcc99918456eec36f730ce
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-16 15:19:44 +08:00
chao.an
6b1ca37048
net/accept: alloc the accept fd after accept success
...
Change-Id: Id879e831dcb5d25eff27cde76ca4cc59a000e02f
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-15 11:23:13 +08:00
chao.an
693bd87cab
net/sock: move the psock calloc out of sockfd_allocate
...
Change-Id: I3b5373ffe9a4034c2ac2cd83389fd46c47dc9047
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-15 11:23:13 +08:00
chao.an
c04f6dfebe
Revert "net/accept: alloc the accept fd after accept success"
...
This reverts commit 28363bf9a8 .
Change-Id: Iafa64ca1af83afa537cd00bf0f67ac76d749b86c
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-15 11:23:05 +08:00
Xiang Xiao
4d66266a8e
sched: Don't include nuttx/sched.h inside sched.h
...
But let nuttx/sched.h include sched.h instead to
avoid expose nuttx kernel API to userspace.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I6fe673364be9eb1259381e6575d4c1a9fea58097
2021-06-13 00:25:26 -07:00
chao.an
28363bf9a8
net/accept: alloc the accept fd after accept success
...
Change-Id: Ib174b510e5be359197db575a9b7b5aceea97665d
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-09 23:09:08 +08:00
liuhaitao
dc639b2b59
Merge remote-tracking branch 'mirtos/master' into dev-upmerge-nuttx-10.1-0507
...
Change-Id: I4bb3a61356be2b4a77ccfe45390b15e68a376dd6
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2021-05-07 20:46:07 +08:00
Jiuzhu Dong
d64d558adb
get/setsockopt: change break to return OK to fix bug
...
N/A
Change-Id: Ie5ecf640bcba6137904fcf3a0a465b2bc5d1cb92
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-04-09 23:17:48 +08:00
Xu Xingliang
f8c5fe24fb
net: Forward socket option only when the socket type is usrsock
...
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
Change-Id: I5e102c4c648936f96834120e2c508f7072436246
2021-04-09 16:58:55 +08:00
chao.an
60407c8c8a
net/tcp: do not start the tcp monitor if unestablished
...
Add more sanity checks to avoid TCP moniter start fail if the
TCP handle unestablished, the dup(2) operation should work at any time
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-19 17:23:18 +09:00
chao.an
2919001e3e
net/tcp: do not start the tcp monitor if unestablished
...
Change-Id: Iace9ccfc73086db442db04b95bc508dd48827b82
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-19 11:11:40 +08:00
Jiuzhu Dong
e96c8b9283
fs: allocate file/socket dynamically
...
Change-Id: I8aea63eaf0275f47f21fc8d5482b51ffecd5c906
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-17 06:46:42 -07:00
Jiuzhu Dong
7a6a1c1f42
fs: allocate file/socket dynamically
...
MIRTOS-273
Change-Id: I8aea63eaf0275f47f21fc8d5482b51ffecd5c906
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-17 21:15:26 +08:00
Gustavo Henrique Nihei
330eff36d7
sourcefiles: Fix relative path in file header
2021-03-09 23:18:28 +08:00
ligd
70442d1f9d
net/socket_rpmsg: add net socket rpmsg support
...
Change-Id: Ie23ee4c0052cf2fc66972ea9bc5f11c070fbcf8a
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-07 01:45:51 -08:00
Peter Bee
e223f60c09
net/socket: move si_send/recv into sendmsg/recvmsg
...
Implement si_send/sendto/recvfrom with si_sendmsg/recvmsg, instead of
the other way round.
Change-Id: I7b858556996e0862df22807a6edf6d7cfe6518fc
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2021-03-05 04:46:13 -08:00
Jiuzhu Dong
4d5a964f29
net: unify socket into file descriptor
...
Change-Id: I9bcd21564e6c97d3edbb38aed1748c114160ea36
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 19:01:41 -08:00
dongjiuzhu1
bb65de6cae
net: unify socket info file descriptor
...
MIRTOS-255
Change-Id: Iee680c8ac07fe87fb6e7900b4f792e0f1ff5036d
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 22:23:44 +08:00
Peter Bee
a2a31c735e
net/socket: move si_send/recv into sendmsg/recvmsg
...
MIRTOS-272
Implement si_send/sendto/recvfrom with si_sendmsg/recvmsg, instead of
the other way round.
Change-Id: I7b858556996e0862df22807a6edf6d7cfe6518fc
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2021-03-02 17:33:01 +08:00
ligd
df76063a35
Revert "net: unify socket info file descriptor"
...
This reverts commit 27b332283e .
2021-02-26 10:21:02 +08:00
Jiuzhu Dong
27b332283e
net: unify socket info file descriptor
...
N/A
Change-Id: I9bcd21564e6c97d3edbb38aed1748c114160ea36
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-25 16:53:58 +08:00
Alin Jerpelea
37d5c1b0d9
net: Author Gregory Nutt: update licenses to Apache
...
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-20 00:38:18 -08:00
Alin Jerpelea
7dc7ef45f1
net: nxstyle fixes
...
Nxstyle fixes to pass CI.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-20 00:38:18 -08:00
Juha Niskanen
de1ad1fdb3
net: fix typos, incorrect comments, nxstyle
...
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-13 09:06:28 -06:00
ligd
fe996fc69c
socket_rpmsg: add socket rpmsg support
...
N/A
Change-Id: I1e18a0b3d643e5b74b86624ef245f19ef616bc61
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-12-04 20:36:24 +08:00
chao.an
316cdccf82
net/sockopt: Try usrsock further if the protocol not available
...
fallback to usrsock if the features are not implemented locally
Change-Id: I46e2d6452d7edd3fa5b3d508945511cd48f22ebb
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-03 12:22:48 +01:00
chao.an
51efe468b9
net/sockopt: fix invalid option set
...
fix invalid option set if enable UDP without TCP
Change-Id: I732893501a9b28749706d6f860c77ae9e14b358c
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-03 12:22:48 +01:00
chao.an
d45b4324ab
net/sockopt: Try usrsock further if the protocol not available
...
fallback to usrsock if the features are not implemented locally
Change-Id: I46e2d6452d7edd3fa5b3d508945511cd48f22ebb
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-01 20:08:40 +08:00
chao.an
753ecb6ae1
net/sockopt: fix invalid option set
...
fix invalid option set if enable UDP without TCP
Change-Id: I732893501a9b28749706d6f860c77ae9e14b358c
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-01 20:08:35 +08:00
chao.an
049c991d28
style/Kconfig: remove unnecessary trailing whitespace
...
N/A
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-28 12:20:30 +01:00
YAMAMOTO Takashi
3297c09d58
net/socket/send.c: Fix a syslog format error
2020-11-20 22:22:53 -08:00
Matias N
5386f972fa
bluetooth: Add support for HCI RAW channel; make host layer optional
2020-10-25 17:04:25 -07:00
Brennan Ashton
1080d3f411
Bluetooth: Start implementing BTPROTO_HCI socket support
...
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-10-25 17:04:25 -07:00
Xiang Xiao
b0797263ca
libc/stdio: Allocate file_struct dynamically
...
1.Reduce the default size of task_group_s(~512B each task)
2.Scale better between simple and complex application
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia872137504fddcf64d89c48d6f0593d76d582710
2020-09-11 17:58:17 +08:00
Xiang Xiao
ae356001cf
Change all files come from Xiaomi/Pinecone to Apache License 2.0
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-22 17:37:21 -06:00
chao.an
e5f6dafe1f
net/socket: add SOCK_CLOEXEC/SOCK_NONBLOCK support
...
Reference here:
https://github.com/torvalds/linux/blob/master/include/linux/net.h
Change-Id: I9fd0170bcd1ae7e778e951d454ada76f63854de5
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-08-17 23:38:18 -05:00
SPRESENSE
76c87d2f85
net/socket: Fix nxstyle issue
2020-07-22 11:41:53 +01:00
SPRESENSE
5ee0432d6f
net/socket: Fix sanity checking of socket interface
...
No error occurs even if NULL is set in the input argument
of socket API. So added an argument check process.
2020-07-22 11:41:53 +01:00
chao.an
e7f2dc8173
net/sockopt: change the socket option style from Linux to BSD
...
Linux Programmer's Manual
...
IP(7)
...
NOTES
...
Using the SOL_IP socket options level isn't portable;
BSD-based stacks use the IPPROTO_IP level.
Change-Id: I63ea5ec7714481b5201608ec4449e522e2be3da2
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-30 18:49:58 -03:00
chao.an
d6a0da41d5
net/vfcntl: fix nxstyle warning
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-24 13:48:41 +01:00
chao.an
f56e0e004b
fs/setfd: correct the return value
...
Change-Id: I766f3760e7167a579b73673c44b70847ee06850b
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-24 13:48:41 +01: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
55d9e5f7af
net: Add SocketCAN support
2020-06-15 08:07:19 -06: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
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
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