Source code of Windows XP (NT5)
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.

194 lines
3.9 KiB

  1. #define IPSEC_ISAKMP_PORT 0xf401 // 500 in NBO
  2. #define IPSEC_KERBEROS_PORT 0x5800 // 88 in NBO
  3. #define IPSEC_LDAP_PORT 0x8501 // 389 in NBO
  4. IPSEC_ACTION
  5. IPSecHandlePacket(
  6. IN PUCHAR pIPHeader,
  7. IN PVOID pData,
  8. IN PVOID IPContext,
  9. IN PNDIS_PACKET Packet,
  10. IN OUT PULONG pExtraBytes,
  11. IN OUT PULONG pMTU,
  12. OUT PVOID *pNewData,
  13. IN OUT PULONG pIpsecFlags,
  14. IN UCHAR DestType
  15. );
  16. IPSEC_ACTION
  17. IPSecSendPacket(
  18. IN PUCHAR pIPHeader,
  19. IN PVOID pData,
  20. IN PVOID IPContext,
  21. IN PNDIS_PACKET Packet,
  22. IN OUT PULONG pExtraBytes,
  23. IN OUT PULONG pMTU,
  24. OUT PVOID *pNewData,
  25. IN OUT PULONG pIpsecFlags,
  26. OUT PIPSEC_DROP_STATUS pDropStatus,
  27. IN UCHAR DestType
  28. );
  29. IPSEC_ACTION
  30. IPSecRecvPacket(
  31. IN PUCHAR *pIPHeader,
  32. IN PVOID pData,
  33. IN PVOID IPContext,
  34. IN PNDIS_PACKET Packet,
  35. IN OUT PULONG pExtraBytes,
  36. IN OUT PULONG pIpsecFlags,
  37. OUT PIPSEC_DROP_STATUS pDropStatus,
  38. IN UCHAR DestType
  39. );
  40. VOID
  41. IPSecCalcHeaderOverheadFromSA(
  42. IN PSA_TABLE_ENTRY pSA,
  43. OUT PULONG pOverhead
  44. );
  45. NTSTATUS
  46. IPSecParsePacket(
  47. IN PUCHAR pIPHeader,
  48. IN PVOID *pData,
  49. OUT tSPI *pSPI
  50. );
  51. PSA_TABLE_ENTRY
  52. IPSecLookupSAInLarval(
  53. IN ULARGE_INTEGER uliSrcDstAddr,
  54. IN ULARGE_INTEGER uliProtoSrcDstPort
  55. );
  56. NTSTATUS
  57. IPSecClassifyPacket(
  58. IN PUCHAR pHeader,
  59. IN PVOID pData,
  60. OUT PSA_TABLE_ENTRY *ppSA,
  61. OUT PSA_TABLE_ENTRY *ppNextSA,
  62. OUT USHORT *pFilterFlags,
  63. #if GPC
  64. IN CLASSIFICATION_HANDLE GpcHandle,
  65. #endif
  66. IN BOOLEAN fOutbound,
  67. IN BOOLEAN fFWPacket,
  68. IN BOOLEAN fDoBypassCheck,
  69. IN UCHAR DestType
  70. );
  71. VOID
  72. IPSecSendComplete(
  73. IN PNDIS_PACKET Packet,
  74. IN PVOID pData,
  75. IN PIPSEC_SEND_COMPLETE_CONTEXT pContext,
  76. IN IP_STATUS Status,
  77. OUT PVOID *ppNewData
  78. );
  79. VOID
  80. IPSecProtocolSendComplete (
  81. IN PVOID pContext,
  82. IN PNDIS_BUFFER pMdl,
  83. IN IP_STATUS Status
  84. );
  85. NTSTATUS
  86. IPSecChkReplayWindow(
  87. IN ULONG Seq,
  88. IN PSA_TABLE_ENTRY pSA,
  89. IN ULONG Index
  90. );
  91. NTSTATUS
  92. IPSecReinjectPacket(
  93. IN PVOID pData,
  94. IN PNDIS_PACKET_EXTENSION pPktExt
  95. );
  96. NTSTATUS
  97. IPSecQueuePacket(
  98. IN PSA_TABLE_ENTRY pSA,
  99. IN PVOID pDataBuf
  100. );
  101. VOID
  102. IPSecIPAddrToUnicodeString(
  103. IN IPAddr Addr,
  104. OUT PWCHAR UCIPAddrBuffer
  105. );
  106. VOID
  107. IPSecCountToUnicodeString(
  108. IN ULONG Count,
  109. OUT PWCHAR UCCountBuffer
  110. );
  111. VOID
  112. IPSecESPStatus(
  113. IN UCHAR StatusType,
  114. IN IP_STATUS StatusCode,
  115. IN IPAddr OrigDest,
  116. IN IPAddr OrigSrc,
  117. IN IPAddr Src,
  118. IN ULONG Param,
  119. IN PVOID Data
  120. );
  121. VOID
  122. IPSecAHStatus(
  123. IN UCHAR StatusType,
  124. IN IP_STATUS StatusCode,
  125. IN IPAddr OrigDest,
  126. IN IPAddr OrigSrc,
  127. IN IPAddr Src,
  128. IN ULONG Param,
  129. IN PVOID Data
  130. );
  131. VOID
  132. IPSecProcessPMTU(
  133. IN IPAddr OrigDest,
  134. IN IPAddr OrigSrc,
  135. IN tSPI SPI,
  136. IN OPERATION_E Operation,
  137. IN ULONG NewMTU
  138. );
  139. IPSEC_ACTION
  140. IPSecRcvFWPacket(
  141. IN PCHAR pIPHeader,
  142. IN PVOID pData,
  143. IN UINT DataLength,
  144. IN UCHAR DestType
  145. );
  146. NTSTATUS
  147. IPSecRekeyInboundSA(
  148. IN PSA_TABLE_ENTRY pSA
  149. );
  150. NTSTATUS
  151. IPSecRekeyOutboundSA(
  152. IN PSA_TABLE_ENTRY pSA
  153. );
  154. NTSTATUS
  155. IPSecPuntInboundSA(
  156. IN PSA_TABLE_ENTRY pSA
  157. );
  158. NTSTATUS
  159. IPSecPuntOutboundSA(
  160. IN PSA_TABLE_ENTRY pSA
  161. );
  162. BOOLEAN
  163. IPSecQueryStatus(
  164. IN CLASSIFICATION_HANDLE GpcHandle
  165. );