blob: 271423dd7a9a2347b120830f7c96ee1601b0b505 [file] [log] [blame]
Amit Ghosha17354e2017-08-23 12:56:04 +01001/*
2 * Copyright 2017-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.opencord.dhcpl2relay;
17
18import org.onlab.packet.IpAddress;
19import org.onlab.packet.MacAddress;
20
21import java.util.Date;
22
23/**
24 * Information about successful DHCP Allocations.
25 */
26public class DhcpAllocationInfo {
27
28 private String circuitId;
29 private MacAddress macAddress;
30 private IpAddress ip;
31 private Date allocationTime;
32
33 public DhcpAllocationInfo(String circuitId, MacAddress macAddress, IpAddress ip) {
34 this.circuitId = circuitId;
35 this.macAddress = macAddress;
36 this.ip = ip;
37 this.allocationTime = new Date();
38 }
39
40 public String circuitId() {
41 return circuitId;
42 }
43
44 public MacAddress macAddress() {
45 return macAddress;
46 }
47
48 public IpAddress ipAddress() {
49 return ip;
50 }
51
52 public Date allocationTime() {
53 return allocationTime;
54 }
55}