Commit Graph

105 Commits

Author SHA1 Message Date
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
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
3fa1e83b55 avoid redundant sockaddr -> string 2019-04-17 09:35:43 -07:00
Michael Davidsaver
22622e91a9 server: detect duplicate channelCreated() calls 2019-02-19 19:58:13 -08:00
Michael Davidsaver
c5fe16eff2 fix search PeerInfo 2019-02-19 19:54:42 -08:00
Michael Davidsaver
d8f9ef2557 make PeerInfo available during search phase 2019-01-29 19:59:53 -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
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