- Timestamp:
- Mar 6, 2009 3:33:40 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
r16254 r17436 284 284 FILL_BOOTP_EXT(q, RFC1533_DNS, 4, &dns_addr_dhcp.s_addr); 285 285 #else 286 # ifdef VBOX_WITH_SLIRP_DNS_PROXY 287 if (pData->use_dns_proxy) 288 { 289 uint32_t addr = htonl(ntohl(special_addr.s_addr) | CTL_DNS); 290 FILL_BOOTP_EXT(q, RFC1533_DNS, 4, &addr); 291 } 292 else 293 # endif 286 294 LIST_FOREACH(de, &pData->dns_list_head, de_list) 287 295 { -
trunk/src/VBox/Devices/Network/slirp/libslirp.h
r16572 r17436 28 28 #endif 29 29 30 int slirp_init(PNATState *, const char *, uint32_t, bool, const char *, const char *,void *);30 int slirp_init(PNATState *, const char *, uint32_t, bool, void *); 31 31 void slirp_register_timers(PNATState pData, PPDMDRVINS pDrvIns); 32 32 void slirp_term(PNATState); … … 68 68 int guest_port); 69 69 70 void slirp_set_dhcp_TFTP_prefix(PNATState pData, const char *tftpPrefix); 71 void slirp_set_dhcp_TFTP_bootfile(PNATState pData, const char *bootFile); 72 void slirp_set_dhcp_next_server(PNATState pData, const char *nextServer); 73 #ifdef VBOX_WITH_SLIRP_DNS_PROXY 74 void slirp_set_dhcp_dns_proxy(PNATState pData, bool fDNSProxy); 75 #endif 70 76 #if defined(VBOX_WITH_SIMPLIFIED_SLIRP_SYNC) && defined(RT_OS_WINDOWS) 71 77 -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r17392 r17436 543 543 544 544 int slirp_init(PNATState *ppData, const char *pszNetAddr, uint32_t u32Netmask, 545 bool fPassDomain, const char *pszTFTPPrefix, 546 const char *pszBootFile, void *pvUser) 545 bool fPassDomain, void *pvUser) 547 546 { 548 547 int fNATfailed = 0; … … 557 556 pData->fPassDomain = fPassDomain; 558 557 pData->pvUser = pvUser; 559 tftp_prefix = pszTFTPPrefix;560 bootp_filename = pszBootFile;561 558 pData->netmask = u32Netmask; 562 559 … … 590 587 alias_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS); 591 588 /* @todo: add ability to configure this staff */ 592 pData->tftp_server.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_TFTP);593 589 594 590 /* set default addresses */ … … 1664 1660 return htons(service); 1665 1661 } 1662 1663 void slirp_set_dhcp_TFTP_prefix(PNATState pData, const char *tftpPrefix) 1664 { 1665 Log2(("tftp_prefix:%s\n", tftp_prefix)); 1666 tftp_prefix = tftpPrefix; 1667 } 1668 1669 void slirp_set_dhcp_TFTP_bootfile(PNATState pData, const char *bootFile) 1670 { 1671 Log2(("bootFile:%s\n", bootFile)); 1672 bootp_filename = bootFile; 1673 } 1674 1675 void slirp_set_dhcp_next_server(PNATState pData, const char *next_server) 1676 { 1677 Log2(("next_server:%s\n", next_server)); 1678 if (next_server == NULL) 1679 pData->tftp_server.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_TFTP); 1680 else 1681 inet_aton(next_server, &pData->tftp_server); 1682 } 1683 #ifdef VBOX_WITH_SLIRP_DNS_PROXY 1684 void slirp_set_dhcp_dns_proxy(PNATState pData, bool fDNSProxy) 1685 { 1686 pData->use_dns_proxy = fDNSProxy; 1687 } 1688 #endif -
trunk/src/VBox/Devices/Network/slirp/slirp_state.h
r17262 r17436 209 209 #define HASH(id) (id & ((1 << HASHSIZE) - 1)) 210 210 struct request *request_hash[1 << HASHSIZE]; 211 /* this field control behaviour of DHCP server */ 212 bool use_dns_proxy; 211 213 #endif 212 214 STAMPROFILE StatFill;
Note:
See TracChangeset
for help on using the changeset viewer.