Cisco Cisco Application Extension Platform for SRE
Cisco Application eXtension Platform 1.1 Developer Guide
Examples
113
Examples
SSH Tunnel Connection
Assuming that port 2222 is bound to the gdbserver on the virtual instance side, the following example
command establishes an SSH tunnel from workstation port 4567 to service module port 2222.
command establishes an SSH tunnel from workstation port 4567 to service module port 2222.
workstation-shell# ssh -L 4567:localhost:2222 tunnel_root@myblade -p 2022
Running GDB on the Development Workstation
This example assumes that port 4567 binds to the SSH tunnel on the workstation, as shown in the above
example code in the
example code in the
.
workstation-shell-2# gdb
(gdb) file debug
(gdb) target remote localhost:4567
(gdb)
You can use typical GDB commands such as break, continue, and step.
Examples
This section includes the following example(s):
•
•
•
Note
To return to the Table of Contents, click
GetRouterIP API: Example
Use the function GetRouterIP( ) to obtain the IP address of the Cisco IOS router. GetRouterIP( ) is
located in library /lib/libipcserviceapi.so.
located in library /lib/libipcserviceapi.so.
The following example specifies the include file of ipcServiceAPI.h in the following include statement:
#include <ipcServiceAPI.h>