blob: c9eb26721a868bf22f82899284facf9847be5694 [file] [log] [blame]
E. Scott Daniels3a2533f2020-04-22 12:40:27 -04001.if false
2==================================================================================
3 Copyright (c) 2020 Nokia
4 Copyright (c) 2020 AT&T Intellectual Property.
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17==================================================================================
18.fi
19
20
21&h2(RMR Dump xAPP)
22The RMR dump application is an example built on top of the C++ xApp framework to both
23illustrate the use of the framework, and to provide a useful diagnostic tool when
24testing and troubleshooting xApps.
25&space
26
27The RMR dump xApp isn't a traditional xApp inasmuch as its goal is to listen for message
28types and to dump information about the messages received to the TTY much as &cw(tcpdump)
29does for raw packet traffic.
30The full source code, and Makefile, are in the &cw(examples) directory of the C++ framework repo.
31&space
32
33When invoked, the RMR dump program is given one or more message types to listen for.
34A callback function is registered for each, and the framework &cw(Run()) function is invoked
35to drive the process.
36For each recognised message, and depending on the verbosity level supplied at program start,
37information about the received message(s) is written to the TTY.
38If the forwarding option, -f, is given on the command line, and an appropriate route table is
39provided, each received message is forwarded without change.
40This allows for the insertion of the RMR dump program into a flow, however if the ultimate
41receiver of a message needs to reply to that message, the reply will not reach the original
42sender, so RMR dump is not a complete "middle box" application.
43&space
44
45The following is the code for this xAPP. Several functions, which provide logic unrelated to
46the framework, have been omitted. The full code is in the framework repository.
47&half_space
48
49&space
50&indent
51.** pull in the code from the example directory
52&ex_start
53.im j=start-example ../../../examples/rmr_dump.cpp
54&ex_end
E. Scott Danielsd486a172020-07-29 12:39:54 -040055&fig_cen( Simple callback application. )
E. Scott Daniels3a2533f2020-04-22 12:40:27 -040056&uindent
57