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

Committer:
andrewboyson
Date:
Mon May 01 18:20:55 2017 +0000
Revision:
13:9cd54f7db57a
Parent:
11:c051adb70c5a
Child:
14:e75a59c1123d
Added ability to read DNS queries with encoded IP addresses

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 7:b794780e33b4 1 extern int NetIp4AddressToString(uint32_t ip, int size, char* text);
andrewboyson 7:b794780e33b4 2 extern int NetIp6AddressToString(char* ip, int size, char* text);
andrewboyson 7:b794780e33b4 3 extern int NetMacToString(char* mac, int size, char* text);
andrewboyson 9:91dae5300a4d 4 extern void NetProtocolToString(uint8_t protocol, int size, char* text);
andrewboyson 2:849103b5a16d 5
andrewboyson 0:faa09bd4e6bf 6 extern int16_t NetToHost16(int16_t n);
andrewboyson 0:faa09bd4e6bf 7 extern int32_t NetToHost32(int32_t n);
andrewboyson 0:faa09bd4e6bf 8 extern int64_t NetToHost64(int64_t n);
andrewboyson 0:faa09bd4e6bf 9 extern uint16_t NetCheckSum(int count, void* pData);
andrewboyson 2:849103b5a16d 10 extern uint16_t NetCheckSumTwo(int count1, void* pData1, int count2, void* pData2);
andrewboyson 2:849103b5a16d 11
andrewboyson 10:f0854784e960 12 extern int NetInit(char* name);
andrewboyson 7:b794780e33b4 13 extern int NetMain();
andrewboyson 7:b794780e33b4 14
andrewboyson 10:f0854784e960 15 extern char* NetName;
andrewboyson 10:f0854784e960 16
andrewboyson 9:91dae5300a4d 17
andrewboyson 9:91dae5300a4d 18 #define ETHERNET 1
andrewboyson 9:91dae5300a4d 19
andrewboyson 9:91dae5300a4d 20 #define IPV4 0x0800
andrewboyson 9:91dae5300a4d 21 #define ARP 0x0806
andrewboyson 9:91dae5300a4d 22 #define IPV6 0x86DD
andrewboyson 9:91dae5300a4d 23
andrewboyson 13:9cd54f7db57a 24 #define HOPOPT 0
andrewboyson 9:91dae5300a4d 25 #define ICMP 1
andrewboyson 11:c051adb70c5a 26 #define IGMP 2
andrewboyson 9:91dae5300a4d 27 #define TCP 6
andrewboyson 9:91dae5300a4d 28 #define UDP 17
andrewboyson 9:91dae5300a4d 29 #define ICMP6 58
andrewboyson 9:91dae5300a4d 30
andrewboyson 9:91dae5300a4d 31
andrewboyson 9:91dae5300a4d 32 #define DO_NOTHING 0
andrewboyson 10:f0854784e960 33 #define UNICAST 1
andrewboyson 10:f0854784e960 34 #define UNICAST_DNS 2
andrewboyson 10:f0854784e960 35 #define UNICAST_DHCP 3
andrewboyson 10:f0854784e960 36 #define MULTICAST_NODE 4
andrewboyson 10:f0854784e960 37 #define MULTICAST_ROUTER 5
andrewboyson 10:f0854784e960 38 #define MULTICAST_MDNS 6
andrewboyson 10:f0854784e960 39 #define MULTICAST_LLMNR 7
andrewboyson 10:f0854784e960 40 #define BROADCAST 8