E. Scott Daniels | 3a2533f | 2020-04-22 12:40:27 -0400 | [diff] [blame] | 1 | .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) |
| 22 | The RMR dump application is an example built on top of the C++ xApp framework to both |
| 23 | illustrate the use of the framework, and to provide a useful diagnostic tool when |
| 24 | testing and troubleshooting xApps. |
| 25 | &space |
| 26 | |
| 27 | The RMR dump xApp isn't a traditional xApp inasmuch as its goal is to listen for message |
| 28 | types and to dump information about the messages received to the TTY much as &cw(tcpdump) |
| 29 | does for raw packet traffic. |
| 30 | The full source code, and Makefile, are in the &cw(examples) directory of the C++ framework repo. |
| 31 | &space |
| 32 | |
| 33 | When invoked, the RMR dump program is given one or more message types to listen for. |
| 34 | A callback function is registered for each, and the framework &cw(Run()) function is invoked |
| 35 | to drive the process. |
| 36 | For each recognised message, and depending on the verbosity level supplied at program start, |
| 37 | information about the received message(s) is written to the TTY. |
| 38 | If the forwarding option, -f, is given on the command line, and an appropriate route table is |
| 39 | provided, each received message is forwarded without change. |
| 40 | This allows for the insertion of the RMR dump program into a flow, however if the ultimate |
| 41 | receiver of a message needs to reply to that message, the reply will not reach the original |
| 42 | sender, so RMR dump is not a complete "middle box" application. |
| 43 | &space |
| 44 | |
| 45 | The following is the code for this xAPP. Several functions, which provide logic unrelated to |
| 46 | the 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 Daniels | d486a17 | 2020-07-29 12:39:54 -0400 | [diff] [blame] | 55 | &fig_cen( Simple callback application. ) |
E. Scott Daniels | 3a2533f | 2020-04-22 12:40:27 -0400 | [diff] [blame] | 56 | &uindent |
| 57 | |