Skip to content
network message encapsulation library
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
debian New release 0.13.2-1 changelog entries. Feb 1, 2018
doc fix spelling typo Feb 23, 2017
examples examples/nmsg-dnsqr2pcap: Also dump ICMP and TCP packets Apr 28, 2016
fltmod nmsg_flt_sample: sample_module_init(): Add _nmsg_dprintf()'s for pars… Jan 12, 2016
libmy Merge ../libmy into next Sep 18, 2015
m4 use my_PKG_CONFIG_FILES Aug 13, 2014
nmsg Use field length when formatting string fields for presentation output. Nov 2, 2017
src Update copyright notices for files touched by #46 (c4d5d43) Feb 12, 2016
tests Fix directory path in string-tests script. Nov 2, 2017
.gitignore Make nmsgtool man page installation more consistent. Feb 7, 2017
.travis.yml on linux use next branch for the protobuf-c dependency for the Travis CI Oct 24, 2017
COPYRIGHT COPYRIGHT, debian/copyright: 2016 Feb 2, 2016
ChangeLog Update ChangeLog and version for release 0.13.2 Jan 30, 2018
LICENSE update copyright and license statements Nov 22, 2013
Makefile.am Rename empty-string-tests to string-tests, because we have nonempty c… Nov 2, 2017
README.FILTERS.md README.FILTERS.md: New (based on pull request description) Feb 2, 2016
README.md README: Update debian installation link to current location. Feb 7, 2017
autogen.sh bootstrap -> autogen.sh Nov 26, 2013
configure.ac Update ChangeLog and version for release 0.13.2 Jan 30, 2018
makedist makedist: bootstrap -> autogen.sh, use 'make distcheck' instead of 'm… Nov 30, 2013

README.md

Build Status

Farsight nmsg

Contact information

Questions about libnmsg, nmsgtool, pynmsg, the development of libnmsg client programs or language bindings, or the NMSG binary protocol should be directed to the nmsg-dev mailing list:

https://lists.farsightsecurity.com/mailman/listinfo/nmsg-dev

Building and installing nmsg

nmsg has the following external dependencies:

On Debian systems, the following packages should be installed, if available:

pkg-config libpcap0.8-dev libprotobuf-c-dev protobuf-c-compiler libxs-dev libyajl-dev zlib1g-dev

Note that on Debian systems, binary packages of nmsg and its dependencies are available from a Debian package repository maintained by Farsight Security. These packages should be used in preference to building from source on Debian-based systems.

On FreeBSD systems, the following ports should be installed, if available:

devel/libxs
devel/yajl
devel/pkgconf
devel/protobuf
devel/protobuf-c

Note that nmsg >= 0.9.0 has been designed to use the 1.x release series of protobuf-c, while previous releases of nmsg were designed to use the 0.x release series of protobuf-c. Make sure you have the correct version of protobuf-c installed before attempting to build nmsg.

After satisfying the prerequisites, ./configure && make && make install should compile and install libnmsg and nmsgtool to /usr/local. If building from a git checkout, run the ./autogen.sh command first to generate the configure script.

Support for libxs can be disabled by passing the --without-libxs parameter to the configure script.

Support for yajl can be disabled by passing the --without-yajl parameter to the configure script.

The documentation for the libnmsg API is located in the doc/doxygen/html directory. To rebuild the API documentation, run make html. This requires Doxygen to be installed.

The manpage documentation is built using DocBook 5, DocBook XSL, and xsltproc. git checkouts do not include the built manpages, but tarball releases do. To build the documentation on Debian systems, the following packages should be installed:

docbook5-xml docbook-xsl-ns xsltproc

Building external modules

nmsg can be extended at runtime with new message types by installing message modules into the libnmsg module directory, which defaults to $PREFIX/lib/nmsg. This location is configurable by passing the --with-plugindir parameter to the configure script.

Message module plugins are .so files which export either a symbol named nmsg_msgmod_ctx or a symbol named nmsg_msgmod_ctx_array. If nmsg_msgmod_ctx is exported, it is an object of type struct nmsg_msgmod_plugin. Otherwise, if nmsg_msgmod_ctx_array is exported, it is a NULL-terminated array of pointers to struct nmsg_msgmod_plugin's. See nmsg/msgmod_plugin.h for details about developing plugins using the message module plugin interface.

nmsg as of version 0.11.0 supports filter modules, which can be loaded by nmsgtool or the nmsg_io_add_filter_module() API call. Filter module plugins are .so files which export a symbol named nmsg_fltmod_plugin_export. See nmsg/fltmod_plugin.h for details about developing plugins using the filter module plugin interface.

nmsg itself ships with a message module and a filter module. See the Message modules and Filter modules sections in Makefile.am for examples of using Automake to build nmsg modules. Also see sie-nmsg for an example of an external message module, and for general information on building plugins using Autotools see the Autotools Mythbuster documentation.

Examples

C language examples are in the examples/ directory.

You can’t perform that action at this time.