- Timestamp:
- Jul 4, 2019 6:25:04 PM (6 years ago)
- Location:
- trunk/src/VBox/NetworkServices/Dhcpd
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/Dhcpd/Db.cpp
r79529 r79530 369 369 * @param id The client ID. 370 370 */ 371 Binding *Db:: createBinding(const ClientId &id)371 Binding *Db::i_createBinding(const ClientId &id) 372 372 { 373 373 Binding *pBinding = NULL; … … 400 400 * @param id The client. 401 401 */ 402 Binding *Db:: createBinding(RTNETADDRIPV4 addr, const ClientId &id)402 Binding *Db::i_createBinding(RTNETADDRIPV4 addr, const ClientId &id) 403 403 { 404 404 bool fAvailable = m_pool.allocate(addr); … … 423 423 * the preferred address (@a addr) into account when possible and if non-zero. 424 424 */ 425 Binding *Db:: allocateAddress(const ClientId &id, RTNETADDRIPV4 addr)425 Binding *Db::i_allocateAddress(const ClientId &id, RTNETADDRIPV4 addr) 426 426 { 427 427 Assert(addr.u == 0 || addressBelongs(addr)); … … 503 503 if (addrBinding == NULL) 504 504 { 505 addrBinding = createBinding(addr, id);505 addrBinding = i_createBinding(addr, id); 506 506 Assert(addrBinding != NULL); 507 507 LogDHCP(("> .... creating new binding for this address %R[binding]\n", addrBinding)); … … 529 529 else 530 530 { 531 idBinding = createBinding();531 idBinding = i_createBinding(); 532 532 if (idBinding != NULL) 533 533 LogDHCP(("> .... creating new binding\n")); … … 586 586 const ClientId &id(req.clientId()); 587 587 588 Binding *b = allocateAddress(id, reqAddr.value());588 Binding *b = i_allocateAddress(id, reqAddr.value()); 589 589 if (b != NULL) 590 590 { … … 607 607 * 608 608 * @returns IPRT status code. 609 * @param newb.610 */ 611 int Db:: addBinding(Binding *pNewBinding)609 * @param pNewBinding The new binding to add. 610 */ 611 int Db::i_addBinding(Binding *pNewBinding) 612 612 { 613 613 /* … … 841 841 if (pElmLease->nameEquals("Lease")) 842 842 { 843 int rc2 = loadLease(pElmLease);843 int rc2 = i_loadLease(pElmLease); 844 844 if (RT_SUCCESS(rc2)) 845 845 { /* likely */ } … … 863 863 * @return IPRT status code. 864 864 */ 865 int Db:: loadLease(const xml::ElementNode *pElmLease)865 int Db::i_loadLease(const xml::ElementNode *pElmLease) 866 866 { 867 867 Binding *pBinding = NULL; … … 882 882 LogDHCP(("> LOAD: EXPIRED lease %R[binding]\n", pBinding)); 883 883 884 int rc = addBinding(pBinding);884 int rc = i_addBinding(pBinding); 885 885 if (RT_FAILURE(rc)) 886 886 delete pBinding; -
trunk/src/VBox/NetworkServices/Dhcpd/Db.h
r79529 r79530 163 163 int loadLeases(const RTCString &strFilename); 164 164 private: 165 int loadLease(const xml::ElementNode *pElmLease);165 int i_loadLease(const xml::ElementNode *pElmLease); 166 166 public: 167 167 int writeLeases(const RTCString &strFilename) const; … … 169 169 170 170 private: 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()); 173 173 174 Binding * allocateAddress(const ClientId &id, RTNETADDRIPV4 addr);174 Binding *i_allocateAddress(const ClientId &id, RTNETADDRIPV4 addr); 175 175 176 176 /* add binding e.g. from the leases file */ 177 int addBinding(Binding *b);177 int i_addBinding(Binding *pNewBinding); 178 178 }; 179 179 -
trunk/src/VBox/NetworkServices/Dhcpd/DhcpdInternal.h
r79524 r79530 16 16 */ 17 17 18 #ifndef VBOX_INCLUDED_SRC_Dhcpd_D efs_h19 #define VBOX_INCLUDED_SRC_Dhcpd_D efs_h18 #ifndef VBOX_INCLUDED_SRC_Dhcpd_DhcpdInternal_h 19 #define VBOX_INCLUDED_SRC_Dhcpd_DhcpdInternal_h 20 20 #ifndef RT_WITHOUT_PRAGMA_ONCE 21 21 # pragma once … … 72 72 #endif 73 73 74 #endif /* !VBOX_INCLUDED_SRC_Dhcpd_D efs_h */74 #endif /* !VBOX_INCLUDED_SRC_Dhcpd_DhcpdInternal_h */ -
trunk/src/VBox/NetworkServices/Dhcpd/Timestamp.h
r79526 r79530 16 16 */ 17 17 18 #ifndef VBOX_INCLUDED_SRC_Dhcpd_Time Stamp_h19 #define VBOX_INCLUDED_SRC_Dhcpd_Time Stamp_h18 #ifndef VBOX_INCLUDED_SRC_Dhcpd_Timestamp_h 19 #define VBOX_INCLUDED_SRC_Dhcpd_Timestamp_h 20 20 #ifndef RT_WITHOUT_PRAGMA_ONCE 21 21 # pragma once … … 110 110 inline bool operator>=(const Timestamp &l, const Timestamp &r) { return l.compare(r) >= 0; } 111 111 112 #endif /* !VBOX_INCLUDED_SRC_Dhcpd_Time Stamp_h */112 #endif /* !VBOX_INCLUDED_SRC_Dhcpd_Timestamp_h */
Note:
See TracChangeset
for help on using the changeset viewer.