Changeset 11074 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Aug 2, 2008 1:42:46 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 33980
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/SrvIntNetR0.cpp
r11073 r11074 5 5 6 6 /* 7 * Copyright (C) 2006-200 7Sun Microsystems, Inc.7 * Copyright (C) 2006-2008 Sun Microsystems, Inc. 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 39 39 #include <iprt/handletable.h> 40 40 #include <iprt/net.h> 41 42 43 /******************************************************************************* 44 * Defined Constants And Macros * 45 *******************************************************************************/ 46 /** @def INTNET_WITH_DHCP_SNOOPING 47 * Enabled DHCP snooping when in shared-mac-on-the-wire mode. */ 48 /*#define INTNET_WITH_DHCP_SNOOPING - the implementation isn't completed yet. */ 41 49 42 50 … … 1034 1042 1035 1043 1044 #ifdef INTNET_WITH_DHCP_SNOOPING 1045 1036 1046 /** 1037 1047 * Snoops IP assignments and releases from the DHCPv4 traffic. … … 1058 1068 } 1059 1069 1070 #endif /* INTNET_WITH_DHCP_SNOOPING */ 1071 1060 1072 1061 1073 /** … … 1070 1082 static void intnetR0TrunkIfSnoopArp(PINTNETNETWORK pNetwork, PCINTNETSG pSG) 1071 1083 { 1072 Log6(("ts-ar: %#d\n", pSG->cbTotal));1073 1074 1084 /* 1075 1085 * Check the minimum size first. … … 1126 1136 1127 1137 1138 #ifdef INTNET_WITH_DHCP_SNOOPING 1128 1139 /** 1129 1140 * Snoop up addresses from ARP and DHCP traffic from frames comming … … 1182 1193 } 1183 1194 } 1195 #endif /* INTNET_WITH_DHCP_SNOOPING */ 1184 1196 1185 1197 … … 1231 1243 } 1232 1244 1245 #ifdef INTNET_WITH_DHCP_SNOOPING 1233 1246 /* 1234 1247 * Check for potential DHCP packets. … … 1250 1263 } 1251 1264 } 1265 #endif /* INTNET_WITH_DHCP_SNOOPING */ 1252 1266 } 1253 1267 … … 1824 1838 && !pIfSender) 1825 1839 { 1840 #ifdef INTNET_WITH_DHCP_SNOOPING 1826 1841 uint16_t EtherType = RT_BE2H_U16(pEthHdr->EtherType); 1827 1842 if ( ( EtherType == RTNET_ETHERTYPE_IPV4 /* for DHCP */ … … 1829 1844 || (pSG->fFlags & (INTNETSG_FLAGS_ARP_IPV4)) ) 1830 1845 intnetR0TrunkIfSnoopAddr(pNetwork, pSG, EtherType); 1846 #else 1847 if (pSG->fFlags & (INTNETSG_FLAGS_ARP_IPV4)) 1848 intnetR0TrunkIfSnoopArp(pNetwork, pSG); 1849 #endif 1831 1850 } 1832 1851 … … 1958 1977 } 1959 1978 1979 #ifdef INTNET_WITH_DHCP_SNOOPING 1960 1980 /* 1961 1981 * Perform DHCP snooping. … … 1964 1984 && pSG->cbTotal >= sizeof(RTNETETHERHDR) + RTNETIPV4_MIN_LEN + RTNETUDP_MIN_LEN + RTNETBOOTP_DHCP_MIN_LEN) 1965 1985 intnetR0TrunkIfSnoopAddr(pNetwork, pSG, RT_BE2H_U16(pEthHdr->EtherType)); 1986 #endif /* INTNET_WITH_DHCP_SNOOPING */ 1966 1987 1967 1988 return fExactIntNetRecipient;
Note:
See TracChangeset
for help on using the changeset viewer.