/** * Construct a DHCP server with a default configuration. */ VBoxNetDhcp::VBoxNetDhcp():VBoxNetBaseService("VBoxNetDhcp", "VBoxNetDhcp") { /* m_enmTrunkType = kIntNetTrunkType_WhateverNone; */ RTMAC mac; mac.au8[0] = 0x08; mac.au8[1] = 0x00; mac.au8[2] = 0x27; mac.au8[3] = 0x40; mac.au8[4] = 0x41; mac.au8[5] = 0x42; setMacAddress(mac); RTNETADDRIPV4 address; address.u = RT_H2N_U32_C(RT_BSWAP_U32_C(RT_MAKE_U32_FROM_U8( 10, 0, 2, 5))); setIpv4Address(address); setSendBufSize(8 * _1K); setRecvBufSize(50 * _1K); m_uCurMsgType = UINT8_MAX; m_cbCurMsg = 0; m_pCurMsg = NULL; memset(&m_CurHdrs, '\0', sizeof(m_CurHdrs)); m_fIgnoreCmdLineParameters = true; for(unsigned int i = 0; i < RT_ELEMENTS(g_aOptionDefs); ++i) addCommandLineOption(&g_aOptionDefs[i]); }
VBoxNetLwipNAT::VBoxNetLwipNAT(SOCKET icmpsock4, SOCKET icmpsock6) : VBoxNetBaseService("VBoxNetNAT", "nat-network") { LogFlowFuncEnter(); m_ProxyOptions.ipv6_enabled = 0; m_ProxyOptions.ipv6_defroute = 0; m_ProxyOptions.icmpsock4 = icmpsock4; m_ProxyOptions.icmpsock6 = icmpsock6; m_ProxyOptions.tftp_root = NULL; m_ProxyOptions.src4 = NULL; m_ProxyOptions.src6 = NULL; RT_ZERO(m_src4); RT_ZERO(m_src6); m_src4.sin_family = AF_INET; m_src6.sin6_family = AF_INET6; #if HAVE_SA_LEN m_src4.sin_len = sizeof(m_src4); m_src6.sin6_len = sizeof(m_src6); #endif m_ProxyOptions.nameservers = NULL; m_LwipNetIf.name[0] = 'N'; m_LwipNetIf.name[1] = 'T'; RTMAC mac; mac.au8[0] = 0x52; mac.au8[1] = 0x54; mac.au8[2] = 0; mac.au8[3] = 0x12; mac.au8[4] = 0x35; mac.au8[5] = 0; setMacAddress(mac); RTNETADDRIPV4 address; address.u = RT_MAKE_U32_FROM_U8( 10, 0, 2, 2); // NB: big-endian setIpv4Address(address); address.u = RT_H2N_U32_C(0xffffff00); setIpv4Netmask(address); fDontLoadRulesOnStartup = false; for(unsigned int i = 0; i < RT_ELEMENTS(g_aGetOptDef); ++i) addCommandLineOption(&g_aGetOptDef[i]); LogFlowFuncLeave(); }
int ONVIF::AudioEncoderConfiguration::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 13) qt_static_metacall(this, _c, _id, _a); _id -= 13; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 13) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 13; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = token(); break; case 1: *reinterpret_cast< QString*>(_v) = name(); break; case 2: *reinterpret_cast< int*>(_v) = useCount(); break; case 3: *reinterpret_cast< QString*>(_v) = encoding(); break; case 4: *reinterpret_cast< int*>(_v) = bitrate(); break; case 5: *reinterpret_cast< int*>(_v) = sampleRate(); break; case 6: *reinterpret_cast< QString*>(_v) = type(); break; case 7: *reinterpret_cast< QString*>(_v) = ipv4Address(); break; case 8: *reinterpret_cast< QString*>(_v) = ipv6Address(); break; case 9: *reinterpret_cast< int*>(_v) = port(); break; case 10: *reinterpret_cast< int*>(_v) = ttl(); break; case 11: *reinterpret_cast< bool*>(_v) = autoStart(); break; case 12: *reinterpret_cast< QString*>(_v) = sessionTimeout(); break; } _id -= 13; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setToken(*reinterpret_cast< QString*>(_v)); break; case 1: setName(*reinterpret_cast< QString*>(_v)); break; case 2: setUseCount(*reinterpret_cast< int*>(_v)); break; case 3: setEncoding(*reinterpret_cast< QString*>(_v)); break; case 4: setBitrate(*reinterpret_cast< int*>(_v)); break; case 5: setSampleRate(*reinterpret_cast< int*>(_v)); break; case 6: setType(*reinterpret_cast< QString*>(_v)); break; case 7: setIpv4Address(*reinterpret_cast< QString*>(_v)); break; case 8: setIpv6Address(*reinterpret_cast< QString*>(_v)); break; case 9: setPort(*reinterpret_cast< int*>(_v)); break; case 10: setTtl(*reinterpret_cast< int*>(_v)); break; case 11: setAutoStart(*reinterpret_cast< bool*>(_v)); break; case 12: setSessionTimeout(*reinterpret_cast< QString*>(_v)); break; } _id -= 13; } else if (_c == QMetaObject::ResetProperty) { _id -= 13; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 13; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 13; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 13; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 13; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 13; } else if (_c == QMetaObject::RegisterPropertyMetaType) { if (_id < 13) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 13; } #endif // QT_NO_PROPERTIES return _id; }
int ONVIF::VideoEncoderConfiguration::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QObject::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 19) qt_static_metacall(this, _c, _id, _a); _id -= 19; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 19) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 19; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< QString*>(_v) = token(); break; case 1: *reinterpret_cast< QString*>(_v) = name(); break; case 2: *reinterpret_cast< int*>(_v) = useCount(); break; case 3: *reinterpret_cast< QString*>(_v) = encoding(); break; case 4: *reinterpret_cast< int*>(_v) = width(); break; case 5: *reinterpret_cast< int*>(_v) = height(); break; case 6: *reinterpret_cast< int*>(_v) = quality(); break; case 7: *reinterpret_cast< int*>(_v) = frameRateLimit(); break; case 8: *reinterpret_cast< int*>(_v) = encodingInterval(); break; case 9: *reinterpret_cast< int*>(_v) = bitrateLimit(); break; case 10: *reinterpret_cast< int*>(_v) = govLength(); break; case 11: *reinterpret_cast< QString*>(_v) = h264Profile(); break; case 12: *reinterpret_cast< QString*>(_v) = type(); break; case 13: *reinterpret_cast< QString*>(_v) = ipv4Address(); break; case 14: *reinterpret_cast< QString*>(_v) = ipv6Address(); break; case 15: *reinterpret_cast< int*>(_v) = port(); break; case 16: *reinterpret_cast< int*>(_v) = ttl(); break; case 17: *reinterpret_cast< bool*>(_v) = autoStart(); break; case 18: *reinterpret_cast< QString*>(_v) = sessionTimeout(); break; default: break; } _id -= 19; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setToken(*reinterpret_cast< QString*>(_v)); break; case 1: setName(*reinterpret_cast< QString*>(_v)); break; case 2: setUseCount(*reinterpret_cast< int*>(_v)); break; case 3: setEncoding(*reinterpret_cast< QString*>(_v)); break; case 4: setWidth(*reinterpret_cast< int*>(_v)); break; case 5: setHeight(*reinterpret_cast< int*>(_v)); break; case 6: setQuality(*reinterpret_cast< int*>(_v)); break; case 7: setFrameRateLimit(*reinterpret_cast< int*>(_v)); break; case 8: setEncodingInterval(*reinterpret_cast< int*>(_v)); break; case 9: setBitrateLimit(*reinterpret_cast< int*>(_v)); break; case 10: setGovLength(*reinterpret_cast< int*>(_v)); break; case 11: setH264Profile(*reinterpret_cast< QString*>(_v)); break; case 12: setType(*reinterpret_cast< QString*>(_v)); break; case 13: setIpv4Address(*reinterpret_cast< QString*>(_v)); break; case 14: setIpv6Address(*reinterpret_cast< QString*>(_v)); break; case 15: setPort(*reinterpret_cast< int*>(_v)); break; case 16: setTtl(*reinterpret_cast< int*>(_v)); break; case 17: setAutoStart(*reinterpret_cast< bool*>(_v)); break; case 18: setSessionTimeout(*reinterpret_cast< QString*>(_v)); break; default: break; } _id -= 19; } else if (_c == QMetaObject::ResetProperty) { _id -= 19; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 19; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 19; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 19; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 19; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 19; } else if (_c == QMetaObject::RegisterPropertyMetaType) { if (_id < 19) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 19; } #endif // QT_NO_PROPERTIES return _id; }