Changeset 27857 in vbox for trunk/include
- Timestamp:
- Mar 31, 2010 9:02:32 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 59541
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/settings.h
r27835 r27857 328 328 }; 329 329 330 struct NATRule 331 { 332 NATRule(): u32Proto(0), 333 u16HostPort(0), 334 u16GuestPort(0){} 335 com::Utf8Str strName; 336 uint32_t u32Proto; 337 uint16_t u16HostPort; 338 com::Utf8Str strHostIP; 339 uint16_t u16GuestPort; 340 com::Utf8Str strGuestIP; 341 bool operator==(const NATRule &r) const 342 { 343 return strName == r.strName 344 && u32Proto == r.u32Proto 345 && u16HostPort == r.u16HostPort 346 && strHostIP == r.strHostIP 347 && u16GuestPort == r.u16GuestPort 348 && strGuestIP == r.strGuestIP; 349 } 350 }; 351 typedef std::list<NATRule> NATRuleList; 352 353 struct NAT 354 { 355 NAT(): u32Mtu(0), 356 u32SockRcv(0), 357 u32SockSnd(0), 358 u32TcpRcv(0), 359 u32TcpSnd(0), 360 fDnsPassDomain(true), /* historically this value is true */ 361 fDnsProxy(false), 362 fDnsUseHostResolver(false){} 363 com::Utf8Str strNetwork; 364 com::Utf8Str strBindIP; 365 uint32_t u32Mtu; 366 uint32_t u32SockRcv; 367 uint32_t u32SockSnd; 368 uint32_t u32TcpRcv; 369 uint32_t u32TcpSnd; 370 com::Utf8Str strTftpPrefix; 371 com::Utf8Str strTftpBootFile; 372 com::Utf8Str strTftpNextServer; 373 bool fDnsPassDomain; 374 bool fDnsProxy; 375 bool fDnsUseHostResolver; 376 NATRuleList llRules; 377 bool operator==(const NAT &n) const 378 { 379 return strNetwork == n.strNetwork 380 && strBindIP == n.strBindIP 381 && u32Mtu == n.u32Mtu 382 && u32SockRcv == n.u32SockRcv 383 && u32SockSnd == n.u32SockSnd 384 && u32TcpSnd == n.u32TcpSnd 385 && u32TcpRcv == n.u32TcpRcv 386 && strTftpPrefix == n.strTftpPrefix 387 && strTftpBootFile == n.strTftpBootFile 388 && strTftpNextServer == n.strTftpNextServer 389 && fDnsPassDomain == n.fDnsPassDomain 390 && fDnsProxy == n.fDnsProxy 391 && fDnsUseHostResolver == n.fDnsUseHostResolver 392 && llRules == n.llRules; 393 } 394 }; 330 395 /** 331 396 * NOTE: If you add any fields in here, you must update a) the constructor and b) … … 358 423 359 424 NetworkAttachmentType_T mode; 360 com::Utf8Str strName; // with NAT: nat network or empty; 425 NAT nat; 426 com::Utf8Str strName; // NAT has own attribute 361 427 // with bridged: host interface or empty; 362 428 // otherwise: network name (required)
Note:
See TracChangeset
for help on using the changeset viewer.