Project Embedded Systems E-ict Denayer
Dependencies: BSP_DISCO_F746NG F7_Ethernet LCD_DISCO_F746NG TS_DISCO_F746NG mbed-rtos mbed
ping.h@5:0518cef07365, 2017-08-17 (annotated)
- Committer:
- Ayrton_L
- Date:
- Thu Aug 17 14:36:34 2017 +0000
- Revision:
- 5:0518cef07365
Final publish; Wrong branch was added last time
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Ayrton_L | 5:0518cef07365 | 1 | #ifndef _PING_H_ |
Ayrton_L | 5:0518cef07365 | 2 | #define _PING_H_ |
Ayrton_L | 5:0518cef07365 | 3 | |
Ayrton_L | 5:0518cef07365 | 4 | #include "lwip/opt.h" |
Ayrton_L | 5:0518cef07365 | 5 | #include "lwip/mem.h" |
Ayrton_L | 5:0518cef07365 | 6 | #include "lwip/raw.h" |
Ayrton_L | 5:0518cef07365 | 7 | #include "lwip/icmp.h" |
Ayrton_L | 5:0518cef07365 | 8 | #include "lwip/netif.h" |
Ayrton_L | 5:0518cef07365 | 9 | #include "lwip/sys.h" |
Ayrton_L | 5:0518cef07365 | 10 | #include "lwip/timers.h" |
Ayrton_L | 5:0518cef07365 | 11 | #include "lwip/inet_chksum.h" |
Ayrton_L | 5:0518cef07365 | 12 | #include "lwip/sockets.h" |
Ayrton_L | 5:0518cef07365 | 13 | #include "lwip/inet.h" |
Ayrton_L | 5:0518cef07365 | 14 | |
Ayrton_L | 5:0518cef07365 | 15 | #ifndef PING_RCV_TIMEO //ping timeout... geen antwoord binnen deze tijd => timeout request |
Ayrton_L | 5:0518cef07365 | 16 | #define PING_RCV_TIMEO 1000 |
Ayrton_L | 5:0518cef07365 | 17 | #endif |
Ayrton_L | 5:0518cef07365 | 18 | |
Ayrton_L | 5:0518cef07365 | 19 | #ifndef PING_ID |
Ayrton_L | 5:0518cef07365 | 20 | #define PING_ID 0x2601 //identifier om te matchen (antwoord matched hiermee. Linux => uniek, Windows => vast, maar wel verschillend per versie) |
Ayrton_L | 5:0518cef07365 | 21 | #endif |
Ayrton_L | 5:0518cef07365 | 22 | |
Ayrton_L | 5:0518cef07365 | 23 | #ifndef PING_DATA_SIZE //grootte payload: "random" data die ook gematched moet worden in het antwoord |
Ayrton_L | 5:0518cef07365 | 24 | #define PING_DATA_SIZE 32 |
Ayrton_L | 5:0518cef07365 | 25 | #endif |
Ayrton_L | 5:0518cef07365 | 26 | |
Ayrton_L | 5:0518cef07365 | 27 | #ifndef PING_DELAY |
Ayrton_L | 5:0518cef07365 | 28 | #define PING_DELAY 500 |
Ayrton_L | 5:0518cef07365 | 29 | #endif |
Ayrton_L | 5:0518cef07365 | 30 | |
Ayrton_L | 5:0518cef07365 | 31 | #ifndef PING_RESULT |
Ayrton_L | 5:0518cef07365 | 32 | #define PING_RESULT(ping_ok) |
Ayrton_L | 5:0518cef07365 | 33 | #endif |
Ayrton_L | 5:0518cef07365 | 34 | |
Ayrton_L | 5:0518cef07365 | 35 | /*-----------------------------------------------------------*/ |
Ayrton_L | 5:0518cef07365 | 36 | |
Ayrton_L | 5:0518cef07365 | 37 | uint32_t ul_Ping( ip_addr_t *x_PingTarget ); |
Ayrton_L | 5:0518cef07365 | 38 | void v_MaakPingRequest( struct icmp_echo_hdr *x_ICMPEchoHdr, uint16_t us_Lenght ); |
Ayrton_L | 5:0518cef07365 | 39 | void v_PingOntvang( int32_t l_SocketReturn ); |
Ayrton_L | 5:0518cef07365 | 40 | err_t ux_Ping( int32_t l_SocketReturn, ip_addr_t *x_IPAddr ); |
Ayrton_L | 5:0518cef07365 | 41 | |
Ayrton_L | 5:0518cef07365 | 42 | static uint16_t us_PingSequenceNummer; |
Ayrton_L | 5:0518cef07365 | 43 | |
Ayrton_L | 5:0518cef07365 | 44 | /*-----------------------------------------------------------*/ |
Ayrton_L | 5:0518cef07365 | 45 | |
Ayrton_L | 5:0518cef07365 | 46 | #endif |