Skip to content

Development

Dan Barrett edited this page Feb 14, 2017 · 33 revisions

Table of Contents

Prerequisites

Writing XIA Enabled Applications

Examples

Modifying XIA

Although out of date now, we presented a XIA GENI Tutorial at a GENI conference on how to add a new XID type to XIA. Although the code has changed, the general details are still correct.

Debugging

Utilities

There are a number of system utilities such as XROUTE and XNETSTAT that can be used to check the state of the system.

GDB

To build XIA with debug symbols compile with the DEBUG flag. This can be done from the top level makefile or in any of the component subdirectories.

To build all of XIA with DEBUG options

cd xia-core
make clean
DEBUG=1 ./configure
make

To build a subdirectory with DEBUG

cd dir
make clean # if necessary
make DEBUG=1
Click and the XIA daemons are started from the xianet script which makes it difficult to invoke them on the gdb command line. The easiest way to debug them is to start XIA running and then attach to the process with the XDEBUG script.
bin/xianet start

# to debug click
sudo bin/xdebug

# to debug a daemon
sudo bin/xdebug xrouted

Valgrind

To run click under valgrind, use the -g switch for xianet.

Wireshark for XIA

See the Wireshark page.

Logs

  • Log debug messages from Click to stdout in addition to syslog
bin/xianet -v start
  • Log debug messages from Click and the XIA daemons to stdout in addition to syslog
bin/xianet -V start
  • Change the log level
Allowable levels are: 0=LOG_EMERG, 1=LOG_ALERT, 2=LOG_CRIT, 3=LOG_ERR, 4=LOG_WARNING, 5=LOG_NOTICE, 6=LOG_INFO, 7=LOG_DEBUG
bin/xianet -l LEVEL start



Previous: Writing XIA Applications
Clone this wiki locally