Skip to content

Development

Dan Barrett edited this page Mar 13, 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. Even though XIA has grown since then, 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.

Diagrams


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

Click and the XIA daemons log to /var/log/syslog at LOG_ERR level by default. This can be changed at startup time. Logging from click can be modified at run time as well.

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 (for click only, not the daemons) at runtime with the XLOG utility.

xlog -v -l LEVEL