Expose mip guts

This commit is contained in:
cpq committed 2022-11-09 19:25:40 +00:00
1 parent eed25f23f6
commit abfac8aa40
15 files changed
+222 -258

No files matched your search

+4 -5
View File
@@ -95,12 +95,11 @@ int main(int argc, char *argv[]) {
struct mg_mgr mgr; // Event manager
mg_mgr_init(&mgr); // Initialise event manager
struct mip_cfg c = {.ip = 0, .mask = 0, .gw = 0};
sscanf(mac, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &c.mac[0], &c.mac[1], &c.mac[2],
&c.mac[3], &c.mac[4], &c.mac[5]);
struct mip_driver driver = {.tx = pcap_tx, .up = pcap_up, .rx = pcap_rx};
mip_init(&mgr, &c, &driver, ph);
struct mip_if mif = {.use_dhcp = true, .driver = &driver, .driver_data = ph};
sscanf(mac, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &mif.mac[0], &mif.mac[1],
&mif.mac[2], &mif.mac[3], &mif.mac[4], &mif.mac[5]);
mip_init(&mgr, &mif);
MG_INFO(("Init done, starting main loop"));
extern void device_dashboard_fn(struct mg_connection *, int, void *, void *);