Pingping Lin | ffa27d3 | 2015-04-30 14:41:03 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Pingping Lin | ffa27d3 | 2015-04-30 14:41:03 -0700 | [diff] [blame] | 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 | */ |
| 16 | package org.onosproject.virtualbng; |
| 17 | |
| 18 | import org.onlab.packet.IpAddress; |
Pingping Lin | dead205 | 2015-06-08 16:07:23 -0700 | [diff] [blame] | 19 | import org.onlab.packet.MacAddress; |
Pingping Lin | ffa27d3 | 2015-04-30 14:41:03 -0700 | [diff] [blame] | 20 | |
| 21 | /** |
| 22 | * Provides service of the virtual BNG. |
| 23 | */ |
| 24 | public interface VbngService { |
| 25 | |
| 26 | /** |
| 27 | * Creates a virtual BNG. |
| 28 | * <p> |
| 29 | * It firstly finds out an available local public IP address. Then, it |
| 30 | * sets up paths between the host configured with private IP and |
| 31 | * next hop. Finally it returns the public IP address. |
| 32 | * </p> |
| 33 | * |
| 34 | * @param privateIpAddress the private IP address |
Pingping Lin | dead205 | 2015-06-08 16:07:23 -0700 | [diff] [blame] | 35 | * @param hostMacAddress the MAC address for the IP address |
| 36 | * @param hostName the host name for the IP address |
Pingping Lin | ffa27d3 | 2015-04-30 14:41:03 -0700 | [diff] [blame] | 37 | * @return the public address if a virtual BGN is successfully created, |
| 38 | * otherwise return null |
| 39 | */ |
Pingping Lin | dead205 | 2015-06-08 16:07:23 -0700 | [diff] [blame] | 40 | IpAddress createVbng(IpAddress privateIpAddress, MacAddress hostMacAddress, |
| 41 | String hostName); |
Pingping Lin | ffa27d3 | 2015-04-30 14:41:03 -0700 | [diff] [blame] | 42 | |
Pingping Lin | d2afaf2 | 2015-06-02 10:46:29 -0700 | [diff] [blame] | 43 | /** |
| 44 | * Deletes a virtual BNG. |
| 45 | * |
| 46 | * @param privateIpAddress a private IP address |
| 47 | * @return the public address assigned for this private IP address if the |
| 48 | * virtual BGN exists and is deleted, otherwise return null if |
| 49 | * there is no vBNG for this private IP address |
| 50 | */ |
| 51 | IpAddress deleteVbng(IpAddress privateIpAddress); |
Pingping Lin | ffa27d3 | 2015-04-30 14:41:03 -0700 | [diff] [blame] | 52 | } |