A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.
Dependents: oldheating gps motorhome heating
Diff: resolve/ar4.c
- Revision:
- 195:bd5b123143ca
- Parent:
- 193:47a953ab571b
- Child:
- 200:5acbc41bf469
diff -r f35c6e218de1 -r bd5b123143ca resolve/ar4.c --- a/resolve/ar4.c Thu Mar 04 12:08:14 2021 +0000 +++ b/resolve/ar4.c Sun Apr 18 19:04:48 2021 +0000 @@ -144,6 +144,14 @@ } MacClear(mac); } +uint32_t Ar4GetIpFromMac(char* pMac) +{ + for (int i = 0; i < RECORDS_COUNT; i++) + { + if (records[i].state == STATE_VALID && MacIsSame(records[i].mac, pMac)) return records[i].ip; + } + return 0; +} bool Ar4HaveMacForIp(uint32_t ip) { for (int i = 0; i < RECORDS_COUNT; i++)