Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
softDNS.h@1:e9d5e828e8a8, 2019-02-05 (annotated)
- Committer:
- rlanders73
- Date:
- Tue Feb 05 18:03:02 2019 +0000
- Revision:
- 1:e9d5e828e8a8
- Parent:
- 0:f34ae89cb769
- Child:
- 2:af40d7399ae8
rolled in to ublox-cellular-interface. This driver gives DNS functionality to R41xM modems to maintain driver continuity.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rlanders73 | 0:f34ae89cb769 | 1 | /* |
rlanders73 | 1:e9d5e828e8a8 | 2 | * softDNS.c |
rlanders73 | 0:f34ae89cb769 | 3 | * |
rlanders73 | 0:f34ae89cb769 | 4 | * Created on: Nov 12, 2018 |
rlanders73 | 1:e9d5e828e8a8 | 5 | * Company: Point Labs, LLC. |
rlanders73 | 0:f34ae89cb769 | 6 | * Author: cblack |
rlanders73 | 1:e9d5e828e8a8 | 7 | * |
rlanders73 | 1:e9d5e828e8a8 | 8 | * Brief: Some modems don't seem to have a DNS function, so this fixes that |
rlanders73 | 0:f34ae89cb769 | 9 | */ |
rlanders73 | 0:f34ae89cb769 | 10 | |
rlanders73 | 0:f34ae89cb769 | 11 | #ifndef SOFTDNS_SOFTDNS_H_ |
rlanders73 | 0:f34ae89cb769 | 12 | #define SOFTDNS_SOFTDNS_H_ |
rlanders73 | 0:f34ae89cb769 | 13 | |
rlanders73 | 0:f34ae89cb769 | 14 | #include "mbed.h" |
rlanders73 | 0:f34ae89cb769 | 15 | |
rlanders73 | 0:f34ae89cb769 | 16 | #define PP_HTONS(x) ((((x) & 0x00ffUL) << 8) | (((x) & 0xff00UL) >> 8)) |
rlanders73 | 0:f34ae89cb769 | 17 | #define PP_NTOHS(x) PP_HTONS(x) |
rlanders73 | 0:f34ae89cb769 | 18 | |
rlanders73 | 0:f34ae89cb769 | 19 | nsapi_error_t softDNS_gethostbyname(const char *hostname, SocketAddress *address, NetworkInterface* net); |
rlanders73 | 0:f34ae89cb769 | 20 | |
rlanders73 | 0:f34ae89cb769 | 21 | #endif /* SOFTDNS_SOFTDNS_H_ */ |