- Timestamp:
- May 25, 2009 7:00:41 AM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/bootp.c
r19979 r19981 32 32 int i; 33 33 34 for (i = 0; i < NB_ADDR; i++)34 for (i = 0; i < NB_ADDR; i++) 35 35 { 36 36 if (!bootp_clients[i].allocated) … … 67 67 int i; 68 68 69 for (i = 0; i < NB_ADDR; i++)69 for (i = 0; i < NB_ADDR; i++) 70 70 { 71 71 if (!memcmp(macaddr, bootp_clients[i].macaddr, 6)) -
trunk/src/VBox/Devices/Network/slirp/ip_output.c
r19847 r19981 46 46 47 47 #ifdef VBOX_WITHOUT_SLIRP_CLIENT_ETHER 48 char* rt_lookup_in_cache(PNATState pData, uint32_t dst)48 static const uint8_t* rt_lookup_in_cache(PNATState pData, uint32_t dst) 49 49 { 50 50 int i; 51 /* @todo (r - vasily) to quick ramp up on routing rails 52 * we use information from DHCP server leasings, this 53 * code couldn't detect any changes in network topology 54 * and should be borrowed from other places 51 /* @todo (r - vasily) to quick ramp up on routing rails 52 * we use information from DHCP server leasings, this 53 * code couldn't detect any changes in network topology 54 * and should be borrowed from other places 55 55 */ 56 for (i = 0; i < NB_ADDR; i++)57 { 58 if ( bootp_clients[i].allocated56 for (i = 0; i < NB_ADDR; i++) 57 { 58 if ( bootp_clients[i].allocated 59 59 && bootp_clients[i].addr.s_addr == dst) 60 {61 60 return &bootp_clients[i].macaddr[0]; 62 63 } 61 } 62 64 63 if (dst != 0) 65 {66 64 return pData->slirp_ethaddr; 67 } 68 return NULL;65 66 return NULL; 69 67 } 70 68 #endif … … 86 84 extern uint8_t zerro_ethaddr[ETH_ALEN]; 87 85 struct ethhdr *eh = NULL; 88 uint8_t *eth_dst = NULL;86 const uint8_t *eth_dst = NULL; 89 87 #endif 90 88 … … 127 125 #endif 128 126 #ifdef VBOX_WITHOUT_SLIRP_CLIENT_ETHER 129 /* Current TCP/IP stack hasn't routing information at 130 * all so we need to calculate destination ethernet address 127 /* Current TCP/IP stack hasn't routing information at 128 * all so we need to calculate destination ethernet address 131 129 */ 132 130 eh = (struct ethhdr *)MBUF_HEAD(m); 133 if (memcmp(eh->h_source, zerro_ethaddr, ETH_ALEN) == 0) {131 if (memcmp(eh->h_source, zerro_ethaddr, ETH_ALEN) == 0) 134 132 eth_dst = rt_lookup_in_cache(pData, ip->ip_dst.s_addr); 135 }136 137 133 #endif 138 134 -
trunk/src/VBox/Devices/Network/slirp/slirp_state.h
r19979 r19981 132 132 uint8_t client_ethaddr[6]; 133 133 #else 134 uint8_t *slirp_ethaddr;134 const uint8_t *slirp_ethaddr; 135 135 #endif 136 136 struct ex_list *exec_list; … … 383 383 QSOCKET_UNLOCK(__X(queue_## label ##_label)); \ 384 384 if ((so) != &(_X(queue_## label ## _label))) SOCKET_LOCK((so)); \ 385 for (;;)\385 for (;;) \ 386 386 { \ 387 387 if ((so) == &(_X(queue_## label ## _label))) \ -
trunk/src/VBox/Devices/Network/slirp/udp.c
r17363 r19981 583 583 u_short temp_port; 584 584 585 for (req = req_tbl; req; req = req->next)585 for (req = req_tbl; req; req = req->next) 586 586 if (so == req->udp_so) 587 587 break; /* found it */
Note:
See TracChangeset
for help on using the changeset viewer.