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.

102 lines
2.2 KiB

  1. typedef struct _TRANSPORT_INFO
  2. {
  3. PRTR_INFO_BLOCK_HEADER pibhInfo;
  4. BOOL bValid;
  5. }TRANSPORT_INFO,*PTRANSPORT_INFO;
  6. typedef struct _INTERFACE_STORE
  7. {
  8. LIST_ENTRY le;
  9. PWCHAR pwszIfName;
  10. PRTR_INFO_BLOCK_HEADER pibhInfo;
  11. DWORD dwIfType;
  12. BOOL bValid;
  13. }INTERFACE_STORE,*PINTERFACE_STORE;
  14. extern LIST_ENTRY g_leIfListHead;
  15. extern TRANSPORT_INFO g_tiTransport;
  16. #define FREE_BUFFER(pibh) \
  17. { \
  18. HeapFree(GetProcessHeap(), \
  19. 0, \
  20. pibh); \
  21. pibh = NULL; \
  22. }
  23. DWORD
  24. ValidateInterfaceInfo(
  25. IN LPCWSTR pwszIfName,
  26. OUT RTR_INFO_BLOCK_HEADER **ppInfo, OPTIONAL
  27. OUT PDWORD pdwIfType, OPTIONAL
  28. OUT INTERFACE_STORE **ppIfStore OPTIONAL
  29. );
  30. DWORD
  31. ValidateGlobalInfo(
  32. OUT RTR_INFO_BLOCK_HEADER **ppInfo
  33. );
  34. DWORD
  35. GetGlobalInfo(
  36. OUT RTR_INFO_BLOCK_HEADER **ppibhInfo
  37. );
  38. DWORD
  39. SetGlobalInfo(
  40. IN PRTR_INFO_BLOCK_HEADER pibhInfo
  41. );
  42. DWORD
  43. GetInterfaceInfo(
  44. IN LPCWSTR pwszIfName,
  45. OUT PRTR_INFO_BLOCK_HEADER *ppibhInfo,
  46. IN PMPR_INTERFACE_0 pMprIf0,
  47. OUT PDWORD pdwIfType
  48. );
  49. DWORD
  50. SetInterfaceInfo(
  51. IN PRTR_INFO_BLOCK_HEADER pibhInfo,
  52. IN LPCWSTR pwszIfName
  53. );
  54. DWORD
  55. AddInterfaceInfo(
  56. IN LPCWSTR pwszIfName
  57. );
  58. DWORD
  59. DeleteInterfaceInfo(
  60. IN LPCWSTR pwszIfName
  61. );
  62. DWORD
  63. WINAPI
  64. IpCommit(
  65. IN DWORD dwAction
  66. );
  67. #ifdef KSL_IPINIP
  68. DWORD
  69. CreateInterface(
  70. IN LPCWSTR pwszFriendlyName,
  71. IN LPCWSTR pwszGuidName,
  72. IN DWORD dwIfType,
  73. IN BOOL bCreateRouterIf
  74. );
  75. #endif //KSL_IPINIP
  76. #define IFCLASS_LOOPBACK 1
  77. #define IFCLASS_P2P 2
  78. #define IFCLASS_BROADCAST 3
  79. #define IFCLASS_NBMA 4
  80. DWORD
  81. GetInterfaceClass(
  82. IN LPCWSTR pwszIfName,
  83. OUT PDWORD pdwIfClass
  84. );