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.

905 lines
21 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows NT **/
  3. /** Copyright(c) Microsoft Corp., 1994-1997 **/
  4. /**********************************************************************/
  5. /*
  6. atq.h
  7. This module contains async thread queue (atq) for async IO and thread
  8. pool sharing among various services.
  9. Brief Description of ATQ:
  10. For description, please see iis\spec\isatq.doc
  11. */
  12. #ifndef _ATQ_H_
  13. #define _ATQ_H_
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. // Include Standard headers
  18. # include <nt.h>
  19. # include <ntrtl.h>
  20. # include <nturtl.h>
  21. # include <windows.h>
  22. # include <winsock2.h>
  23. # include <mswsock.h>
  24. # include <iscaptrc.h>
  25. #ifndef dllexp
  26. #define dllexp __declspec( dllexport )
  27. #endif
  28. /*++
  29. ATQ API Overview:
  30. Global per module:
  31. AtqInitialize()
  32. AtqTerminate()
  33. AtqGetCompletionPort()
  34. AtqGetInfo()
  35. AtqSetInfo()
  36. ATQ Endpoint functions:
  37. AtqCreateEndpoint()
  38. AtqStartEndpoint()
  39. AtqEndpointGetInfo()
  40. AtqEndpointSetInfo()
  41. AtqStopCloseEndpoint()
  42. AtqCloseCloseEndpoint()
  43. AtqStopAndCloseEndpoint() <-- soon to be killed
  44. Per ATQ Context Functions:
  45. AtqAddAsyncHandle() <-- for non AcceptEx() sockets
  46. AtqGetAcceptExAddrs() <-- for AcceptEx() sockets
  47. AtqContextSetInfo()
  48. AtqCloseFileHandle()
  49. AtqCloseSocket()
  50. AtqFreeContext()
  51. Bandwidth Throttler Functions:
  52. AtqCreateBandwidthInfo()
  53. AtqFreeBandwidthInfo()
  54. AtqBandwidthSetInfo()
  55. AtqBandwidthGetInfo()
  56. IO Functions:
  57. AtqReadFile()
  58. AtqWriteFile()
  59. AtqReadSocket()
  60. AtqWriteSocket()
  61. AtqTransmitFile()
  62. AtqTransmitFileAndRecv() <-- gone
  63. AtqSendAndRecv() <-- gone
  64. Utility Functions:
  65. AtqCreateFileW() <-- gone
  66. AtqReadDirChanges()
  67. AtqPostCompletionStatus()
  68. --*/
  69. /*----------------------------------------------------------
  70. Registry Parameters used by ATQ during AtqInitialize()
  71. ATQ loads some of the parameters from
  72. HKLM\System\CurrentControlSet\Services\InetInfo\Parameters
  73. Most of these parameters are for INTERNAL ANALYSIS and
  74. development/testing. Setup should not install values
  75. for the same. Setup can include values for items marked SETUP.
  76. ------------------------------------------------------------*/
  77. // Names
  78. #define ATQ_REG_PER_PROCESSOR_ATQ_THREADS TEXT("MaxPoolThreads")
  79. #define ATQ_REG_POOL_THREAD_LIMIT TEXT("PoolThreadLimit") // SETUP
  80. #define ATQ_REG_PER_PROCESSOR_CONCURRENCY TEXT("MaxConcurrency")
  81. #define ATQ_REG_THREAD_TIMEOUT TEXT("ThreadTimeout")
  82. #define ATQ_REG_USE_ACCEPTEX TEXT("UseAcceptEx")
  83. #define ATQ_REG_USE_KERNEL_APC TEXT("UseKernelApc")
  84. #define ATQ_REG_MIN_KB_SEC TEXT("MinFileKbSec") // SETUP
  85. #define ATQ_REG_LISTEN_BACKLOG TEXT("ListenBacklog") // SETUP
  86. #define ATQ_REG_ENABLE_DEBUG_THREADS TEXT("EnableDebugThreads")
  87. #define ATQ_REG_DISABLE_BACKLOG_MONITOR TEXT("DisableBacklogMonitor")
  88. #define ATQ_REG_FORCE_TIMEOUT TEXT("ForceTimeout")
  89. // Default Values
  90. #define ATQ_REG_DEF_PER_PROCESSOR_ATQ_THREADS (4)
  91. // special value of 0 means that system will determine this dynamically.
  92. #define ATQ_REG_DEF_PER_PROCESSOR_CONCURRENCY (0)
  93. #define ATQ_REG_DEF_USE_KERNEL_APC (1)
  94. #define ATQ_REG_DEF_MAX_UNCONNECTED_ACCEPTEX (1024)
  95. //
  96. // thread limit settings
  97. //
  98. #define ATQ_REG_MIN_POOL_THREAD_LIMIT (64)
  99. #define ATQ_REG_DEF_POOL_THREAD_LIMIT (128)
  100. #define ATQ_REG_MAX_POOL_THREAD_LIMIT (256)
  101. //
  102. // THREAD_TIMEOUTs are high to prevent async ios from being cancelled
  103. // when the thread goes away.
  104. //
  105. #define ATQ_REG_DEF_THREAD_TIMEOUT (30 * 60) // thirty minutes
  106. #define ATQ_REG_DEF_USE_ACCEPTEX (TRUE)
  107. #define ATQ_REG_DEF_MIN_KB_SEC (1000) // 1000 bytes
  108. #define ATQ_REG_DEF_LISTEN_BACKLOG (25)
  109. //
  110. // fake xmit file buffer size
  111. //
  112. #define ATQ_REG_DEF_NONTF_BUFFER_SIZE (4096)
  113. /*----------------------------------------------------------
  114. Global Functions of ATQ module
  115. -----------------------------------------------------------*/
  116. BOOL
  117. AtqInitialize(
  118. IN DWORD dwFlags
  119. );
  120. BOOL
  121. AtqTerminate(
  122. VOID
  123. );
  124. dllexp
  125. HANDLE
  126. AtqGetCompletionPort();
  127. /*
  128. * Sets various context information in Atq Module for global modifications
  129. *
  130. *
  131. * Bandwidth Throttle: Sets the throttle level in Bytes/Second.
  132. * If INFINITE, then it is assumed that
  133. * there is no throttle value (default)
  134. *
  135. * Max Pool Threads: Sets the maximum number of pool threads Atq will allow
  136. * to be created per processor
  137. *
  138. * MaxConcurrency: tells how many threads to permit per processor
  139. *
  140. * Thread Timeout: Indicates how long a thread should be kep alive
  141. * waiting on GetQueuedCompletionStatus() before commiting suicide
  142. * (in seconds)
  143. *
  144. * Inc/Dec max pool threads: If a server will be doing extended processing
  145. * in an ATQ pool thread, they should increase the max pool threads
  146. * while the extended processing is occurring. This prevents starvation
  147. * of other requests
  148. *
  149. * AtqMinKbSec: set the assumed minimum KB per second for AtqTransmitFile()
  150. * This value is used in calculating the timeout for file transfer
  151. * operation
  152. *
  153. */
  154. typedef enum _ATQ_INFO {
  155. AtqBandwidthThrottle = 0,
  156. AtqExitThreadCallback,
  157. AtqMaxPoolThreads, // per processor values
  158. AtqMaxConcurrency, // per processor concurrency value
  159. AtqThreadTimeout,
  160. AtqUseAcceptEx, // Use AcceptEx if available
  161. AtqIncMaxPoolThreads, // Up the max thread count
  162. AtqDecMaxPoolThreads, // Decrease the max thread count
  163. AtqMinKbSec, // Minimum assumed transfer rate for AtqTransmitFile
  164. AtqBandwidthThrottleMaxBlocked, // Max number of blocked requests
  165. AtqMaxThreadLimit, // absolute maximum number of threads
  166. AtqAvailableThreads // Number of available threads
  167. } ATQ_INFO;
  168. //
  169. // ATQ_THREAD_EXIT_CALLBACK
  170. // Type of callback function to be called when an ATQ thread exits so
  171. // that the user of ATQ may clen up thread specific data.
  172. //
  173. typedef
  174. VOID
  175. (*ATQ_THREAD_EXIT_CALLBACK) ( VOID );
  176. dllexp
  177. ULONG_PTR
  178. AtqSetInfo(
  179. IN ATQ_INFO atqInfo,
  180. IN ULONG_PTR Data
  181. );
  182. dllexp
  183. ULONG_PTR
  184. AtqGetInfo(
  185. IN ATQ_INFO atqInfo
  186. );
  187. typedef struct _ATQ_STATISTICS {
  188. DWORD cAllowedRequests;
  189. DWORD cBlockedRequests;
  190. DWORD cRejectedRequests;
  191. DWORD cCurrentBlockedRequests;
  192. DWORD MeasuredBandwidth;
  193. } ATQ_STATISTICS;
  194. dllexp
  195. BOOL AtqGetStatistics( IN OUT ATQ_STATISTICS * pAtqStats);
  196. dllexp
  197. BOOL AtqClearStatistics(VOID);
  198. /*----------------------------------------------------------
  199. ATQ Endpoint functions
  200. -----------------------------------------------------------*/
  201. //
  202. // endpoint data
  203. //
  204. typedef enum _ATQ_ENDPOINT_INFO {
  205. EndpointInfoListenPort,
  206. EndpointInfoListenSocket,
  207. EndpointInfoAcceptExOutstanding
  208. } ATQ_ENDPOINT_INFO;
  209. //
  210. // ATQ_COMPLETION
  211. // This is the routine that is called upon IO completion (on
  212. // error or success).
  213. //
  214. // Context is the context passed to AtqAddAsyncHandle
  215. // BytesWritten is the number of bytes written to the file or
  216. // bytes written to the client's buffer
  217. // CompletionStatus is the WinError completion code
  218. // lpOverLapped is the filled in overlap structure
  219. //
  220. // If the timeout thread times out an IO request, the completion routine
  221. // will be called by the timeout thread with IOCompletion FALSE and
  222. // CompletionStatus == ERROR_SEM_TIMEOUT. The IO request is *still*
  223. // outstanding in this instance. Generally it will be completed when
  224. // the file handle is closed.
  225. //
  226. typedef
  227. VOID
  228. (*ATQ_COMPLETION)(
  229. IN PVOID Context,
  230. IN DWORD BytesWritten,
  231. IN DWORD CompletionStatus, // Win32 Error code
  232. IN OVERLAPPED * lpo
  233. );
  234. //
  235. // Type of callback function to be called when a new connection is established.
  236. // This function should be defined before including conninfo.hxx
  237. //
  238. typedef
  239. VOID
  240. (*ATQ_CONNECT_CALLBACK) (
  241. IN SOCKET sNew,
  242. IN LPSOCKADDR_IN pSockAddr,
  243. IN PVOID EndpointContext,
  244. IN PVOID EndpointObject
  245. );
  246. typedef struct _ATQ_ENDPOINT_CONFIGURATION {
  247. //
  248. // Port to listen on. If 0, system will assign
  249. //
  250. USHORT ListenPort;
  251. //
  252. // IP address to bind to. 0 (INADDR_ANY) == wildcard.
  253. //
  254. DWORD IpAddress;
  255. DWORD cbAcceptExRecvBuffer;
  256. DWORD nAcceptExOutstanding;
  257. DWORD AcceptExTimeout;
  258. //
  259. // Callbacks
  260. //
  261. ATQ_CONNECT_CALLBACK pfnConnect;
  262. ATQ_COMPLETION pfnConnectEx;
  263. ATQ_COMPLETION pfnIoCompletion;
  264. } ATQ_ENDPOINT_CONFIGURATION, *PATQ_ENDPOINT_CONFIGURATION;
  265. dllexp
  266. PVOID
  267. AtqCreateEndpoint(
  268. IN PATQ_ENDPOINT_CONFIGURATION Configuration,
  269. IN PVOID EndpointContext
  270. );
  271. dllexp
  272. BOOL
  273. AtqStartEndpoint(
  274. IN PVOID Endpoint
  275. );
  276. dllexp
  277. ULONG_PTR
  278. AtqEndpointGetInfo(
  279. IN PVOID Endpoint,
  280. IN ATQ_ENDPOINT_INFO EndpointInfo
  281. );
  282. dllexp
  283. ULONG_PTR
  284. AtqEndpointSetInfo(
  285. IN PVOID Endpoint,
  286. IN ATQ_ENDPOINT_INFO EndpointInfo,
  287. IN ULONG_PTR Info
  288. );
  289. dllexp
  290. BOOL
  291. AtqStopEndpoint(
  292. IN PVOID Endpoint
  293. );
  294. dllexp
  295. BOOL
  296. AtqCloseEndpoint(
  297. IN PVOID Endpoint
  298. );
  299. dllexp
  300. BOOL
  301. AtqStopAndCloseEndpoint(
  302. IN PVOID Endpoint,
  303. IN LPTHREAD_START_ROUTINE lpCompletion,
  304. IN PVOID lpCompletionContext
  305. );
  306. /*----------------------------------------------------------
  307. ATQ CONTEXT functions
  308. -----------------------------------------------------------*/
  309. //
  310. // This is the public portion of an ATQ Context. It should be treated
  311. // as read only
  312. //
  313. // !!! Changes made to this structure should also be made to
  314. // ATQ_CONTEXT in atqtypes.hxx !!!
  315. //
  316. typedef struct _ATQ_CONTEXT_PUBLIC {
  317. HANDLE hAsyncIO; // handle for async i/o object: socket/file
  318. OVERLAPPED Overlapped; // Overlapped structure used for IO
  319. } ATQ_CONTEXT_PUBLIC, *PATQ_CONTEXT;
  320. dllexp
  321. BOOL
  322. AtqAddAsyncHandle(
  323. OUT PATQ_CONTEXT * ppatqContext,
  324. IN PVOID EndpointObject,
  325. IN PVOID ClientContext,
  326. IN ATQ_COMPLETION pfnCompletion,
  327. IN DWORD TimeOut,
  328. IN HANDLE hAsyncIO
  329. );
  330. dllexp
  331. VOID
  332. AtqGetAcceptExAddrs(
  333. IN PATQ_CONTEXT patqContext,
  334. OUT SOCKET * pSock,
  335. OUT PVOID * ppvBuff,
  336. OUT PVOID * pEndpointContext,
  337. OUT SOCKADDR * * ppsockaddrLocal,
  338. OUT SOCKADDR * * ppsockaddrRemote
  339. );
  340. /*++
  341. AtqCloseSocket()
  342. Routine Description:
  343. Closes the socket in this atq structure if it wasn't
  344. closed by transmitfile. This function should be called only
  345. if the embedded handle in AtqContext is a Socket.
  346. Arguments:
  347. patqContext - Context whose socket should be closed.
  348. fShutdown - If TRUE, means we call shutdown and always close the socket.
  349. Note that if TransmitFile closed the socket, it will have done the
  350. shutdown for us
  351. Returns:
  352. TRUE on success and FALSE if there is a failure.
  353. --*/
  354. dllexp
  355. BOOL
  356. AtqCloseSocket(
  357. PATQ_CONTEXT patqContext,
  358. BOOL fShutdown
  359. );
  360. /*++
  361. AtqCloseFileHandle()
  362. Routine Description:
  363. Closes the file handle in this atq structure.
  364. This function should be called only if the embedded handle
  365. in AtqContext is a file handle.
  366. Arguments:
  367. patqContext - Context whose file handle should be closed.
  368. Returns:
  369. TRUE on success and FALSE if there is a failure.
  370. --*/
  371. dllexp
  372. BOOL
  373. AtqCloseFileHandle(
  374. PATQ_CONTEXT patqContext
  375. );
  376. /*++
  377. AtqFreeContext()
  378. Routine Description:
  379. Frees the context created in AtqAddAsyncHandle.
  380. Call this after the async handle has been closed and all outstanding
  381. IO operations have been completed. The context is invalid after this call.
  382. Call AtqFreeContext() for same context only ONCE.
  383. Arguments:
  384. patqContext - Context to free
  385. fReuseContext - TRUE if this can context can be reused in the context of
  386. the calling thread. Should be FALSE if the calling thread will exit
  387. soon (i.e., isn't an AtqPoolThread).
  388. Returns:
  389. None
  390. --*/
  391. dllexp
  392. VOID
  393. AtqFreeContext(
  394. IN PATQ_CONTEXT patqContext,
  395. BOOL fReuseContext
  396. );
  397. enum ATQ_CONTEXT_INFO
  398. {
  399. ATQ_INFO_TIMEOUT = 0, // Timeout rounded up to ATQ timeout interval
  400. ATQ_INFO_RESUME_IO, // resumes IO as is after Timeout
  401. ATQ_INFO_COMPLETION, // Completion routine
  402. ATQ_INFO_COMPLETION_CONTEXT,// Completion context
  403. ATQ_INFO_BANDWIDTH_INFO, // Bandwidth Throttling Descriptor
  404. ATQ_INFO_ABORTIVE_CLOSE, // do abortive close on closesocket
  405. ATQ_INFO_FORCE_CLOSE, // Always close the socket in AtqCloseSocket()
  406. ATQ_INFO_SET_OVL_OFFSET // Set the offset in the overlapped structure
  407. };
  408. /*++
  409. AtqContextSetInfo()
  410. Routine Description:
  411. Sets various bits of information for this context
  412. Arguments:
  413. patqContext - pointer to ATQ context
  414. atqInfo - Data item to set
  415. data - New value for item
  416. Return Value:
  417. The old value of the parameter
  418. --*/
  419. dllexp
  420. ULONG_PTR
  421. AtqContextSetInfo(
  422. IN PATQ_CONTEXT patqContext,
  423. IN enum ATQ_CONTEXT_INFO atqInfo,
  424. IN ULONG_PTR data
  425. );
  426. /*----------------------------------------------------------
  427. ATQ Context IO functions
  428. -----------------------------------------------------------*/
  429. /*++
  430. Routine Description:
  431. Atq<Operation><Target>()
  432. <Operation> := Read | Write | Transmit
  433. <Target> := File | Socket
  434. These functions just setup ATQ context and then call the corresponding
  435. Win32/WinSock function for submitting an asynchronous IO operation. By
  436. default the Socket functions support scatter/gather using WSABUF
  437. These functions are wrappers and should be called instead of the
  438. correpsonding Win32 API. The one difference from the Win32 API is TRUE
  439. is returned if the error ERROR_IO_PENDING occurred, thus clients do not
  440. need to check for this case.
  441. The timeout time for the request is calculated by taking the maximum of
  442. the context's timeout time and bytes transferred based on 1k/second.
  443. Arguments:
  444. patqContext - pointer to ATQ context
  445. Everything else as in the Win32 API/WinSock APIs
  446. NOTES: AtqTransmitFile takes an additional DWORD flags which may contain
  447. the winsock constants TF_DISCONNECT and TF_REUSE_SOCKET
  448. AtqReadFile and AtqWriteFile take an optional overlapped structure if
  449. clients want to have multiple outstanding reads or writes. If the value
  450. is NULL, then the overlapped structure from the Atq context is used.
  451. Return Value:
  452. TRUE if successful, FALSE on error (call GetLastError)
  453. sets ERROR_NETWORK_BUSY as error when the request needs to be rejected.
  454. --*/
  455. dllexp
  456. BOOL
  457. AtqReadFile(
  458. IN PATQ_CONTEXT patqContext,
  459. IN LPVOID lpBuffer,
  460. IN DWORD BytesToRead,
  461. IN OVERLAPPED * lpo OPTIONAL
  462. );
  463. dllexp
  464. BOOL
  465. AtqReadSocket(
  466. IN PATQ_CONTEXT patqContext,
  467. IN LPWSABUF pwsaBuffers,
  468. IN DWORD dwBufferCount,
  469. IN OVERLAPPED * lpo OPTIONAL
  470. );
  471. /*
  472. * Code for reading into single buffer will look like the following.
  473. * {
  474. * WSABUF wsaBuf = { (BytesToRead), (lpBuffer)};
  475. * fRet = AtqReadSocket( patqContext, &wsaBuf, 1, lpo);
  476. * }
  477. */
  478. dllexp
  479. BOOL
  480. AtqWriteFile(
  481. IN PATQ_CONTEXT patqContext,
  482. IN LPCVOID lpBuffer,
  483. IN DWORD BytesToWrite,
  484. IN OVERLAPPED * lpo OPTIONAL
  485. );
  486. dllexp
  487. BOOL
  488. AtqWriteSocket(
  489. IN PATQ_CONTEXT patqContext,
  490. IN LPWSABUF pwsaBuffers,
  491. IN DWORD dwBufferCount,
  492. IN OVERLAPPED * lpo OPTIONAL
  493. );
  494. dllexp
  495. BOOL
  496. AtqSyncWsaSend(
  497. IN PATQ_CONTEXT patqContext,
  498. IN LPWSABUF pwsaBuffers,
  499. IN DWORD dwBufferCount,
  500. OUT LPDWORD pcbWritten
  501. );
  502. // Note: This API always causes the complete file to be sent.
  503. // If you want to change the behaviour store the appropriate offsets
  504. // in the ATQ_CONTEXT::Overlapped object. Or use AtqTransmitFileEx
  505. dllexp
  506. BOOL
  507. AtqTransmitFile(
  508. IN PATQ_CONTEXT patqContext,
  509. IN HANDLE hFile, // File data comes from
  510. IN DWORD dwBytesInFile, // what is the size of file?
  511. IN LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers,
  512. IN DWORD dwFlags // TF_DISCONNECT, TF_REUSE_SOCKET
  513. );
  514. dllexp
  515. BOOL
  516. AtqTransmitFileEx(
  517. IN PATQ_CONTEXT patqContext,
  518. IN HANDLE hFile, // File data comes from
  519. IN DWORD dwBytesInFile, // what is the size of file?
  520. IN LPTRANSMIT_FILE_BUFFERS lpTransmitBuffers,
  521. IN DWORD dwFlags, // TF_DISCONNECT, TF_REUSE_SOCKET
  522. IN OVERLAPPED * lpo
  523. );
  524. /*----------------------------------------------------------
  525. ATQ Utility Functions
  526. -----------------------------------------------------------*/
  527. typedef
  528. VOID
  529. (*ATQ_OPLOCK_COMPLETION)(
  530. IN PVOID Context,
  531. IN DWORD Status
  532. );
  533. dllexp
  534. BOOL
  535. AtqReadDirChanges(PATQ_CONTEXT patqContext,
  536. LPVOID lpBuffer,
  537. DWORD BytesToRead,
  538. BOOL fWatchSubDir,
  539. DWORD dwNotifyFilter,
  540. OVERLAPPED * lpo );
  541. /*++
  542. AtqPostCompletionStatus()
  543. Routine Description:
  544. Posts a completion status on the completion port queue
  545. An IO pending error code is treated as a success error code
  546. Arguments:
  547. patqContext - pointer to ATQ context
  548. Everything else as in the Win32 API
  549. NOTES:
  550. Return Value:
  551. TRUE if successful, FALSE on error (call GetLastError)
  552. --*/
  553. dllexp
  554. BOOL
  555. AtqPostCompletionStatus(
  556. IN PATQ_CONTEXT patqContext,
  557. IN DWORD BytesTransferred
  558. );
  559. /*----------------------------------------------------------
  560. ATQ Utility Functions
  561. -----------------------------------------------------------*/
  562. /*++
  563. Bandwidth Throttling Support
  564. The following items are used in the support for bandwidth throttling
  565. --*/
  566. enum ATQ_BANDWIDTH_INFO
  567. {
  568. ATQ_BW_BANDWIDTH_LEVEL = 0,
  569. ATQ_BW_MAX_BLOCKED,
  570. ATQ_BW_STATISTICS,
  571. ATQ_BW_DESCRIPTION,
  572. };
  573. /*++
  574. AtqCreateBandwidthInfo()
  575. Routine Description:
  576. Allocate and opaque bandwidth descriptor
  577. Arguments:
  578. None
  579. Return Value:
  580. Pointer to descriptor. NULL if failed.
  581. --*/
  582. dllexp
  583. PVOID
  584. AtqCreateBandwidthInfo(
  585. VOID
  586. );
  587. /*++
  588. AtqFreeBandwidthInfo()
  589. Routine Description:
  590. Triggers the destruction of a bandwidth descriptor
  591. Arguments:
  592. pvBandwidthInfo - pointer to valid descriptor
  593. Return Value:
  594. TRUE if successful, else FALSE
  595. --*/
  596. dllexp
  597. BOOL
  598. AtqFreeBandwidthInfo(
  599. IN PVOID pvBandwidthInfo
  600. );
  601. /*++
  602. AtqBandwidthSetInfo()
  603. Routine Description:
  604. Set properties of bandwidth descriptor
  605. Arguments:
  606. pvBandwidthInfo - pointer to descriptor
  607. BWInfo - property to change
  608. Data - value of property
  609. Return Value:
  610. Old value of property
  611. --*/
  612. dllexp
  613. ULONG_PTR
  614. AtqBandwidthSetInfo(
  615. IN PVOID pvBandwidthInfo,
  616. IN ATQ_BANDWIDTH_INFO BwInfo,
  617. IN ULONG_PTR Data
  618. );
  619. /*++
  620. AtqBandwidthGetInfo()
  621. Routine Description:
  622. Get properties of bandwidth descriptor
  623. Arguments:
  624. pvBandwidthInfo - pointer to descriptor
  625. BWInfo - property to change
  626. pData - filled in with value of property
  627. Return Value:
  628. TRUE if successful, else FALSE
  629. --*/
  630. dllexp
  631. BOOL
  632. AtqBandwidthGetInfo(
  633. IN PVOID pvBandwidthInfo,
  634. IN ATQ_BANDWIDTH_INFO BwInfo,
  635. OUT ULONG_PTR * pData
  636. );
  637. /*++
  638. AtqSetSocketOption()
  639. Routine Description:
  640. Set socket options. Presently only handles TCP_NODELAY
  641. Arguments:
  642. patqContext - pointer to ATQ context
  643. optName - name of property to change
  644. optValue - value of property to set
  645. Return Value:
  646. TRUE if successful, else FALSE
  647. --*/
  648. dllexp
  649. BOOL
  650. AtqSetSocketOption(
  651. IN PATQ_CONTEXT patqContext,
  652. IN INT optName,
  653. IN INT optValue
  654. );
  655. dllexp
  656. PIIS_CAP_TRACE_INFO
  657. AtqGetCapTraceInfo(
  658. IN PATQ_CONTEXT patqContext
  659. );
  660. #ifdef __cplusplus
  661. }
  662. #endif
  663. #endif // !_ATQ_H_