Changeset 63267 in vbox for trunk/src/VBox/NetworkServices
- Timestamp:
- Aug 10, 2016 1:34:15 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 109900
- Location:
- trunk/src/VBox/NetworkServices
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp
r62481 r63267 415 415 break; 416 416 } 417 418 default: break; /* Shut up MSC. */ 417 419 } 418 420 return hrc; … … 426 428 427 429 HRESULT hrc = com::Initialize(); 428 Assert(!FAILED(hrc)); 430 Assert(!FAILED(hrc)); NOREF(hrc); 429 431 430 432 proxy_arp_hook = pxremap_proxy_arp; … … 516 518 { 517 519 AssertPtrReturnVoid(arg); 518 VBoxNetLwipNAT *pThis = (VBoxNetLwipNAT *)arg;519 520 520 521 /* XXX: proxy finalization */ … … 998 999 RT_ZERO(Rule); 999 1000 1000 int irc = netPfStrToPf(Val.psz, (rc == 'P'), &Rule.Pfr); 1001 int rc2 = netPfStrToPf(Val.psz, (rc == 'P'), &Rule.Pfr); 1002 RT_NOREF_PV(rc2); 1001 1003 rules.push_back(Rule); 1002 1004 return VINF_SUCCESS; … … 1013 1015 AssertReturn(cbFrame != 0, VERR_INVALID_PARAMETER); 1014 1016 1015 struct pbuf *p = pbuf_alloc(PBUF_RAW, cbFrame + ETH_PAD_SIZE, PBUF_POOL);1017 struct pbuf *p = pbuf_alloc(PBUF_RAW, (u16_t)cbFrame + ETH_PAD_SIZE, PBUF_POOL); 1016 1018 if (RT_UNLIKELY(p == NULL)) 1017 1019 return VERR_NO_MEMORY; … … 1049 1051 int VBoxNetLwipNAT::processGSO(PCPDMNETWORKGSO pGso, size_t cbFrame) 1050 1052 { 1051 if (!PDMNetGsoIsValid(pGso, cbFrame, 1052 cbFrame - sizeof(PDMNETWORKGSO))) 1053 if (!PDMNetGsoIsValid(pGso, cbFrame, cbFrame - sizeof(PDMNETWORKGSO))) 1053 1054 return VERR_INVALID_PARAMETER; 1054 1055 … … 1057 1058 uint32_t const cSegs = PDMNetGsoCalcSegmentCount(pGso, 1058 1059 cbFrame); 1059 for ( size_t iSeg = 0; iSeg < cSegs; iSeg++)1060 for (uint32_t iSeg = 0; iSeg < cSegs; iSeg++) 1060 1061 { 1061 1062 uint32_t cbSegFrame; 1062 void *pvSegFrame = 1063 PDMNetGsoCarveSegmentQD(pGso, 1064 (uint8_t *)(pGso + 1), 1065 cbFrame, 1066 abHdrScratch, 1067 iSeg, 1068 cSegs, 1069 &cbSegFrame); 1063 void *pvSegFrame = PDMNetGsoCarveSegmentQD(pGso, 1064 (uint8_t *)(pGso + 1), 1065 cbFrame, 1066 abHdrScratch, 1067 iSeg, 1068 cSegs, 1069 &cbSegFrame); 1070 1070 1071 1071 int rc = processFrame(pvSegFrame, cbSegFrame); -
trunk/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.cpp
r62679 r63267 533 533 534 534 /* S/G API */ 535 int VBoxNetBaseService::sendBufferOnWire(PCINTNETSEG pcSg, int cSg, size_t cbFrame) 536 { 535 int VBoxNetBaseService::sendBufferOnWire(PCINTNETSEG paSegs, size_t cSegs, size_t cbFrame) 536 { 537 /* Allocate frame */ 537 538 PINTNETHDR pHdr = NULL; 538 uint8_t *pu8Frame = NULL; 539 540 /* Allocate frame */ 541 int rc = IntNetRingAllocateFrame(&m->m_pIfBuf->Send, cbFrame, &pHdr, (void **)&pu8Frame); 539 uint8_t *pbFrame = NULL; 540 int rc = IntNetRingAllocateFrame(&m->m_pIfBuf->Send, (uint32_t)cbFrame, &pHdr, (void **)&pbFrame); 542 541 AssertRCReturn(rc, rc); 543 542 544 543 /* Now we fill pvFrame with S/G above */ 545 int offFrame = 0;546 for ( int idxSg = 0; idxSg < cSg; ++idxSg)547 { 548 memcpy(&p u8Frame[offFrame], pcSg[idxSg].pv, pcSg[idxSg].cb);549 offFrame +=pcSg[idxSg].cb;544 size_t offFrame = 0; 545 for (size_t idxSeg = 0; idxSeg < cSegs; ++idxSeg) 546 { 547 memcpy(&pbFrame[offFrame], paSegs[idxSeg].pv, paSegs[idxSeg].cb); 548 offFrame += paSegs[idxSeg].cb; 550 549 } 551 550 … … 817 816 void VBoxNetBaseService::debugPrintV(int iMinLevel, bool fMsg, const char *pszFmt, va_list va) const 818 817 { 818 RT_NOREF(fMsg); 819 819 if (iMinLevel <= m->m_cVerbosity) 820 820 { … … 840 840 { 841 841 PRTGETOPTDEF pOpt = m->m_vecOptionDefs[i]; 842 memcpy(&pOptArray[i], m->m_vecOptionDefs[i], sizeof(RTGETOPTDEF));842 memcpy(&pOptArray[i], pOpt, sizeof(*pOpt)); 843 843 } 844 844 return pOptArray; -
trunk/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.h
r62481 r63267 70 70 int waitForIntNetEvent(int cMillis); 71 71 int abortWait(); 72 int sendBufferOnWire(PCINTNETSEG p Sg, int cSg, size_t cbBuffer);72 int sendBufferOnWire(PCINTNETSEG paSegs, size_t cSegs, size_t cbBuffer); 73 73 void flushWire(); 74 74 -
trunk/src/VBox/NetworkServices/NetLib/VBoxNetIntIf.cpp
r62481 r63267 80 80 int VBoxNetIntIfRingWriteFrame(PINTNETBUF pBuf, PINTNETRINGBUF pRingBuf, size_t cSegs, PCINTNETSEG paSegs) 81 81 { 82 RT_NOREF(pBuf); 83 82 84 /* 83 85 * Validate input. -
trunk/src/VBox/NetworkServices/NetLib/VBoxNetPortForwardString.cpp
r62681 r63267 55 55 bool fEmptyAcceptable) 56 56 { 57 int idxRaw = 0;58 57 int cbField = 0; 59 58
Note:
See TracChangeset
for help on using the changeset viewer.