nsapi.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /** BEGIN COPYRIGHT BLOCK
  2. * This Program is free software; you can redistribute it and/or modify it under
  3. * the terms of the GNU General Public License as published by the Free Software
  4. * Foundation; version 2 of the License.
  5. *
  6. * This Program is distributed in the hope that it will be useful, but WITHOUT
  7. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  8. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  9. *
  10. * You should have received a copy of the GNU General Public License along with
  11. * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  12. * Place, Suite 330, Boston, MA 02111-1307 USA.
  13. *
  14. * In addition, as a special exception, Red Hat, Inc. gives You the additional
  15. * right to link the code of this Program with code not covered under the GNU
  16. * General Public License ("Non-GPL Code") and to distribute linked combinations
  17. * including the two, subject to the limitations in this paragraph. Non-GPL Code
  18. * permitted under this exception must only link to the code of this Program
  19. * through those well defined interfaces identified in the file named EXCEPTION
  20. * found in the source code files (the "Approved Interfaces"). The files of
  21. * Non-GPL Code may instantiate templates or use macros or inline functions from
  22. * the Approved Interfaces without causing the resulting work to be covered by
  23. * the GNU General Public License. Only Red Hat, Inc. may make changes or
  24. * additions to the list of Approved Interfaces. You must obey the GNU General
  25. * Public License in all respects for all of the Program code and other code used
  26. * in conjunction with the Program except the Non-GPL Code covered by this
  27. * exception. If you modify this file, you may extend this exception to your
  28. * version of the file, but you are not obligated to do so. If you do not wish to
  29. * provide this exception without modification, you must delete this exception
  30. * statement from your version and license this file solely under the GPL without
  31. * exception.
  32. *
  33. *
  34. * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  35. * Copyright (C) 2005 Red Hat, Inc.
  36. * All rights reserved.
  37. * END COPYRIGHT BLOCK **/
  38. /*
  39. * Aruna Victor
  40. */
  41. #include <windows.h>
  42. #include <stdio.h>
  43. #include <base/file.h>
  44. #include <base/eventlog.h>
  45. #include <base/util.h>
  46. #include <base/shexp.h>
  47. #include <base/systhr.h>
  48. #include <base/crit.h>
  49. #include <base/systhr.h>
  50. #include <ssl.h>
  51. typedef void * (SafFunction)();
  52. SafFunction **SafTable;
  53. __declspec(dllexport) int InitSafTable(SafFunction *Table);
  54. /* Functions from file.h */
  55. #define SYSTEM_FOPENRO 22
  56. #define SYSTEM_FOPENWA 23
  57. #define SYSTEM_FOPENRW 24
  58. #define SYSTEM_FCLOSE 25
  59. #define SYSTEM_NOCOREDUMPS 26
  60. #define SYSTEM_FWRITE 27
  61. #define SYSTEM_FWRITE_ATOMIC 28
  62. #define SYSTEM_WINERR 29
  63. #define SYSTEM_WINSOCKERR 30
  64. #define FILE_NOTFOUND 31
  65. #define SYSTEM_STAT 32
  66. #define FILE_UNIX2LOCAL 34
  67. #define DIR_OPEN 35
  68. #define DIR_READ 36
  69. #define DIR_CLOSE 37
  70. /* Functions from ereport.h */
  71. #define EREPORT 80
  72. /* Functions from minissl.h */
  73. #define SSL_CLOSE 90
  74. #define SSL_SOCKET 91
  75. #define SSL_GET_SOCKOPT 92
  76. #define SSL_SET_SOCKOPT 93
  77. #define SSL_BIND 94
  78. #define SSL_LISTEN 95
  79. #define SSL_ACCEPT 96
  80. #define SSL_READ 97
  81. #define SSL_WRITE 98
  82. #define SSL_GETPEERNAME 99
  83. /* Functions from systhr.h */
  84. #define SYSTHREAD_START 133
  85. #define SYSTHREAD_ATTACH 134
  86. #define SYSTHREAD_TERMINATE 135
  87. #define SYSTHREAD_SLEEP 136
  88. #define SYSTHREAD_INIT 137
  89. #define SYSTHREAD_NEWKEY 138
  90. #define SYSTHREAD_GETDATA 139
  91. #define SYSTHREAD_SETDATA 140
  92. #define LOG_ERROR_EVENT 149
  93. /* Functions from shexp.h */
  94. #define SHEXP_VALID 160
  95. #define SHEXP_MATCH 161
  96. #define SHEXP_CMP 162
  97. #define SHEXP_CASECMP 163
  98. /* Functions from systems.h */
  99. #define UTIL_STRCASECMP 170
  100. #define UTIL_STRNCASECMP 171
  101. /* Functions from util.h */
  102. #define UTIL_HOSTNAME 187
  103. #define UTIL_ITOA 198
  104. #define UTIL_VSPRINTF 199
  105. #define UTIL_SPRINTF 200
  106. #define UTIL_VSNPRINTF 201
  107. #define UTIL_SNPRINTF 202
  108. /* Functions from conf.h */
  109. #define CONF_INIT 207
  110. /* robm Functions added in 2.0 */
  111. #define SYSTEM_FOPENWT 261
  112. #define SYSTEM_MALLOC 262
  113. #define SYSTEM_FREE 263
  114. #define SYSTEM_REALLOC 264
  115. #define SYSTEM_STRDUP 265
  116. #define CRIT_INIT 267
  117. #define CRIT_ENTER 268
  118. #define CRIT_EXIT 269
  119. #define CRIT_TERMINATE 270
  120. #define SYSTHREAD_CURRENT 271
  121. #define ACL_LISTCONCAT 312
  122. #define GETCLIENTLANG 313