- Timestamp:
- Jul 4, 2019 6:27:21 PM (6 years ago)
- Location:
- trunk/src/VBox/NetworkServices/Dhcpd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/Dhcpd/Db.h
r79530 r79531 136 136 typedef std::list<Binding *> bindings_t; 137 137 138 /** Configuration (set at init). */ 138 /** Configuration (set at init). 139 * @note Currently not used. */ 139 140 const Config *m_pConfig; 140 141 /** The lease database. */ -
trunk/src/VBox/NetworkServices/Dhcpd/IPv4Pool.cpp
r79529 r79531 48 48 * @param a_Range The range to insert. 49 49 */ 50 int IPv4Pool::i nsert(const IPv4Range &a_Range)50 int IPv4Pool::i_insert(const IPv4Range &a_Range) 51 51 { 52 52 /* … … 152 152 { 153 153 if (haddr == first) 154 i nsert(++first, last);154 i_insert(++first, last); 155 155 else if (haddr == last) 156 i nsert(first, --last);156 i_insert(first, --last); 157 157 else 158 158 { 159 i nsert(first, haddr - 1);160 i nsert(haddr + 1, last);159 i_insert(first, haddr - 1); 160 i_insert(haddr + 1, last); 161 161 } 162 162 } -
trunk/src/VBox/NetworkServices/Dhcpd/IPv4Pool.h
r79529 r79531 121 121 int init(RTNETADDRIPV4 aFirstAddr, RTNETADDRIPV4 aLastAddr); 122 122 123 RTNETADDRIPV4 allocate(); 124 bool allocate(RTNETADDRIPV4); 125 123 126 /** 124 127 * Checks if the pool range includes @a addr (allocation status not considered). … … 129 132 } 130 133 131 RTNETADDRIPV4 allocate();132 bool allocate(RTNETADDRIPV4);133 134 134 private: 135 int i nsert(const IPv4Range &range);135 int i_insert(const IPv4Range &range); 136 136 #if 0 137 int i nsert(IPV4HADDR single) { returninsert(IPv4Range(single)); }137 int i_insert(IPV4HADDR single) { return i_insert(IPv4Range(single)); } 138 138 #endif 139 int i nsert(IPV4HADDR first, IPV4HADDR last) { returninsert(IPv4Range(first, last)); }140 int i nsert(RTNETADDRIPV4 single) { returninsert(IPv4Range(single)); }141 int i nsert(RTNETADDRIPV4 first, RTNETADDRIPV4 last) { returninsert(IPv4Range(first, last)); }139 int i_insert(IPV4HADDR first, IPV4HADDR last) { return i_insert(IPv4Range(first, last)); } 140 int i_insert(RTNETADDRIPV4 single) { return i_insert(IPv4Range(single)); } 141 int i_insert(RTNETADDRIPV4 first, RTNETADDRIPV4 last) { return i_insert(IPv4Range(first, last)); } 142 142 }; 143 143
Note:
See TracChangeset
for help on using the changeset viewer.