Changeset 16213 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Jan 23, 2009 10:26:21 PM (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
r15890 r16213 206 206 RTStrPrintf((char*)rbp->bp_file, sizeof(rbp->bp_file), "%s", bootp_filename); 207 207 208 saddr.sin_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_ ALIAS);208 saddr.sin_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_TFTP); 209 209 saddr.sin_port = htons(BOOTP_SERVER); 210 210 -
trunk/src/VBox/Devices/Network/slirp/ctl.h
r15093 r16213 3 3 #define CTL_ALIAS 2 4 4 #define CTL_DNS 3 5 #define CTL_TFTP 4 5 6 #define CTL_BROADCAST 255 6 7 8 #define CTL_CHECK(x, ctl) (((x) & ~pData->netmask) == (ctl)) -
trunk/src/VBox/Devices/Network/slirp/slirp.c
r16063 r16213 1000 1000 if ((htip & pData->netmask) == ntohl(special_addr.s_addr)) 1001 1001 { 1002 if ( (htip & ~pData->netmask) == CTL_DNS 1003 || (htip & ~pData->netmask) == CTL_ALIAS) 1002 if ( CTL_CHECK(htip,CTL_DNS) 1003 || CTL_CHECK(htip, CTL_ALIAS) 1004 || CTL_CHECK(htip, CTL_TFTP)) 1004 1005 goto arp_ok; 1005 1006 for (ex_ptr = exec_list; ex_ptr; ex_ptr = ex_ptr->ex_next) -
trunk/src/VBox/Devices/Network/slirp/udp.c
r15845 r16213 45 45 #include <slirp.h> 46 46 #include "ip_icmp.h" 47 #include "ctl.h" 47 48 48 49 … … 159 160 * handle TFTP 160 161 */ 161 if (ntohs(uh->uh_dport) == TFTP_SERVER) 162 if ( ntohs(uh->uh_dport) == TFTP_SERVER 163 && CTL_CHECK(ntohl(ip->ip_dst.s_addr), CTL_TFTP)) 162 164 { 163 165 tftp_input(pData, m);
Note:
See TracChangeset
for help on using the changeset viewer.