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 set of pkgconf package definition files are provided in the $MSG_DIR/lib/pkgconfig subdirectory. These files can be used to compile/link a program with gcc as follows:

$ gcc -o myprogram myprogram.c `pkgconf --with-path=$MSG_DIR/lib/pkgconfig --cflags --libs cmsg`