C Interface
The C interface is provided through the cmsg.h
header file,
which defines typedefs, enums and functions.
API Specification
Compiling/Linking
Headers for the C interface are provided in the header file
$MSG_DIR/include/cmsg.h
, and executables should be linked
against $MSG_DIR/lib/libcmsg.so
(Linux) or
$MSG_DIR/lib/libcmsg.dylib
(MacOS). To simplify this process,
a script $MSG_DIR/scripts/cmsg_link
is provided that writes
the appropriate linker commands to standard output. This script can be
used to compile/link a program with gcc as follows:
gcc -o myprogram myprogram.c -I $MSG_DIR/include `$MSG_DIR/scripts/cmsg_link`