Commit Graph

234 Commits

Author SHA1 Message Date
Michael Davidsaver
2702e60937 increase TCP timeout to 40 seconds 2021-01-14 18:15:30 -08:00
Michael Davidsaver
d005260017 hackAroundRTEMSSocketInterrupt 2020-11-22 11:58:33 -08:00
Michael Davidsaver
3b2261a61f Remove unused alignBuffer() and alignData() 2020-11-14 12:01:47 -08:00
Michael Davidsaver
564f19e466 handle exception in authGblInit()
Don't allow c++ exceptions to propagate to epicsThreadOnce()
2020-11-10 23:03:48 -08:00
Michael Davidsaver
3f050f3533 avoid unnecessary re-throw
"Failed to initialize UDP transport"
is not a useful error message
2020-06-06 08:01:52 -07:00
3ba6679e67 removed spaces at end of line 2020-04-15 08:17:03 -07:00
40300a12cb replaced tabs with spaces 2020-04-15 08:17:03 -07:00
Michael Davidsaver
19d868eb7d start CID, SID, and IOID from different non-zero
Help to detect situations where these IDs get mixed up
2020-04-07 13:08:55 -07:00
Michael Davidsaver
642168efe1 ipAddrToDottedIP() consistent buffer size
IPv4 + port "XXX.XXX.XXX.XXX:12345" is 4*4 + 5 + 1 == 22

rounding up to 24 for no good reason.
2020-01-16 09:22:23 -08:00
Michael Davidsaver
0fdd3a7079 bind() error msg buffer too small 2020-01-16 09:16:23 -08:00
Michael Davidsaver
135bf7265c fully fix AuthorizationRegistry race 2019-10-31 07:43:48 -07:00
Michael Davidsaver
7bc5bc2cbc fix AuthorizationRegistry race
oops.  should only prevent add/remove while iterating,
not concurrent iteration.
2019-10-10 15:12:58 -07:00
Michael Davidsaver
f81ebae455 minor log 2019-10-10 15:12:58 -07:00
Michael Davidsaver
50de6cc58e remove 3.14 compatibility 2019-08-20 15:52:56 -07:00
Michael Davidsaver
99d66750fb Merge remote-tracking branch 'md/txrxstats'
* md/txrxstats:
  stop testing against Base 3.14
  bytes tx/rx stats per socket and per Operation
2019-08-20 15:52:49 -07:00
Michael Davidsaver
a22f866211 mask warnings during shutdown()
On some target (OSX), and interrupted recv() will
return with a a spurious error (EBADF).
2019-07-24 16:08:00 -07:00
Michael Davidsaver
badf14c4fa cleanup and quiet warnings 2019-07-15 14:06:06 -07:00
Michael Davidsaver
a06c829050 bytes tx/rx stats per socket and per Operation 2019-07-15 14:06:06 -07:00
Michael Davidsaver
1e9e4bd2a8 BlockingTCPAcceptor drop unused ctor 2019-07-15 14:03:50 -07:00
Michael Davidsaver
e0dc94a91d always epicsThreadStackBig
on RTEMS at least, c++ code needs the largest standard
stack frame size.
2019-07-15 13:54:36 -07:00
Michael Davidsaver
3a8a24deb3 vxworks fix 2019-06-26 17:02:02 -07:00
Michael Davidsaver
05bf0fc453 CAPlugin handle peer NULL data 2019-06-13 10:52:24 -07:00
Michael Davidsaver
6dd1346ace further dead code 2019-05-21 08:54:14 -07:00
Michael Davidsaver
9e05b29f35 Don't clear client _outgoingIR on beacon anomaly
No reason to do this, especially w/o locking.  Outgoing used by
a TCP send thread, beacon anomaly handling on UDP receive thread.

Probably means that anomaly handling never happens...
2019-05-21 08:54:14 -07:00
Michael Davidsaver
a6e7d7f5fc Remove dead code
aliveNotification() and unresponsiveTransport() never called.
Remove these, and code only referenced through these methods.
2019-05-21 08:54:14 -07:00
Michael Davidsaver
2da60b083e Enable client sending of CMD_ECHO 2019-05-21 08:54:14 -07:00
Michael Davidsaver
111a3dde86 RX timeout
Enable idle timeout if both peers have version>=2.
2019-05-21 08:54:14 -07:00
Michael Davidsaver
79e73ab966 AbstractCodec cleanup 2019-05-21 08:54:14 -07:00
Michael Davidsaver
0f26f39b5b more de-virt getRevision() 2019-05-21 08:51:01 -07:00
Michael Davidsaver
64453e1f1a split client/server protocol version 2019-05-21 08:51:01 -07:00
Michael Davidsaver
1ea70a302b ignore protocol minor version 0
The change from 0 -> 1 included incompatible changes
to CMD_BEACON and several others.

Ignore any UDP messages (beacon or search),
and disconnect any TCP peers, with version==0.
2019-05-21 08:51:01 -07:00
Michael Davidsaver
dfeb9fd5a5 more Troubleshoot "no more data in UDP packet" 2019-05-21 08:51:00 -07:00
Michael Davidsaver
ecee708d3a redo hexDump
ludicrously inefficient (cf. toHex() ), and inflexible.
2019-05-21 08:51:00 -07:00
Michael Davidsaver
732fd1f771 Troubleshoot "no more data in UDP packet" 2019-05-21 08:45:50 -07:00
Michael Davidsaver
75befddf46 minor 2019-05-20 17:48:10 -07:00
Michael Davidsaver
3a2a3ac148 remove unused getSocketReceiveBufferSize() 2019-05-20 17:48:10 -07:00
Michael Davidsaver
0084b6e60a de-virt Transport::getRevision()
Makes clear that this is/was only for TCP,
and eliminate redundant storage.  Also apply
locking to this storage.

Use header version directly in search handler.
Correct as only UDP search is actually used atm.
2019-05-20 17:48:10 -07:00
Michael Davidsaver
32ba2f32d0 avoid deprecated ByteBuffer::getArray()
use identical, but not overloaded, getBuffer()
2019-05-19 14:09:38 -07:00
Michael Davidsaver
736e0c169a Merge branch 'auth'
* auth:
  fix osdGetRoles
  oops
  Add showauth executable
  getgrouplist() on OSX has different sig.
  auth fix mingw static
  fix search PeerInfo
  PeerInfo in pva/server.h and pva/sharedstate.h
  make PeerInfo available during search phase
  auth status void accidental success.
  minor doc
  always need to link with netapi32 now
  authorize with local group lookup
  Add osdGetRoles()
  authorization framework
  pvasr show PeerInfo
  redo security (aka. access control)
  remove asCheck

# Conflicts:
#	src/server/pv/responseHandlers.h
#	src/server/responseHandlers.cpp
2019-05-12 14:40:29 -07:00
Michael Davidsaver
a697008f13 demagic 2019-04-17 09:35:43 -07:00
Michael Davidsaver
37cb765ed5 minor log message 2019-02-19 19:58:33 -08:00
Michael Davidsaver
bdd2730315 auth status void accidental success.
The default value of _verificationStatus is reported
on auth timeout.  Make sure it isn't success.
2019-01-13 19:04:59 -08:00
Michael Davidsaver
b46e0972ea minor doc 2019-01-13 19:04:59 -08:00
Michael Davidsaver
50302d31ac authorize with local group lookup 2019-01-12 15:14:19 -08:00
Michael Davidsaver
b168c51aac Add osdGetRoles() 2019-01-12 15:14:19 -08:00
Michael Davidsaver
3209899172 authorization framework 2019-01-12 15:14:19 -08:00
Michael Davidsaver
fa484a883a redo security (aka. access control)
Break up monolithic SecurityPlugin API into three parts.

1. Authentication.
2. Authorization.
3. Access Control decision.  Left to ChannelProviders
2019-01-12 15:14:19 -08:00
Michael Davidsaver
3b4a52a360 remove usage of NoDefaultMethods 2019-01-12 12:02:25 -08:00
Michael Davidsaver
0d1ba091a2 remove unused, and un-useful, IP address utils 2019-01-12 12:02:25 -08:00
Michael Davidsaver
d48971dbb9 BlockingUDPConnector cleanup
remove unused options and arguments.  Avoid alloc.
2019-01-12 12:02:25 -08:00