Commit Graph

33 Commits

Author SHA1 Message Date
Andrew Tridgell ef67fa4293 AP_HAL: use SocketAPM_native 2024-01-03 12:14:47 +11:00
Andrew Tridgell cbb3e27519 AP_HAL: added SocketAPM_native
this is a varient of SocketAPM that always uses native sockets
(ie. doesn't go via AP_Networking lwip)
2024-01-03 12:14:47 +11:00
Andrew Tridgell 3d5251dfe8 AP_HAL: added inet_str_to_addr to SocketAPM 2024-01-03 12:14:47 +11:00
Andrew Tridgell 8e132e44cf AP_HAL: improved sockaddr_in compatibility 2024-01-03 12:14:47 +11:00
Andrew Tridgell e53729f331 AP_HAL: make Socket.cpp safe for lwip and SITL usage 2024-01-03 12:14:47 +11:00
Andrew Tridgell 7b5b1ba59f AP_HAL: fixed build without MSG_NOSIGNAL
for older MacOSX
2024-01-02 08:12:37 +11:00
Andrew Tridgell 9358bfce34 AP_HAL: added duplicate() in SocketAPM 2023-12-11 18:00:38 +11:00
Andrew Tridgell a77331e725 AP_HAL: mark socket as not connected on EOF
this allows lua scripts to properly detect a closed TCP connection
2023-12-11 18:00:38 +11:00
Andrew Tridgell 64d649fbcc AP_HAL: fixed SO_REUSEADDR on bind
and use MSG_NOSIGNAL to prevent pipe errors in SITL
2023-12-11 18:00:38 +11:00
Andrew Tridgell 98e8b9785c AP_HAL: added close() to SocketAPM 2023-12-11 18:00:38 +11:00
Andrew Tridgell b49152bbe6 AP_HAL: mark new accept() socket as connected 2023-12-11 18:00:38 +11:00
Andrew Tridgell 2ee48dea29 AP_HAL: support bi-directional UDP broadcast sockets 2023-11-28 12:18:55 +11:00
Andrew Tridgell a05acfc090 AP_HAL: added last_recv_address() with supplied buffer
this prevents a race condition with a static string
2023-11-28 12:18:55 +11:00
Tom Pittenger e8c852f0d4 AP_HAL: Allow APMSockets to autodetect Broadcast IPs 2023-11-25 16:28:07 -08:00
Andrew Tridgell ee592476ce AP_HAL: implement multicast for UDP sockets 2023-11-25 12:19:43 -08:00
Tom Pittenger df600e5582 AP_HAL: Enable SocketAPM to use LwIP/ChibiOS 2023-11-15 12:43:41 -08:00
Andrew Tridgell 26823b56ae AP_HAL: added connect_timeout to SocketAPM 2023-10-23 20:27:49 +11:00
Patrick José Pereira 6899c0b5af AP_HAL: Add missing const in member functions
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2021-02-03 18:45:14 +11:00
Peter Barker 24653a33ed SITL: make socket manipulation functions bool rather than void
... so callers can check if they succeeded or not
2018-12-18 08:51:01 +11:00
Peter Barker 584c5d5806 AP_HAL: Socket: add set_cloexec 2018-06-19 09:14:28 +10:00
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Gustavo Jose de Sousa 0456eccca8 AP_HAL: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:28:43 +10:00
Andrew Tridgell eca0940bc7 AP_HAL: allow for broadcast packets on UDP IPv4 2015-07-29 16:46:33 +10:00
Andrew Tridgell 3e4b0b9869 AP_HAL: added pollout() function to socket API 2015-07-29 14:19:46 +10:00
Andrew Tridgell 596ecde70d AP_HAL: added listen and accept APIs to socket API 2015-07-29 09:07:41 +10:00
Andrew Tridgell b07f7e873f AP_HAL: added pollin() interface for Socket API 2015-07-29 08:58:02 +10:00
Andrew Tridgell 5067359ed7 AP_HAL: fixed socket destructor 2015-07-29 08:39:16 +10:00
Staroselskii Georgii 1a588263e4 AP_HAL: added destructor for Socket 2015-07-29 08:34:43 +10:00
Staroselskii Georgii 4411c1fed4 AP_HAL: improved constness of Socket API 2015-07-29 08:24:24 +10:00
Andrew Tridgell 9336914598 AP_HAL: added sendto socket method 2015-05-22 16:07:44 +10:00
Andrew Tridgell be587beedc AP_HAL: disable nagle on sockets for faster local operation 2015-05-21 07:48:45 +10:00
Andrew Tridgell 414f4125de AP_HAL: use FD_CLOEXEC to prevent sockets being inherited in SITL 2015-05-11 08:05:51 +10:00
Andrew Tridgell 08b9ed3342 AP_HAL: added socket handling class 2015-05-05 21:34:19 +10:00