Changeset 87616 in vbox
- Timestamp:
- Feb 4, 2021 11:59:16 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 142651
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp
r87601 r87616 177 177 int homeInit(); 178 178 int logInit(); 179 int eventsInit(); 179 180 180 181 static void reportError(const char *a_pcszFormat, ...) RT_IPRT_FORMAT_ATTR(1, 2); … … 194 195 static err_t netifInit(netif *pNetif) RT_NOTHROW_PROTO; 195 196 196 HRESULT HandleEvent(VBoxEventType_T aEventType, IEvent *pEvent);197 virtual HRESULT HandleEvent(VBoxEventType_T aEventType, IEvent *pEvent); 197 198 198 199 const char **getHostNameservers(); … … 354 355 logInit(); 355 356 356 357 {358 ComEventTypeArray eventTypes;359 eventTypes.push_back(VBoxEventType_OnNATNetworkPortForward);360 eventTypes.push_back(VBoxEventType_OnNATNetworkSetting);361 rc = createNatListener(m_NatListener, virtualbox, this, eventTypes);362 AssertRCReturn(rc, rc);363 }364 365 366 357 // resolver changes are reported on vbox but are retrieved from 367 358 // host so stash a pointer for future lookups … … 369 360 AssertComRCReturn(hrc, VERR_INTERNAL_ERROR); 370 361 371 {372 ComEventTypeArray eventTypes;373 eventTypes.push_back(VBoxEventType_OnHostNameResolutionConfigurationChange);374 eventTypes.push_back(VBoxEventType_OnNATNetworkStartStop);375 rc = createNatListener(m_VBoxListener, virtualbox, this, eventTypes);376 AssertRCReturn(rc, rc);377 }378 379 {380 ComEventTypeArray eventTypes;381 eventTypes.push_back(VBoxEventType_OnVBoxSVCAvailabilityChanged);382 rc = createClientListener(m_VBoxClientListener, virtualboxClient, this, eventTypes);383 AssertRCReturn(rc, rc);384 }385 362 386 363 BOOL fIPv6Enabled = FALSE; … … 494 471 m_ProxyOptions.nameservers = getHostNameservers(); 495 472 473 eventsInit(); 496 474 /* end of COM initialization */ 497 475 … … 597 575 598 576 return rc; 577 } 578 579 580 /** 581 * Create and register event listeners. 582 */ 583 int VBoxNetLwipNAT::eventsInit() 584 { 585 int rc; 586 587 { 588 ComEventTypeArray eventTypes; 589 eventTypes.push_back(VBoxEventType_OnNATNetworkPortForward); 590 eventTypes.push_back(VBoxEventType_OnNATNetworkSetting); 591 rc = createNatListener(m_NatListener, virtualbox, this, eventTypes); 592 AssertRCReturn(rc, rc); 593 } 594 595 { 596 ComEventTypeArray eventTypes; 597 eventTypes.push_back(VBoxEventType_OnHostNameResolutionConfigurationChange); 598 eventTypes.push_back(VBoxEventType_OnNATNetworkStartStop); 599 rc = createNatListener(m_VBoxListener, virtualbox, this, eventTypes); 600 AssertRCReturn(rc, rc); 601 } 602 603 { 604 ComEventTypeArray eventTypes; 605 eventTypes.push_back(VBoxEventType_OnVBoxSVCAvailabilityChanged); 606 rc = createClientListener(m_VBoxClientListener, virtualboxClient, this, eventTypes); 607 AssertRCReturn(rc, rc); 608 } 609 610 return VINF_SUCCESS; 599 611 } 600 612
Note:
See TracChangeset
for help on using the changeset viewer.