
[ XML-ish module for message passing ]

Messages passed between Osiris modules need to be extensible.  That is, the
current message passing scheme packs and pushes structs across the network
and that is problematic when the structures change.  The solution is to
use a simple XML message passing scheme instead.

The initialize method will set the type and clear the data buffer.  There
will be only a single top level node that cooresponds to the original
message types.  The header will be a typical xml utf-8 header, for example:

<?xml version="1.0" encoding="UTF-8"?>
<start_scan>
</start_scan>

The above message has no body, just a type.  For messages with a body:

<?xml version="1.0" encoding="UTF-8"?>
<status_response>
    <config_state>2</config_state>
    <config_id>0xfeedface</config_id>
    <os_name>Darwin</os_name>
    ...
</status_response>

There are essentially two types of messages.  Messages with a body,and
messages that contain an empty body (such as start_scan, stop_scan, 
drop_config, status_request, and others).  The empty body messages are
simple to deal with because the message can be constructed with little
effort.

The messages with a body are built from a structure, or from the contents
of a file.

The >very< rough draft API:

struct OSI_MESSAGE
{
    int type;
    char buffer[1024];
}

int initialize_message( OSI_MESSAGE *msg, int type );
int get_message_type( OSI_MESSAGE *msg );

int get_message_field_value( OSI_MESSAGE *msg, int type, const char *name,
                             int name_length, char *value, int value_length );

int set_message_field_value( OSI_MESSAGE *msg, int type, const char *name,
                             int name_length, const char *value,
                             int value_length );

