NetworkManager provides a detailed and capable D-Bus interface on the system bus. You can use this interface to query NetworkManager about the overall state of the network and details of network devices like current IP addresses or DHCP options, and to activate and deactivate network connections. A network connection is a bundle of settings that describe a connection to a particular computer network, like a specific mobile broadband provider or a single wifi network. These connections are provided by other D-Bus services, called "settings services", which also provide a D-Bus interface and allow you to query and change stored network connections and preferences. The NetworkManager D-Bus API specification ([0.7] [0.8] [0.9]) provides a detailed description of each object and interface that NetworkManager provides.
The 0.9 release is a significant milestone, and provides more simplified D-Bus interface that makes it easier to write user applications that take full advantage of the networking state. That means quite a few things have changed. To help smooth the process of updating applications, check out the 0.9 Migration Guide. Let us know if you have tips, suggestions, problems!
NetworkManager also provides two glib-based convenience libraries called libnm-util and libnm-glib. These wrap the D-Bus interface in easy-to-use GObjects. Documentation for libnm-util is here: [libnm-util 08] [libnm-util 09] and documentation for libnm-glib is here: [libnm-glib 08] [libnm-glib 09].
Sure, there's a bunch of examples for Python, C, and glib, and Qt right here: [09] [08].
First, you should probably consider joining the mailing list as there is a lot of useful information there from other NM hackers: http://mail.gnome.org/mailman/listinfo/networkmanager-list.
Second, read the Design Goals of NetworkManager to get an idea of why things work the way they do, and check out the wiki for more information on the architecture.
To checkout and build the latest, hottest sources of the core NetworkManager daemon from git:
git clone git://anongit.freedesktop.org/NetworkManager/NetworkManager.git
cd NetworkManager
./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
sudo make install
The development branch of NetworkManager uses ModemManager to control 3G modems now, so you'll also want to:
git clone git://anongit.freedesktop.org/ModemManager/ModemManager.git
cd ModemManager
./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
sudo make install
And if you want to play with the applet, you need network-manager-applet, too, this time from Gnome git:
git clone git://git.gnome.org/network-manager-applet
cd network-manager-applet
./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
sudo make install
There are also VPN service plugins for vpnc, openvpn, and pptp. Each
has its own git module, so replace 'vpnc' as appropriate in the following
example:
git clone git://git.gnome.org/network-manager-vpnc
cd network-manager-vpnc
./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
sudo make install
If you make changes to NetworkManager, create the patch using a Unified diff format (ie, diff -u) and mail the patch to the NetworkManager list. Others on the list may make suggestions, please take these into consideration. Eventually, your patch can be checked into the NetworkManager git source repositories.
The most up-to-date list of work items is kept in the TODO file in NetworkManager git. If you see anything you'd like to work on, please send a patch!
NetworkManager is distributed under the GNU General Public License v.2, and is Copyright © 2004-2012 by the NetworkManager project.