LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 UPB | 3 * Copyright (c) 2011 UPB |
| 4 * Copyright (c) 2017 NITK Surathkal |
4 * | 5 * |
5 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 7 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 8 * published by the Free Software Foundation; |
8 * | 9 * |
9 * This program is distributed in the hope that it will be useful, | 10 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 13 * GNU General Public License for more details. |
13 * | 14 * |
14 * You should have received a copy of the GNU General Public License | 15 * You should have received a copy of the GNU General Public License |
15 * along with this program; if not, write to the Free Software | 16 * along with this program; if not, write to the Free Software |
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
17 * | 18 * |
18 * Author: Radu Lupu <rlupu@elcom.pub.ro> for previous patch of DHCP on ns-3.12 | 19 * Author: Radu Lupu <rlupu@elcom.pub.ro> |
19 * Ankit Deepak <adadeepak8@gmail.com> and | 20 * Ankit Deepak <adadeepak8@gmail.com> |
20 * Deepti Rajagopal <deeptir96@gmail.com> for DHCP patch on ns-3.25 | 21 * Deepti Rajagopal <deeptir96@gmail.com> |
21 * | 22 * |
22 */ | 23 */ |
23 | 24 |
24 #ifndef DHCP_SERVER_H | 25 #ifndef DHCP_SERVER_H |
25 #define DHCP_SERVER_H | 26 #define DHCP_SERVER_H |
26 | 27 |
27 #include "ns3/application.h" | 28 #include "ns3/application.h" |
28 #include "ns3/event-id.h" | 29 #include "ns3/event-id.h" |
29 #include "ns3/ptr.h" | 30 #include "ns3/ptr.h" |
30 #include "ns3/address.h" | 31 #include "ns3/address.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 106 |
106 Ptr<Socket> m_socket; //!< The socket bound to port 67 | 107 Ptr<Socket> m_socket; //!< The socket bound to port 67 |
107 Address m_local; //!< The local address | 108 Address m_local; //!< The local address |
108 Ipv4Address m_poolAddress; //!< The network address available to t
he server | 109 Ipv4Address m_poolAddress; //!< The network address available to t
he server |
109 Ipv4Address m_minAddress; //!< The first address in the address p
ool | 110 Ipv4Address m_minAddress; //!< The first address in the address p
ool |
110 Ipv4Address m_maxAddress; //!< The last address in the address po
ol | 111 Ipv4Address m_maxAddress; //!< The last address in the address po
ol |
111 uint32_t m_occurange; //!< Number of occupied address in the
pool | 112 uint32_t m_occurange; //!< Number of occupied address in the
pool |
112 Ipv4Mask m_poolMask; //!< The network mask of the pool | 113 Ipv4Mask m_poolMask; //!< The network mask of the pool |
113 Ipv4Address m_server; //!< Address of DHCP server | 114 Ipv4Address m_server; //!< Address of DHCP server |
114 Ipv4Address m_peer; //!< Address of DHCP client | 115 Ipv4Address m_peer; //!< Address of DHCP client |
115 std::map<std::pair<Mac48Address, uint32_t>, uint32_t> m_leasedAddresses; //!<
Leased address and their status (cache memory) | 116 Ipv4Address m_gateway; //!< Store the gateway address |
| 117 std::map<std::pair<Address, Ipv4Address>, uint32_t> m_leasedAddresses; //!< Le
ased address and their status (cache memory) |
116 uint32_t m_nextAddressSeq; //!< The next address in the sequence w
hich can be alloted | 118 uint32_t m_nextAddressSeq; //!< The next address in the sequence w
hich can be alloted |
117 Time m_lease; //!< The granted lease time for an addr
ess | 119 Time m_lease; //!< The granted lease time for an addr
ess |
118 Time m_renew; //!< The renewal time for an address | 120 Time m_renew; //!< The renewal time for an address |
119 Time m_rebind; //!< The rebinding time for an address | 121 Time m_rebind; //!< The rebinding time for an address |
120 EventId m_expiredEvent; //!< The Event to trigger TimerHandler | 122 EventId m_expiredEvent; //!< The Event to trigger TimerHandler |
121 }; | 123 }; |
122 | 124 |
123 } // namespace ns3 | 125 } // namespace ns3 |
124 | 126 |
125 #endif /* DHCP_SERVER_H */ | 127 #endif /* DHCP_SERVER_H */ |
LEFT | RIGHT |