ifup ifdown example
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:
> 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
Size: 198 bytes
Desc: not available
More information about the libnl