Skip to content

lp48280421/snetmanmon

 
 

Repository files navigation

snetmanmon

A simple network manager and monitor for Linux

(C) 2015 Alexander Holler

See the file LICENSE for the license.


snetmanmon is a simple alternative to ifupdown, ifplugd, networkmanager,
connman and similiar tools, which all lacked some functionality I wanted.


In particular it makes it possible to not only react on (dis)appearing
interfaces, but also on (dis)appearing IPs and (dis)appearing routes,
besides the possibility to do actions based on the MAC of an interface
too.

Furthermore it's a tool to keep track (logging) of changes in regard
to interfaces, IP addresses and routes on a machine. Something which
becomes more important in times of virtual machines, containers and
software-defined networking (SDN) and which isn't supported by the
tools above.

That means if you want to log the (dis)appearance of interfaces,
IP addresses and routes on your machine, this tool might be your
choice.

But it also gives the possibility to do almost anything else if
a network interface, an IP or route (dis)appears. E.g. if you want to
start a DHCP-client if a WLAN dongle with a MAC a:b:c:d:e:f will be
attached to your system and furthermore you want to start a
NTP-client only if the IP i.j.k.m (or i::*) appears on interface
ethN, this is easy possible to do with snetmanmon too. In short,
if you have a ThingOfInternets (ToI) instead of an IoT,
snetmanmon might be the right tool too.

Have a look at the file snetmanmon.conf.full_example for
documentation and a look at ipv6_rpc.txt for a creative usage example.

Why is it called simple? Because it almost doesn't do any actions
itself. E.g. It doesn't configure network interfaces nor does it
do DHCP by itself, but instead relies on whatever tool the user
prefers to accomplish such actions. This is in line with the old
comcept on Unix systems of "Do One Thing and Do It Well". So,
hopefully, snetmanmon does it well too.

Describing how it works is simple too: snetmanmon listens for rtnetlink
messages generated by the kernel and maintains an internal database of
interfaces, IPs and routes in order to consolidate and extend the
rtnetlink messages it received from the kernel for usage as consistent
events in userspace.


To build snetmanmon, call

	cmake -DCMAKE_BUILD_TYPE=release
	make

Afterwards you just can call it with

	./snetmanmon snetmanmon.conf.simple_example

to test it (no special privileges are needed and nothing else will
be executed).


To build a package for Debian (tested with 8.0 (Jessie)), you need to
install the packages build-essential, cmake, debhelper, libboost-dev,
libboost-regex-dev and libboost-system-dev. Afterwards just call

	dpkg-buildpackage -us -uc


If you're missing features or want support, please keep in mind that
the author built snetmanmon only to fulfill his own needs and that
he doesn't care much for anything else (anymore) if it isn't payed.


PS: If you're working for Google or if you are a Google employee,
and you want to use this tool, please give the autor a call so that
he can make a quiz (have some fun) *with you* in order to test if
you qualify as an user.
The idea was actually to add this as an exception to the license, but
unfortunately that would disqualify the license in regard to some
rules for open source licenses.

About

A simple network manager and monitor for Linux

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 90.7%
  • Shell 5.5%
  • CMake 3.8%