Commit Graph

12 Commits

Author SHA1 Message Date
Daniel K. O.
1b412d2769
wutsocket fixes: select() handles timeout wrong, and poll() lacks a safety check (#428)
Some checks failed
C/C++ CI / ubuntu-latest (push) Has been cancelled
* - Fix select() to also update the fd_set arguments on timeout condition.
- Move the nfds argument restriction to the nsysnet side.
- Allow user-defined FD_SETSIZE, since newlib's fd_set allow custom sizes.
- Define __socklen_t_defined when socklen_t is typedefed.

* Added safety check for poll(): the nsysnet fd must fit in nsysnet_fd_set.

---------

Co-authored-by: Daniel K. O. (dkosmari) <none@none>
2025-10-10 20:27:42 +02:00
GaryOderNichts
2c98cc91aa Run clang-format
Some checks failed
C/C++ CI / ubuntu-latest (push) Has been cancelled
`find . -regex '.*\.\(cpp\|hpp\|cu\|cuh\|c\|h\)' -exec clang-format -style=file -i {} \;`
2025-06-05 11:06:04 +01:00
GaryOderNichts
2b66122422 Add .clang-format
Co-authored-by: Maschell <Maschell@gmx.de>
2025-06-05 11:06:04 +01:00
GaryOderNichts
1bbdc75f27 wutsocket/ioctl: Remove unimplemented requests
Some checks failed
C/C++ CI / ubuntu-latest (push) Has been cancelled
2025-05-16 22:13:22 +02:00
GaryOderNichts
af0ccf48b7
nn_nets2: Add somemopt (#338) 2023-11-30 12:22:49 +01:00
GaryOderNichts
922eb4583e wutsocket: allow sending multicasts 2023-10-17 23:01:41 +02:00
fincs
eb0306184d
wutsocket: Revise automatic initialization, see details:
- __init/fini_wut_socket have been simplified and are now weak,
  this is intended to allow users to customize their behaviour
- socket_lib_init/exit have been restored as regular imports and are
  no longer using RPLWRAP
- __wut_socket_init/fini_devoptab are now exposed as global symbols,
  intended to be used in custom socket init/deinit logic
2021-09-18 16:57:29 +02:00
GaryOderNichts
d0dc9869e5 wutsocket: avoid aliasing issues 2021-03-07 16:40:55 +01:00
GaryOderNichts
174b0c0a86 wutsocket: implement gethostid and gethostname 2021-03-07 16:40:55 +01:00
GaryOderNichts
f1e9cbd58a wutsocket: implement missing functions 2021-03-07 16:40:55 +01:00
fincs
efc1bd47ff
wutsocket: only link in networking layer if actually used 2021-03-07 13:36:59 +01:00
rw-r-r-0644
c377cffe13
Network socket changes (#136) 2021-03-07 13:09:12 +01:00