Sean Condon | 39c2a2d | 2017-03-21 14:23:19 +0000 | [diff] [blame^] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.incubator.net.l2monitoring.cfm; |
| 17 | |
| 18 | import org.onlab.packet.MacAddress; |
| 19 | import org.onosproject.incubator.net.l2monitoring.cfm.identifier.MepId; |
| 20 | |
| 21 | import java.util.BitSet; |
| 22 | |
| 23 | /** |
| 24 | * Object representing Linktrace create parameters. |
| 25 | */ |
| 26 | public interface MepLtCreate { |
| 27 | /** |
| 28 | * The remote Mep will be identified by either a MacAddress or a MEPId. |
| 29 | * @return The MAC address of the remoteMep |
| 30 | */ |
| 31 | MacAddress remoteMepAddress(); |
| 32 | |
| 33 | /** |
| 34 | * The remote Mep will be identified by either a MacAddress or a MEPId. |
| 35 | * @return The id of the remoteMep |
| 36 | */ |
| 37 | MepId remoteMepId(); |
| 38 | |
| 39 | /** |
| 40 | * The Flags field for LTMs transmitted by the MEP. |
| 41 | * [802.1q] 12.14.7.4.2:b |
| 42 | * Bit 0 is use-fdb-only |
| 43 | * @return A bit set of flags |
| 44 | */ |
| 45 | BitSet transmitLtmFlags(); |
| 46 | |
| 47 | /** |
| 48 | * An initial value for the LTM TTL field. 64 if not specified. |
| 49 | * [802.1q] 12.14.7.4.2:d |
| 50 | * @return The default number of hops |
| 51 | */ |
| 52 | Short defaultTtl(); |
| 53 | |
| 54 | |
| 55 | /** |
| 56 | * Builder for {@link org.onosproject.incubator.net.l2monitoring.cfm.MepLtCreate}. |
| 57 | */ |
| 58 | interface MepLtCreateBuilder { |
| 59 | MepLtCreateBuilder transmitLtmFlags(BitSet transmitLtmFlags); |
| 60 | |
| 61 | MepLtCreateBuilder defaultTtl(Short defaultTtl); |
| 62 | |
| 63 | public MepLtCreate build(); |
| 64 | } |
| 65 | } |