Changeset 22459 in vbox for trunk/src/VBox/Devices/Network/DrvNAT.cpp
- Timestamp:
- Aug 26, 2009 9:18:20 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r22458 r22459 72 72 return PDMDrvHlpVMSetError((pthis)->pDrvIns, (rc), RT_SRC_POS, N_("NAT#%d: configuration query for \""name"\" " #type_name " failed"), \ 73 73 (pthis)->pDrvIns->iInstance); \ 74 } while(0)74 } while (0) 75 75 76 76 #define GET_ED_STRICT(pthis, node, name, rc, type, type_name, var) \ … … 80 80 return PDMDrvHlpVMSetError((pthis)->pDrvIns, (rc), RT_SRC_POS, N_("NAT#%d: configuration query for \""name"\" " #type_name " failed"), \ 81 81 (pthis)->pDrvIns->iInstance); \ 82 } while(0)82 } while (0) 83 83 84 84 #define GET_EXTRADATA_N(pthis, node, name, rc, type, type_name, var, var_size) \ … … 88 88 return PDMDrvHlpVMSetError((pthis)->pDrvIns, (rc), RT_SRC_POS, N_("NAT#%d: configuration query for \""name"\" " #type_name " failed"), \ 89 89 (pthis)->pDrvIns->iInstance); \ 90 } while(0)90 } while (0) 91 91 92 92 #define GET_BOOL(rc, pthis, node, name, var) \ … … 103 103 104 104 105 #define DO GETIP(rc, node, instance, status, x)\106 do { 107 108 109 110 111 } while(0)105 #define DO_GET_IP(rc, node, instance, status, x) \ 106 do { \ 107 char sz##x[32]; \ 108 GET_STRING((rc), (node), (instance), #x, sz ## x[0], sizeof(sz ## x)); \ 109 if (rc != VERR_CFGM_VALUE_NOT_FOUND) \ 110 (status) = inet_aton(sz ## x, &x); \ 111 } while (0) 112 112 113 113 #define GETIP_DEF(rc, node, instance, x, def) \ … … 115 115 { \ 116 116 int status = 0; \ 117 DO GETIP((rc), (node), (instance), status, x);\117 DO_GET_IP((rc), (node), (instance), status, x); \ 118 118 if (status == 0 || rc == VERR_CFGM_VALUE_NOT_FOUND) \ 119 119 x.s_addr = def; \ 120 }while(0) 121 120 } while (0) 121 122 /** Queue depth (!SLIRP_SPLIT_CAN_OUTPUT). */ 122 123 #define QUEUE_SIZE 50 124 123 125 124 126 /*******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.