VirtualBox

Changeset 11074 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Aug 2, 2008 1:42:46 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
33980
Message:

intnet: Disabled the DHCP snooping code by putting it inside #ifdef INTNET_WITH_DHCP_SNOOPING. It doesn't do anything yet, so no reason to waste time on it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/SrvIntNetR0.cpp

    r11073 r11074  
    55
    66/*
    7  * Copyright (C) 2006-2007 Sun Microsystems, Inc.
     7 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3939#include <iprt/handletable.h>
    4040#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. */
    4149
    4250
     
    10341042
    10351043
     1044#ifdef INTNET_WITH_DHCP_SNOOPING
     1045
    10361046/**
    10371047 * Snoops IP assignments and releases from the DHCPv4 traffic.
     
    10581068}
    10591069
     1070#endif /* INTNET_WITH_DHCP_SNOOPING */
     1071
    10601072
    10611073/**
     
    10701082static void intnetR0TrunkIfSnoopArp(PINTNETNETWORK pNetwork, PCINTNETSG pSG)
    10711083{
    1072 Log6(("ts-ar: %#d\n", pSG->cbTotal));
    1073 
    10741084    /*
    10751085     * Check the minimum size first.
     
    11261136
    11271137
     1138#ifdef INTNET_WITH_DHCP_SNOOPING
    11281139/**
    11291140 * Snoop up addresses from ARP and DHCP traffic from frames comming
     
    11821193    }
    11831194}
     1195#endif /* INTNET_WITH_DHCP_SNOOPING */
    11841196
    11851197
     
    12311243    }
    12321244
     1245#ifdef INTNET_WITH_DHCP_SNOOPING
    12331246    /*
    12341247     * Check for potential DHCP packets.
     
    12501263        }
    12511264    }
     1265#endif /* INTNET_WITH_DHCP_SNOOPING */
    12521266}
    12531267
     
    18241838             && !pIfSender)
    18251839    {
     1840#ifdef INTNET_WITH_DHCP_SNOOPING
    18261841        uint16_t EtherType = RT_BE2H_U16(pEthHdr->EtherType);
    18271842        if (    (   EtherType == RTNET_ETHERTYPE_IPV4       /* for DHCP */
     
    18291844            ||  (pSG->fFlags & (INTNETSG_FLAGS_ARP_IPV4)) )
    18301845            intnetR0TrunkIfSnoopAddr(pNetwork, pSG, EtherType);
     1846#else
     1847       if (pSG->fFlags & (INTNETSG_FLAGS_ARP_IPV4))
     1848           intnetR0TrunkIfSnoopArp(pNetwork, pSG);
     1849#endif
    18311850    }
    18321851
     
    19581977    }
    19591978
     1979#ifdef INTNET_WITH_DHCP_SNOOPING
    19601980    /*
    19611981     * Perform DHCP snooping.
     
    19641984        &&  pSG->cbTotal >= sizeof(RTNETETHERHDR) + RTNETIPV4_MIN_LEN + RTNETUDP_MIN_LEN + RTNETBOOTP_DHCP_MIN_LEN)
    19651985        intnetR0TrunkIfSnoopAddr(pNetwork, pSG, RT_BE2H_U16(pEthHdr->EtherType));
     1986#endif /* INTNET_WITH_DHCP_SNOOPING */
    19661987
    19671988    return fExactIntNetRecipient;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette