ric-plt/lib/rmr.git
5 years agotest(e2e): Add return to sender app based test 67/167/1
E. Scott Daniels [Thu, 16 May 2019 17:04:34 +0000 (17:04 +0000)]
test(e2e): Add return to sender app based test

Change-Id: Idb460369c4210a614dfba961efa3a8df8f5ee51a
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agofeature(routes): Add rtable update 64/164/1
E. Scott Daniels [Wed, 15 May 2019 14:46:17 +0000 (14:46 +0000)]
feature(routes): Add rtable update

RMr now supports the ability to update entries in the route
table throught the updatert request.

Change-Id: I49c7a1875017e36359044399cf99aacc93e15dc7
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Fix bug in symtab numeric key del

Numeric key was being truncated because of an incorrect
cast (int, instead of int64_t).

Change-Id: I854a2b39e3c890a992ec390879e3a7d2418f6e53
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Add route table update test

Change-Id: I1737219cbadf15c5214a2b54d15f74225c781242
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Fix whitespace things

Change-Id: Ibd5e14ad8c7930d386e407ad92d2e903da6eac86
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agotest(unit): Fix warning in unit test script 63/163/1
E. Scott Daniels [Tue, 14 May 2019 20:07:36 +0000 (20:07 +0000)]
test(unit): Fix warning in unit test script

Eliminated error/warning message if attempt to delete .gcov
files fails when there are none to delete.

Change-Id: Ib552c3e73161ca5572d220f03498aba878a3bfc8
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agofix(rtable): Potential memory leak in rte replace 51/151/1
E. Scott Daniels [Tue, 14 May 2019 14:14:20 +0000 (14:14 +0000)]
fix(rtable): Potential memory leak in rte replace

If a route table entry was overlaid during the loading of
a new table there was a potential for leaking. Added unit
tests to better verify results of symtab cloning.

Change-Id: I6afecf52e9a48b36da3a06fa01867956a1a52261
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agofix(send): Add second key lookup if sub-id is set 44/144/2
E. Scott Daniels [Mon, 13 May 2019 17:28:39 +0000 (17:28 +0000)]
fix(send): Add second key lookup if sub-id is set

When finding an endpoint based on mtype+sub_id a second lookup
using just mtype is now performed if the mtype/sub_id combination
did not map to an endpoint.  This allows for "auto correction"
if the user application does not reset (clear) the sub_id when a
mtype should not be sent with one.

Fixed broken unit test for rmr_call()

Change-Id: I5056e3d0a477d5a4272031ad8b2046e3ffca7c8a
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agotest(unit): Skip deb check if dpkg not installed 43/143/1
E. Scott Daniels [Mon, 13 May 2019 15:06:46 +0000 (15:06 +0000)]
test(unit): Skip deb check if dpkg not installed

Some systems do not use dpkg and thus it might not be installed
by default. The unit test will not verify the .deb file after
creation if dpkg is not installed/supported by the underlying
flavour of Linux.

Change-Id: Ia28f43a09a88a4410bcbf94dd6704ea261ebbc07
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agotest(app): Support lib64 based Linix flavours 42/142/1
E. Scott Daniels [Mon, 13 May 2019 15:03:36 +0000 (15:03 +0000)]
test(app): Support lib64 based Linix flavours

Some flavours of Linux default to installing libraries
in lib64 rather than using lib as the default hardware
type and libXX as alternate architecture formats. These
changes allow the application oriented test scripts to
find the RMr libraries in the build directory regardless
of the choice of the underlying system.

Change-Id: I74aa982d7934f9c7dc7a5e86bbd1fa678c8dec61
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agofix(build): Capture lib dir info on all flavours 31/131/1
E. Scott Daniels [Thu, 9 May 2019 14:39:19 +0000 (14:39 +0000)]
fix(build): Capture lib dir info on all flavours

For some flavours of Linux (arch, alpine, SuSE) the use of
lib64 as the installation directory made it difficult to
find the nano/nng libraries during the RMr build and install
process.  This change pulls the lib dir info as the nano/nng
CMake files do and thus is able to find the libraries
without needing a specific command line -D option on these
systems.

Change-Id: I70527865a47774ab446f6924788f5b864a776156
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agoenhance(API): Add constant passthru for wrappers 16/116/1
E. Scott Daniels [Mon, 6 May 2019 20:19:59 +0000 (20:19 +0000)]
enhance(API): Add constant passthru for wrappers

Change-Id: I3c417e0b74514d1f86bc1930b507f49f0b14baab
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agoUpdate RIC message type constants 11/111/1
E. Scott Daniels [Fri, 3 May 2019 19:38:48 +0000 (19:38 +0000)]
Update RIC message type constants

Change-Id: I6879bdb0dca9171ccd1e88e34aac2829cad999e4
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agodoc(manpage): Correct typo in man page 10/110/1
E. Scott Daniels [Fri, 3 May 2019 19:24:04 +0000 (19:24 +0000)]
doc(manpage): Correct typo in man page

Change-Id: Id428e2b645d5ddf6a3fb2e5b58ccd3e52e6ad56c
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agotest(unit): Add nanomsg unit tests 03/103/3
E. Scott Daniels [Thu, 2 May 2019 17:09:35 +0000 (17:09 +0000)]
test(unit): Add nanomsg unit tests

This adds unit tests which drive the nanomsg portion of the
library. The unit test script also now merges coverage
reports so that common portions of the library do not need
to be tested by both nano and nng tests in order to show
accurate coverage information.

Change-Id: Id852d46272972f481d4f37d8a60681228b4bc0ff
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agofix(API): Add missing trace init function 01/101/1
E. Scott Daniels [Thu, 2 May 2019 15:44:16 +0000 (15:44 +0000)]
fix(API): Add missing trace init function

The trace init funciton was missing from the nanomsg support
in the library.

Change-Id: I4afae697c32e1d7eb99685f10843890fd98be73c
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agotest(unit): Fix broken unit test for rmr_call 87/87/1
E. Scott Daniels [Fri, 26 Apr 2019 12:01:54 +0000 (12:01 +0000)]
test(unit): Fix broken unit test for rmr_call

Change-Id: I62dae74a6047144f209b7de80a9d03a3f6e6d397
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agofeat(routing): Support session based routing 84/84/1
E. Scott Daniels [Tue, 23 Apr 2019 18:24:25 +0000 (18:24 +0000)]
feat(routing): Support session based routing

The session id field in a message buffer is now used
directly for routing.

Change-Id: I3634c97588b11172db964b2d06c96c317d8b8ae3
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Routing table entry changes to pick up subid

Change-Id: If08dc21aae4acaab350ba75a8854ad2f24007b03
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Fix unit test for rmr_call

It was not properly setting message type and now that RMr
ensures that invalid message type is set by default on a newly
created message this was causing unit test to fail.

Change-Id: I50f08d1038ea7fca2a070cdd949657bfbc25f3fd
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Add application level tests

Added round robin and multi group application level
test scripts.

Change-Id: Ic6aebaf3bc1edb763decc7fd0aebb09df116f20c
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
NNG based sub-id support added

Change-Id: I0d36b55bb90a315ba94c9476df88e2c7eac6c383
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Correct bug in app test script

Change-Id: I5b4a9f32aa1bc2907f320b8ad4628e0948062904
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Nano sub-id changes and unit test updates

Change-Id: Ia69f2fb33de3bbee2f33f9a4c5def779c872e52c
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change nil-sub_id key to high order key

If there is no sub-id, then the key is based only on the
message type, but to allow for a sub-id == 0 the key
when there is no subscription id must be set to
0xffffffff00000000 + msg type.

New version for deb is 1.0.19

Change-Id: I55f89d368466a0137fdea99410c76ba72e1923ab
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agodoc(code): Indent fixes and whitespace cleanup 75/75/1
E. Scott Daniels [Tue, 23 Apr 2019 12:59:28 +0000 (12:59 +0000)]
doc(code): Indent fixes and whitespace cleanup

Change-Id: I05a1cd543ba0603446244122337276028e199382
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agofix(routes): Allow RTS without specific rt entry 74/74/1
E. Scott Daniels [Mon, 22 Apr 2019 19:30:49 +0000 (19:30 +0000)]
fix(routes): Allow RTS without specific rt entry

In order to return a message to the original sender (rts) the
sender's hostname:port was required to be in the route table
for the instance.  This might not always be the case as an
application may need to send messages to another only in an RTS
capacity and not as a message type routed message. Threfore the
requirement that an application host:port be listed in the route
table for this type of relationship isn't needed.

With this change, an application will be able to call rmr_rts_msg()
for any received message regardless of whether the sender is listed
in the local route table.

Change-Id: I9ab04a874524369dc218bacade0e34f7ea13ea95
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agotest(app): Add test application base 73/73/1
E. Scott Daniels [Mon, 22 Apr 2019 17:04:10 +0000 (17:04 +0000)]
test(app): Add test application base

Added two simple test applications (a sender and receiver)
with a driver script to test RMr message passing funcitons.
These apps verify correctness of messages sent at either
high or low message rates.

Change-Id: I0b1b2c752e7c01b1b510cb44582532bc1f276901
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agofix(API): Sync the timeout specifications 72/72/1
E. Scott Daniels [Mon, 22 Apr 2019 16:51:37 +0000 (16:51 +0000)]
fix(API): Sync the timeout specifications

The timeout specification was millisecond for all but one
place in the nanomsg code.  All references are now ms.

Change-Id: I10aa4a5a51c2d9169d43cb2aa4ff7b709974b067
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agofeat(API): Add subscription id and source retrieval 67/67/5
E. Scott Daniels [Fri, 19 Apr 2019 21:12:25 +0000 (21:12 +0000)]
feat(API): Add subscription id and source retrieval

Subscription id is needed for applications which wish to route
messages based on subscription rather than message type. This
field is now available to user applications by the sub_id
field in the message.  Subscription based applications may also
need to have access to the message source, so a get source
function has been added.

Change-Id: I796392a6e3899e8f01a3292796e54e7abd56c32f
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agofeat(doc): Add trace man pages 66/66/2
E. Scott Daniels [Fri, 19 Apr 2019 19:51:41 +0000 (19:51 +0000)]
feat(doc): Add trace man pages

Change-Id: I51493fc1322ffc07e1fc9a5e9be4f7ce54c88994
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agofeat(API): Add trace data functions 64/64/2
E. Scott Daniels [Thu, 18 Apr 2019 14:01:16 +0000 (14:01 +0000)]
feat(API):  Add trace data functions

The trace data in the RMr header can now be set and
retrieved by the user programme with the new functions.

Change-Id: Ie00381d3671f906c703ca7d9048cf4a1a6d6194d
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
 Finish trace functions for nng

Change-Id: Ie7dda5d13d0d53e57347655cbb27d0fc13173d28
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
 Switch to address macro from offset

Change-Id: I560d696a7e5e743437b14d2737a3dde8d12c2aa9
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Set version manually

The CI process _should_ set a tag when the code is merged
and we will pull that tag and use it as the maj.min.patch
version.  However, the CI process is not doing this, so
we are forced to mantain the version number in the CMake
file for now.  This commit sets that version to 1.0.17.

Change-Id: I577efbd64bc0711244a1dbc1ae27eb9581b6d7d6
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
 Add trace functions for nanomsg

Change-Id: If640b7ee8a4996d8c324bbdd2cb4a85f68a3cc73
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agotest(all): Add additional log messages 63/63/1
E. Scott Daniels [Wed, 17 Apr 2019 16:31:16 +0000 (16:31 +0000)]
test(all): Add additional log messages

Change-Id: I2e5478302960d8125e961f4e1c45054b926c7597
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agotest(all): Add toplevel build and test script 56/56/1
E. Scott Daniels [Wed, 17 Apr 2019 14:53:34 +0000 (14:53 +0000)]
test(all): Add toplevel build and test script

Change-Id: Ie34a4418c8e03103ee44a25b228cadf910237f0c
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agotest(unit): Extend unit tests 53/53/1
E. Scott Daniels [Tue, 16 Apr 2019 20:47:54 +0000 (20:47 +0000)]
test(unit): Extend unit tests

Change-Id: I28148ce6ef070ad85cb80fc21f090ff47e856d79
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agofeat(msgs): Add header v2 support 52/52/1
E. Scott Daniels [Fri, 12 Apr 2019 15:14:40 +0000 (15:14 +0000)]
feat(msgs): Add header v2 support

Change-Id: Iebfb91b0b42d99e1cc54fa012d1bdfc24d7d57c2
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Nanomsg changes for v2 header

Change-Id: I2d01c346e743556b04c43db9885132ee1107c059
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Fix warning message

Change-Id: Iafa54e4701b00ba7b7e2ee88b531c66482f40d46
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Remvoe test/debug/RBF things

Change-Id: I40feef30b9622fc42299ab50b5badc558796e910
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Add tag based versioning to cmake file

Change-Id: I2a37c4cd793ff298af37898371025d1b48dd9990
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agoAdd license info to example files 48/48/1
E. Scott Daniels [Tue, 9 Apr 2019 20:40:03 +0000 (20:40 +0000)]
Add license info to example files

Change-Id: I0b4ef44bb6cc3ad55383a918949a1e2f744c2dbe
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agoFix possible allocation of 0 len buffer in rtc 47/47/2
E. Scott Daniels [Tue, 9 Apr 2019 20:25:58 +0000 (20:25 +0000)]
Fix possible allocation of 0 len buffer in rtc

It was possible for the route table collector to allocate
a zero length buffer to copy a received message into.

Change-Id: Ie270f7fe9f721661f59713eaf15500762b2b3253
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agoFix potential nil pointer error in msg allocation 45/45/1
E. Scott Daniels [Tue, 9 Apr 2019 19:59:42 +0000 (19:59 +0000)]
Fix potential nil pointer error in msg allocation

Header pointer returned by NNG function was not checked for
nil value and could result in nil pointer use.

Change-Id: Ib30c148c27a0304fe10b85fe2e9cb2a6349ca26e
Signed-off-by: E. Scott Daniels <daniels@research.att.com>
5 years agoAdded submodule information 34/34/1
Ashwin Sridharan [Thu, 4 Apr 2019 12:31:35 +0000 (08:31 -0400)]
Added submodule information

Change-Id: I2cd423a3b387990d40b8962f929dd5a89d08d181
Signed-off-by: Ashwin Sridharan <hiltunen@att.com>
5 years agoAdding submodule locations 32/32/1
Ashwin Sridharan [Thu, 4 Apr 2019 10:48:11 +0000 (06:48 -0400)]
Adding submodule locations

Change-Id: Idb0f5a70f7c570f53665972598275c4c1375d7b8
Signed-off-by: Ashwin Sridharan <hiltunen@att.com>
5 years agoInitial commit of RMR Library 30/30/1
Ashwin Sridharan [Wed, 3 Apr 2019 20:47:02 +0000 (16:47 -0400)]
Initial commit of RMR Library

Change-Id: Ic4c998b056e8759f4a47a9a8c50c77e88df0f325
Signed-off-by: Ashwin Sridharan <hiltunen@att.com>
5 years agoInitial empty repository
Andrew Grimberg [Thu, 21 Mar 2019 23:55:42 +0000 (23:55 +0000)]
Initial empty repository