Jian Li | 3573439 | 2016-07-14 11:55:24 +0900 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016-present Open Networking Laboratory |
| 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 | */ |
Jian Li | 6b77dc0 | 2016-07-14 16:04:25 +0900 | [diff] [blame] | 16 | package org.onosproject.lisp.msg.types; |
Jian Li | 3573439 | 2016-07-14 11:55:24 +0900 | [diff] [blame] | 17 | |
Jian Li | 115d860 | 2016-08-15 20:21:53 +0900 | [diff] [blame^] | 18 | import io.netty.buffer.ByteBuf; |
| 19 | import org.onosproject.lisp.msg.exceptions.LispParseError; |
| 20 | |
Jian Li | 3573439 | 2016-07-14 11:55:24 +0900 | [diff] [blame] | 21 | /** |
Jian Li | 6b77dc0 | 2016-07-14 16:04:25 +0900 | [diff] [blame] | 22 | * No address. |
Jian Li | 3573439 | 2016-07-14 11:55:24 +0900 | [diff] [blame] | 23 | */ |
Jian Li | 6b77dc0 | 2016-07-14 16:04:25 +0900 | [diff] [blame] | 24 | public class LispNoAddress extends LispAfiAddress { |
Jian Li | 3573439 | 2016-07-14 11:55:24 +0900 | [diff] [blame] | 25 | |
Jian Li | 6b77dc0 | 2016-07-14 16:04:25 +0900 | [diff] [blame] | 26 | /** |
| 27 | * Initializes no address. |
| 28 | */ |
| 29 | public LispNoAddress() { |
| 30 | super(AddressFamilyIdentifierEnum.NO_ADDRESS); |
| 31 | } |
Jian Li | 115d860 | 2016-08-15 20:21:53 +0900 | [diff] [blame^] | 32 | |
| 33 | /** |
| 34 | * LISP no address reader class. |
| 35 | */ |
| 36 | public static class NoAddressReader implements LispAddressReader<LispNoAddress> { |
| 37 | |
| 38 | @Override |
| 39 | public LispNoAddress readFrom(ByteBuf byteBuf) throws LispParseError { |
| 40 | return new LispNoAddress(); |
| 41 | } |
| 42 | } |
Jian Li | 3573439 | 2016-07-14 11:55:24 +0900 | [diff] [blame] | 43 | } |