mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-06 15:51:25 +00:00
Add MQTT device through RNDIS example
This commit is contained in:
1 parent
ad90b0b7b1
commit
ad57731ae1
17 files changed
+471
-22
No files matched your search
+4
-1
@@ -450,7 +450,10 @@ static void rx_dhcp_server(struct mg_tcpip_if *ifp, struct pkt *pkt) {
|
||||
memcpy(&res.options, opts, sizeof(opts));
|
||||
res.magic = pkt->dhcp->magic;
|
||||
res.xid = pkt->dhcp->xid;
|
||||
// memcpy(ifp->gwmac, pkt->eth->src, sizeof(ifp->gwmac));
|
||||
if (ifp->enable_get_gateway) {
|
||||
ifp->gw = res.yiaddr;
|
||||
memcpy(ifp->gwmac, pkt->eth->src, sizeof(ifp->gwmac));
|
||||
}
|
||||
tx_udp(ifp, pkt->eth->src, ifp->ip, mg_htons(67),
|
||||
op == 1 ? ~0U : res.yiaddr, mg_htons(68), &res, sizeof(res));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user