Skip to content

Development

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

Table of Contents

Prerequisites

Useful Information

Writing XIA Enabled Applications

Modifying XIA

Extending XIA via adding new principal types is one of its core features.

Although the code it is based on is out of date now, we presented a tutorial at GEC 21 in 2014 on how to add a new XID type to XIA. Although the code has changed, the general details are still correct.

This poster presentation on XIA as a research platform from the same conference presents an overview of the philosophy behind principal types.

TODO: What do we want to say about modifying the XIA system code?

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. If set at configuration time, the DEBUG flag will be the default setting for all future invocations of make.

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 desired process with the XDEBUG script.
xianet start

# to debug click
sudo xdebug

# to debug a daemon
sudo 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
xianet -v start
  • Log debug messages from Click and the XIA daemons to stdout in addition to syslog
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
  • Change the log level at runtime with the XLOG utility.
xlog -v -l LEVEL
Clone this wiki locally