儲存庫 vbox 的更動 18459
- 時間撮記:
- 2009-3-28 上午04:54:55 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/Network/SrvIntNetR0.cpp
r17966 r18459 1175 1175 */ 1176 1176 PCRTNETIPV4 pIpHdr = (PCRTNETIPV4)((PCRTNETETHERHDR)pSG->aSegs[0].pv + 1); 1177 size_t cbPacket = pSG->cbTotal - sizeof(RTNETETHERHDR);1177 uint32_t cbPacket = pSG->cbTotal - sizeof(RTNETETHERHDR); 1178 1178 if (pSG->cSegsUsed > 1) 1179 1179 { … … 1194 1194 return; 1195 1195 } 1196 size_t cbIpHdr = pIpHdr->ip_hl * 4;1196 uint32_t cbIpHdr = pIpHdr->ip_hl * 4; 1197 1197 1198 1198 /* … … 1225 1225 * Copy to temporary buffer if necessary. 1226 1226 */ 1227 size_t cbPacket = RT_MIN(pSG->cbTotal, sizeof(RTNETARPIPV4));1227 uint32_t cbPacket = RT_MIN(pSG->cbTotal, sizeof(RTNETARPIPV4)); 1228 1228 PCRTNETARPIPV4 pArpIPv4 = (PCRTNETARPIPV4)((uintptr_t)pSG->aSegs[0].pv + sizeof(RTNETETHERHDR)); 1229 1229 if ( pSG->cSegsUsed != 1 … … 1979 1979 */ 1980 1980 PCRTNETIPV4 pIpHdr = (PCRTNETIPV4)((PCRTNETETHERHDR)pSG->aSegs[0].pv + 1); 1981 size_t cbPacket = pSG->cbTotal - sizeof(RTNETETHERHDR);1981 uint32_t cbPacket = pSG->cbTotal - sizeof(RTNETETHERHDR); 1982 1982 if (pSG->cSegsUsed > 1) 1983 1983 { … … 2035 2035 /* Patch flags */ 2036 2036 uint16_t uFlags = pDhcp->bp_flags | RT_H2BE_U16_C(RTNET_DHCP_FLAG_BROADCAST); 2037 intnetR0SgWritePart(pSG, (uint 8_t*)&pDhcp->bp_flags - (uint8_t*)pIpHdr + sizeof(RTNETETHERHDR), sizeof(uFlags), &uFlags);2037 intnetR0SgWritePart(pSG, (uintptr_t)&pDhcp->bp_flags - (uintptr_t)pIpHdr + sizeof(RTNETETHERHDR), sizeof(uFlags), &uFlags); 2038 2038 /* Patch UDP checksum */ 2039 2039 uint32_t uChecksum = (uint32_t)~pUdpHdr->uh_sum + RT_H2BE_U16_C(RTNET_DHCP_FLAG_BROADCAST); … … 2041 2041 uChecksum = (uChecksum >> 16) + (uChecksum & 0xFFFF); 2042 2042 uChecksum = ~uChecksum; 2043 intnetR0SgWritePart(pSG, (uint 8_t*)&pUdpHdr->uh_sum - (uint8_t*)pIpHdr + sizeof(RTNETETHERHDR), sizeof(pUdpHdr->uh_sum), &uChecksum);2043 intnetR0SgWritePart(pSG, (uintptr_t)&pUdpHdr->uh_sum - (uintptr_t)pIpHdr + sizeof(RTNETETHERHDR), sizeof(pUdpHdr->uh_sum), &uChecksum); 2044 2044 } 2045 2045 break;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器