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.

1114 lines
21 KiB

  1. /*++
  2. Copyright (c) 1998, Microsoft Corporation
  3. Module Name:
  4. rmh323.c
  5. Abstract:
  6. This module contains routines for the H.323 transparent proxy module's
  7. interface to the IP router-manager. (See ROUTPROT.H for details).
  8. Author:
  9. Abolade Gbadegesin (aboladeg) 18-Jun-1999
  10. Revision History:
  11. --*/
  12. #include "precomp.h"
  13. #pragma hdrstop
  14. #include <h323icsp.h>
  15. COMPONENT_REFERENCE H323ComponentReference;
  16. PIP_H323_GLOBAL_INFO H323GlobalInfo = NULL;
  17. CRITICAL_SECTION H323GlobalInfoLock;
  18. HANDLE H323NotificationEvent;
  19. ULONG H323ProtocolStopped = 0;
  20. const MPR_ROUTING_CHARACTERISTICS H323RoutingCharacteristics =
  21. {
  22. MS_ROUTER_VERSION,
  23. MS_IP_H323,
  24. RF_ROUTING|RF_ADD_ALL_INTERFACES,
  25. H323RmStartProtocol,
  26. H323RmStartComplete,
  27. H323RmStopProtocol,
  28. H323RmGetGlobalInfo,
  29. H323RmSetGlobalInfo,
  30. NULL,
  31. NULL,
  32. H323RmAddInterface,
  33. H323RmDeleteInterface,
  34. H323RmInterfaceStatus,
  35. H323RmGetInterfaceInfo,
  36. H323RmSetInterfaceInfo,
  37. H323RmGetEventMessage,
  38. NULL,
  39. NULL,
  40. NULL,
  41. NULL,
  42. NULL,
  43. H323RmMibCreate,
  44. H323RmMibDelete,
  45. H323RmMibGet,
  46. H323RmMibSet,
  47. H323RmMibGetFirst,
  48. H323RmMibGetNext,
  49. NULL,
  50. NULL
  51. };
  52. SUPPORT_FUNCTIONS H323SupportFunctions;
  53. VOID
  54. H323CleanupModule(
  55. VOID
  56. )
  57. /*++
  58. Routine Description:
  59. This routine is invoked to cleanup the H.323 transparent proxy module.
  60. Arguments:
  61. none.
  62. Return Value:
  63. none.
  64. Environment:
  65. Invoked from within a 'DllMain' routine on 'DLL_PROCESS_DETACH'.
  66. --*/
  67. {
  68. // TODO: Call h323ics!CleanupModule
  69. H323ProxyCleanupModule();
  70. H323ShutdownInterfaceManagement();
  71. DeleteCriticalSection(&H323GlobalInfoLock);
  72. DeleteComponentReference(&H323ComponentReference);
  73. } // H323CleanupModule
  74. VOID
  75. H323CleanupProtocol(
  76. VOID
  77. )
  78. /*++
  79. Routine Description:
  80. This routine is invoked to cleanup the H.323 transparent proxy
  81. protocol-component after a 'StopProtocol'. It runs when the last reference
  82. to the component is released. (See 'COMPREF.H').
  83. Arguments:
  84. none.
  85. Return Value:
  86. none.
  87. Environment:
  88. Invoked from within an arbitrary context with no locks held.
  89. --*/
  90. {
  91. PROFILE("H323CleanupProtocol");
  92. if (H323GlobalInfo) { NH_FREE(H323GlobalInfo); H323GlobalInfo = NULL; }
  93. // TODO: Call h323ics!StopService
  94. H323ProxyStopService();
  95. InterlockedExchange(reinterpret_cast<LPLONG>(&H323ProtocolStopped), 1);
  96. SetEvent(H323NotificationEvent);
  97. ResetComponentReference(&H323ComponentReference);
  98. NhStopEventLog();
  99. } // H323CleanupProtocol
  100. BOOLEAN
  101. H323InitializeModule(
  102. VOID
  103. )
  104. /*++
  105. Routine Description:
  106. This routine is invoked to initialize the H323 module.
  107. Arguments:
  108. none.
  109. Return Value:
  110. BOOLEAN - TRUE if initialization succeeded, FALSE otherwise
  111. Environment:
  112. Invoked in the context of a 'DllMain' routine on 'DLL_PROCESS_ATTACH'.
  113. --*/
  114. {
  115. if (InitializeComponentReference(
  116. &H323ComponentReference, H323CleanupProtocol
  117. )) {
  118. return FALSE;
  119. }
  120. __try {
  121. InitializeCriticalSection(&H323GlobalInfoLock);
  122. } __except(EXCEPTION_EXECUTE_HANDLER) {
  123. DeleteComponentReference(&H323ComponentReference);
  124. return FALSE;
  125. }
  126. if (H323InitializeInterfaceManagement()) {
  127. DeleteCriticalSection(&H323GlobalInfoLock);
  128. DeleteComponentReference(&H323ComponentReference);
  129. return FALSE;
  130. }
  131. // TODO: Call h323ics!InitializeModule
  132. H323ProxyInitializeModule();
  133. return TRUE;
  134. } // H323InitializeModule
  135. ULONG
  136. APIENTRY
  137. H323RmStartProtocol(
  138. HANDLE NotificationEvent,
  139. PSUPPORT_FUNCTIONS SupportFunctions,
  140. PVOID GlobalInfo,
  141. ULONG StructureVersion,
  142. ULONG StructureSize,
  143. ULONG StructureCount
  144. )
  145. /*++
  146. Routine Description:
  147. This routine is invoked to indicate the component's operation should begin.
  148. Arguments:
  149. NotificationEvent - event on which we notify the router-manager
  150. about asynchronous occurrences
  151. SupportFunctions - functions for initiating router-related operations
  152. GlobalInfo - configuration for the component
  153. Return Value:
  154. ULONG - Win32 status code.
  155. Environment:
  156. The routine runs in the context of an IP router-manager thread.
  157. --*/
  158. {
  159. ULONG Error = NO_ERROR;
  160. ULONG Size;
  161. PROFILE("H323RmStartProtocol");
  162. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  163. if (!GlobalInfo) { DEREFERENCE_H323_AND_RETURN(ERROR_INVALID_PARAMETER); }
  164. NhStartEventLog();
  165. do {
  166. //
  167. // Copy the global configuration
  168. //
  169. EnterCriticalSection(&H323GlobalInfoLock);
  170. Size = sizeof(*H323GlobalInfo);
  171. H323GlobalInfo
  172. = reinterpret_cast<PIP_H323_GLOBAL_INFO>(NH_ALLOCATE(Size));
  173. if (!H323GlobalInfo) {
  174. LeaveCriticalSection(&H323GlobalInfoLock);
  175. NhTrace(
  176. TRACE_FLAG_INIT,
  177. "H323RmStartProtocol: cannot allocate global info"
  178. );
  179. NhErrorLog(
  180. IP_H323_LOG_ALLOCATION_FAILED,
  181. 0,
  182. "%d",
  183. Size
  184. );
  185. Error = ERROR_NOT_ENOUGH_MEMORY;
  186. break;
  187. }
  188. CopyMemory(H323GlobalInfo, GlobalInfo, Size);
  189. //
  190. // Save the notification event
  191. //
  192. H323NotificationEvent = NotificationEvent;
  193. //
  194. // Save the support functions
  195. //
  196. if (!SupportFunctions) {
  197. ZeroMemory(&H323SupportFunctions, sizeof(H323SupportFunctions));
  198. } else {
  199. CopyMemory(
  200. &H323SupportFunctions,
  201. SupportFunctions,
  202. sizeof(*SupportFunctions)
  203. );
  204. }
  205. Error = H323ProxyStartService();
  206. LeaveCriticalSection(&H323GlobalInfoLock);
  207. InterlockedExchange(reinterpret_cast<LPLONG>(&H323ProtocolStopped), 0);
  208. } while (FALSE);
  209. if (NO_ERROR != Error) {
  210. NhStopEventLog();
  211. EnterCriticalSection(&H323GlobalInfoLock);
  212. if (NULL != H323GlobalInfo) {
  213. NH_FREE(H323GlobalInfo);
  214. H323GlobalInfo = NULL;
  215. }
  216. LeaveCriticalSection(&H323GlobalInfoLock);
  217. }
  218. DEREFERENCE_H323_AND_RETURN(Error);
  219. } // H323RmStartProtocol
  220. ULONG
  221. APIENTRY
  222. H323RmStartComplete(
  223. VOID
  224. )
  225. /*++
  226. Routine Description:
  227. This routine is invoked when the router has finished adding the initial
  228. configuration.
  229. Arguments:
  230. none.
  231. Return Value:
  232. ULONG - Win32 status code
  233. Environment:
  234. The routine runs in the context of an IP router-manager thread.
  235. --*/
  236. {
  237. return NO_ERROR;
  238. } // H323RmStartComplete
  239. ULONG
  240. APIENTRY
  241. H323RmStopProtocol(
  242. VOID
  243. )
  244. /*++
  245. Routine Description:
  246. This routine is invoked to stop the protocol.
  247. Arguments:
  248. none.
  249. Return Value:
  250. ULONG - Win32 status code
  251. Environment:
  252. The routine runs in the context of an IP router-manager thread.
  253. --*/
  254. {
  255. //
  256. // Reference the module to make sure it's running
  257. //
  258. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  259. //
  260. // Drop the initial reference to cause a cleanup
  261. //
  262. ReleaseInitialComponentReference(&H323ComponentReference);
  263. return DEREFERENCE_H323() ? NO_ERROR : ERROR_PROTOCOL_STOP_PENDING;
  264. } // H323RmStopProtocol
  265. ULONG
  266. APIENTRY
  267. H323RmAddInterface(
  268. PWCHAR Name,
  269. ULONG Index,
  270. NET_INTERFACE_TYPE Type,
  271. ULONG MediaType,
  272. USHORT AccessType,
  273. USHORT ConnectionType,
  274. PVOID InterfaceInfo,
  275. ULONG StructureVersion,
  276. ULONG StructureSize,
  277. ULONG StructureCount
  278. )
  279. /*++
  280. Routine Description:
  281. This routine is invoked to add an interface to the component.
  282. Arguments:
  283. Name - the name of the interface (unused)
  284. Index - the index of the interface
  285. Type - the type of the interface
  286. InterfaceInfo - the configuration information for the interface
  287. Return Value:
  288. ULONG - Win32 status code.
  289. Environment:
  290. The routine runs in the context of an IP router-manager thread.
  291. --*/
  292. {
  293. ULONG Error;
  294. PROFILE("H323RmAddInterface");
  295. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  296. Error =
  297. H323CreateInterface(
  298. Index,
  299. Type,
  300. (PIP_H323_INTERFACE_INFO)InterfaceInfo,
  301. NULL
  302. );
  303. DEREFERENCE_H323_AND_RETURN(Error);
  304. } // H323RmAddInterface
  305. ULONG
  306. APIENTRY
  307. H323RmDeleteInterface(
  308. ULONG Index
  309. )
  310. /*++
  311. Routine Description:
  312. This routine is invoked to delete an interface from the component.
  313. Arguments:
  314. Index - the index of the interface
  315. Return Value:
  316. ULONG - Win32 status code
  317. Environment:
  318. The routine runs in the context of an IP router-manager thread.
  319. --*/
  320. {
  321. ULONG Error;
  322. PROFILE("H323RmDeleteInterface");
  323. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  324. Error =
  325. H323DeleteInterface(
  326. Index
  327. );
  328. DEREFERENCE_H323_AND_RETURN(Error);
  329. } // H323RmDeleteInterface
  330. ULONG
  331. APIENTRY
  332. H323RmGetEventMessage(
  333. OUT ROUTING_PROTOCOL_EVENTS* Event,
  334. OUT MESSAGE* Result
  335. )
  336. /*++
  337. Routine Description:
  338. This routine is invoked to retrieve an event message from the component.
  339. The only event message we generate is the 'ROUTER_STOPPED' message.
  340. Arguments:
  341. Event - receives the generated event
  342. Result - receives the associated result
  343. Return Value:
  344. ULONG - Win32 status code.
  345. --*/
  346. {
  347. PROFILE("H323RmGetEventMessage");
  348. if (InterlockedExchange(reinterpret_cast<LPLONG>(&H323ProtocolStopped), 0)) {
  349. *Event = ROUTER_STOPPED;
  350. return NO_ERROR;
  351. }
  352. return ERROR_NO_MORE_ITEMS;
  353. } // H323RmGetEventMessage
  354. ULONG
  355. APIENTRY
  356. H323RmGetInterfaceInfo(
  357. ULONG Index,
  358. PVOID InterfaceInfo,
  359. IN OUT PULONG InterfaceInfoSize,
  360. IN OUT PULONG StructureVersion,
  361. IN OUT PULONG StructureSize,
  362. IN OUT PULONG StructureCount
  363. )
  364. /*++
  365. Routine Description:
  366. This routine is invoked to retrieve the component's per-interface
  367. configuration.
  368. Arguments:
  369. Index - the index of the interface to be queried
  370. InterfaceInfo - receives the query results
  371. InterfaceInfoSize - receives the amount of data retrieved
  372. Return Value:
  373. ULONG - Win32 status code.
  374. --*/
  375. {
  376. ULONG Error;
  377. PROFILE("H323RmGetInterfaceInfo");
  378. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  379. Error =
  380. H323QueryInterface(
  381. Index,
  382. (PIP_H323_INTERFACE_INFO)InterfaceInfo,
  383. InterfaceInfoSize
  384. );
  385. *StructureSize = *InterfaceInfoSize;
  386. if (StructureCount) {*StructureCount = 1;}
  387. DEREFERENCE_H323_AND_RETURN(Error);
  388. } // H323RmGetInterfaceInfo
  389. ULONG
  390. APIENTRY
  391. H323RmSetInterfaceInfo(
  392. ULONG Index,
  393. PVOID InterfaceInfo,
  394. ULONG StructureVersion,
  395. ULONG StructureSize,
  396. ULONG StructureCount
  397. )
  398. /*++
  399. Routine Description:
  400. This routine is invoked to change the component's per-interface
  401. configuration.
  402. Arguments:
  403. Index - the index of the interface to be updated
  404. InterfaceInfo - supplies the new configuration
  405. Return Value:
  406. ULONG - Win32 status code.
  407. --*/
  408. {
  409. ULONG Error;
  410. PROFILE("H323RmSetInterfaceInfo");
  411. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  412. Error =
  413. H323ConfigureInterface(
  414. Index,
  415. (PIP_H323_INTERFACE_INFO)InterfaceInfo
  416. );
  417. DEREFERENCE_H323_AND_RETURN(Error);
  418. } // H323RmSetInterfaceInfo
  419. ULONG
  420. APIENTRY
  421. H323RmInterfaceStatus(
  422. ULONG Index,
  423. BOOL InterfaceActive,
  424. ULONG StatusType,
  425. PVOID StatusInfo
  426. )
  427. /*++
  428. Routine Description:
  429. This routine is invoked to bind/unbind, enable/disable an interface
  430. Arguments:
  431. Index - the interface to be bound
  432. InterfaceActive - whether the interface is active
  433. StatusType - type of status being changed (bind or enabled)
  434. StatusInfo - Info pertaining to the state being changed
  435. Return Value:
  436. ULONG - Win32 Status code
  437. Environment:
  438. The routine runs in the context of an IP router-manager thread.
  439. --*/
  440. {
  441. ULONG Error = NO_ERROR;
  442. switch(StatusType) {
  443. case RIS_INTERFACE_ADDRESS_CHANGE: {
  444. PIP_ADAPTER_BINDING_INFO BindInfo =
  445. (PIP_ADAPTER_BINDING_INFO)StatusInfo;
  446. if (BindInfo->AddressCount) {
  447. Error = H323RmBindInterface(Index, StatusInfo);
  448. } else {
  449. Error = H323RmUnbindInterface(Index);
  450. }
  451. break;
  452. }
  453. case RIS_INTERFACE_ENABLED: {
  454. Error = H323RmEnableInterface(Index);
  455. break;
  456. }
  457. case RIS_INTERFACE_DISABLED: {
  458. Error = H323RmDisableInterface(Index);
  459. break;
  460. }
  461. }
  462. return Error;
  463. } // H323RmInterfaceStatus
  464. ULONG
  465. H323RmBindInterface(
  466. ULONG Index,
  467. PVOID BindingInfo
  468. )
  469. /*++
  470. Routine Description:
  471. This routine is invoked to bind an interface to its IP address(es).
  472. Arguments:
  473. Index - the interface to be bound
  474. BindingInfo - the addressing information
  475. Return Value:
  476. ULONG - Win32 status code.
  477. Environment:
  478. The routine runs in the context of an IP router-manager thread.
  479. --*/
  480. {
  481. ULONG Error;
  482. PROFILE("H323RmBindInterface");
  483. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  484. Error =
  485. H323BindInterface(
  486. Index,
  487. (PIP_ADAPTER_BINDING_INFO)BindingInfo
  488. );
  489. DEREFERENCE_H323_AND_RETURN(Error);
  490. } // H323RmBindInterface
  491. ULONG
  492. H323RmUnbindInterface(
  493. ULONG Index
  494. )
  495. /*++
  496. Routine Description:
  497. This routine is invoked to unbind an interface from its IP address(es).
  498. Arguments:
  499. Index - the interface to be unbound
  500. Return Value:
  501. ULONG - Win32 status code.
  502. Environment:
  503. The routine runs in the context of an IP router-manager thread.
  504. --*/
  505. {
  506. ULONG Error;
  507. PROFILE("H323RmUnbindInterface");
  508. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  509. Error =
  510. H323UnbindInterface(
  511. Index
  512. );
  513. DEREFERENCE_H323_AND_RETURN(Error);
  514. } // H323RmUnbindInterface
  515. ULONG
  516. H323RmEnableInterface(
  517. ULONG Index
  518. )
  519. /*++
  520. Routine Description:
  521. This routine is invoked to enable operation on an interface.
  522. Arguments:
  523. Index - the interface to be enabled.
  524. Return Value:
  525. ULONG - Win32 status code.
  526. Environment:
  527. The routine runs in the context of an IP router-manager thread.
  528. --*/
  529. {
  530. ULONG Error;
  531. PROFILE("H323RmEnableInterface");
  532. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  533. Error =
  534. H323EnableInterface(
  535. Index
  536. );
  537. DEREFERENCE_H323_AND_RETURN(Error);
  538. } // H323RmEnableInterface
  539. ULONG
  540. H323RmDisableInterface(
  541. ULONG Index
  542. )
  543. /*++
  544. Routine Description:
  545. This routine is invoked to disable operation on an interface.
  546. Arguments:
  547. Index - the interface to be disabled.
  548. Return Value:
  549. ULONG - Win32 status code.
  550. Environment:
  551. The routine runs in the context of an IP router-manager thread.
  552. --*/
  553. {
  554. ULONG Error;
  555. PROFILE("H323RmDisableInterface");
  556. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  557. Error =
  558. H323DisableInterface(
  559. Index
  560. );
  561. DEREFERENCE_H323_AND_RETURN(Error);
  562. } // H323RmDisableInterface
  563. ULONG
  564. APIENTRY
  565. H323RmGetGlobalInfo(
  566. PVOID GlobalInfo,
  567. IN OUT PULONG GlobalInfoSize,
  568. IN OUT PULONG StructureVersion,
  569. IN OUT PULONG StructureSize,
  570. IN OUT PULONG StructureCount
  571. )
  572. /*++
  573. Routine Description:
  574. This routine is invoked to retrieve the configuration for the component.
  575. Arguments:
  576. GlobalInfo - receives the configuration
  577. GlobalInfoSize - receives the size of the configuration
  578. Return Value:
  579. ULONG - Win32 status code
  580. Environment:
  581. The routine runs in the context of an IP router-manager thread.
  582. --*/
  583. {
  584. ULONG Size;
  585. PROFILE("H323RmGetGlobalInfo");
  586. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  587. if (!GlobalInfoSize || (*GlobalInfoSize && !GlobalInfo)) {
  588. DEREFERENCE_H323_AND_RETURN(ERROR_INVALID_PARAMETER);
  589. }
  590. EnterCriticalSection(&H323GlobalInfoLock);
  591. Size = sizeof(*H323GlobalInfo);
  592. if (*GlobalInfoSize < Size) {
  593. LeaveCriticalSection(&H323GlobalInfoLock);
  594. *StructureSize = *GlobalInfoSize = Size;
  595. if (StructureCount) {*StructureCount = 1;}
  596. DEREFERENCE_H323_AND_RETURN(ERROR_INSUFFICIENT_BUFFER);
  597. }
  598. CopyMemory(GlobalInfo, H323GlobalInfo, Size);
  599. LeaveCriticalSection(&H323GlobalInfoLock);
  600. *StructureSize = *GlobalInfoSize = Size;
  601. if (StructureCount) {*StructureCount = 1;}
  602. DEREFERENCE_H323_AND_RETURN(NO_ERROR);
  603. } // H323RmGetGlobalInfo
  604. ULONG
  605. APIENTRY
  606. H323RmSetGlobalInfo(
  607. PVOID GlobalInfo,
  608. ULONG StructureVersion,
  609. ULONG StructureSize,
  610. ULONG StructureCount
  611. )
  612. /*++
  613. Routine Description:
  614. This routine is invoked to change the configuration for the component.
  615. Arguments:
  616. GlobalInfo - the new configuration
  617. Return Value:
  618. ULONG - Win32 status code
  619. Environment:
  620. The routine runs in the context of an IP router-manager thread.
  621. --*/
  622. {
  623. ULONG OldFlags;
  624. ULONG NewFlags;
  625. PIP_H323_GLOBAL_INFO NewInfo;
  626. ULONG Size;
  627. PROFILE("H323RmSetGlobalInfo");
  628. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  629. if (!GlobalInfo) { DEREFERENCE_H323_AND_RETURN(ERROR_INVALID_PARAMETER); }
  630. Size = sizeof(*H323GlobalInfo);
  631. NewInfo = reinterpret_cast<PIP_H323_GLOBAL_INFO>(NH_ALLOCATE(Size));
  632. if (!NewInfo) {
  633. NhTrace(
  634. TRACE_FLAG_INIT,
  635. "H323RmSetGlobalInfo: error reallocating global info"
  636. );
  637. NhErrorLog(
  638. IP_H323_LOG_ALLOCATION_FAILED,
  639. 0,
  640. "%d",
  641. Size
  642. );
  643. DEREFERENCE_H323_AND_RETURN(ERROR_NOT_ENOUGH_MEMORY);
  644. }
  645. CopyMemory(NewInfo, GlobalInfo, Size);
  646. EnterCriticalSection(&H323GlobalInfoLock);
  647. OldFlags = H323GlobalInfo->Flags;
  648. NH_FREE(H323GlobalInfo);
  649. H323GlobalInfo = NewInfo;
  650. NewFlags = H323GlobalInfo->Flags;
  651. LeaveCriticalSection(&H323GlobalInfoLock);
  652. DEREFERENCE_H323_AND_RETURN(NO_ERROR);
  653. } // H323RmSetGlobalInfo
  654. ULONG
  655. APIENTRY
  656. H323RmMibCreate(
  657. ULONG InputDataSize,
  658. PVOID InputData
  659. )
  660. {
  661. return ERROR_NOT_SUPPORTED;
  662. }
  663. ULONG
  664. APIENTRY
  665. H323RmMibDelete(
  666. ULONG InputDataSize,
  667. PVOID InputData
  668. )
  669. {
  670. return ERROR_NOT_SUPPORTED;
  671. }
  672. ULONG
  673. APIENTRY
  674. H323RmMibGet(
  675. ULONG InputDataSize,
  676. PVOID InputData,
  677. OUT PULONG OutputDataSize,
  678. OUT PVOID OutputData
  679. )
  680. /*++
  681. Routine Description:
  682. The transparent proxy only exposes one item to the MIB; its statistics.
  683. Arguments:
  684. InputDataSize - the MIB query data size
  685. InputData - specifies the MIB object to be retrieved
  686. OutputDataSize - the MIB response data size
  687. OutputData - receives the MIB object retrieved
  688. Return Value:
  689. ULONG - Win32 status code.
  690. --*/
  691. {
  692. ULONG Error;
  693. PIP_H323_MIB_QUERY Oidp;
  694. PROFILE("H323RmMibGet");
  695. REFERENCE_H323_OR_RETURN(ERROR_CAN_NOT_COMPLETE);
  696. if (InputDataSize < sizeof(*Oidp) || !OutputDataSize) {
  697. Error = ERROR_INVALID_PARAMETER;
  698. } else {
  699. Oidp = (PIP_H323_MIB_QUERY)InputData;
  700. // switch(Oidp->Oid) {
  701. // default: {
  702. NhTrace(
  703. TRACE_FLAG_H323,
  704. "H323RmMibGet: oid %d invalid",
  705. Oidp->Oid
  706. );
  707. Error = ERROR_INVALID_PARAMETER;
  708. // break;
  709. // }
  710. // }
  711. }
  712. DEREFERENCE_H323_AND_RETURN(Error);
  713. }
  714. ULONG
  715. APIENTRY
  716. H323RmMibSet(
  717. ULONG InputDataSize,
  718. PVOID InputData
  719. )
  720. {
  721. return ERROR_NOT_SUPPORTED;
  722. }
  723. ULONG
  724. APIENTRY
  725. H323RmMibGetFirst(
  726. ULONG InputDataSize,
  727. PVOID InputData,
  728. OUT PULONG OutputDataSize,
  729. OUT PVOID OutputData
  730. )
  731. {
  732. return ERROR_NOT_SUPPORTED;
  733. }
  734. ULONG
  735. APIENTRY
  736. H323RmMibGetNext(
  737. ULONG InputDataSize,
  738. PVOID InputData,
  739. OUT PULONG OutputDataSize,
  740. OUT PVOID OutputData
  741. )
  742. {
  743. return ERROR_NOT_SUPPORTED;
  744. }