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.

661 lines
8.7 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1994 - 1999
  6. //
  7. // File: server.h
  8. //
  9. //--------------------------------------------------------------------------
  10. /************************************************************************/
  11. // Local function prototypes
  12. /************************************************************************/
  13. VOID
  14. Usage(
  15. IN PSZ PrgName
  16. );
  17. VOID
  18. Setup_Function_Pointers(
  19. );
  20. NTSTATUS
  21. Wait_For_Client_Threads(
  22. );
  23. NTSTATUS
  24. Parse_Cmd_Line(
  25. IN USHORT argc,
  26. IN PSZ argv[]
  27. );
  28. VOID
  29. SrvService(
  30. IN PUSHORT pTindex
  31. );
  32. VOID
  33. Cleanup(
  34. );
  35. /************************************************************************/
  36. // External function prototypes
  37. /************************************************************************/
  38. /*++
  39. For NamedPipe
  40. --*/
  41. extern
  42. NTSTATUS
  43. NMP_Initialize(
  44. IN USHORT NClients,
  45. IN PCHAR ServerName,
  46. IN USHORT SrvCli
  47. );
  48. extern
  49. NTSTATUS
  50. NMP_PerClientInit(
  51. IN USHORT CIndex,
  52. IN USHORT SrvCli
  53. );
  54. extern
  55. NTSTATUS
  56. NMP_Allocate_Memory(
  57. IN USHORT CIndex
  58. );
  59. extern
  60. NTSTATUS
  61. NMP_Deallocate_Memory(
  62. IN USHORT CIndex
  63. );
  64. extern
  65. NTSTATUS
  66. NMP_DoHandshake(
  67. IN USHORT CIndex,
  68. IN USHORT SrvCli
  69. );
  70. extern
  71. NTSTATUS
  72. NMP_Cleanup(
  73. VOID
  74. );
  75. extern
  76. NTSTATUS
  77. NMP_Wait_For_Client(
  78. IN USHORT CIndex
  79. );
  80. extern
  81. NTSTATUS
  82. NMP_Disconnect_Client(
  83. IN USHORT CIndex
  84. );
  85. extern
  86. NTSTATUS
  87. NMP_ReadFromIPC(
  88. IN USHORT CIndex,
  89. IN OUT PULONG pReadDone,
  90. IN USHORT SrvCli
  91. );
  92. extern
  93. NTSTATUS
  94. NMP_WriteToIPC(
  95. IN USHORT CIndex,
  96. IN OUT PULONG pWriteDone,
  97. IN USHORT SrvCli
  98. );
  99. extern
  100. NTSTATUS
  101. NMP_XactIO(
  102. IN USHORT CIndex,
  103. IN OUT PULONG pReadDone,
  104. IN OUT PULONG pWriteDone,
  105. IN USHORT SrvCli,
  106. IN BOOLEAN FirstIter
  107. );
  108. extern
  109. NTSTATUS
  110. NMP_ThreadCleanUp(
  111. IN USHORT CIndex
  112. );
  113. /*++**********************************************************************
  114. For NetBIOS
  115. --*/
  116. extern
  117. NTSTATUS
  118. NB_Initialize(
  119. IN USHORT NClients,
  120. IN PCHAR ServerName,
  121. IN USHORT SrvCli
  122. );
  123. extern
  124. NTSTATUS
  125. NB_PerClientInit(
  126. IN USHORT CIndex,
  127. IN USHORT SrvCli
  128. );
  129. extern
  130. NTSTATUS
  131. NB_Allocate_Memory(
  132. IN USHORT CIndex
  133. );
  134. extern
  135. NTSTATUS
  136. NB_Deallocate_Memory(
  137. IN USHORT CIndex
  138. );
  139. extern
  140. NTSTATUS
  141. NB_DoHandshake(
  142. IN USHORT CIndex,
  143. IN USHORT SrvCli
  144. );
  145. extern
  146. NTSTATUS
  147. NB_Cleanup(
  148. VOID
  149. );
  150. extern
  151. NTSTATUS
  152. NB_Wait_For_Client(
  153. IN USHORT CIndex
  154. );
  155. extern
  156. NTSTATUS
  157. NB_Disconnect_Client(
  158. IN USHORT CIndex
  159. );
  160. extern
  161. NTSTATUS
  162. NB_ReadFromIPC(
  163. IN USHORT CIndex,
  164. IN OUT PULONG pReadDone,
  165. IN USHORT SrvCli
  166. );
  167. extern
  168. NTSTATUS
  169. NB_WriteToIPC(
  170. IN USHORT CIndex,
  171. IN OUT PULONG pWriteDone,
  172. IN USHORT SrvCli
  173. );
  174. extern
  175. NTSTATUS
  176. NB_XactIO(
  177. IN USHORT CIndex,
  178. IN OUT PULONG pReadDone,
  179. IN OUT PULONG pWriteDone,
  180. IN USHORT SrvCli,
  181. IN BOOLEAN FirstIter
  182. );
  183. extern
  184. NTSTATUS
  185. NB_ThreadCleanUp(
  186. IN USHORT CIndex
  187. );
  188. /*++**********************************************************************
  189. For Sockets TCP/IP
  190. --*/
  191. extern
  192. NTSTATUS
  193. SCTCP_Initialize(
  194. IN USHORT NClients,
  195. IN PCHAR ServerName,
  196. IN USHORT SrvCli
  197. );
  198. extern
  199. NTSTATUS
  200. SCTCP_PerClientInit(
  201. IN USHORT CIndex,
  202. IN USHORT SrvCli
  203. );
  204. extern
  205. NTSTATUS
  206. SCTCP_Allocate_Memory(
  207. IN USHORT CIndex
  208. );
  209. extern
  210. NTSTATUS
  211. SCTCP_Deallocate_Memory(
  212. IN USHORT CIndex
  213. );
  214. extern
  215. NTSTATUS
  216. SCTCP_DoHandshake(
  217. IN USHORT CIndex,
  218. IN USHORT SrvCli
  219. );
  220. extern
  221. NTSTATUS
  222. SCTCP_Cleanup(
  223. VOID
  224. );
  225. extern
  226. NTSTATUS
  227. SCTCP_Wait_For_Client(
  228. IN USHORT CIndex
  229. );
  230. extern
  231. NTSTATUS
  232. SCTCP_Disconnect_Client(
  233. IN USHORT CIndex
  234. );
  235. extern
  236. NTSTATUS
  237. SCTCP_ReadFromIPC(
  238. IN USHORT CIndex,
  239. IN OUT PULONG pReadDone,
  240. IN USHORT SrvCli
  241. );
  242. extern
  243. NTSTATUS
  244. SCTCP_WriteToIPC(
  245. IN USHORT CIndex,
  246. IN OUT PULONG pWriteDone,
  247. IN USHORT SrvCli
  248. );
  249. extern
  250. NTSTATUS
  251. SCTCP_XactIO(
  252. IN USHORT CIndex,
  253. IN OUT PULONG pReadDone,
  254. IN OUT PULONG pWriteDone,
  255. IN USHORT SrvCli,
  256. IN BOOLEAN FirstIter
  257. );
  258. extern
  259. NTSTATUS
  260. SCTCP_ThreadCleanUp(
  261. IN USHORT CIndex
  262. );
  263. /*++**********************************************************************
  264. For Sockets SPX(XNS)
  265. --*/
  266. extern
  267. NTSTATUS
  268. SCXNS_Initialize(
  269. IN USHORT NClients,
  270. IN PCHAR ServerName,
  271. IN USHORT SrvCli
  272. );
  273. extern
  274. NTSTATUS
  275. SCXNS_PerClientInit(
  276. IN USHORT CIndex,
  277. IN USHORT SrvCli
  278. );
  279. extern
  280. NTSTATUS
  281. SCXNS_Allocate_Memory(
  282. IN USHORT CIndex
  283. );
  284. extern
  285. NTSTATUS
  286. SCXNS_Deallocate_Memory(
  287. IN USHORT CIndex
  288. );
  289. extern
  290. NTSTATUS
  291. SCXNS_DoHandshake(
  292. IN USHORT CIndex,
  293. IN USHORT SrvCli
  294. );
  295. extern
  296. NTSTATUS
  297. SCXNS_Cleanup(
  298. VOID
  299. );
  300. extern
  301. NTSTATUS
  302. SCXNS_Wait_For_Client(
  303. IN USHORT CIndex
  304. );
  305. extern
  306. NTSTATUS
  307. SCXNS_Disconnect_Client(
  308. IN USHORT CIndex
  309. );
  310. extern
  311. NTSTATUS
  312. SCXNS_ReadFromIPC(
  313. IN USHORT CIndex,
  314. IN OUT PULONG pReadDone,
  315. IN USHORT SrvCli
  316. );
  317. extern
  318. NTSTATUS
  319. SCXNS_WriteToIPC(
  320. IN USHORT CIndex,
  321. IN OUT PULONG pWriteDone,
  322. IN USHORT SrvCli
  323. );
  324. extern
  325. NTSTATUS
  326. SCXNS_XactIO(
  327. IN USHORT CIndex,
  328. IN OUT PULONG pReadDone,
  329. IN OUT PULONG pWriteDone,
  330. IN USHORT SrvCli,
  331. IN BOOLEAN FirstIter
  332. );
  333. extern
  334. NTSTATUS
  335. SCXNS_ThreadCleanUp(
  336. IN USHORT CIndex
  337. );
  338. /*++**********************************************************************
  339. For Sockets UDP
  340. --*/
  341. extern
  342. NTSTATUS
  343. SCUDP_Initialize(
  344. IN USHORT NClients,
  345. IN PCHAR ServerName,
  346. IN USHORT SrvCli
  347. );
  348. extern
  349. NTSTATUS
  350. SCUDP_PerClientInit(
  351. IN USHORT CIndex,
  352. IN USHORT SrvCli
  353. );
  354. extern
  355. NTSTATUS
  356. SCUDP_Allocate_Memory(
  357. IN USHORT CIndex
  358. );
  359. extern
  360. NTSTATUS
  361. SCUDP_Deallocate_Memory(
  362. IN USHORT CIndex
  363. );
  364. extern
  365. NTSTATUS
  366. SCUDP_DoHandshake(
  367. IN USHORT CIndex,
  368. IN USHORT SrvCli
  369. );
  370. extern
  371. NTSTATUS
  372. SCUDP_Cleanup(
  373. VOID
  374. );
  375. extern
  376. NTSTATUS
  377. SCUDP_Wait_For_Client(
  378. IN USHORT CIndex
  379. );
  380. extern
  381. NTSTATUS
  382. SCUDP_Disconnect_Client(
  383. IN USHORT CIndex
  384. );
  385. extern
  386. NTSTATUS
  387. SCUDP_ReadFromIPC(
  388. IN USHORT CIndex,
  389. IN OUT PULONG pReadDone,
  390. IN USHORT SrvCli
  391. );
  392. extern
  393. NTSTATUS
  394. SCUDP_WriteToIPC(
  395. IN USHORT CIndex,
  396. IN OUT PULONG pWriteDone,
  397. IN USHORT SrvCli
  398. );
  399. extern
  400. NTSTATUS
  401. SCUDP_ThreadCleanUp(
  402. IN USHORT CIndex
  403. );
  404. /*++**********************************************************************
  405. For Sockets IPX
  406. --*/
  407. extern
  408. NTSTATUS
  409. SCIPX_Initialize(
  410. IN USHORT NClients,
  411. IN PCHAR ServerName,
  412. IN USHORT SrvCli
  413. );
  414. extern
  415. NTSTATUS
  416. SCIPX_PerClientInit(
  417. IN USHORT CIndex,
  418. IN USHORT SrvCli
  419. );
  420. extern
  421. NTSTATUS
  422. SCIPX_Allocate_Memory(
  423. IN USHORT CIndex
  424. );
  425. extern
  426. NTSTATUS
  427. SCIPX_Deallocate_Memory(
  428. IN USHORT CIndex
  429. );
  430. extern
  431. NTSTATUS
  432. SCIPX_DoHandshake(
  433. IN USHORT CIndex,
  434. IN USHORT SrvCli
  435. );
  436. extern
  437. NTSTATUS
  438. SCIPX_Cleanup(
  439. VOID
  440. );
  441. extern
  442. NTSTATUS
  443. SCIPX_Wait_For_Client(
  444. IN USHORT CIndex
  445. );
  446. extern
  447. NTSTATUS
  448. SCIPX_Disconnect_Client(
  449. IN USHORT CIndex
  450. );
  451. extern
  452. NTSTATUS
  453. SCIPX_ReadFromIPC(
  454. IN USHORT CIndex,
  455. IN OUT PULONG pReadDone,
  456. IN USHORT SrvCli
  457. );
  458. extern
  459. NTSTATUS
  460. SCIPX_WriteToIPC(
  461. IN USHORT CIndex,
  462. IN OUT PULONG pWriteDone,
  463. IN USHORT SrvCli
  464. );
  465. extern
  466. NTSTATUS
  467. SCIPX_ThreadCleanUp(
  468. IN USHORT CIndex
  469. );
  470. /*++**********************************************************************
  471. For Datagram NetBIOS
  472. --*/
  473. extern
  474. NTSTATUS
  475. DGNB_Initialize(
  476. IN USHORT NClients,
  477. IN PCHAR ServerName,
  478. IN USHORT SrvCli
  479. );
  480. extern
  481. NTSTATUS
  482. DGNB_PerClientInit(
  483. IN USHORT CIndex,
  484. IN USHORT SrvCli
  485. );
  486. extern
  487. NTSTATUS
  488. DGNB_Allocate_Memory(
  489. IN USHORT CIndex
  490. );
  491. extern
  492. NTSTATUS
  493. DGNB_Deallocate_Memory(
  494. IN USHORT CIndex
  495. );
  496. extern
  497. NTSTATUS
  498. DGNB_DoHandshake(
  499. IN USHORT CIndex,
  500. IN USHORT SrvCli
  501. );
  502. extern
  503. NTSTATUS
  504. DGNB_Cleanup(
  505. VOID
  506. );
  507. extern
  508. NTSTATUS
  509. DGNB_Wait_For_Client(
  510. IN USHORT CIndex
  511. );
  512. extern
  513. NTSTATUS
  514. DGNB_Disconnect_Client(
  515. IN USHORT CIndex
  516. );
  517. extern
  518. NTSTATUS
  519. DGNB_ReadFromIPC(
  520. IN USHORT CIndex,
  521. IN OUT PULONG pReadDone,
  522. IN USHORT SrvCli
  523. );
  524. extern
  525. NTSTATUS
  526. DGNB_WriteToIPC(
  527. IN USHORT CIndex,
  528. IN OUT PULONG pWriteDone,
  529. IN USHORT SrvCli
  530. );
  531. extern
  532. NTSTATUS
  533. DGNB_XactIO(
  534. IN USHORT CIndex,
  535. IN OUT PULONG pReadDone,
  536. IN OUT PULONG pWriteDone,
  537. IN USHORT SrvCli,
  538. IN BOOLEAN FirstIter
  539. );
  540. extern
  541. NTSTATUS
  542. DGNB_ThreadCleanUp(
  543. IN USHORT CIndex
  544. );