Commit Graph

743 Commits

Author SHA1 Message Date
Michael Davidsaver a372d936e8 add server to client remote logging 2025-06-11 15:32:47 -07:00
Michael Davidsaver 839fc01bfd fix Source::Search::source() IPv6 representation 2025-06-11 15:32:47 -07:00
Michael Davidsaver b8a4001c58 GetAddrInfo wrapper always numeric 2025-06-11 15:32:47 -07:00
Michael Davidsaver 190eb8750f update local mcast hack logic to sendmsg()
Better test of whether received packet was forwarded,
based on OS provided meta-data instead of peer provided
unicast flag.

Also use ORIGIN_TAG (original destination) address as
UDP source address if a local interface address.
2025-06-11 15:32:47 -07:00
Michael Davidsaver a464e9a6eb redesign IfaceMap
Switch to periodic poll on dedicated worker thread
instead of opportunistic poll on use.
2025-06-11 15:32:47 -07:00
Michael Davidsaver 25f5f1dcee IfaceMap add look up index by address, and loopback by index 2025-06-11 15:32:47 -07:00
Michael Davidsaver 80c63888ed add sendtox
wrapper sendmsg() and WSASendMsg()

Linux and Windows support IPv4 IP_PKTINFO.
BSD, Linux, and Windows support IPV6_PKTINFO

So far RTEMS and OSX, the extra sendto() overrides
will be ignored.
2025-06-11 15:32:47 -07:00
Michael Davidsaver a2b424cba2 increase max UDP packet batch size 2025-06-11 15:32:47 -07:00
Michael Davidsaver e30640a6f9 always "bind" to iface bcast when not any
Since we always bind() the wildcards, the OS specific
oddifies wrt. bind() to interface addresses/bcast address
do not apply.  So always register interest in associated
broadcast addresses.
2025-06-11 15:32:47 -07:00
Michael Davidsaver b0b8d60656 rename generated CONFIG_SITE to TOOLCHAIN
No longer generate CONFIG_SITE.Common.$(T_A),
which should never be generated...
2025-06-11 15:32:47 -07:00
Michael Davidsaver 66788f5107 minor 2025-06-11 15:32:47 -07:00
Michael Davidsaver edcc21bca3 quiet clang warning
triggers -Wtautological-constant-compare
2025-04-15 14:33:23 -07:00
Michael Davidsaver 91fed88cdd "Beacon tx error" show destination 2025-03-31 13:55:19 -07:00
Joao Paulo Martins 542e0fe9f0 Changed Float32 and Float64 to Float32A and Float64A in the NTNDArray TypeDef 2025-03-31 00:11:08 -04:00
Michael Davidsaver 49c9d82053 drop unused IfaceMap 2025-02-12 17:48:18 -08:00
Michael Davidsaver c870415908 fix formatting of uint8 and int8 fields
where being rendered as 'char'
2025-01-30 12:34:01 -08:00
Michael Davidsaver ff1d6510cb reduce Search tx log spam
eg. if an interface disappears.
2025-01-19 12:07:40 -08:00
Michael Davidsaver c3e91f60be client: defer notification of connect() failure
... to bevEvent() callback to handle early failure
the same as later disconnect.
2024-12-22 16:55:58 -05:00
Michael Davidsaver a7d761d507 fix spelling 2024-10-13 17:38:28 -07:00
Anze Zagar 92d519702f client: search retry step reset on channel reconnection (fixes epics-base/pvxs#84) 2024-10-01 08:28:53 -07:00
Michael Davidsaver a3a685ba2b server: correctly adjudicate collision bind() of specific port
On Linux (at least) SO_REUSEADDR, which allows a new listener to
bind while an existing sock is in FIN-WAIT.  Apparently this allows
any number of sockets to bind(), but only when listen() to succeed.

Further, on Linux there is a known documented race condition which
can result in all listen() failing.  It isn't clear how to handle
this case without a potentially infinite loop, so ignore it.
If this happens, then eg. no PVA server will get port 5075.

So when probing for another listener, it is necessary to enter the
listening state.  When this fails, the socket is no longer usable
for another bind(), so it is necessary to allocate another for the
next attempt.
2024-08-14 17:53:36 -07:00
Michael Davidsaver 330097b7d4 cache_sync() copy Any/Union
Delta may be later be changed by user code,
so copy to ensure cache is not modified.

cf. 92fb0a4afa
2024-08-01 15:46:31 -07:00
Michael Davidsaver bc6d3cc6b5 doc 2024-07-31 21:47:08 -07:00
Michael Davidsaver 9b77c061b0 Timeout exception should say "Timeout" 2024-04-22 07:55:13 -07:00
Michael Davidsaver 4bd884719e Workaround TCP_NODELAY error on winsock
Apparently winsock does not like setsockopt()
concurrently to async connect().  So delay
NODELAY until after connected.
2024-03-29 15:31:53 -07:00
Michael Davidsaver 615e49a978 doc 2024-03-29 15:25:54 -07:00
Michael Davidsaver c2e5fdca55 client: avoid FD leak on failed connect()
Async connect() can fail immediately in some cases.
2024-02-22 09:48:21 -08:00
Michael Davidsaver 7e6463c200 codespell 2023-11-21 12:20:34 -08:00
Michael Davidsaver be7fab5192 server: explicit move ctor
The default seems to copy the shared_ptr member?
2023-11-20 10:59:44 -08:00
Michael Davidsaver b8f42dc0e7 optimize (slight) string serialization
w/ memcpy()
2023-11-11 08:15:12 -08:00
Michael Davidsaver 87322ef64c disambiguate Size from Selector 2023-11-11 08:15:12 -08:00
Michael Davidsaver a6b3eb58bd add missing check on invalid Union[] selector 2023-11-11 08:15:12 -08:00
Michael Davidsaver 17464a117a disallow "null" size by default
pvDataCPP only explicitly checks for "null" size (-1)
for Union, where it indicates the implicit "null" arm.
Also string, where "null" is equivalent to zero length string.
2023-11-08 16:18:20 -08:00
Michael Davidsaver 2a56a08516 set TCP_NODELAY
Turns out, this can make a difference in some situations.
2023-11-07 14:08:56 -08:00
Michael Davidsaver 28f785db6f server: minor 2023-10-23 16:51:35 -07:00
Michael Davidsaver 9b55ff33be minor logging 2023-10-16 12:20:57 -07:00
Michael Davidsaver a9eea922b5 Relax when assigning struct[] or union[] of similar
Attempt copy with partial assignment.
2023-10-03 20:45:28 -07:00
Michael Davidsaver 7211143b10 server: relax post() after finish()
ignore re-finish()
2023-10-03 20:43:41 -07:00
Michael Davidsaver 9b099be0d8 server: release bound callbacks on cleanup()
The now Dead Op may still be held by user code.
Ensure that cleanup() leaves that Op in a state
where it can be safely dtor()ed from any thread.
2023-10-03 20:43:41 -07:00
Michael Davidsaver c4327022c9 server: make MonitorOp::doReply() static
avoids need for shared_from_this().
2023-10-03 20:43:41 -07:00
Michael Davidsaver e09f901e72 client: fix _reExecPut() allowed for .get()
copy+paste...
2023-10-01 19:56:42 -07:00
Michael Davidsaver d8f7de8c8c client: GET yield complete 2023-09-25 18:50:26 -07:00
Michael Davidsaver 8acd4fa5ea client: consolidate cache_sync() 2023-09-25 18:50:26 -07:00
Michael Davidsaver de63ec4496 doc 2023-09-12 19:30:27 +02:00
Michael Davidsaver 68cc69b984 client: propagate exception during early op. setup 2023-09-11 10:37:00 +02:00
Michael Davidsaver f20d958c46 client: avoid assert() with invalid forceServer
op->chan may not be set if Channel::build() throws.
eg. if forced server name is invalid for connect().
2023-09-11 10:37:00 +02:00
Michael Davidsaver 0274358453 1.2.3
PVXS Python / win64 3.10 (push) Failing after 1s
PVXS Python / win64 3.11 (push) Failing after 1s
PVXS Python / win64 3.5 (push) Failing after 1s
PVXS Python / win64 3.6 (push) Failing after 1s
PVXS Python / win64 3.7 (push) Failing after 1s
PVXS Python / win64 3.8 (push) Failing after 1s
PVXS Python / win64 3.9 (push) Failing after 1s
PVXS EPICS / Native Linux with 3.14 (push) Failing after 2s
PVXS EPICS / Native Linux with 3.15 (push) Failing after 2s
PVXS EPICS / Native Linux with clang (push) Failing after 1s
PVXS EPICS / Native Linux (libc++ debug) (push) Failing after 2s
PVXS EPICS / Native Linux (WError) (push) Failing after 1s
PVXS EPICS / Native Linux (c++17) (push) Failing after 2s
PVXS EPICS / Native Linux with libevent stable (push) Failing after 1s
PVXS EPICS / Cross mingw64 DLL (push) Failing after 2s
PVXS EPICS / Cross mingw64 static (push) Failing after 2s
PVXS EPICS / Native Linux with 7.0.2 (push) Failing after 2s
PVXS EPICS / Linux centos 7 (push) Failing after 1s
PVXS EPICS / Linux fedora latest (push) Failing after 2s
PVXS Python / linux64 test (push) Failing after 1s
PVXS Python / linux 2.7 i686 (push) Failing after 7s
PVXS Python / linux 2.7u i686 (push) Failing after 7s
PVXS Python / linux 3.5 i686 (push) Failing after 7s
PVXS Python / linux 3.6 i686 (push) Failing after 7s
PVXS Python / linux 3.7 i686 (push) Failing after 7s
PVXS Python / linux 3.8 i686 (push) Failing after 7s
PVXS Python / linux 3.9 i686 (push) Failing after 7s
PVXS Python / linux 2.7 amd64 (push) Failing after 7s
PVXS Python / linux 2.7u amd64 (push) Failing after 7s
PVXS Python / linux 3.5 amd64 (push) Failing after 7s
PVXS Python / linux 3.6 amd64 (push) Failing after 7s
PVXS Python / linux 3.7 amd64 (push) Failing after 7s
PVXS Python / linux 3.8 amd64 (push) Failing after 7s
PVXS Python / linux 3.9 amd64 (push) Failing after 7s
PVXS Python / linux 3.10 amd64 (push) Failing after 7s
PVXS Python / linux 3.11 amd64 (push) Failing after 7s
PVXS EPICS / OSX (push) Cancelled after 0s
PVXS EPICS / RTEMS5 (push) Cancelled after 0s
PVXS EPICS / vs2019 DLL (push) Cancelled after 0s
PVXS EPICS / vs2019 static (push) Cancelled after 0s
PVXS Python / osx 3.10 intel (push) Cancelled after 0s
PVXS Python / osx 3.11 intel (push) Cancelled after 0s
PVXS Python / osx 3.6 intel (push) Cancelled after 0s
PVXS Python / osx 3.7 intel (push) Cancelled after 0s
PVXS Python / osx 3.8 intel (push) Cancelled after 0s
PVXS Python / osx 3.9 intel (push) Cancelled after 0s
2023-09-07 09:33:42 +02:00
Michael Davidsaver 9a50df3163 NTTable helper actually claim to be NTTable... 2023-09-06 14:30:45 +02:00
Michael Davidsaver e9ecf7e8dd missing copyright boilerplate 2023-09-06 14:30:45 +02:00
Michael Davidsaver d7e49605cc threadOnce further reduce boilerplate
also latch failure
2023-09-04 16:17:25 +02:00