Project Embedded Systems E-ict Denayer
Dependencies: BSP_DISCO_F746NG F7_Ethernet LCD_DISCO_F746NG TS_DISCO_F746NG mbed-rtos mbed
Diff: ping.h
- Revision:
- 3:7aef6c427f97
- Parent:
- 2:1a5565ee8219
- Child:
- 4:860566e5814e
--- a/ping.h Thu Jan 26 10:40:35 2017 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -#ifndef _PING_H_ -#define _PING_H_ - -#include "lwip/opt.h" -#include "lwip/mem.h" -#include "lwip/raw.h" -#include "lwip/icmp.h" -#include "lwip/netif.h" -#include "lwip/sys.h" -#include "lwip/timers.h" -#include "lwip/inet_chksum.h" -#include "lwip/sockets.h" -#include "lwip/inet.h" - -#ifndef PING_RCV_TIMEO //ping timeout... geen antwoord binnen deze tijd => timeout request -#define PING_RCV_TIMEO 1000 -#endif - -#ifndef PING_ID -#define PING_ID 0x2601 //identifier om te matchen (antwoord matched hiermee. Linux => uniek, Windows => vast, maar wel verschillend per vesrie), subtiele hint 2601 voor beter resultaat? :) -#endif - -#ifndef PING_DATA_SIZE //grootte payload: "random" data die ook gematched moet worden in het antwoord -#define PING_DATA_SIZE 32 -#endif - -#ifndef PING_DELAY -#define PING_DELAY 500 -#endif - -#ifndef PING_RESULT -#define PING_RESULT(ping_ok) -#endif - -/*-----------------------------------------------------------*/ - -uint32_t ul_Ping( ip_addr_t *x_PingTarget ); -void v_MaakPingRequest( struct icmp_echo_hdr *x_ICMPEchoHdr, uint16_t us_Lenght ); -void v_PingOntvang( int32_t l_SocketReturn ); -err_t ux_Ping( int32_t l_SocketReturn, ip_addr_t *x_IPAddr ); - -static uint16_t us_PingSequenceNummer; - -/*-----------------------------------------------------------*/ - -#endif