VirtualBox

Ignore:
Timestamp:
Mar 11, 2009 8:23:26 AM (16 years ago)
Author:
vboxsync
Message:

s-bahn coding...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp

    r17599 r17663  
    709709     * If none was found, create a new lease for it and then construct a reply.
    710710     */
    711 
    712     /** @todo this code IS required. */
     711    VBoxNetDhcpLease *pLease = findLeaseByMacAddress(pDhcpMsg->bp_chaddr.Mac,
     712                                                     true /* fEnsureUpToDateConfig */);
     713    if (!pLease)
     714        pLease = newLease(pDhcpMsg, cb);
     715    if (!pLease)
     716        return false;
     717    pLease->setState(pLease::kState_Discover);
     718
     719    handleDhcpReply(RTNET_DHCP_MT_OFFER, pLease, pDhcpMsg, cb);
    713720    return true;
    714721}
    715722
     723
     724/** The requested address. */
     725#define RTNET_DHCP_OPT_REQUESTED_ADDRESS    50
    716726
    717727/**
     
    728738     * Windows will reissue these requests when rejoining a network if it thinks it
    729739     * already has an address on the network. If we cannot find a valid lease,
    730      * make a new one.
    731      */
    732     /** @todo check how windows treats bp_xid here, it should match I think. If
    733      *        it doesn't we've no way of filtering out broadcast replies to other
    734      *        DHCP servers. */
     740     * make a new one and return NAC.
     741     */
     742    uint8_t             uReplyType  = RTNET_DHCP_MT_NAC;
     743    VBoxNetDhcpLease   *pLease      = NULL;
     744    RTNETADDRIPV4       IPv4Addr;
     745    if (findOptionIPv4Addr(RTNET_DHCP_OPT_REQUESTED_ADDRESS, pDhcpMsg, cb, &Ipv4Addr))
     746    {
     747        pLease = findLeaseByIpv4AndMacAddresses(Ipv4Addr, pDhcpMsg->bp_chaddr);
     748        if (pLease)
     749        {
     750            /** @todo check how windows treats bp_xid here, it should match I think. If
     751             *        it doesn't we've no way of filtering out broadcast replies to other
     752             *        DHCP servers. */
     753            if (pDhcpMsg->bp_xid == )
     754            {
     755            }
     756
     757        }
     758    }
     759
     760    if (pLease)
     761    {
     762    }
     763
    735764
    736765    /** @todo this code IS required. */
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