ifup ifdown example

David Lamparter equinox at diac24.net
Fri Feb 18 08:46:56 EST 2011

On Thu, Feb 17, 2011 at 10:07:03PM -0800, Reuben Hawkins wrote:
> Hi,
> Is there a simple example showing how to figure out if/when network
> interfaces are up/down or change state?  Can that be done with libnl?

Yes, that can be done with libnl. Look at src/nl-monitor.c, that tells
you how to create a netlink multicast listener. You may need to add
some code to filter out the events you want to trigger on; if your
application is simple you can as well just "reevaluate" things without
looking at the message you received.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20110218/89a1031a/attachment.sig>

More information about the libnl mailing list