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.

149 lines
3.9 KiB

  1. //============================================================================
  2. // Copyright (c) 1995, Microsoft Corporation
  3. //
  4. // File: work.h
  5. //
  6. // History:
  7. // Abolade Gbadegesin Aug-8-1995 Created.
  8. //
  9. // Contains structures and functions for IPRIP's work items.
  10. //============================================================================
  11. #ifndef _WORK_H_
  12. #define _WORK_H_
  13. //
  14. // type definition of an input context
  15. //
  16. typedef struct _INPUT_CONTEXT {
  17. DWORD IC_InterfaceIndex;
  18. DWORD IC_AddrIndex;
  19. SOCKADDR_IN IC_InputSource;
  20. DWORD IC_InputLength;
  21. IPRIP_PACKET IC_InputPacket;
  22. } INPUT_CONTEXT, *PINPUT_CONTEXT;
  23. //
  24. // type definition of a demand-update context
  25. //
  26. typedef struct _UPDATE_CONTEXT {
  27. DWORD UC_InterfaceIndex;
  28. DWORD UC_RetryCount;
  29. DWORD UC_RouteCount;
  30. } UPDATE_CONTEXT, *PUPDATE_CONTEXT;
  31. //
  32. // these are the type definitions of the three functions
  33. // that are in each update buffer's function table
  34. //
  35. typedef DWORD (*PSTART_BUFFER_ROUTINE)(PVOID);
  36. typedef DWORD (*PADD_ENTRY_ROUTINE)(PVOID, PRIP_IP_ROUTE);
  37. typedef DWORD (*PFINISH_BUFFER_ROUTINE)(PVOID);
  38. //
  39. // this is the definition of an update buffer. It includes the command
  40. // to be put in the IPRIP packet header, the destination for the buffer,
  41. // and the three update-buffer functions
  42. //
  43. typedef struct _UPDATE_BUFFER {
  44. PIF_TABLE_ENTRY UB_ITE;
  45. DWORD UB_AddrIndex;
  46. DWORD UB_Address;
  47. DWORD UB_Netmask;
  48. SOCKET UB_Socket;
  49. DWORD UB_Command;
  50. DWORD UB_Length;
  51. BYTE UB_Buffer[MAX_PACKET_SIZE];
  52. SOCKADDR_IN UB_Destination;
  53. DWORD UB_DestAddress;
  54. DWORD UB_DestNetmask;
  55. PADD_ENTRY_ROUTINE UB_AddRoutine;
  56. PSTART_BUFFER_ROUTINE UB_StartRoutine;
  57. PFINISH_BUFFER_ROUTINE UB_FinishRoutine;
  58. } UPDATE_BUFFER, *PUPDATE_BUFFER;
  59. VOID WorkerFunctionNetworkEvents(PVOID pContext);
  60. VOID WorkerFunctionProcessTimer(PVOID pContext);
  61. VOID WorkerFunctionProcessInput(PVOID pContext);
  62. VOID WorkerFunctionStartFullUpdate(PVOID pContext, BOOLEAN bNotUsed);
  63. VOID WorkerFunctionFinishFullUpdate(PVOID pContext, BOOLEAN bNotUsed);
  64. VOID WorkerFunctionStartTriggeredUpdate(PVOID pContext);
  65. VOID WorkerFunctionFinishTriggeredUpdate(PVOID pContext, BOOLEAN bNotUsed);
  66. VOID WorkerFunctionStartDemandUpdate(PVOID pContext);
  67. VOID WorkerFunctionFinishDemandUpdate(PVOID pContext, BOOLEAN bNotUsed);
  68. VOID WorkerFunctionProcessRtmMessage(PVOID pContext);
  69. VOID WorkerFunctionActivateInterface(PVOID pContext);
  70. VOID WorkerFunctionDeactivateInterface(PVOID pContext);
  71. VOID WorkerFunctionFinishStopProtocol(PVOID pContext);
  72. VOID WorkerFunctionMibDisplay(PVOID pContext, BOOLEAN bNotUsed);
  73. DWORD
  74. SendRoutes(
  75. PIF_TABLE_ENTRY pIfList[],
  76. DWORD dwIfCount,
  77. DWORD dwSendMode,
  78. DWORD dwDestination,
  79. DWORD dwAddrIndex
  80. );
  81. VOID
  82. ProcessRequest(
  83. PVOID pContext
  84. );
  85. VOID
  86. ProcessResponse(
  87. PVOID pContext
  88. );
  89. DWORD
  90. ProcessRtmNotification(
  91. RTM_ENTITY_HANDLE hRtmHandle, // not used
  92. RTM_EVENT_TYPE retEventType,
  93. PVOID pvContext1, // not used
  94. PVOID pvContext2 // not used
  95. );
  96. VOID
  97. CallbackFunctionProcessRtmMessage (
  98. PVOID pContext, // not used
  99. BOOLEAN NotUsed
  100. );
  101. VOID
  102. CallbackFunctionProcessTimer (
  103. PVOID pContext, // not used
  104. BOOLEAN NotUsed
  105. );
  106. VOID
  107. CallbackFunctionNetworkEvents (
  108. PVOID pContext,
  109. BOOLEAN NotUsed
  110. );
  111. DWORD
  112. BlockDeleteRoutesOnInterface (
  113. IN HANDLE hRtmHandle,
  114. IN DWORD dwIfIndex
  115. );
  116. #endif // _WORK_H_