Commit Graph

96 Commits

Author SHA1 Message Date
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
13cac5f4cc remove asCheck
This interface will be removed.
2019-01-12 14:31:19 -08:00
Michael Davidsaver
f84774e3ec PVA server earlier check of monitor window
Check window size before attemting poll() as apparently
"spurious" send() is possible.
2018-10-22 14:07:22 -07:00
Michael Davidsaver
3f85f7c2ad cleanup 2018-10-22 10:04:57 -07:00
Michael Davidsaver
ac9ebc47ba improper use of rand() w/o RAND_MAX
... with an extra dose of integer modulo thrown in.
2018-10-18 15:18:00 -07:00
Michael Davidsaver
9de8676a6f pvlist debugging 2018-10-18 15:18:00 -07:00
Michael Davidsaver
542d51a215 RPC troubleshooting
something funny is going on
2018-10-03 23:41:30 -07:00
Michael Davidsaver
2fec84461d use of CMD_* instead of magic numbers 2018-10-02 12:52:24 -07:00
Michael Davidsaver
a1a2e71ecc fix ServerCancelRequestHandler::handleResponse
Thus far this has been dead code as ServerChannel::getRequest()
returned a Destroyable which was actually a BaseChannelRequester
sub-class, not a ChannelRequest sub-class.
2018-06-29 16:22:56 -07:00
Michael Davidsaver
3ffbf9c597 ServerChannel::_requests holds BaseChannelRequester
Make it a bit more obvious that things are backwards here.
2018-06-29 16:22:56 -07:00
Michael Davidsaver
1e04c91d3c Server window fix clear
A leftover from when window_t held MonitorElement::Ref
which it no longer does.
2018-06-26 11:56:51 -07:00
Michael Davidsaver
c0126d9a1c server: pipeline=true windowing
Implement flow control windows in the server itself,
so that this applies to all Monitor.

Then the reportRemoteQueueStatus() callback is only needed
to deliver the initial window update.

This is done by not calling Monitor::release() immediately
when pipeline=true.  Rather, hold onto MonitorElement s
until an ack is received.

Also addresses a race with clearing _channelMonitor
vs. having send() queued at/after destroy().
2018-06-26 11:23:50 -07:00
Michael Davidsaver
656e2fcfd4 PVA server avoid possible data race
The operation member variable is set by from the
returned pointer, and within the *Connect callback.
Make sure these down race.
2018-06-26 11:23:50 -07:00
Michael Davidsaver
e08de8c2df detect Structure caching error
The assert in the client side copy is hit during
some kind of failure to keep the Field cache
up to date.
2018-06-22 13:28:49 -07:00
Michael Davidsaver
12e7b7864b fix s_channelNameToProvider hack
Move from global to ServerContext, apply lock, and
properly test if no provider has claimed, eg an attempt
at unadvertised PV (still wouldn't work, but at least
wouldn't crash).
2018-05-18 17:04:07 -07:00
Michael Davidsaver
7a523dd948 drop unused NOMINMAX 2018-05-18 15:20:26 -07:00
Michael Davidsaver
ba41fa6d62 notes 2018-05-18 15:17:27 -07:00
Michael Davidsaver
6ccca1ce58 const-ify string constants
yes really...
2018-05-18 10:12:34 -07:00
Michael Davidsaver
6abfe9d196 server: cleanup handling of vector of providers
avoid keeping extra refs.  situation is confusing
enough as it is.
2018-05-18 08:53:52 -07:00
Michael Davidsaver
3b53e81f2f avoid destroy() w/ lock 2018-03-22 13:39:04 -07:00
Michael Davidsaver
e9cc8298a6 server monitor cleanup
ServerMonitorRequesterImpl::getChannelMonitor()
seems like no possibility of deadlock atm.
2018-03-22 13:34:55 -07:00
Michael Davidsaver
909cef9200 minor 2018-02-21 11:19:58 -08:00
Michael Davidsaver
9b828852c0 Transport::getRemoteAddress() return reference
make it clear that result is always !NULL
2018-02-01 19:09:44 -08:00
Michael Davidsaver
0161799c93 must zero osiSockAddr prior to use!
RTEMS depends on this or eg. bind()
will fail because comparison with
list of interface addresses is done
with memcmp()!
2017-11-28 17:54:25 -06:00
Michael Davidsaver
3b565d0c56 server GetField ensure no duplicate reply 2017-11-06 16:48:34 -06:00
Michael Davidsaver
c469d49ecb server: keep most recent GetFieldRequester alive 2017-11-06 16:27:43 -06:00
Michael Davidsaver
0ec4e16373 skip unnecessary static_pointer_casts 2017-11-06 16:12:13 -06:00
Michael Davidsaver
073c77b1ef consolidate ServerChannel and ServerChannelImpl
"interface" with a single implementation.
combine and de-virtualize.
2017-11-06 15:14:41 -06:00
Michael Davidsaver
5f78671b36 compose ServerResponseHandler 2017-11-06 14:47:10 -06:00
Michael Davidsaver
1d7f15de25 combine AbstractResponseHandler and ResponseHandler 2017-11-06 14:27:46 -06:00
Michael Davidsaver
3071a06000 cleanup server response handlers
avoid unnecessary dynamic_cast and ref. counter activity
2017-11-06 14:07:02 -06:00
Michael Davidsaver
aaef110507 eliminate ChannelHostingTransport
an "interface" used once.  Drop it and de-virtualize.
2017-11-06 13:41:58 -06:00
Michael Davidsaver
49173ec884 disable pvAccessMB and unused ref-counting boilerplate 2017-11-05 16:54:10 -06:00
Michael Davidsaver
5e900b1f11 remove super abstract authNZInitialize(void*)
with separate client and server calls.

Still dynamic_cast ugliness as Transport and Codec
hierarchies don't have a common root.
2017-11-05 16:41:59 -06:00
Michael Davidsaver
5137b90f56 minor client message handling
avoid unnecessary dynamic_cast
2017-09-06 13:49:24 -05:00
Michael Davidsaver
8cf56711fd pva server: keep ChannelRequester alive 2017-07-14 13:36:48 +02:00
Michael Davidsaver
8a35fbb11e reduce the number of public symbols 2017-06-26 20:17:18 +02:00
Michael Davidsaver
49c3541204 minor 2017-06-26 16:41:14 +02:00
Michael Davidsaver
7ccd8df02f PipelineMonitor -> Monitor
collapse PipelineMonitor into Monitor

no-op virtual call is probably less work than
dynamic_cast.
2017-06-22 13:09:42 +02:00
Michael Davidsaver
33e842db2e boilerplate reduction 2017-06-08 16:23:15 +02:00
Michael Davidsaver
ce25f0b175 ServerContext ref. loop breaking and threading
Drop unnecessary "worker" thread which does no work.
Ensure that returned shared_ptr is unique()==true.

Add ServerContext::create() to start a new server
with specific config and/or providers
2017-05-31 11:40:51 +02:00
Michael Davidsaver
277e5c33fb privatize some API details
hide a number of APIs which should not
be public APIs.
2017-05-30 17:12:31 +02:00
Michael Davidsaver
b05e7699b5 remove no-op lock/unlock from Lock sub-classes 2017-05-24 17:20:17 -04:00
Michael Davidsaver
4a9d79f019 sockAddrToA -> sockAddrToDottedIP
Avoid blocking host name lookup for debug log messages.
Can cause long delays when DNS not available.
2017-04-15 11:48:24 -04:00
Andrew Johnson
0ad8ece840 Define and use GETPID() macro 2016-04-06 15:19:35 -05:00
Andrew Johnson
12d68fe209 Add epicsExportSharedSymbols, move some includes 2016-04-06 10:59:22 -05:00
Matej Sekoranja
85e881fbcd send udp transport initialization order, search response broadcast transport null check
closes #39
2016-03-23 21:10:04 +01:00
Matej Sekoranja
5279d247ca general indent beautification 2016-03-10 23:36:16 +01:00
Matej Sekoranja
56b6279035 manual merge 2016-03-02 13:34:05 +01:00
Matej Sekoranja
1ca3918afa local multicast reimplemented 2016-03-01 12:11:25 +01:00