Monday, June 4, 2012

Nsn - network status notifier

NSN HAS NEW WEBSITE HERE

nsn is a tool written for reporting changes in network interfaces. Nsn can be used to monitor changes in

- interfaces
- addresses
- routes
- neighbor cache
- rules

and possibly some other network stack related features.

Nsn can also be used to execute commands when state changes are observed.
Nsn is written in c, and usees netlink sockets to receive change notifications from kernel. Hence nsn is quite natural continuation to my netlink introduction post, and its sources are written so they can be used as simple netlink socket usage example.

12.09.2012 - Created version 0.2-1 which performs some checks for compatibility at compile time => does not require such state of the art kernel to compile. Also compiled against older kernel to make static binary work with older kernels.
28.08.2012 - I added version 0.2 as a downloadable tarball. It contains sources and a statically linked binary for x86. NOTE: NSN requires pretty new linux kernel to operate. You can download tarball from here:
http://xp-dev.com/svn/nsn/branches/nsn_0.2-1.tar.gz
http://xp-dev.com/svn/nsn/branches/nsn_0.2.tar.gz

nsn can be obtained from svn repository:
Trunk (constantly changing - I suggest using most recent tag for other but development purposes)and http://xp-dev.com/svn/nsn/trunk
Download with svn client by typing

svn checkout http://xp-dev.com/svn/nsn/trunk
Version 0.2http://xp-dev.com/svn/nsn/tags/0.2

Download with svn client by typing


svn checkout http://xp-dev.com/svn/nsn/tags/0.2
Version 0.1: http://xp-dev.com/svn/nsn/tags/0.1
Download with svn client by typing
svn checkout http://xp-dev.com/svn/nsn/tags/0.1

You can also try downloading static binary for x86 architecture:
http://xp-dev.com/svn/nsn/tags/0.2/bin/nsn
But this leaves you without man pages, sources and Makefile.
Compilation should be equally easy (just go to folder trunk and type make and optionally make install which generates man pages and installs binaries). NSN really depends only on librt (for getting accurate timings for events) and compilation should thus be fairly painless. In case you find any problems, just give me a nudge in comment section below =) Oh, I keep forgetting -static flag in Makefile. If you fail with linking, please try changing line

LDFLAGS=-lrt -static
to
LDFLAGS=-lrt

NOTE: This is just first development version, thus it may not be bugfree. Also there is no tags created from trunk yet, so software is subject to frequent changes. I'll update links here when first frozen version is out.
NOTE2: today 07. June 2012 I created first tag since I need to leave the trunk in non compiling state for a day or two... Sorry for premature tag mates :( I'll try to put up 0.2 as quickly as I can
NOTE3: I had forgot -static flag to 0.1 tag and it may cause problems with linking.
Man page also available online at http://maz-programmersdiary.blogspot.fi/2012/06/nsn-man-page.html

Enjoy!

2 comments:

  1. Trunk is compiling again. And most of the features for version 0.2 are in (although untested). Trunk can be found from
    http://xp-dev.com/svn/nsn/trunk

    ReplyDelete
  2. Please leave me a note if you encounter any bugs. (Mazziesaccount, gmail). Of course it would also be nice to hear if this worked for you =)

    ReplyDelete