VirtualBox

Changeset 79530 in vbox for trunk/src


Ignore:
Timestamp:
Jul 4, 2019 6:25:04 PM (6 years ago)
Author:
vboxsync
Message:

Dhcpd: Went over the Db and IPv4Pool code adding comments and and such. [doxygen+scm] bugref:9288

Location:
trunk/src/VBox/NetworkServices/Dhcpd
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/Dhcpd/Db.cpp

    r79529 r79530  
    369369 * @param   id          The client ID.
    370370 */
    371 Binding *Db::createBinding(const ClientId &id)
     371Binding *Db::i_createBinding(const ClientId &id)
    372372{
    373373    Binding      *pBinding = NULL;
     
    400400 * @param   id          The client.
    401401 */
    402 Binding *Db::createBinding(RTNETADDRIPV4 addr, const ClientId &id)
     402Binding *Db::i_createBinding(RTNETADDRIPV4 addr, const ClientId &id)
    403403{
    404404    bool fAvailable = m_pool.allocate(addr);
     
    423423 * the preferred address (@a addr) into account when possible and if non-zero.
    424424 */
    425 Binding *Db::allocateAddress(const ClientId &id, RTNETADDRIPV4 addr)
     425Binding *Db::i_allocateAddress(const ClientId &id, RTNETADDRIPV4 addr)
    426426{
    427427    Assert(addr.u == 0 || addressBelongs(addr));
     
    503503        if (addrBinding == NULL)
    504504        {
    505             addrBinding = createBinding(addr, id);
     505            addrBinding = i_createBinding(addr, id);
    506506            Assert(addrBinding != NULL);
    507507            LogDHCP(("> .... creating new binding for this address %R[binding]\n", addrBinding));
     
    529529    else
    530530    {
    531         idBinding = createBinding();
     531        idBinding = i_createBinding();
    532532        if (idBinding != NULL)
    533533            LogDHCP(("> .... creating new binding\n"));
     
    586586    const ClientId &id(req.clientId());
    587587
    588     Binding *b = allocateAddress(id, reqAddr.value());
     588    Binding *b = i_allocateAddress(id, reqAddr.value());
    589589    if (b != NULL)
    590590    {
     
    607607 *
    608608 * @returns IPRT status code.
    609  * @param   newb                .
    610  */
    611 int Db::addBinding(Binding *pNewBinding)
     609 * @param   pNewBinding     The new binding to add.
     610 */
     611int Db::i_addBinding(Binding *pNewBinding)
    612612{
    613613    /*
     
    841841        if (pElmLease->nameEquals("Lease"))
    842842        {
    843             int rc2 = loadLease(pElmLease);
     843            int rc2 = i_loadLease(pElmLease);
    844844            if (RT_SUCCESS(rc2))
    845845            { /* likely */ }
     
    863863 * @return  IPRT status code.
    864864 */
    865 int Db::loadLease(const xml::ElementNode *pElmLease)
     865int Db::i_loadLease(const xml::ElementNode *pElmLease)
    866866{
    867867    Binding *pBinding = NULL;
     
    882882            LogDHCP(("> LOAD: EXPIRED lease %R[binding]\n", pBinding));
    883883
    884         int rc = addBinding(pBinding);
     884        int rc = i_addBinding(pBinding);
    885885        if (RT_FAILURE(rc))
    886886            delete pBinding;
  • trunk/src/VBox/NetworkServices/Dhcpd/Db.h

    r79529 r79530  
    163163    int      loadLeases(const RTCString &strFilename);
    164164private:
    165     int      loadLease(const xml::ElementNode *pElmLease);
     165    int      i_loadLease(const xml::ElementNode *pElmLease);
    166166public:
    167167    int      writeLeases(const RTCString &strFilename) const;
     
    169169
    170170private:
    171     Binding *createBinding(const ClientId &id = ClientId());
    172     Binding *createBinding(RTNETADDRIPV4 addr, const ClientId &id = ClientId());
     171    Binding *i_createBinding(const ClientId &id = ClientId());
     172    Binding *i_createBinding(RTNETADDRIPV4 addr, const ClientId &id = ClientId());
    173173
    174     Binding *allocateAddress(const ClientId &id, RTNETADDRIPV4 addr);
     174    Binding *i_allocateAddress(const ClientId &id, RTNETADDRIPV4 addr);
    175175
    176176    /* add binding e.g. from the leases file */
    177     int      addBinding(Binding *b);
     177    int      i_addBinding(Binding *pNewBinding);
    178178};
    179179
  • trunk/src/VBox/NetworkServices/Dhcpd/DhcpdInternal.h

    r79524 r79530  
    1616 */
    1717
    18 #ifndef VBOX_INCLUDED_SRC_Dhcpd_Defs_h
    19 #define VBOX_INCLUDED_SRC_Dhcpd_Defs_h
     18#ifndef VBOX_INCLUDED_SRC_Dhcpd_DhcpdInternal_h
     19#define VBOX_INCLUDED_SRC_Dhcpd_DhcpdInternal_h
    2020#ifndef RT_WITHOUT_PRAGMA_ONCE
    2121# pragma once
     
    7272#endif
    7373
    74 #endif /* !VBOX_INCLUDED_SRC_Dhcpd_Defs_h */
     74#endif /* !VBOX_INCLUDED_SRC_Dhcpd_DhcpdInternal_h */
  • trunk/src/VBox/NetworkServices/Dhcpd/Timestamp.h

    r79526 r79530  
    1616 */
    1717
    18 #ifndef VBOX_INCLUDED_SRC_Dhcpd_TimeStamp_h
    19 #define VBOX_INCLUDED_SRC_Dhcpd_TimeStamp_h
     18#ifndef VBOX_INCLUDED_SRC_Dhcpd_Timestamp_h
     19#define VBOX_INCLUDED_SRC_Dhcpd_Timestamp_h
    2020#ifndef RT_WITHOUT_PRAGMA_ONCE
    2121# pragma once
     
    110110inline bool operator>=(const Timestamp &l, const Timestamp &r) { return l.compare(r) >= 0; }
    111111
    112 #endif /* !VBOX_INCLUDED_SRC_Dhcpd_TimeStamp_h */
     112#endif /* !VBOX_INCLUDED_SRC_Dhcpd_Timestamp_h */
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