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.

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