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
net.h@126:62edacc9f14d, 2019-02-25 (annotated)
- Committer:
- andrewboyson
- Date:
- Mon Feb 25 20:59:19 2019 +0000
- Revision:
- 126:62edacc9f14d
- Parent:
- 121:bc048b65a630
- Child:
- 136:8a65abb0dc63
Added ability to post content plus content length and content start .
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 61:aad055f1b0d1 | 1 | #include <stdint.h> |
andrewboyson | 61:aad055f1b0d1 | 2 | #include <stdbool.h> |
andrewboyson | 2:849103b5a16d | 3 | |
andrewboyson | 43:bc028d5a6424 | 4 | extern bool NetTraceStack; |
andrewboyson | 43:bc028d5a6424 | 5 | extern bool NetTraceNewLine; |
andrewboyson | 43:bc028d5a6424 | 6 | extern bool NetTraceVerbose; |
andrewboyson | 57:e0fb648acf48 | 7 | extern char NetTraceHost[]; |
andrewboyson | 61:aad055f1b0d1 | 8 | extern bool NetTraceHostGetMatched(void); |
andrewboyson | 61:aad055f1b0d1 | 9 | extern void NetTraceHostResetMatched(void); |
andrewboyson | 57:e0fb648acf48 | 10 | extern void NetTraceHostCheckIp6(char* ip); |
andrewboyson | 57:e0fb648acf48 | 11 | extern void NetTraceHostCheckMac(char* mac); |
andrewboyson | 37:793b39683406 | 12 | |
andrewboyson | 0:faa09bd4e6bf | 13 | extern int16_t NetToHost16(int16_t n); |
andrewboyson | 0:faa09bd4e6bf | 14 | extern int32_t NetToHost32(int32_t n); |
andrewboyson | 0:faa09bd4e6bf | 15 | extern int64_t NetToHost64(int64_t n); |
andrewboyson | 0:faa09bd4e6bf | 16 | extern uint16_t NetCheckSum(int count, void* pData); |
andrewboyson | 2:849103b5a16d | 17 | extern uint16_t NetCheckSumTwo(int count1, void* pData1, int count2, void* pData2); |
andrewboyson | 2:849103b5a16d | 18 | |
andrewboyson | 61:aad055f1b0d1 | 19 | extern void NetInit(const char* name4, const char* name6); |
andrewboyson | 61:aad055f1b0d1 | 20 | extern void NetMain(void); |
andrewboyson | 7:b794780e33b4 | 21 | |
andrewboyson | 59:e0e556c8bd46 | 22 | extern const char* NetName4; |
andrewboyson | 59:e0e556c8bd46 | 23 | extern const char* NetName6; |
andrewboyson | 97:d91f7db00235 | 24 | |
andrewboyson | 121:bc048b65a630 | 25 | #define FAULT_POINT_NetMain 1 |
andrewboyson | 121:bc048b65a630 | 26 | #define FAULT_POINT_LinkMain 2 |
andrewboyson | 121:bc048b65a630 | 27 | #define FAULT_POINT_EthHandlePacket 3 |
andrewboyson | 121:bc048b65a630 | 28 | #define FAULT_POINT_Ip4HandleReceivedPacket 4 |
andrewboyson | 121:bc048b65a630 | 29 | #define FAULT_POINT_Tcp4HandleReceivedPacket 5 |
andrewboyson | 121:bc048b65a630 | 30 | #define FAULT_POINT_TcpHandleReceivedPacket 6 |
andrewboyson | 121:bc048b65a630 | 31 | #define FAULT_POINT_TcpHdrReadFromPacket 7 |
andrewboyson | 121:bc048b65a630 | 32 | #define FAULT_POINT_HttpHandleRequest 8 |
andrewboyson | 121:bc048b65a630 | 33 | #define FAULT_POINT_HttpReadRequest 9 |
andrewboyson | 121:bc048b65a630 | 34 | #define FAULT_POINT_HttpRequestFunction 10 |
andrewboyson | 126:62edacc9f14d | 35 | #define FAULT_POINT_HttpPostFunction 11 |
andrewboyson | 126:62edacc9f14d | 36 | #define FAULT_POINT_HttpGetFunction 12 |
andrewboyson | 126:62edacc9f14d | 37 | #define FAULT_POINT_Udp4HandleReceivedPacket 13 |
andrewboyson | 126:62edacc9f14d | 38 | #define FAULT_POINT_UdpHandleReceivedPacket 14 |
andrewboyson | 126:62edacc9f14d | 39 | #define FAULT_POINT_NtpHandlePacketReceived 15 |