Changeset 79845 in vbox for trunk/src/VBox
- Timestamp:
- Jul 17, 2019 9:12:50 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 132232
- Location:
- trunk/src/VBox
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
r79778 r79845 113 113 } DHCPDCMDCTX; 114 114 115 typedef std::pair<D hcpOpt_T, Utf8Str> DhcpOptSpec;115 typedef std::pair<DHCPOption_T, Utf8Str> DhcpOptSpec; 116 116 typedef std::vector<DhcpOptSpec> DhcpOpts; 117 117 typedef DhcpOpts::iterator DhcpOptIterator; 118 118 119 typedef std::vector<D hcpOpt_T> DhcpOptIds;119 typedef std::vector<DHCPOption_T> DhcpOptIds; 120 120 typedef DhcpOptIds::iterator DhcpOptIdIterator; 121 121 … … 511 511 if (ptrConfig.isNull()) 512 512 return RTEXITCODE_FAILURE; 513 CHECK_ERROR2I_STMT(ptrConfig, SetOption((D hcpOpt_T)idAddOpt, DHCPOptionEncoding_Normal,513 CHECK_ERROR2I_STMT(ptrConfig, SetOption((DHCPOption_T)idAddOpt, DHCPOptionEncoding_Normal, 514 514 Bstr(ValueUnion.psz).raw()), rcExit = RTEXITCODE_FAILURE); 515 515 } … … 534 534 if (ptrConfig.isNull()) 535 535 return RTEXITCODE_FAILURE; 536 CHECK_ERROR2I_STMT(ptrConfig, SetOption((D hcpOpt_T)idAddOpt, DHCPOptionEncoding_Hex,536 CHECK_ERROR2I_STMT(ptrConfig, SetOption((DHCPOption_T)idAddOpt, DHCPOptionEncoding_Hex, 537 537 Bstr(ValueUnion.psz).raw()), rcExit = RTEXITCODE_FAILURE); 538 538 } … … 548 548 if (ptrConfig.isNull()) 549 549 return RTEXITCODE_FAILURE; 550 CHECK_ERROR2I_STMT(ptrConfig, RemoveOption((D hcpOpt_T)ValueUnion.u8), rcExit = RTEXITCODE_FAILURE);550 CHECK_ERROR2I_STMT(ptrConfig, RemoveOption((DHCPOption_T)ValueUnion.u8), rcExit = RTEXITCODE_FAILURE); 551 551 } 552 552 break; … … 780 780 if (ptrConfig.isNull()) 781 781 return RTEXITCODE_FAILURE; 782 CHECK_ERROR2I_STMT(ptrConfig, SetOption((D hcpOpt_T)u8OptId, DHCPOptionEncoding_Normal,782 CHECK_ERROR2I_STMT(ptrConfig, SetOption((DHCPOption_T)u8OptId, DHCPOptionEncoding_Normal, 783 783 Bstr(ValueUnion.psz).raw()), rcExit = RTEXITCODE_FAILURE); 784 784 } … … 797 797 if (ptrConfig.isNull()) 798 798 return RTEXITCODE_FAILURE; 799 CHECK_ERROR2I_STMT(ptrConfig, RemoveOption((D hcpOpt_T)u8OptId), rcExit = RTEXITCODE_FAILURE);799 CHECK_ERROR2I_STMT(ptrConfig, RemoveOption((DHCPOption_T)u8OptId), rcExit = RTEXITCODE_FAILURE); 800 800 } 801 801 fNeedValueOrRemove = false; -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r79826 r79845 1764 1764 name="DhcpOpt" 1765 1765 uuid="40d99bd3-3ece-44d2-a07e-1085fe9c4f0b"> 1766 <desc>Deprecated enum, will be removed in 6.1.</desc> 1766 1767 <const name="SubnetMask" value="1"/> 1767 1768 <const name="TimeOffset" value="2"/> … … 1830 1831 1831 1832 <enum 1833 name="DHCPOption" 1834 uuid="00f5b10f-0021-4513-00f7-5bf4000982bf"> 1835 <!-- Names should exactly match those given in DhcpOptions.h. --> 1836 <!-- Note! we use the descriptions here in the VBoxManage man page / manual. Everything must be propertly described. --> 1837 <const name="SubnetMask" value="1"><desc>IPv4 netmask. Set to <link to="IDHCPServer::networkMask"/> by default.</desc></const> 1838 <const name="TimeOffset" value="2"><desc>UTC offset in seconds (32-bit decimal value).</desc></const> 1839 <const name="Routers" value="3"><desc>Space separated list of IPv4 router addresses.</desc></const> 1840 <const name="TimeServers" value="4"><desc>Space separated list of IPv4 time server (RFC 868) addresses.</desc></const> 1841 <const name="NameServers" value="5"><desc>Space separated list of IPv4 name server (IEN 116) addresses.</desc></const> 1842 <const name="DomainNameServers" value="6"><desc>Space separated list of IPv4 DNS addresses.</desc></const> 1843 <const name="LogServers" value="7"><desc>Space separated list of IPv4 log server addresses.</desc></const> 1844 <const name="CookieServers" value="8"><desc>Space separated list of IPv4 cookie server (RFC 865) addresses.</desc></const> 1845 <const name="LPRServers" value="9"><desc>Space separated list of IPv4 line printer server (RFC 1179) addresses.</desc></const> 1846 <const name="ImpressServers" value="10"><desc>Space separated list of IPv4 imagen impress server addresses.</desc></const> 1847 <const name="ResourseLocationServers" value="11"><desc>Space separated list of IPv4 resource location (RFC 887) addresses.</desc></const> 1848 <const name="HostName" value="12"><desc>The client name. See RFC 1035 for character limits. </desc></const> 1849 <const name="BootFileSize" value="13"><desc>Number of 512 byte blocks making up the boot file (16-bit decimal value).</desc></const> 1850 <const name="MeritDumpFile" value="14"><desc>Client core file.</desc></const> 1851 <const name="DomainName" value="15"><desc>Domain name for the client.</desc></const> 1852 <const name="SwapServer" value="16"><desc>IPv4 address of the swap server that the client should use.</desc></const> 1853 <const name="RootPath" value="17"><desc>The path to the root disk the client should use.</desc></const> 1854 <const name="ExtensionPath" value="18"><desc>Path to a file containing additional DHCP options (RFC2123).</desc></const> 1855 <const name="IPForwarding" value="19"><desc>Whether IP forwarding should be enabled by the client (boolean).</desc></const> 1856 <const name="OptNonLocalSourceRouting" value="20"><desc>Whether non-local datagrams should be forwarded by the client (boolean)</desc></const> 1857 <const name="PolicyFilter" value="21"><desc>List of IPv4 addresses and masks paris controlling non-local source routing.</desc></const> 1858 <const name="MaxDgramReassemblySize" value="22"><desc>The maximum datagram size the client should reassemble (16-bit decimal value).</desc></const> 1859 <const name="DefaultIPTTL" value="23"><desc>The default time-to-leave on outgoing (IP) datagrams (8-bit decimal value).</desc></const> 1860 <const name="PathMTUAgingTimeout" value="24"><desc>RFC1191 path MTU discovery timeout value in seconds (32-bit decimal value).</desc></const> 1861 <const name="PathMTUPlateauTable" value="25"><desc>RFC1191 path MTU discovery size table, sorted in ascending order (list of 16-bit decimal values).</desc></const> 1862 <const name="InterfaceMTU" value="26"><desc>The MTU size for the interface (16-bit decimal value).</desc></const> 1863 <const name="AllSubnetsAreLocal" value="27"><desc>Indicates whether the MTU size is the same for all subnets (boolean).</desc></const> 1864 <const name="BroadcastAddress" value="28"><desc>Broadcast address (RFC1122) for the client to use (IPv4 address).</desc></const> 1865 <const name="PerformMaskDiscovery" value="29"><desc>Whether to perform subnet mask discovery via ICMP (boolean).</desc></const> 1866 <const name="MaskSupplier" value="30"><desc>Whether to respond to subnet mask requests via ICMP (boolean).</desc></const> 1867 <const name="PerformRouterDiscovery" value="31"><desc>Whether to perform router discovery (RFC1256) (boolean).</desc></const> 1868 <const name="RouterSolicitationAddress" value="32"><desc>Where to send router solicitation requests (RFC1256) (IPv4 address).</desc></const> 1869 <const name="StaticRoute" value="33"><desc>List of network and router address pairs addresses.</desc></const> 1870 <const name="TrailerEncapsulation" value="34"><desc>Whether to negotiate the use of trailers for ARP (RTF893) (boolean).</desc></const> 1871 <const name="ARPCacheTimeout" value="35"><desc>The timeout in seconds for ARP cache entries (32-bit decimal value).</desc></const> 1872 <const name="EthernetEncapsulation" value="36"><desc>Whether to use IEEE 802.3 (RTF1042) rather than of v2 (RFC894) ethernet encapsulation (boolean).</desc></const> 1873 <const name="TCPDefaultTTL" value="37"><desc>Default time-to-live for TCP sends (non-zero 8-bit decimal value).</desc></const> 1874 <const name="TCPKeepaliveInterval" value="38"><desc>The interface in seconds between TCP keepalive messages (32-bit decimal value).</desc></const> 1875 <const name="TCPKeepaliveGarbage" value="39"><desc>Whether to include a byte of garbage in TCP keepalive messages for backward compatibility (boolean).</desc></const> 1876 <const name="NISDomain" value="40"><desc>The NIS (Sun Network Information Services) domain name (string).</desc></const> 1877 <const name="NISServers" value="41"><desc>Space separated list of IPv4 NIS server addresses.</desc></const> 1878 <const name="NTPServers" value="42"><desc>Space separated list of IPv4 NTP (RFC1035) server addresses.</desc></const> 1879 <const name="VendorSpecificInfo" value="43"><desc>Vendor specific information. Only <link to="DHCPOptionEncoding_hex"/></desc></const> 1880 <const name="NetBIOSNameServers" value="44"><desc>Space separated list of IPv4 NetBIOS name server (NBNS) addresses ((RFC1001,RFC1002).</desc></const> 1881 <const name="NetBIOSDatagramServers" value="45"><desc>Space separated list of IPv4 NetBIOS datagram distribution server (NBDD) addresses (RFC1001,RFC1002).</desc></const> 1882 <const name="NetBIOSNodeType" value="46"><desc>NetBIOS node type (RFC1001,RFC1002): 1=B-node, 2=P-node, 4=M-node, and 8=H-node (8-bit decimal value).</desc></const> 1883 <const name="NetBIOSScope" value="47"><desc>NetBIOS scope (RFC1001,RFC1002). Only <link to="DHCPOptionEncoding_hex"/></desc></const> 1884 <const name="XWindowsFontServers" value="48"><desc>Space separated list of IPv4 X windows font server addresses.</desc></const> 1885 <const name="XWindowsDisplayManager" value="49"><desc>Space separated list of IPv4 X windows display manager addresses.</desc></const> 1886 <!-- Options 50 thru 59 are considered DHCP internal and currently not settable. --> 1887 <const name="NetWareIPDomainName" value="62"><desc>Netware IP domain name (RFC2242) (string).</desc></const> 1888 <const name="NetWareIPInformation" value="63"><desc>Netware IP information (RFC2242). Only <link to="DHCPOptionEncoding_hex"/></desc></const> 1889 <const name="NISPlusDomain" value="64"><desc>The NIS+ domain name (string).</desc></const> 1890 <const name="NISPlusServers" value="65"><desc>Space separated list of IPv4 NIS+ server addresses.</desc></const> 1891 <const name="TFTPServerName" value="66"><desc>TFTP server name (string).</desc></const> 1892 <const name="BootfileName" value="67"><desc>Bootfile name (string).</desc></const> 1893 <const name="MobileIPHomeAgents" value="68"><desc>Space separated list of IPv4 mobile IP agent addresses.</desc></const> 1894 <const name="SMTPServers" value="69"><desc>Space separated list of IPv4 simple mail transport protocol (SMPT) server addresses.</desc></const> 1895 <const name="POP3Servers" value="70"><desc>Space separated list of IPv4 post office protocol 3 (POP3) server addresses.</desc></const> 1896 <const name="NNTPServers" value="71"><desc>Space separated list of IPv4 network news transport protocol (NTTP) server addresses.</desc></const> 1897 <const name="WWWServers" value="72"><desc>Space separated list of default IPv4 world wide web (WWW) server addresses.</desc></const> 1898 <const name="FingerServers" value="73"><desc>Space separated list of default IPv4 finger server addresses.</desc></const> 1899 <const name="IRCServers" value="74"><desc>Space separated list of default IPv4 internet relay chat (IRC) server addresses.</desc></const> 1900 <const name="StreetTalkServers" value="75"><desc>Space separated list of IPv4 StreetTalk server addresses.</desc></const> 1901 <const name="STDAServers" value="76"><desc>Space separated list of IPv4 StreetTalk directory assistance (STDA) server addresses.</desc></const> 1902 <!-- 77 is client only --> 1903 <const name="SLPDirectoryAgent" value="78"><desc>Addresses of one or more service location protocol (SLP) directory agent, and an indicator of whether their use is mandatory. Only <link to="DHCPOptionEncoding_hex"/>.</desc></const> 1904 <const name="SLPServiceScope" value="79"><desc>List of service scopes for the service location protocol (SLP) and whether using the list is mandator. Only <link to="DHCPOptionEncoding_hex"/>.</desc></const> 1905 <!-- 80 is client only --> 1906 <const name="DomainSearch" value="119"><desc>Domain search list, see RFC3397 and section 4.1.4 in RFC1035 for encoding. Only <link to="DHCPOptionEncoding_hex"/>.</desc></const> 1907 </enum> 1908 1909 <enum 1832 1910 name="DHCPOptionEncoding" 1833 1911 uuid="84b6d460-2838-4682-c0d6-ef5b573ef28a"> … … 2140 2218 <interface 2141 2219 name="IDHCPConfig" extends="$unknown" 2142 uuid=" 39cdde66-cfc3-4eec-7427-faf5b16469ae"2220 uuid="00f4a8dc-0002-4b81-0077-1dcb004571ba" 2143 2221 wsmap="managed" 2144 2222 reservedMethods="8" reservedAttributes="16" … … 2166 2244 </attribute> 2167 2245 2246 <attribute name="forcedOptions" type="DHCPOption" safearray="yes" readonly="no"> 2247 <desc>List of DHCP options which should be forced upon the clients in this 2248 config scope when they are available, whether the clients asks for them 2249 or not.</desc> 2250 </attribute> 2251 2252 <attribute name="suppressedOptions" type="DHCPOption" safearray="yes" readonly="no"> 2253 <desc>List of DHCP options which should not be sent to the clients in 2254 this config scope. This is intended for cases where one client or a 2255 group of clients shouldn't see one or more (typically global) options.</desc> 2256 </attribute> 2257 2168 2258 <method name="setOption"> 2169 2259 <desc> 2170 2260 Sets a DHCP option. 2171 2261 </desc> 2172 <param name="option" dir="in" type="D hcpOpt">2262 <param name="option" dir="in" type="DHCPOption"> 2173 2263 <desc>The DHCP option.</desc> 2174 2264 </param> … … 2178 2268 <param name="value" dir="in" type="wstring"> 2179 2269 <desc>The DHCP option value. The exact format depends on the DHCP 2180 option and should be documented in <link to="DhcpOpt"/>. 2181 </desc> 2270 @a option value and @a encoding, see see <link to="DHCPOption"/> 2271 for the <link to="DHCPOptionEncoding::Normal"/> format. 2272 </desc> 2182 2273 </param> 2183 2274 </method> … … 2185 2276 <method name="removeOption"> 2186 2277 <desc>Removes the given DHCP option.</desc> 2187 <param name="option" dir="in" type="D hcpOpt"/>2278 <param name="option" dir="in" type="DHCPOption"/> 2188 2279 </method> 2189 2280 … … 2200 2291 <method name="getOption"> 2201 2292 <desc>Gets the value of a single DHCP option.</desc> 2202 <param name="option" dir="in" type="D hcpOpt">2293 <param name="option" dir="in" type="DHCPOption"> 2203 2294 <desc>The DHCP option being sought.</desc> 2204 2295 </param> … … 2207 2298 </param> 2208 2299 <param name="value" dir="return" type="wstring"> 2209 <desc>The value of the requested DHCP option.</desc> 2300 <desc>The value of the requested DHCP option. The exact format depends on 2301 the DHCP @a option value and the @a encoding, see <link to="DHCPOption"/> 2302 for the <link to="DHCPOptionEncoding::Normal"/> format. 2303 </desc> 2210 2304 </param> 2211 2305 </method> … … 2213 2307 <method name="getAllOptions"> 2214 2308 <desc>Gets all DHCP options and their values</desc> 2215 <param name="options" dir="out" type="D hcpOpt" safearray="yes">2309 <param name="options" dir="out" type="DHCPOption" safearray="yes"> 2216 2310 <desc>Array containing the DHCP option numbers.</desc> 2217 2311 </param> … … 2220 2314 </param> 2221 2315 <param name="values" dir="return" type="wstring" safearray="yes"> 2222 <desc>Array of values that runs parallel to @a options and @a encodings.</desc> 2316 <desc>Array of values that runs parallel to @a options and @a encodings. The 2317 format depends on both of those. 2318 </desc> 2223 2319 </param> 2224 2320 </method> -
trunk/src/VBox/Main/include/DHCPConfigImpl.h
r79822 r79845 45 45 protected: 46 46 /** Config scope (global, group, vm+nic, mac). */ 47 DHCPConfigScope_T const m_enmScope;47 DHCPConfigScope_T const m_enmScope; 48 48 /** Minimum lease time. */ 49 ULONG m_secMinLeaseTime;49 ULONG m_secMinLeaseTime; 50 50 /** Default lease time. */ 51 ULONG m_secDefaultLeaseTime;51 ULONG m_secDefaultLeaseTime; 52 52 /** Maximum lease time. */ 53 ULONG m_secMaxLeaseTime; 53 ULONG m_secMaxLeaseTime; 54 /** List of options which are forced upon the client when available, whether 55 * requested by it or not. */ 56 std::vector<DHCPOption_T> m_vecForcedOptions; 57 /** List of options which should be suppressed and not returned the the client 58 * when available and requested. */ 59 std::vector<DHCPOption_T> m_vecSuppressedOptions; 54 60 /** DHCP option map. */ 55 settings::DhcpOptionMap m_OptionMap;61 settings::DhcpOptionMap m_OptionMap; 56 62 /** The DHCP server parent (weak). */ 57 DHCPServer * const m_pParent;63 DHCPServer * const m_pParent; 58 64 /** The DHCP server parent (weak). */ 59 VirtualBox * const m_pVirtualBox;65 VirtualBox * const m_pVirtualBox; 60 66 private: 61 67 /** For setError and such. */ 62 VirtualBoxBase * const m_pHack;68 VirtualBoxBase * const m_pHack; 63 69 64 70 protected: … … 85 91 HRESULT i_getMaxLeaseTime(ULONG *aMaxLeaseTime); 86 92 HRESULT i_setMaxLeaseTime(ULONG aMaxLeaseTime); 93 HRESULT i_getForcedOptions(std::vector<DHCPOption_T> &aOptions); 94 HRESULT i_setForcedOptions(const std::vector<DHCPOption_T> &aOptions); 95 HRESULT i_getSuppressedOptions(std::vector<DHCPOption_T> &aOptions); 96 HRESULT i_setSuppressedOptions(const std::vector<DHCPOption_T> &aOptions); 87 97 /** @} */ 88 98 … … 92 102 * @todo Make protected again when IDHCPServer is cleaned up. 93 103 * @{ */ 94 virtual HRESULT i_setOption(D hcpOpt_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue);95 96 virtual HRESULT i_removeOption(D hcpOpt_T aOption);104 virtual HRESULT i_setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue); 105 106 virtual HRESULT i_removeOption(DHCPOption_T aOption); 97 107 virtual HRESULT i_removeAllOptions(); 98 HRESULT i_getOption(D hcpOpt_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue);99 HRESULT i_getAllOptions(std::vector<D hcpOpt_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings,108 HRESULT i_getOption(DHCPOption_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue); 109 HRESULT i_getAllOptions(std::vector<DHCPOption_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings, 100 110 std::vector<com::Utf8Str> &aValues); 101 111 virtual HRESULT i_remove(); … … 150 160 HRESULT getMaxLeaseTime(ULONG *aMaxLeaseTime) RT_OVERRIDE { return i_getMaxLeaseTime(aMaxLeaseTime); } 151 161 HRESULT setMaxLeaseTime(ULONG aMaxLeaseTime) RT_OVERRIDE { return i_setMaxLeaseTime(aMaxLeaseTime); } 162 HRESULT getForcedOptions(std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_getForcedOptions(aOptions); } 163 HRESULT setForcedOptions(const std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_setForcedOptions(aOptions); } 164 HRESULT getSuppressedOptions(std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_getSuppressedOptions(aOptions); } 165 HRESULT setSuppressedOptions(const std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_setSuppressedOptions(aOptions); } 152 166 /** @} */ 153 167 154 168 /** @name wrapped IDHCPConfig methods 155 169 * @{ */ 156 HRESULT setOption(D hcpOpt_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) RT_OVERRIDE170 HRESULT setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) RT_OVERRIDE 157 171 { 158 172 return i_setOption(aOption, aEncoding, aValue); 159 173 } 160 174 161 HRESULT removeOption(D hcpOpt_T aOption) RT_OVERRIDE175 HRESULT removeOption(DHCPOption_T aOption) RT_OVERRIDE 162 176 { 163 177 return i_removeOption(aOption); … … 169 183 } 170 184 171 HRESULT getOption(D hcpOpt_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue) RT_OVERRIDE185 HRESULT getOption(DHCPOption_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue) RT_OVERRIDE 172 186 { 173 187 return i_getOption(aOption, aEncoding, aValue); 174 188 } 175 189 176 HRESULT getAllOptions(std::vector<D hcpOpt_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings,190 HRESULT getAllOptions(std::vector<DHCPOption_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings, 177 191 std::vector<com::Utf8Str> &aValues) RT_OVERRIDE 178 192 { … … 187 201 188 202 public: 189 HRESULT i_setOption(D hcpOpt_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) RT_OVERRIDE;190 HRESULT i_removeOption(D hcpOpt_T aOption) RT_OVERRIDE;203 HRESULT i_setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) RT_OVERRIDE; 204 HRESULT i_removeOption(DHCPOption_T aOption) RT_OVERRIDE; 191 205 HRESULT i_removeAllOptions() RT_OVERRIDE; 192 206 HRESULT i_remove() RT_OVERRIDE; … … 307 321 HRESULT getMaxLeaseTime(ULONG *aMaxLeaseTime) RT_OVERRIDE { return i_getMaxLeaseTime(aMaxLeaseTime); } 308 322 HRESULT setMaxLeaseTime(ULONG aMaxLeaseTime) RT_OVERRIDE { return i_setMaxLeaseTime(aMaxLeaseTime); } 323 HRESULT getForcedOptions(std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_getForcedOptions(aOptions); } 324 HRESULT setForcedOptions(const std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_setForcedOptions(aOptions); } 325 HRESULT getSuppressedOptions(std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_getSuppressedOptions(aOptions); } 326 HRESULT setSuppressedOptions(const std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_setSuppressedOptions(aOptions); } 309 327 /** @} */ 310 328 … … 318 336 /** @name Wrapped IDHCPConfig methods 319 337 * @{ */ 320 HRESULT setOption(D hcpOpt_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) RT_OVERRIDE338 HRESULT setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) RT_OVERRIDE 321 339 { 322 340 return i_setOption(aOption, aEncoding, aValue); 323 341 } 324 342 325 HRESULT removeOption(D hcpOpt_T aOption) RT_OVERRIDE343 HRESULT removeOption(DHCPOption_T aOption) RT_OVERRIDE 326 344 { 327 345 return i_removeOption(aOption); … … 333 351 } 334 352 335 HRESULT getOption(D hcpOpt_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue) RT_OVERRIDE353 HRESULT getOption(DHCPOption_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue) RT_OVERRIDE 336 354 { 337 355 return i_getOption(aOption, aEncoding, aValue); 338 356 } 339 357 340 HRESULT getAllOptions(std::vector<D hcpOpt_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings,358 HRESULT getAllOptions(std::vector<DHCPOption_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings, 341 359 std::vector<com::Utf8Str> &aValues) RT_OVERRIDE 342 360 { … … 438 456 HRESULT getMaxLeaseTime(ULONG *aMaxLeaseTime) RT_OVERRIDE { return i_getMaxLeaseTime(aMaxLeaseTime); } 439 457 HRESULT setMaxLeaseTime(ULONG aMaxLeaseTime) RT_OVERRIDE { return i_setMaxLeaseTime(aMaxLeaseTime); } 458 HRESULT getForcedOptions(std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_getForcedOptions(aOptions); } 459 HRESULT setForcedOptions(const std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_setForcedOptions(aOptions); } 460 HRESULT getSuppressedOptions(std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_getSuppressedOptions(aOptions); } 461 HRESULT setSuppressedOptions(const std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_setSuppressedOptions(aOptions); } 440 462 /** @} */ 441 463 442 464 /** @name wrapped IDHCPConfig methods 443 465 * @{ */ 444 HRESULT setOption(D hcpOpt_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) RT_OVERRIDE466 HRESULT setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) RT_OVERRIDE 445 467 { 446 468 return i_setOption(aOption, aEncoding, aValue); 447 469 } 448 470 449 HRESULT removeOption(D hcpOpt_T aOption) RT_OVERRIDE471 HRESULT removeOption(DHCPOption_T aOption) RT_OVERRIDE 450 472 { 451 473 return i_removeOption(aOption); … … 457 479 } 458 480 459 HRESULT getOption(D hcpOpt_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue) RT_OVERRIDE481 HRESULT getOption(DHCPOption_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue) RT_OVERRIDE 460 482 { 461 483 return i_getOption(aOption, aEncoding, aValue); 462 484 } 463 485 464 HRESULT getAllOptions(std::vector<D hcpOpt_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings,486 HRESULT getAllOptions(std::vector<DHCPOption_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings, 465 487 std::vector<com::Utf8Str> &aValues) RT_OVERRIDE 466 488 { -
trunk/src/VBox/Main/include/DHCPServerImpl.h
r79771 r79845 29 29 struct DHCPServer; 30 30 struct DhcpOptValue; 31 typedef std::map<D hcpOpt_T, DhcpOptValue> DhcpOptionMap;31 typedef std::map<DHCPOption_T, DhcpOptValue> DhcpOptionMap; 32 32 } 33 33 … … 121 121 ComObjPtr<DHCPIndividualConfig> &a_rPtrConfig); 122 122 123 HRESULT i_encode60Option(com::Utf8Str &strEncoded, D hcpOpt_T enmOption,123 HRESULT i_encode60Option(com::Utf8Str &strEncoded, DHCPOption_T enmOption, 124 124 DHCPOptionEncoding_T enmEncoding, const com::Utf8Str &strValue); 125 125 HRESULT i_getAllOptions60(DHCPConfig &aSourceConfig, std::vector<com::Utf8Str> &aValues); -
trunk/src/VBox/Main/src-server/DHCPConfigImpl.cpp
r79822 r79845 63 63 m_secMaxLeaseTime = rConfig.secMaxLeaseTime; 64 64 65 /* 66 * The two option list: 67 */ 68 struct 69 { 70 const char *psz; 71 std::vector<DHCPOption_T> *pDst; 72 } aStr2Vec[] = 73 { 74 { rConfig.strForcedOptions.c_str(), &m_vecForcedOptions }, 75 { rConfig.strSuppressedOptions.c_str(), &m_vecSuppressedOptions }, 76 }; 77 for (size_t i = 0; i < RT_ELEMENTS(aStr2Vec); i++) 78 { 79 Assert(aStr2Vec[i].pDst->size() == 0); 80 const char *psz = RTStrStripL(aStr2Vec[i].psz); 81 while (*psz != '\0') 82 { 83 uint8_t bOpt; 84 char *pszNext; 85 int vrc = RTStrToUInt8Ex(psz, &pszNext, 10, &bOpt); 86 if (vrc == VINF_SUCCESS || vrc == VWRN_TRAILING_SPACES) 87 { 88 try 89 { 90 aStr2Vec[i].pDst->push_back((DHCPOption_T)bOpt); 91 } 92 catch (std::bad_alloc &) 93 { 94 return E_OUTOFMEMORY; 95 } 96 } 97 else 98 { 99 LogRelFunc(("Trouble at offset %#zu converting '%s' to a DHCPOption_T vector (vrc=%Rrc)! Ignornig the remainder.\n", 100 psz - aStr2Vec[i].psz, aStr2Vec[i].psz, vrc)); 101 break; 102 } 103 psz = RTStrStripL(pszNext); 104 } 105 } 106 107 /* 108 * The option map: 109 */ 65 110 for (settings::DhcpOptionMap::const_iterator it = rConfig.mapOptions.begin(); it != rConfig.mapOptions.end(); ++it) 66 111 { … … 86 131 a_rDst.secMaxLeaseTime = m_secMaxLeaseTime; 87 132 133 /* Forced and suppressed vectors: */ 134 try 135 { 136 a_rDst.strForcedOptions.setNull(); 137 for (size_t i = 0; i < m_vecForcedOptions.size(); i++) 138 a_rDst.strForcedOptions.appendPrintf(i ? " %d" : "%d", m_vecForcedOptions[i]); 139 140 a_rDst.strSuppressedOptions.setNull(); 141 for (size_t i = 0; i < m_vecSuppressedOptions.size(); i++) 142 a_rDst.strSuppressedOptions.appendPrintf(i ? " %d" : "%d", m_vecSuppressedOptions[i]); 143 } 144 catch (std::bad_alloc &) 145 { 146 return E_OUTOFMEMORY; 147 } 148 149 88 150 /* Options: */ 89 151 try … … 161 223 162 224 163 HRESULT DHCPConfig::i_setOption(DhcpOpt_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) 225 HRESULT DHCPConfig::i_getForcedOptions(std::vector<DHCPOption_T> &aOptions) 226 { 227 AutoReadLock alock(m_pHack COMMA_LOCKVAL_SRC_POS); 228 try 229 { 230 aOptions = m_vecForcedOptions; 231 } 232 catch (std::bad_alloc &) 233 { 234 return E_OUTOFMEMORY; 235 } 236 return S_OK; 237 } 238 239 240 HRESULT DHCPConfig::i_setForcedOptions(const std::vector<DHCPOption_T> &aOptions) 241 { 242 /* 243 * Validate the options. 244 */ 245 try 246 { 247 std::map<DHCPOption_T, bool> mapDuplicates; 248 for (size_t i = 0; i < aOptions.size(); i++) 249 { 250 DHCPOption_T enmOpt = aOptions[i]; 251 if ((int)enmOpt > 0 && (int)enmOpt < 255) 252 { 253 if (mapDuplicates.find(enmOpt) == mapDuplicates.end()) 254 mapDuplicates[enmOpt] = true; 255 else 256 return m_pHack->setError(E_INVALIDARG, m_pHack->tr("Duplicate option value: %d"), (int)enmOpt); 257 } 258 else 259 return m_pHack->setError(E_INVALIDARG, m_pHack->tr("Invalid option value: %d"), (int)enmOpt); 260 } 261 } 262 catch (std::bad_alloc &) 263 { 264 return E_OUTOFMEMORY; 265 } 266 267 /* 268 * Do the updating. 269 */ 270 { 271 AutoWriteLock alock(m_pHack COMMA_LOCKVAL_SRC_POS); 272 273 /* Actually changed? */ 274 if (m_vecForcedOptions.size() == aOptions.size()) 275 { 276 ssize_t i = m_vecForcedOptions.size(); 277 while (i-- > 0) 278 if (m_vecForcedOptions[i] != aOptions[i]) 279 break; 280 if (i < 0) 281 return S_OK; 282 } 283 284 /* Copy over the changes: */ 285 try 286 { 287 m_vecForcedOptions = aOptions; 288 } 289 catch (std::bad_alloc &) 290 { 291 return E_OUTOFMEMORY; 292 } 293 } 294 295 return i_doWriteConfig(); 296 } 297 298 299 HRESULT DHCPConfig::i_getSuppressedOptions(std::vector<DHCPOption_T> &aOptions) 300 { 301 AutoReadLock alock(m_pHack COMMA_LOCKVAL_SRC_POS); 302 try 303 { 304 aOptions = m_vecSuppressedOptions; 305 } 306 catch (std::bad_alloc &) 307 { 308 return E_OUTOFMEMORY; 309 } 310 return S_OK; 311 } 312 313 314 HRESULT DHCPConfig::i_setSuppressedOptions(const std::vector<DHCPOption_T> &aOptions) 315 { 316 /* 317 * Validate and normalize it. 318 */ 319 std::map<DHCPOption_T, bool> mapNormalized; 320 try 321 { 322 for (size_t i = 0; i < aOptions.size(); i++) 323 { 324 DHCPOption_T enmOpt = aOptions[i]; 325 if ((int)enmOpt > 0 && (int)enmOpt < 255) 326 mapNormalized[enmOpt] = true; 327 else 328 return m_pHack->setError(E_INVALIDARG, m_pHack->tr("Invalid option value: %d"), (int)enmOpt); 329 } 330 } 331 catch (std::bad_alloc &) 332 { 333 return E_OUTOFMEMORY; 334 } 335 336 /* 337 * Do the updating. 338 */ 339 { 340 AutoWriteLock alock(m_pHack COMMA_LOCKVAL_SRC_POS); 341 342 /* Actually changed? */ 343 if (m_vecSuppressedOptions.size() == mapNormalized.size()) 344 { 345 size_t i = 0; 346 for (std::map<DHCPOption_T, bool>::const_iterator itMap = mapNormalized.begin();; ++itMap, i++) 347 { 348 if (itMap == mapNormalized.end()) 349 return S_OK; /* no change */ 350 if (itMap->first != m_vecSuppressedOptions[i]) 351 break; 352 } 353 } 354 355 /* Copy over the changes: */ 356 try 357 { 358 m_vecSuppressedOptions.resize(mapNormalized.size()); 359 size_t i = 0; 360 for (std::map<DHCPOption_T, bool>::const_iterator itMap = mapNormalized.begin(); 361 itMap != mapNormalized.end(); ++itMap, i++) 362 m_vecSuppressedOptions[i] = itMap->first; 363 } 364 catch (std::bad_alloc &) 365 { 366 return E_OUTOFMEMORY; 367 } 368 } 369 370 return i_doWriteConfig(); 371 } 372 373 374 HRESULT DHCPConfig::i_setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) 164 375 { 165 376 /* … … 211 422 212 423 213 HRESULT DHCPConfig::i_removeOption(D hcpOpt_T aOption)424 HRESULT DHCPConfig::i_removeOption(DHCPOption_T aOption) 214 425 { 215 426 { … … 235 446 236 447 237 HRESULT DHCPConfig::i_getOption(D hcpOpt_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue)448 HRESULT DHCPConfig::i_getOption(DHCPOption_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue) 238 449 { 239 450 AutoReadLock alock(m_pHack COMMA_LOCKVAL_SRC_POS); … … 248 459 249 460 250 HRESULT DHCPConfig::i_getAllOptions(std::vector<D hcpOpt_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings,461 HRESULT DHCPConfig::i_getAllOptions(std::vector<DHCPOption_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings, 251 462 std::vector<com::Utf8Str> &aValues) 252 463 { … … 338 549 HRESULT hrc = DHCPConfig::i_initWithDefaults(a_pVirtualBox, a_pParent); 339 550 if (SUCCEEDED(hrc)) 340 hrc = i_setOption(D hcpOpt_SubnetMask, DHCPOptionEncoding_Normal, "0.0.0.0");551 hrc = i_setOption(DHCPOption_SubnetMask, DHCPOptionEncoding_Normal, "0.0.0.0"); 341 552 342 553 if (SUCCEEDED(hrc)) … … 386 597 { 387 598 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 388 settings::DhcpOptionMap::const_iterator it = m_OptionMap.find(D hcpOpt_SubnetMask);599 settings::DhcpOptionMap::const_iterator it = m_OptionMap.find(DHCPOption_SubnetMask); 389 600 if (it != m_OptionMap.end()) 390 601 { … … 412 623 return setErrorBoth(E_INVALIDARG, vrc, tr("Invalid IPv4 netmask '%s': %Rrc"), a_rSrc.c_str(), vrc); 413 624 414 return i_setOption(D hcpOpt_SubnetMask, DHCPOptionEncoding_Normal, a_rSrc);625 return i_setOption(DHCPOption_SubnetMask, DHCPOptionEncoding_Normal, a_rSrc); 415 626 } 416 627 … … 419 630 * Overriden to ensure the sanity of the DhcpOpt_SubnetMask option. 420 631 */ 421 HRESULT DHCPGlobalConfig::i_setOption(D hcpOpt_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue)632 HRESULT DHCPGlobalConfig::i_setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) 422 633 { 423 634 if (aOption != DhcpOpt_SubnetMask || aEncoding == DHCPOptionEncoding_Normal) … … 430 641 * Overriden to ensure the sanity of the DhcpOpt_SubnetMask option. 431 642 */ 432 HRESULT DHCPGlobalConfig::i_removeOption(D hcpOpt_T aOption)643 HRESULT DHCPGlobalConfig::i_removeOption(DHCPOption_T aOption) 433 644 { 434 645 if (aOption != DhcpOpt_SubnetMask) … … 445 656 { 446 657 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 447 settings::DhcpOptionMap::iterator it = m_OptionMap.find(D hcpOpt_SubnetMask);658 settings::DhcpOptionMap::iterator it = m_OptionMap.find(DHCPOption_SubnetMask); 448 659 m_OptionMap.erase(m_OptionMap.begin(), it); 449 660 if (it != m_OptionMap.end()) -
trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp
r79823 r79845 580 580 * value. 581 581 */ 582 HRESULT DHCPServer::i_encode60Option(com::Utf8Str &strEncoded, D hcpOpt_T enmOption,582 HRESULT DHCPServer::i_encode60Option(com::Utf8Str &strEncoded, DHCPOption_T enmOption, 583 583 DHCPOptionEncoding_T enmEncoding, const com::Utf8Str &strValue) 584 584 { … … 634 634 { 635 635 /* Get the values using the new getter: */ 636 std::vector<D hcpOpt_T>Options;636 std::vector<DHCPOption_T> Options; 637 637 std::vector<DHCPOptionEncoding_T> Encodings; 638 638 std::vector<com::Utf8Str> Values; … … 658 658 { 659 659 if (aOption != 0) 660 return aTargetConfig.i_setOption( aOption, DHCPOptionEncoding_Normal, aValue);660 return aTargetConfig.i_setOption((DHCPOption_T)aOption, DHCPOptionEncoding_Normal, aValue); 661 661 662 662 /* … … 703 703 } 704 704 705 return aTargetConfig.i_setOption( aOption, enmEncoding, com::Utf8Str(pszNext + 1));705 return aTargetConfig.i_setOption((DHCPOption_T)aOption, enmEncoding, com::Utf8Str(pszNext + 1)); 706 706 } 707 707 … … 715 715 HRESULT DHCPServer::removeGlobalOption(DhcpOpt_T aOption) 716 716 { 717 return m->globalConfig->i_removeOption( aOption);717 return m->globalConfig->i_removeOption((DHCPOption_T)aOption); 718 718 } 719 719 … … 885 885 HRESULT hrc = i_vmNameAndSlotToConfig(aVmName, aSlot, false, ptrConfig); 886 886 if (SUCCEEDED(hrc)) 887 hrc = ptrConfig->i_removeOption( aOption);887 hrc = ptrConfig->i_removeOption((DHCPOption_T)aOption); 888 888 return hrc; 889 889 } -
trunk/src/VBox/Main/xml/Settings.cpp
r79778 r79845 1738 1738 pElmThis->setAttribute("networkName", srv.strNetworkName); 1739 1739 pElmThis->setAttribute("IPAddress", srv.strIPAddress); 1740 DhcpOptConstIterator itOpt = srv.globalConfig.mapOptions.find(D hcpOpt_SubnetMask);1740 DhcpOptConstIterator itOpt = srv.globalConfig.mapOptions.find(DHCPOption_SubnetMask); 1741 1741 if (itOpt != srv.globalConfig.mapOptions.end()) 1742 1742 pElmThis->setAttribute("networkMask", itOpt->second.strValue); … … 1802 1802 if (rConfig.secMaxLeaseTime > 0) 1803 1803 elmOptions.setAttribute("secMaxLeaseTime", rConfig.secMaxLeaseTime); 1804 if (rConfig.strForcedOptions.isNotEmpty()) 1805 elmOptions.setAttribute("forcedOptions", rConfig.strForcedOptions); 1806 if (rConfig.strSuppressedOptions.isNotEmpty()) 1807 elmOptions.setAttribute("suppressedOptions", rConfig.strSuppressedOptions); 1804 1808 1805 1809 /* The DHCP options are <Option> child elements: */ 1806 1810 for (DhcpOptConstIterator it = rConfig.mapOptions.begin(); it != rConfig.mapOptions.end(); ++it) 1807 if (it->first != D hcpOpt_SubnetMask || !fSkipSubnetMask)1811 if (it->first != DHCPOption_SubnetMask || !fSkipSubnetMask) 1808 1812 { 1809 1813 xml::ElementNode *pElmOption = elmOptions.createChild("Option"); … … 1830 1834 if ( pelmServer->getAttributeValue("networkName", srv.strNetworkName) 1831 1835 && pelmServer->getAttributeValue("IPAddress", srv.strIPAddress) 1832 && pelmServer->getAttributeValue("networkMask", srv.globalConfig.mapOptions[D hcpOpt_SubnetMask].strValue)1836 && pelmServer->getAttributeValue("networkMask", srv.globalConfig.mapOptions[DHCPOption_SubnetMask].strValue) 1833 1837 && pelmServer->getAttributeValue("lowerIP", srv.strIPLower) 1834 1838 && pelmServer->getAttributeValue("upperIP", srv.strIPUpper) … … 1927 1931 if (!elmConfig.getAttributeValue("secMaxLeaseTime", rConfig.secMaxLeaseTime)) 1928 1932 rConfig.secMaxLeaseTime = 0; 1933 if (!elmConfig.getAttributeValue("forcedOptions", rConfig.strForcedOptions)) 1934 rConfig.strSuppressedOptions.setNull(); 1935 if (!elmConfig.getAttributeValue("suppressedOptions", rConfig.strSuppressedOptions)) 1936 rConfig.strSuppressedOptions.setNull(); 1929 1937 1930 1938 /* The DHCP options are <Option> child elements: */ … … 1936 1944 if (!pElmOption->getAttributeValue("name", iOptName)) 1937 1945 continue; 1938 D hcpOpt_T OptName = (DhcpOpt_T)iOptName;1939 if (OptName == D hcpOpt_SubnetMask && fIgnoreSubnetMask)1946 DHCPOption_T OptName = (DHCPOption_T)iOptName; 1947 if (OptName == DHCPOption_SubnetMask && fIgnoreSubnetMask) 1940 1948 continue; 1941 1949 … … 2258 2266 #endif 2259 2267 srv.strIPAddress = "192.168.56.100"; 2260 srv.globalConfig.mapOptions[D hcpOpt_SubnetMask] = DhcpOptValue("255.255.255.0");2268 srv.globalConfig.mapOptions[DHCPOption_SubnetMask] = DhcpOptValue("255.255.255.0"); 2261 2269 srv.strIPLower = "192.168.56.101"; 2262 2270 srv.strIPUpper = "192.168.56.254"; -
trunk/src/VBox/NetworkServices/Dhcpd/DhcpOptions.cpp
r79778 r79845 321 321 HANDLE(OptNonLocalSourceRouting); // 20 322 322 HANDLE(OptPolicyFilter); // 21 323 HANDLE(OptMaxD atagramReassemblySize);// 22323 HANDLE(OptMaxDgramReassemblySize); // 22 324 324 HANDLE(OptDefaultIPTTL); // 23 325 HANDLE(Opt DefaultPathMTUAgingTimeout);// 24325 HANDLE(OptPathMTUAgingTimeout); // 24 326 326 HANDLE(OptPathMTUPlateauTable); // 25 327 327 HANDLE(OptInterfaceMTU); // 26 … … 342 342 HANDLE(OptNISServers); // 41 343 343 HANDLE(OptNTPServers); // 42 344 HANDLE(OptVendorSpecificInfo); // 43344 //HANDLE(OptVendorSpecificInfo); // 43 - Only DHCPOptionEncoding_hex 345 345 HANDLE(OptNetBIOSNameServers); // 44 346 346 HANDLE(OptNetBIOSDatagramServers); // 45 347 347 HANDLE(OptNetBIOSNodeType); // 46 348 HANDLE(OptNetBIOSScope); // 47348 //HANDLE(OptNetBIOSScope); // 47 - Only DHCPOptionEncoding_hex 349 349 HANDLE(OptXWindowsFontServers); // 48 350 350 HANDLE(OptXWindowsDisplayManager); // 49 … … 364 364 #endif 365 365 HANDLE(OptNetWareIPDomainName); // 62 366 HANDLE(OptNetWareIPInformation); // 63366 //HANDLE(OptNetWareIPInformation); // 63 - Only DHCPOptionEncoding_hex 367 367 HANDLE(OptNISPlusDomain); // 64 368 368 HANDLE(OptNISPlusServers); // 65 369 HANDLE(OptTFTPServer );// 66 - perhaps we should use an alternative way to configure these.370 HANDLE(OptBoot FileName); // 67 - perhaps we should use an alternative way to configure these.369 HANDLE(OptTFTPServerName); // 66 - perhaps we should use an alternative way to configure these. 370 HANDLE(OptBootfileName); // 67 - perhaps we should use an alternative way to configure these. 371 371 HANDLE(OptMobileIPHomeAgents); // 68 372 372 HANDLE(OptSMTPServers); // 69 … … 379 379 HANDLE(OptSTDAServers); // 76 380 380 // OptUserClassId (77) is client only and not configurable. 381 HANDLE(OptSLPDirectoryAgent); // 78382 HANDLE(OptSLPServiceScope); // 79381 //HANDLE(OptSLPDirectoryAgent); // 78 - Only DHCPOptionEncoding_hex 382 //HANDLE(OptSLPServiceScope); // 79 - Only DHCPOptionEncoding_hex 383 383 // OptRapidCommit (80) is not configurable. 384 385 //HANDLE(OptDomainSearch); // 119 - Only DHCPOptionEncoding_hex 384 386 385 387 #undef HANDLE -
trunk/src/VBox/NetworkServices/Dhcpd/DhcpOptions.h
r79763 r79845 756 756 typedef OptValue<20, bool> OptNonLocalSourceRouting; 757 757 typedef OptList<21, DhcpIpv4AddrAndMask> OptPolicyFilter; 758 typedef OptValue<22, uint16_t> OptMaxD atagramReassemblySize;758 typedef OptValue<22, uint16_t> OptMaxDgramReassemblySize; 759 759 typedef OptValue<23, uint16_t> OptDefaultIPTTL; 760 typedef OptValue<24, uint32_t> Opt DefaultPathMTUAgingTimeout;760 typedef OptValue<24, uint32_t> OptPathMTUAgingTimeout; 761 761 typedef OptList<25, uint16_t> OptPathMTUPlateauTable; 762 762 typedef OptValue<26, uint16_t> OptInterfaceMTU; … … 801 801 typedef OptString<64> OptNISPlusDomain; 802 802 typedef OptString<65> OptNISPlusServers; 803 typedef OptString<66> OptTFTPServer ;/**< when overloaded */804 typedef OptString<67> OptBoot FileName; /**< when overloaded */803 typedef OptString<66> OptTFTPServerName; /**< when overloaded */ 804 typedef OptString<67> OptBootfileName; /**< when overloaded */ 805 805 typedef OptList<68, RTNETADDRIPV4> OptMobileIPHomeAgents; 806 806 typedef OptList<69, RTNETADDRIPV4> OptSMTPServers; … … 816 816 typedef OptList<79, uint8_t> OptSLPServiceScope; /**< complicated, so just byte list for now. RFC2610 */ 817 817 typedef OptNoValue<80> OptRapidCommit; /**< RFC4039 */ 818 typedef OptList<119, uint8_t> OptDomainSearch; /**< RFC3397 */ 818 819 /** @} */ 819 820
Note:
See TracChangeset
for help on using the changeset viewer.