discover/discover-server: Restrict clients based on uid
[petitboot] / discover / network.h
1 #ifndef NETWORK_H
2 #define NETWORK_H
3
4 struct network;
5 struct device_handler;
6 struct discover_device;
7 struct waitset;
8
9 struct network *network_init(struct device_handler *handler,
10                 struct waitset *waitset, bool dry_run);
11 int network_shutdown(struct network *network);
12
13 void network_register_device(struct network *network,
14                 struct discover_device *dev);
15 void network_unregister_device(struct network *network,
16                 struct discover_device *dev);
17 void network_requery_device(struct network *network,
18                 struct discover_device *dev);
19
20 uint8_t *find_mac_by_name(void *ctx, struct network *network,
21                 const char *name);
22
23 void network_mark_interface_ready(struct device_handler *handler,
24                 int ifindex, const char *ifname, uint8_t *mac, int hwsize);
25
26 #endif /* NETWORK_H */
27