module: network: monitor ethernet interfaces

State exposed (tag names):

* name: the interface name ("eth0" etc)
* index: the interface index, "ifindex"
* state: operational state (down, up etc)
* mac: the Ethernet hardware address
* ipv4: the *last* IPv4 address added to the interface
* ipv6: the *last* IPv6 address added to the interface

State we monitor (for changes):

* state
* ipv4 addresses
* ipv6 addresses
This commit is contained in:
Daniel Eklöf 2018-12-30 20:40:10 +01:00
parent c795718ad7
commit 4c4f0ce7a0
4 changed files with 413 additions and 0 deletions

6
modules/network.h Normal file
View file

@ -0,0 +1,6 @@
#pragma once
#include "../module.h"
#include "../particle.h"
struct module *module_network(const char *iface, struct particle *label);