Changeset 25362 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Dec 14, 2009 1:16:35 PM (15 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/bootp.c
r25276 r25362 324 324 FILL_BOOTP_EXT(q, RFC1533_HOSTNAME, val, slirp_hostname); 325 325 } 326 slirp_arp_cache_update_or_add(pData, rbp->bp_yiaddr.s_addr, bc->macaddr); 326 327 return q - rbp->bp_vend; /*return offset */ 327 328 } … … 457 458 memcpy(bc->macaddr, bp->bp_hwaddr, bp->bp_hlen); 458 459 bc->addr.s_addr = bp->bp_ciaddr.s_addr; 459 slirp_arp_cache_update(pData, bp->bp_ciaddr.s_addr, bp->bp_hwaddr);460 460 } 461 461 break; … … 481 481 memcpy(bc->macaddr, bp->bp_hwaddr, bp->bp_hlen); 482 482 bc->addr.s_addr = ui32; 483 slirp_arp_cache_update(pData, bp->bp_ciaddr.s_addr, bp->bp_hwaddr);484 483 break; 485 484 -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r25277 r25362 653 653 void slirp_link_up(PNATState pData) 654 654 { 655 struct arp_cache_entry *ac = NULL; 655 656 link_up = 1; 657 658 if (LIST_EMPTY(&pData->arp_cache)) 659 return; 660 661 LIST_FOREACH(ac, &pData->arp_cache, list) 662 { 663 activate_port_forwarding(pData, ac->ether); 664 } 656 665 } 657 666 … … 2123 2132 } 2124 2133 2134 int slirp_arp_cache_update_or_add(PNATState pData, uint32_t dst, const uint8_t *mac) 2135 { 2136 if (slirp_arp_cache_update(pData, dst, mac)) 2137 slirp_arp_cache_add(pData, dst, mac); 2138 2139 return 0; 2140 } 2141 2125 2142 /* updates the arp cache 2126 2143 * @returns 0 - if has found and updated -
trunk/src/VBox/Devices/Network/slirp/slirp.h
r23462 r25362 319 319 int slirp_arp_cache_update(PNATState pData, uint32_t dst, const uint8_t *mac); 320 320 void slirp_arp_cache_add(PNATState pData, uint32_t ip, const uint8_t *ether); 321 int slirp_arp_cache_update_or_add(PNATState pData, uint32_t dst, const uint8_t *mac); 321 322 #define MIN_MRU 128 322 323 #define MAX_MRU 16384
Note:
See TracChangeset
for help on using the changeset viewer.