VirtualBox

source: vbox/trunk/src/VBox/Main/include/DHCPConfigImpl.h@ 107526

Last change on this file since 107526 was 107521, checked in by vboxsync, 4 weeks ago

src/VBox/Main/include/DHCPConfigImpl.h: Fixed warning found by Parfait (uninitialized attributes). jiraref:VBP-1424

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 20.8 KB
Line 
1/* $Id: DHCPConfigImpl.h 107521 2025-01-08 14:49:29Z vboxsync $ */
2/** @file
3 * VirtualBox Main - IDHCPConfig, IDHCPConfigGlobal, IDHCPConfigGroup, IDHCPConfigIndividual header.
4 */
5
6/*
7 * Copyright (C) 2006-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef MAIN_INCLUDED_DHCPConfigImpl_h
29#define MAIN_INCLUDED_DHCPConfigImpl_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include "DHCPGlobalConfigWrap.h"
35#include "DHCPGroupConditionWrap.h"
36#include "DHCPGroupConfigWrap.h"
37#include "DHCPIndividualConfigWrap.h"
38#include <VBox/settings.h>
39
40
41class DHCPServer;
42class DHCPGroupConfig;
43
44
45/**
46 * Base class for the a DHCP configration layer.
47 *
48 * This does not inherit from DHCPConfigWrap because its children need to
49 * inherit from children of DHCPConfigWrap, which smells like trouble and thus
50 * wasn't even attempted. Instead, we have a hack for passing a pointer that we
51 * can call setError and such on.
52 */
53class DHCPConfig
54{
55protected:
56 /** Config scope (global, group, vm+nic, mac). */
57 DHCPConfigScope_T const m_enmScope;
58 /** Minimum lease time. */
59 ULONG m_secMinLeaseTime;
60 /** Default lease time. */
61 ULONG m_secDefaultLeaseTime;
62 /** Maximum lease time. */
63 ULONG m_secMaxLeaseTime;
64 /** List of options which are forced upon the client when available, whether
65 * requested by it or not. */
66 std::vector<DHCPOption_T> m_vecForcedOptions;
67 /** List of options which should be suppressed and not returned the the client
68 * when available and requested. */
69 std::vector<DHCPOption_T> m_vecSuppressedOptions;
70 /** DHCP option map. */
71 settings::DhcpOptionMap m_OptionMap;
72 /** The DHCP server parent (weak). */
73 DHCPServer * const m_pParent;
74 /** The DHCP server parent (weak). */
75 VirtualBox * const m_pVirtualBox;
76private:
77 /** For setError and such. */
78 VirtualBoxBase * const m_pHack;
79
80protected:
81 /** @name Constructors and destructors.
82 * @{ */
83 DHCPConfig(DHCPConfigScope_T a_enmScope, VirtualBoxBase *a_pHack)
84 : m_enmScope(a_enmScope), m_secMinLeaseTime(0), m_secDefaultLeaseTime(0), m_secMaxLeaseTime(0), m_OptionMap()
85 , m_pParent(NULL), m_pVirtualBox(NULL), m_pHack(a_pHack)
86 {}
87 DHCPConfig();
88 virtual ~DHCPConfig()
89 {}
90 HRESULT i_initWithDefaults(VirtualBox *a_pVirtualBox, DHCPServer *a_pParent);
91 HRESULT i_initWithSettings(VirtualBox *a_pVirtualBox, DHCPServer *a_pParent, const settings::DHCPConfig &rConfig);
92 /** @} */
93
94 /** @name IDHCPConfig properties
95 * @{ */
96 HRESULT i_getScope(DHCPConfigScope_T *aScope);
97 HRESULT i_getMinLeaseTime(ULONG *aMinLeaseTime);
98 HRESULT i_setMinLeaseTime(ULONG aMinLeaseTime);
99 HRESULT i_getDefaultLeaseTime(ULONG *aDefaultLeaseTime);
100 HRESULT i_setDefaultLeaseTime(ULONG aDefaultLeaseTime);
101 HRESULT i_getMaxLeaseTime(ULONG *aMaxLeaseTime);
102 HRESULT i_setMaxLeaseTime(ULONG aMaxLeaseTime);
103 HRESULT i_getForcedOptions(std::vector<DHCPOption_T> &aOptions);
104 HRESULT i_setForcedOptions(const std::vector<DHCPOption_T> &aOptions);
105 HRESULT i_getSuppressedOptions(std::vector<DHCPOption_T> &aOptions);
106 HRESULT i_setSuppressedOptions(const std::vector<DHCPOption_T> &aOptions);
107 /** @} */
108
109public:
110 DECLARE_TRANSLATE_METHODS(DHCPConfig)
111
112 /** @name IDHCPConfig methods
113 * @note public because the DHCPServer needs them for 6.0 interfaces.
114 * @todo Make protected again when IDHCPServer is cleaned up.
115 * @{ */
116 virtual HRESULT i_setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue);
117
118 virtual HRESULT i_removeOption(DHCPOption_T aOption);
119 virtual HRESULT i_removeAllOptions();
120 HRESULT i_getOption(DHCPOption_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue);
121 HRESULT i_getAllOptions(std::vector<DHCPOption_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings,
122 std::vector<com::Utf8Str> &aValues);
123 virtual HRESULT i_remove();
124 /** @} */
125
126
127public:
128 HRESULT i_doWriteConfig();
129 HRESULT i_saveSettings(settings::DHCPConfig &a_rDst);
130 DHCPConfigScope_T i_getScope() const RT_NOEXCEPT { return m_enmScope; }
131 virtual void i_writeDhcpdConfig(xml::ElementNode *pElm);
132};
133
134
135/**
136 * Global DHCP configuration.
137 */
138class DHCPGlobalConfig : public DHCPGlobalConfigWrap, public DHCPConfig
139{
140public:
141 DECLARE_TRANSLATE_METHODS(DHCPGlobalConfig)
142
143 /** @name Constructors and destructors.
144 * @{ */
145 DHCPGlobalConfig()
146 : DHCPConfig(DHCPConfigScope_Global, this)
147 { }
148 HRESULT FinalConstruct()
149 {
150 return BaseFinalConstruct();
151 }
152 void FinalRelease()
153 {
154 uninit();
155 BaseFinalRelease();
156 }
157 HRESULT initWithDefaults(VirtualBox *a_pVirtualBox, DHCPServer *a_pParent);
158 HRESULT initWithSettings(VirtualBox *a_pVirtualBox, DHCPServer *a_pParent, const settings::DHCPConfig &rConfig);
159 void uninit() RT_OVERRIDE;
160 /** @} */
161
162 HRESULT i_saveSettings(settings::DHCPConfig &a_rDst);
163 HRESULT i_getNetworkMask(com::Utf8Str &a_rDst);
164 HRESULT i_setNetworkMask(const com::Utf8Str &a_rSrc);
165
166protected:
167 /** @name wrapped IDHCPConfig properties
168 * @{ */
169 HRESULT getScope(DHCPConfigScope_T *aScope) RT_OVERRIDE { return i_getScope(aScope); }
170 HRESULT getMinLeaseTime(ULONG *aMinLeaseTime) RT_OVERRIDE { return i_getMinLeaseTime(aMinLeaseTime); }
171 HRESULT setMinLeaseTime(ULONG aMinLeaseTime) RT_OVERRIDE { return i_setMinLeaseTime(aMinLeaseTime); }
172 HRESULT getDefaultLeaseTime(ULONG *aDefaultLeaseTime) RT_OVERRIDE { return i_getDefaultLeaseTime(aDefaultLeaseTime); }
173 HRESULT setDefaultLeaseTime(ULONG aDefaultLeaseTime) RT_OVERRIDE { return i_setDefaultLeaseTime(aDefaultLeaseTime); }
174 HRESULT getMaxLeaseTime(ULONG *aMaxLeaseTime) RT_OVERRIDE { return i_getMaxLeaseTime(aMaxLeaseTime); }
175 HRESULT setMaxLeaseTime(ULONG aMaxLeaseTime) RT_OVERRIDE { return i_setMaxLeaseTime(aMaxLeaseTime); }
176 HRESULT getForcedOptions(std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_getForcedOptions(aOptions); }
177 HRESULT setForcedOptions(const std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_setForcedOptions(aOptions); }
178 HRESULT getSuppressedOptions(std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_getSuppressedOptions(aOptions); }
179 HRESULT setSuppressedOptions(const std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_setSuppressedOptions(aOptions); }
180 /** @} */
181
182 /** @name wrapped IDHCPConfig methods
183 * @{ */
184 HRESULT setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) RT_OVERRIDE
185 {
186 return i_setOption(aOption, aEncoding, aValue);
187 }
188
189 HRESULT removeOption(DHCPOption_T aOption) RT_OVERRIDE
190 {
191 return i_removeOption(aOption);
192 }
193
194 HRESULT removeAllOptions() RT_OVERRIDE
195 {
196 return i_removeAllOptions();
197 }
198
199 HRESULT getOption(DHCPOption_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue) RT_OVERRIDE
200 {
201 return i_getOption(aOption, aEncoding, aValue);
202 }
203
204 HRESULT getAllOptions(std::vector<DHCPOption_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings,
205 std::vector<com::Utf8Str> &aValues) RT_OVERRIDE
206 {
207 return i_getAllOptions(aOptions, aEncodings, aValues);
208 }
209
210 HRESULT remove() RT_OVERRIDE
211 {
212 return i_remove();
213 }
214 /** @} */
215
216public:
217 HRESULT i_setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) RT_OVERRIDE;
218 HRESULT i_removeOption(DHCPOption_T aOption) RT_OVERRIDE;
219 HRESULT i_removeAllOptions() RT_OVERRIDE;
220 HRESULT i_remove() RT_OVERRIDE;
221};
222
223
224/**
225 * DHCP Group inclusion/exclusion condition.
226 */
227class DHCPGroupCondition : public DHCPGroupConditionWrap
228{
229private:
230 /** Inclusive or exclusive condition. */
231 bool m_fInclusive;
232 /** The condition type (or how m_strValue should be interpreted). */
233 DHCPGroupConditionType_T m_enmType;
234 /** The value. Interpreted according to m_enmType. */
235 com::Utf8Str m_strValue;
236 /** Pointer to the parent (weak). */
237 DHCPGroupConfig *m_pParent;
238
239public:
240 DECLARE_TRANSLATE_METHODS(DHCPGroupCondition)
241
242 /** @name Constructors and destructors.
243 * @{ */
244 DHCPGroupCondition()
245 : m_fInclusive(false)
246 , m_enmType(DHCPGroupConditionType_MAC)
247 , m_pParent(NULL)
248 {}
249 HRESULT FinalConstruct()
250 {
251 return BaseFinalConstruct();
252 }
253 void FinalRelease()
254 {
255 uninit();
256 BaseFinalRelease();
257 }
258 HRESULT initWithDefaults(DHCPGroupConfig *a_pParent, bool a_fInclusive, DHCPGroupConditionType_T a_enmType,
259 const com::Utf8Str a_strValue);
260 HRESULT initWithSettings(DHCPGroupConfig *a_pParent, const settings::DHCPGroupCondition &a_rSrc);
261 void uninit() RT_OVERRIDE;
262 /** @} */
263
264 HRESULT i_saveSettings(settings::DHCPGroupCondition &a_rDst);
265 static HRESULT i_validateTypeAndValue(DHCPGroupConditionType_T enmType, com::Utf8Str const &strValue,
266 VirtualBoxBase *pErrorDst);
267
268 /** @name Internal accessors
269 * @{ */
270 bool i_getInclusive() const RT_NOEXCEPT { return m_fInclusive; }
271 DHCPGroupConditionType_T i_getType() const RT_NOEXCEPT { return m_enmType; }
272 com::Utf8Str const &i_getValue() const RT_NOEXCEPT { return m_strValue; }
273 /** @} */
274
275protected:
276 /** @name Wrapped IDHCPGroupCondition properties
277 * @{ */
278 HRESULT getInclusive(BOOL *aInclusive) RT_OVERRIDE;
279 HRESULT setInclusive(BOOL aInclusive) RT_OVERRIDE;
280 HRESULT getType(DHCPGroupConditionType_T *aType) RT_OVERRIDE;
281 HRESULT setType(DHCPGroupConditionType_T aType) RT_OVERRIDE;
282 HRESULT getValue(com::Utf8Str &aValue) RT_OVERRIDE;
283 HRESULT setValue(const com::Utf8Str &aValue) RT_OVERRIDE;
284 /** @} */
285
286 /** @name Wrapped IDHCPGroupCondition methods
287 * @{ */
288 HRESULT remove() RT_OVERRIDE;
289 /** @} */
290};
291
292
293/**
294 * Group configuration.
295 */
296class DHCPGroupConfig : public DHCPGroupConfigWrap, public DHCPConfig
297{
298private:
299 /** Group name. */
300 com::Utf8Str m_strName;
301 /** Group membership conditions. */
302 std::vector<ComObjPtr<DHCPGroupCondition> > m_Conditions;
303 /** Iterator for m_Conditions. */
304 typedef std::vector<ComObjPtr<DHCPGroupCondition> >::iterator ConditionsIterator;
305
306public:
307 DECLARE_TRANSLATE_METHODS(DHCPGroupConfig)
308
309 /** @name Constructors and destructors.
310 * @{ */
311 DHCPGroupConfig()
312 : DHCPConfig(DHCPConfigScope_Group, this)
313 { }
314 HRESULT FinalConstruct()
315 {
316 return BaseFinalConstruct();
317 }
318 void FinalRelease()
319 {
320 uninit();
321 BaseFinalRelease();
322 }
323 HRESULT initWithDefaults(VirtualBox *a_pVirtualBox, DHCPServer *a_pParent, const com::Utf8Str &a_rName);
324 HRESULT initWithSettings(VirtualBox *a_pVirtualBox, DHCPServer *a_pParent, const settings::DHCPGroupConfig &a_rSrc);
325 void uninit() RT_OVERRIDE;
326 /** @} */
327
328 HRESULT i_saveSettings(settings::DHCPGroupConfig &a_rDst);
329 HRESULT i_removeCondition(DHCPGroupCondition *a_pCondition);
330 void i_writeDhcpdConfig(xml::ElementNode *a_pElmGroup) RT_OVERRIDE;
331
332protected:
333 /** @name Wrapped IDHCPConfig properties
334 * @{ */
335 HRESULT getScope(DHCPConfigScope_T *aScope) RT_OVERRIDE { return i_getScope(aScope); }
336 HRESULT getMinLeaseTime(ULONG *aMinLeaseTime) RT_OVERRIDE { return i_getMinLeaseTime(aMinLeaseTime); }
337 HRESULT setMinLeaseTime(ULONG aMinLeaseTime) RT_OVERRIDE { return i_setMinLeaseTime(aMinLeaseTime); }
338 HRESULT getDefaultLeaseTime(ULONG *aDefaultLeaseTime) RT_OVERRIDE { return i_getDefaultLeaseTime(aDefaultLeaseTime); }
339 HRESULT setDefaultLeaseTime(ULONG aDefaultLeaseTime) RT_OVERRIDE { return i_setDefaultLeaseTime(aDefaultLeaseTime); }
340 HRESULT getMaxLeaseTime(ULONG *aMaxLeaseTime) RT_OVERRIDE { return i_getMaxLeaseTime(aMaxLeaseTime); }
341 HRESULT setMaxLeaseTime(ULONG aMaxLeaseTime) RT_OVERRIDE { return i_setMaxLeaseTime(aMaxLeaseTime); }
342 HRESULT getForcedOptions(std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_getForcedOptions(aOptions); }
343 HRESULT setForcedOptions(const std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_setForcedOptions(aOptions); }
344 HRESULT getSuppressedOptions(std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_getSuppressedOptions(aOptions); }
345 HRESULT setSuppressedOptions(const std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_setSuppressedOptions(aOptions); }
346 /** @} */
347
348 /** @name Wrapped IDHCPGroupConfig properties
349 * @{ */
350 HRESULT getName(com::Utf8Str &aName) RT_OVERRIDE;
351 HRESULT setName(const com::Utf8Str &aName) RT_OVERRIDE;
352 HRESULT getConditions(std::vector<ComPtr<IDHCPGroupCondition> > &aConditions) RT_OVERRIDE;
353 /** @} */
354
355 /** @name Wrapped IDHCPConfig methods
356 * @{ */
357 HRESULT setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) RT_OVERRIDE
358 {
359 return i_setOption(aOption, aEncoding, aValue);
360 }
361
362 HRESULT removeOption(DHCPOption_T aOption) RT_OVERRIDE
363 {
364 return i_removeOption(aOption);
365 }
366
367 HRESULT removeAllOptions() RT_OVERRIDE
368 {
369 return i_removeAllOptions();
370 }
371
372 HRESULT getOption(DHCPOption_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue) RT_OVERRIDE
373 {
374 return i_getOption(aOption, aEncoding, aValue);
375 }
376
377 HRESULT getAllOptions(std::vector<DHCPOption_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings,
378 std::vector<com::Utf8Str> &aValues) RT_OVERRIDE
379 {
380 return i_getAllOptions(aOptions, aEncodings, aValues);
381 }
382
383 HRESULT remove() RT_OVERRIDE
384 {
385 return i_remove();
386 }
387 /** @} */
388
389 /** @name Wrapped IDHCPGroupConfig methods
390 * @{ */
391 HRESULT addCondition(BOOL aInclusive, DHCPGroupConditionType_T aType, const com::Utf8Str &aValue,
392 ComPtr<IDHCPGroupCondition> &aCondition) RT_OVERRIDE;
393 HRESULT removeAllConditions() RT_OVERRIDE;
394 /** @} */
395};
396
397
398/**
399 * Individual DHCP configuration.
400 */
401class DHCPIndividualConfig : public DHCPIndividualConfigWrap, public DHCPConfig
402{
403private:
404 /** The MAC address or all zeros. */
405 RTMAC m_MACAddress;
406 /** The VM ID or all zeros. */
407 com::Guid const m_idMachine;
408 /** The VM NIC slot number, or ~(ULONG)0. */
409 ULONG const m_uSlot;
410 /** This is part of a hack to resolve the MAC address for
411 * DHCPConfigScope_MachineNIC instances. If non-zero, we m_MACAddress is valid.
412 * To deal with the impossibly theoretical scenario that the DHCP server is
413 * being started by more than one thread, this is a version number and not just
414 * a boolean indicator. */
415 uint32_t volatile m_uMACAddressResolvedVersion;
416
417 /** The fixed IPv4 address, empty if dynamic. */
418 com::Utf8Str m_strFixedAddress;
419
420public:
421 DECLARE_TRANSLATE_METHODS(DHCPIndividualConfig)
422
423 /** @name Constructors and destructors.
424 * @{ */
425 DHCPIndividualConfig()
426 : DHCPConfig(DHCPConfigScope_MAC, this)
427 , m_uSlot(~(ULONG)0)
428 , m_uMACAddressResolvedVersion(0)
429 {
430 RT_ZERO(m_MACAddress);
431 }
432 HRESULT FinalConstruct()
433 {
434 return BaseFinalConstruct();
435 }
436 void FinalRelease()
437 {
438 uninit();
439 BaseFinalRelease();
440 }
441 HRESULT initWithMachineIdAndSlot(VirtualBox *a_pVirtualBox, DHCPServer *a_pParent, com::Guid const &a_idMachine,
442 ULONG a_uSlot, uint32_t a_uMACAddressVersion);
443 HRESULT initWithMACAddress(VirtualBox *a_pVirtualBox, DHCPServer *a_pParent, PCRTMAC a_pMACAddress);
444 HRESULT initWithSettingsAndMachineIdAndSlot(VirtualBox *a_pVirtualBox, DHCPServer *a_pParent,
445 const settings::DHCPIndividualConfig &rData, com::Guid const &a_idMachine,
446 ULONG a_uSlot, uint32_t a_uMACAddressVersion);
447 HRESULT initWithSettingsAndMACAddress(VirtualBox *a_pVirtualBox, DHCPServer *a_pParent,
448 const settings::DHCPIndividualConfig &rData, PCRTMAC a_pMACAddress);
449 void uninit() RT_OVERRIDE;
450 /** @} */
451
452 /** @name Internal methods that are public for various reasons
453 * @{ */
454 HRESULT i_saveSettings(settings::DHCPIndividualConfig &a_rDst);
455 RTMAC const &i_getMACAddress() const RT_NOEXCEPT { return m_MACAddress; }
456 com::Guid const &i_getMachineId() const RT_NOEXCEPT { return m_idMachine; }
457 ULONG i_getSlot() const RT_NOEXCEPT { return m_uSlot; }
458 HRESULT i_getMachineMAC(PRTMAC pMACAddress);
459
460 HRESULT i_resolveMACAddress(uint32_t uVersion);
461 /** This is used to avoid producing bogus Dhcpd configuration elements. */
462 bool i_isMACAddressResolved(uint32_t uVersion) const
463 {
464 return m_enmScope != DHCPConfigScope_MachineNIC || (int32_t)(m_uMACAddressResolvedVersion - uVersion) >= 0;
465 }
466 void i_writeDhcpdConfig(xml::ElementNode *pElm) RT_OVERRIDE;
467 /** @} */
468
469protected:
470 /** @name wrapped IDHCPConfig properties
471 * @{ */
472 HRESULT getScope(DHCPConfigScope_T *aScope) RT_OVERRIDE { return i_getScope(aScope); }
473 HRESULT getMinLeaseTime(ULONG *aMinLeaseTime) RT_OVERRIDE { return i_getMinLeaseTime(aMinLeaseTime); }
474 HRESULT setMinLeaseTime(ULONG aMinLeaseTime) RT_OVERRIDE { return i_setMinLeaseTime(aMinLeaseTime); }
475 HRESULT getDefaultLeaseTime(ULONG *aDefaultLeaseTime) RT_OVERRIDE { return i_getDefaultLeaseTime(aDefaultLeaseTime); }
476 HRESULT setDefaultLeaseTime(ULONG aDefaultLeaseTime) RT_OVERRIDE { return i_setDefaultLeaseTime(aDefaultLeaseTime); }
477 HRESULT getMaxLeaseTime(ULONG *aMaxLeaseTime) RT_OVERRIDE { return i_getMaxLeaseTime(aMaxLeaseTime); }
478 HRESULT setMaxLeaseTime(ULONG aMaxLeaseTime) RT_OVERRIDE { return i_setMaxLeaseTime(aMaxLeaseTime); }
479 HRESULT getForcedOptions(std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_getForcedOptions(aOptions); }
480 HRESULT setForcedOptions(const std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_setForcedOptions(aOptions); }
481 HRESULT getSuppressedOptions(std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_getSuppressedOptions(aOptions); }
482 HRESULT setSuppressedOptions(const std::vector<DHCPOption_T> &aOptions) RT_OVERRIDE { return i_setSuppressedOptions(aOptions); }
483 /** @} */
484
485 /** @name wrapped IDHCPConfig methods
486 * @{ */
487 HRESULT setOption(DHCPOption_T aOption, DHCPOptionEncoding_T aEncoding, const com::Utf8Str &aValue) RT_OVERRIDE
488 {
489 return i_setOption(aOption, aEncoding, aValue);
490 }
491
492 HRESULT removeOption(DHCPOption_T aOption) RT_OVERRIDE
493 {
494 return i_removeOption(aOption);
495 }
496
497 HRESULT removeAllOptions() RT_OVERRIDE
498 {
499 return i_removeAllOptions();
500 }
501
502 HRESULT getOption(DHCPOption_T aOption, DHCPOptionEncoding_T *aEncoding, com::Utf8Str &aValue) RT_OVERRIDE
503 {
504 return i_getOption(aOption, aEncoding, aValue);
505 }
506
507 HRESULT getAllOptions(std::vector<DHCPOption_T> &aOptions, std::vector<DHCPOptionEncoding_T> &aEncodings,
508 std::vector<com::Utf8Str> &aValues) RT_OVERRIDE
509 {
510 return i_getAllOptions(aOptions, aEncodings, aValues);
511 }
512
513 HRESULT remove() RT_OVERRIDE
514 {
515 return i_remove();
516 }
517 /** @} */
518
519 /** @name IDHCPIndividualConfig properties
520 * @{ */
521 HRESULT getMACAddress(com::Utf8Str &aMacAddress) RT_OVERRIDE;
522 HRESULT getMachineId(com::Guid &aId) RT_OVERRIDE;
523 HRESULT getSlot(ULONG *aSlot) RT_OVERRIDE;
524 HRESULT getFixedAddress(com::Utf8Str &aFixedAddress) RT_OVERRIDE;
525 HRESULT setFixedAddress(const com::Utf8Str &aFixedAddress) RT_OVERRIDE;
526 /** @} */
527};
528
529#endif /* !MAIN_INCLUDED_DHCPConfigImpl_h */
530
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette