Changeset 11057 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Aug 1, 2008 1:45:41 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 33952
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/SrvIntNetR0.cpp
r11055 r11057 205 205 /** The SUPR0 object id. */ 206 206 void *pvObj; 207 /** Pointer to the temporary buffer that is used when snooping fragmented packets. 208 * This is allocated after this structure if we're sharing the MAC address with 209 * the host. The buffer is INTNETNETWORK_TMP_SIZE big and aligned on a 64-byte boundrary. */ 210 uint8_t *pbTmp; 207 211 /** Network creation flags (INTNET_OPEN_FLAGS_*). */ 208 212 uint32_t fFlags; … … 220 224 /** Pointer to an internal network. */ 221 225 typedef INTNETNETWORK *PINTNETNETWORK; 226 227 /** The size of the buffer INTNETNETWORK::pbTmp points at. */ 228 #define INTNETNETWORK_TMP_SIZE 2048 222 229 223 230 … … 3353 3360 * Allocate and initialize. 3354 3361 */ 3355 PINTNETNETWORK pNew = (PINTNETNETWORK)RTMemAllocZ(sizeof(*pNew)); 3362 size_t cb = sizeof(INTNETNETWORK); 3363 if (fFlags & INTNET_OPEN_FLAGS_SHARED_MAC_ON_WIRE) 3364 cb += INTNETNETWORK_TMP_SIZE + 64; 3365 PINTNETNETWORK pNew = (PINTNETNETWORK)RTMemAllocZ(cb); 3356 3366 if (!pNew) 3357 3367 return VERR_NO_MEMORY; … … 3370 3380 Assert(strlen(pszTrunk) < sizeof(pNew->szTrunk)); /* caller's responsibility. */ 3371 3381 strcpy(pNew->szTrunk, pszTrunk); 3382 if (fFlags & INTNET_OPEN_FLAGS_SHARED_MAC_ON_WIRE) 3383 pNew->pbTmp = RT_ALIGN_PT(pNew + 1, 64, uint8_t *); 3384 //else 3385 // pNew->pbTmp = NULL; 3372 3386 3373 3387 /*
Note:
See TracChangeset
for help on using the changeset viewer.