Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.4 KiB

  1. #ifndef _PINGSVC_
  2. #define _PINGSVC_
  3. #define DBG_PING_ERRORS 0x00010000
  4. #define DBG_PING_REQUESTS 0x00020000
  5. #define DBG_PING_RESPONSES 0x00040000
  6. #define DBG_PING_CONTROL 0x00080000
  7. #include <packon.h>
  8. // Extended IPX address structures described (but not defined) in wsnwlink.h
  9. // For outgoing packets
  10. typedef struct _SOCKADDR_IPX_EXT_SEND {
  11. SOCKADDR_IPX std;
  12. UCHAR pkttype; // IPX packet type
  13. } SOCKADDR_IPX_EXT_SEND, *PSOCKADDR_IPX_EXT_SEND;
  14. // For incoming packets
  15. typedef struct _SOCKADDR_IPX_EXT_RECV {
  16. SOCKADDR_IPX std;
  17. UCHAR pkttype; // IPX packet type
  18. UCHAR who; // Who sent it? 1 - broadcast, 2 - local
  19. } SOCKADDR_IPX_EXT_RECV, *PSOCKADDR_IPX_EXT_RECV;
  20. #define IPX_PING_SOCKET 0x9086
  21. typedef struct _IPX_PING_HEADER {
  22. UCHAR signature[4];
  23. UCHAR version;
  24. UCHAR type;
  25. #define PING_PACKET_TYPE_REQUEST 0
  26. #define PING_PACKET_TYPE_RESPONSE 1
  27. UCHAR pingid[2];
  28. UCHAR result;
  29. UCHAR reserved;
  30. } IPX_PING_HEADER, *PIPX_PING_HEADER;
  31. #include <packoff.h>
  32. typedef struct _PING_DATA_BLOCK {
  33. WSAOVERLAPPED ovlp;
  34. union {
  35. SOCKADDR_IPX_EXT_RECV raddr;
  36. SOCKADDR_IPX_EXT_SEND saddr;
  37. };
  38. IPX_PING_HEADER pinghdr;
  39. CHAR pingdata[1];
  40. } PING_DATA_BLOCK, *PPING_DATA_BLOCK;
  41. DWORD
  42. StartPingSvc (
  43. VOID
  44. );
  45. VOID
  46. StopPingSvc (
  47. VOID
  48. );
  49. #endif