Refactor: move LCAF related address classes under lcaf package

Change-Id: I828fe5596c84b121b9382a69107ddfce20840f99
diff --git a/protocols/lisp/ctl/src/main/java/org/onosproject/lisp/ctl/impl/LispMapServer.java b/protocols/lisp/ctl/src/main/java/org/onosproject/lisp/ctl/impl/LispMapServer.java
index faac48d..5e4d35a 100644
--- a/protocols/lisp/ctl/src/main/java/org/onosproject/lisp/ctl/impl/LispMapServer.java
+++ b/protocols/lisp/ctl/src/main/java/org/onosproject/lisp/ctl/impl/LispMapServer.java
@@ -34,7 +34,7 @@
 import org.onosproject.lisp.msg.types.LispAfiAddress;
 import org.onosproject.lisp.msg.types.LispIpv4Address;
 import org.onosproject.lisp.msg.types.LispIpv6Address;
-import org.onosproject.lisp.msg.types.LispNatLcafAddress.NatAddressBuilder;
+import org.onosproject.lisp.msg.types.lcaf.LispNatLcafAddress.NatAddressBuilder;
 import org.onosproject.lisp.msg.types.LispNoAddress;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/DefaultLispInfoReply.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/DefaultLispInfoReply.java
index 25827a0..ff34776 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/DefaultLispInfoReply.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/DefaultLispInfoReply.java
@@ -24,9 +24,9 @@
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
-import org.onosproject.lisp.msg.types.LispLcafAddress.LcafAddressReader;
-import org.onosproject.lisp.msg.types.LispLcafAddress.LcafAddressWriter;
-import org.onosproject.lisp.msg.types.LispNatLcafAddress;
+import org.onosproject.lisp.msg.types.lcaf.LispLcafAddress.LcafAddressReader;
+import org.onosproject.lisp.msg.types.lcaf.LispLcafAddress.LcafAddressWriter;
+import org.onosproject.lisp.msg.types.lcaf.LispNatLcafAddress;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/LispInfoReply.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/LispInfoReply.java
index 4e8af92..533e6fd 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/LispInfoReply.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/LispInfoReply.java
@@ -15,7 +15,7 @@
  */
 package org.onosproject.lisp.msg.protocols;
 
-import org.onosproject.lisp.msg.types.LispNatLcafAddress;
+import org.onosproject.lisp.msg.types.lcaf.LispNatLcafAddress;
 
 /**
  * LISP info reply message interface.
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispAfiAddress.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispAfiAddress.java
index c333236..83dad7b 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispAfiAddress.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispAfiAddress.java
@@ -19,6 +19,7 @@
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
+import org.onosproject.lisp.msg.types.lcaf.LispLcafAddress;
 
 import java.util.Objects;
 
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispAppDataLcafAddress.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispAppDataLcafAddress.java
similarity index 97%
rename from protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispAppDataLcafAddress.java
rename to protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispAppDataLcafAddress.java
index 49d594d..911e0ad 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispAppDataLcafAddress.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispAppDataLcafAddress.java
@@ -13,12 +13,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import io.netty.buffer.ByteBuf;
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
+import org.onosproject.lisp.msg.types.LispAddressReader;
+import org.onosproject.lisp.msg.types.LispAddressWriter;
+import org.onosproject.lisp.msg.types.LispAfiAddress;
 
 import java.nio.ByteBuffer;
 import java.util.Arrays;
@@ -388,7 +391,7 @@
             byteBuf.writeShort(address.getRemotePortLow());
             byteBuf.writeShort(address.getRemotePortHigh());
 
-            AfiAddressWriter writer = new LispAfiAddress.AfiAddressWriter();
+            LispAfiAddress.AfiAddressWriter writer = new LispAfiAddress.AfiAddressWriter();
             writer.writeTo(byteBuf, address.getAddress());
 
             LispLcafAddress.updateLength(lcafIndex, byteBuf);
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispAsLcafAddress.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispAsLcafAddress.java
similarity index 93%
rename from protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispAsLcafAddress.java
rename to protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispAsLcafAddress.java
index 0983773..22ddb57 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispAsLcafAddress.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispAsLcafAddress.java
@@ -13,12 +13,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import io.netty.buffer.ByteBuf;
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
+import org.onosproject.lisp.msg.types.LispAddressReader;
+import org.onosproject.lisp.msg.types.LispAddressWriter;
+import org.onosproject.lisp.msg.types.LispAfiAddress;
 
 import java.util.Objects;
 
@@ -161,7 +164,7 @@
             LispLcafAddress.deserializeCommon(byteBuf);
 
             int asNumber = (int) byteBuf.readUnsignedInt();
-            LispAfiAddress address = new AfiAddressReader().readFrom(byteBuf);
+            LispAfiAddress address = new LispAfiAddress.AfiAddressReader().readFrom(byteBuf);
 
             return new AsAddressBuilder()
                             .withAsNumber(asNumber)
@@ -185,7 +188,7 @@
 
             byteBuf.writeInt(address.getAsNumber());
 
-            new AfiAddressWriter().writeTo(byteBuf, address.getAddress());
+            new LispAfiAddress.AfiAddressWriter().writeTo(byteBuf, address.getAddress());
 
             LispLcafAddress.updateLength(lcafIndex, byteBuf);
         }
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispCanonicalAddressFormatEnum.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispCanonicalAddressFormatEnum.java
similarity index 97%
rename from protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispCanonicalAddressFormatEnum.java
rename to protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispCanonicalAddressFormatEnum.java
index b552e08..011a0dc 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispCanonicalAddressFormatEnum.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispCanonicalAddressFormatEnum.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 /**
  * LISP Canonical Address Format (LCAF) Enumeration class.
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispLcafAddress.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispLcafAddress.java
similarity index 84%
rename from protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispLcafAddress.java
rename to protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispLcafAddress.java
index 30f6ad8..a6b5d46 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispLcafAddress.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispLcafAddress.java
@@ -13,36 +13,28 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import io.netty.buffer.ByteBuf;
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
-import org.onosproject.lisp.msg.types.LispAppDataLcafAddress.AppDataLcafAddressReader;
-import org.onosproject.lisp.msg.types.LispAppDataLcafAddress.AppDataLcafAddressWriter;
-import org.onosproject.lisp.msg.types.LispListLcafAddress.ListLcafAddressReader;
-import org.onosproject.lisp.msg.types.LispListLcafAddress.ListLcafAddressWriter;
-import org.onosproject.lisp.msg.types.LispNatLcafAddress.NatLcafAddressReader;
-import org.onosproject.lisp.msg.types.LispNatLcafAddress.NatLcafAddressWriter;
-import org.onosproject.lisp.msg.types.LispSegmentLcafAddress.SegmentLcafAddressReader;
-import org.onosproject.lisp.msg.types.LispSegmentLcafAddress.SegmentLcafAddressWriter;
-import org.onosproject.lisp.msg.types.LispSourceDestLcafAddress.SourceDestLcafAddressReader;
-import org.onosproject.lisp.msg.types.LispSourceDestLcafAddress.SourceDestLcafAddressWriter;
-import org.onosproject.lisp.msg.types.LispTeLcafAddress.TeLcafAddressReader;
-import org.onosproject.lisp.msg.types.LispTeLcafAddress.TeLcafAddressWriter;
+import org.onosproject.lisp.msg.types.AddressFamilyIdentifierEnum;
+import org.onosproject.lisp.msg.types.LispAddressReader;
+import org.onosproject.lisp.msg.types.LispAddressWriter;
+import org.onosproject.lisp.msg.types.LispAfiAddress;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.util.Objects;
 
 import static com.google.common.base.MoreObjects.toStringHelper;
-import static org.onosproject.lisp.msg.types.LispCanonicalAddressFormatEnum.APPLICATION_DATA;
-import static org.onosproject.lisp.msg.types.LispCanonicalAddressFormatEnum.LIST;
-import static org.onosproject.lisp.msg.types.LispCanonicalAddressFormatEnum.NAT;
-import static org.onosproject.lisp.msg.types.LispCanonicalAddressFormatEnum.SEGMENT;
-import static org.onosproject.lisp.msg.types.LispCanonicalAddressFormatEnum.SOURCE_DEST;
-import static org.onosproject.lisp.msg.types.LispCanonicalAddressFormatEnum.TRAFFIC_ENGINEERING;
+import static org.onosproject.lisp.msg.types.lcaf.LispCanonicalAddressFormatEnum.APPLICATION_DATA;
+import static org.onosproject.lisp.msg.types.lcaf.LispCanonicalAddressFormatEnum.LIST;
+import static org.onosproject.lisp.msg.types.lcaf.LispCanonicalAddressFormatEnum.NAT;
+import static org.onosproject.lisp.msg.types.lcaf.LispCanonicalAddressFormatEnum.SEGMENT;
+import static org.onosproject.lisp.msg.types.lcaf.LispCanonicalAddressFormatEnum.SOURCE_DEST;
+import static org.onosproject.lisp.msg.types.lcaf.LispCanonicalAddressFormatEnum.TRAFFIC_ENGINEERING;
 
 
 /**
@@ -404,27 +396,27 @@
             byte lcafType = (byte) byteBuf.getUnsignedByte(index + LCAF_TYPE_FIELD_INDEX);
 
             if (lcafType == APPLICATION_DATA.getLispCode()) {
-                return new AppDataLcafAddressReader().readFrom(byteBuf);
+                return new LispAppDataLcafAddress.AppDataLcafAddressReader().readFrom(byteBuf);
             }
 
             if (lcafType == NAT.getLispCode()) {
-                return new NatLcafAddressReader().readFrom(byteBuf);
+                return new LispNatLcafAddress.NatLcafAddressReader().readFrom(byteBuf);
             }
 
             if (lcafType == LIST.getLispCode()) {
-                return new ListLcafAddressReader().readFrom(byteBuf);
+                return new LispListLcafAddress.ListLcafAddressReader().readFrom(byteBuf);
             }
 
             if (lcafType == SEGMENT.getLispCode()) {
-                return new SegmentLcafAddressReader().readFrom(byteBuf);
+                return new LispSegmentLcafAddress.SegmentLcafAddressReader().readFrom(byteBuf);
             }
 
             if (lcafType == SOURCE_DEST.getLispCode()) {
-                return new SourceDestLcafAddressReader().readFrom(byteBuf);
+                return new LispSourceDestLcafAddress.SourceDestLcafAddressReader().readFrom(byteBuf);
             }
 
             if (lcafType == TRAFFIC_ENGINEERING.getLispCode()) {
-                return new TeLcafAddressReader().readFrom(byteBuf);
+                return new LispTeLcafAddress.TeLcafAddressReader().readFrom(byteBuf);
             }
 
             log.warn("Unsupported LCAF type, please specify a correct LCAF type");
@@ -444,27 +436,27 @@
                 throws LispWriterException {
             switch (address.getType()) {
                 case APPLICATION_DATA:
-                    new AppDataLcafAddressWriter().writeTo(byteBuf,
+                    new LispAppDataLcafAddress.AppDataLcafAddressWriter().writeTo(byteBuf,
                             (LispAppDataLcafAddress) address);
                     break;
                 case NAT:
-                    new NatLcafAddressWriter().writeTo(byteBuf,
+                    new LispNatLcafAddress.NatLcafAddressWriter().writeTo(byteBuf,
                             (LispNatLcafAddress) address);
                     break;
                 case LIST:
-                    new ListLcafAddressWriter().writeTo(byteBuf,
+                    new LispListLcafAddress.ListLcafAddressWriter().writeTo(byteBuf,
                             (LispListLcafAddress) address);
                     break;
                 case SEGMENT:
-                    new SegmentLcafAddressWriter().writeTo(byteBuf,
+                    new LispSegmentLcafAddress.SegmentLcafAddressWriter().writeTo(byteBuf,
                             (LispSegmentLcafAddress) address);
                     break;
                 case SOURCE_DEST:
-                    new SourceDestLcafAddressWriter().writeTo(byteBuf,
+                    new LispSourceDestLcafAddress.SourceDestLcafAddressWriter().writeTo(byteBuf,
                             (LispSourceDestLcafAddress) address);
                     break;
                 case TRAFFIC_ENGINEERING:
-                    new TeLcafAddressWriter().writeTo(byteBuf,
+                    new LispTeLcafAddress.TeLcafAddressWriter().writeTo(byteBuf,
                             (LispTeLcafAddress) address);
                     break;
                 default:
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispListLcafAddress.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispListLcafAddress.java
similarity index 93%
rename from protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispListLcafAddress.java
rename to protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispListLcafAddress.java
index 3c47e6c..1b5983e 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispListLcafAddress.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispListLcafAddress.java
@@ -13,14 +13,20 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import com.google.common.collect.ImmutableList;
 import io.netty.buffer.ByteBuf;
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
+import org.onosproject.lisp.msg.types.AddressFamilyIdentifierEnum;
+import org.onosproject.lisp.msg.types.LispAddressReader;
+import org.onosproject.lisp.msg.types.LispAddressWriter;
+import org.onosproject.lisp.msg.types.LispAfiAddress;
+import org.onosproject.lisp.msg.types.LispIpv4Address;
 import org.onosproject.lisp.msg.types.LispIpv4Address.Ipv4AddressWriter;
+import org.onosproject.lisp.msg.types.LispIpv6Address;
 import org.onosproject.lisp.msg.types.LispIpv6Address.Ipv6AddressWriter;
 
 import java.util.List;
@@ -169,7 +175,7 @@
 
             LispLcafAddress lcafAddress = LispLcafAddress.deserializeCommon(byteBuf);
 
-            AfiAddressReader reader = new AfiAddressReader();
+            LispAfiAddress.AfiAddressReader reader = new LispAfiAddress.AfiAddressReader();
 
             LispAfiAddress ipv4 = reader.readFrom(byteBuf);
             LispAfiAddress ipv6 = reader.readFrom(byteBuf);
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispNatLcafAddress.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispNatLcafAddress.java
similarity index 98%
rename from protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispNatLcafAddress.java
rename to protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispNatLcafAddress.java
index 5bc88aa..6da6b42 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispNatLcafAddress.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispNatLcafAddress.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
@@ -21,6 +21,9 @@
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
+import org.onosproject.lisp.msg.types.LispAddressReader;
+import org.onosproject.lisp.msg.types.LispAddressWriter;
+import org.onosproject.lisp.msg.types.LispAfiAddress;
 
 import java.util.List;
 import java.util.Objects;
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispSegmentLcafAddress.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispSegmentLcafAddress.java
similarity index 97%
rename from protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispSegmentLcafAddress.java
rename to protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispSegmentLcafAddress.java
index a13d967..914664e 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispSegmentLcafAddress.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispSegmentLcafAddress.java
@@ -13,13 +13,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import io.netty.buffer.ByteBuf;
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
-import org.onosproject.lisp.msg.types.LispAfiAddress.AfiAddressReader;
+import org.onosproject.lisp.msg.types.LispAddressReader;
+import org.onosproject.lisp.msg.types.LispAddressWriter;
+import org.onosproject.lisp.msg.types.LispAfiAddress;
 
 import java.util.Objects;
 
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispSourceDestLcafAddress.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispSourceDestLcafAddress.java
similarity index 97%
rename from protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispSourceDestLcafAddress.java
rename to protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispSourceDestLcafAddress.java
index 696d08e..00accd9 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispSourceDestLcafAddress.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispSourceDestLcafAddress.java
@@ -13,14 +13,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import io.netty.buffer.ByteBuf;
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
-import org.onosproject.lisp.msg.types.LispAfiAddress.AfiAddressReader;
-import org.onosproject.lisp.msg.types.LispAfiAddress.AfiAddressWriter;
+import org.onosproject.lisp.msg.types.LispAddressReader;
+import org.onosproject.lisp.msg.types.LispAddressWriter;
+import org.onosproject.lisp.msg.types.LispAfiAddress;
 
 import java.util.Objects;
 
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispTeLcafAddress.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispTeLcafAddress.java
similarity index 95%
rename from protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispTeLcafAddress.java
rename to protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispTeLcafAddress.java
index 5892653..6b61305 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispTeLcafAddress.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispTeLcafAddress.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
@@ -21,13 +21,13 @@
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
-import org.onosproject.lisp.msg.types.LispTeRecord.TeRecordWriter;
+import org.onosproject.lisp.msg.types.LispAddressReader;
+import org.onosproject.lisp.msg.types.LispAddressWriter;
 
 import java.util.List;
 import java.util.Objects;
 
 import static com.google.common.base.MoreObjects.toStringHelper;
-import static org.onosproject.lisp.msg.types.LispLcafAddress.COMMON_HEADER_SIZE;
 
 /**
  * Traffic Engineering (TE) type LCAF address class.
@@ -161,7 +161,7 @@
             int lcafIndex = byteBuf.writerIndex();
             LispLcafAddress.serializeCommon(byteBuf, address);
 
-            TeRecordWriter writer = new TeRecordWriter();
+            LispTeRecord.TeRecordWriter writer = new LispTeRecord.TeRecordWriter();
 
             List<LispTeRecord> teRecords = address.getTeRecords();
             for (int i = 0; i < teRecords.size(); i++) {
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispTeRecord.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispTeRecord.java
similarity index 97%
rename from protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispTeRecord.java
rename to protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispTeRecord.java
index 48f7d47..6b4b56a 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/LispTeRecord.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispTeRecord.java
@@ -13,13 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import io.netty.buffer.ByteBuf;
 import org.onlab.util.ByteOperator;
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
+import org.onosproject.lisp.msg.types.LispAddressReader;
+import org.onosproject.lisp.msg.types.LispAddressWriter;
+import org.onosproject.lisp.msg.types.LispAfiAddress;
 import org.onosproject.lisp.msg.types.LispAfiAddress.AfiAddressReader;
 import org.onosproject.lisp.msg.types.LispAfiAddress.AfiAddressWriter;
 
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/package-info.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/package-info.java
new file mode 100644
index 0000000..21a149d
--- /dev/null
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/package-info.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2017-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/**
+ * LISP Canonical Address Formatted address type package.
+ */
+package org.onosproject.lisp.msg.types.lcaf;
\ No newline at end of file
diff --git a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/protocols/DefaultLispInfoReplyTest.java b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/protocols/DefaultLispInfoReplyTest.java
index d72ba55..550dd5c 100644
--- a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/protocols/DefaultLispInfoReplyTest.java
+++ b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/protocols/DefaultLispInfoReplyTest.java
@@ -28,9 +28,9 @@
 import org.onosproject.lisp.msg.protocols.DefaultLispInfoReply.InfoReplyReader;
 import org.onosproject.lisp.msg.protocols.DefaultLispInfoReply.InfoReplyWriter;
 import org.onosproject.lisp.msg.types.LispIpv4Address;
-import org.onosproject.lisp.msg.types.LispNatLcafAddress;
+import org.onosproject.lisp.msg.types.lcaf.LispNatLcafAddress;
 import org.onosproject.lisp.msg.protocols.LispInfoReply.InfoReplyBuilder;
-import org.onosproject.lisp.msg.types.LispNatLcafAddress.NatAddressBuilder;
+import org.onosproject.lisp.msg.types.lcaf.LispNatLcafAddress.NatAddressBuilder;
 
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.is;
diff --git a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispAppDataLcafAddressTest.java b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispAppDataLcafAddressTest.java
similarity index 91%
rename from protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispAppDataLcafAddressTest.java
rename to protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispAppDataLcafAddressTest.java
index 338dfb6..dffef74 100644
--- a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispAppDataLcafAddressTest.java
+++ b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispAppDataLcafAddressTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import com.google.common.testing.EqualsTester;
 import io.netty.buffer.ByteBuf;
@@ -24,9 +24,11 @@
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
-import org.onosproject.lisp.msg.types.LispAppDataLcafAddress.AppDataAddressBuilder;
-import org.onosproject.lisp.msg.types.LispAppDataLcafAddress.AppDataLcafAddressWriter;
-import org.onosproject.lisp.msg.types.LispAppDataLcafAddress.AppDataLcafAddressReader;
+import org.onosproject.lisp.msg.types.LispAfiAddress;
+import org.onosproject.lisp.msg.types.LispIpv4Address;
+import org.onosproject.lisp.msg.types.lcaf.LispAppDataLcafAddress.AppDataAddressBuilder;
+import org.onosproject.lisp.msg.types.lcaf.LispAppDataLcafAddress.AppDataLcafAddressWriter;
+import org.onosproject.lisp.msg.types.lcaf.LispAppDataLcafAddress.AppDataLcafAddressReader;
 
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.is;
diff --git a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispAsLcafAddressTest.java b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispAsLcafAddressTest.java
similarity index 90%
rename from protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispAsLcafAddressTest.java
rename to protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispAsLcafAddressTest.java
index 5cac8b89..0a95c4f 100644
--- a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispAsLcafAddressTest.java
+++ b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispAsLcafAddressTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import com.google.common.testing.EqualsTester;
 import io.netty.buffer.ByteBuf;
@@ -24,9 +24,10 @@
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
-import org.onosproject.lisp.msg.types.LispAsLcafAddress.AsAddressBuilder;
-import org.onosproject.lisp.msg.types.LispAsLcafAddress.AsLcafAddressReader;
-import org.onosproject.lisp.msg.types.LispAsLcafAddress.AsLcafAddressWriter;
+import org.onosproject.lisp.msg.types.LispIpv4Address;
+import org.onosproject.lisp.msg.types.lcaf.LispAsLcafAddress.AsAddressBuilder;
+import org.onosproject.lisp.msg.types.lcaf.LispAsLcafAddress.AsLcafAddressReader;
+import org.onosproject.lisp.msg.types.lcaf.LispAsLcafAddress.AsLcafAddressWriter;
 
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.is;
diff --git a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispLcafAddressTest.java b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispLcafAddressTest.java
similarity index 97%
rename from protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispLcafAddressTest.java
rename to protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispLcafAddressTest.java
index e0b61b2..e76ab92 100644
--- a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispLcafAddressTest.java
+++ b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispLcafAddressTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import com.google.common.testing.EqualsTester;
 import org.junit.Before;
diff --git a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispListLcafAddressTest.java b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispListLcafAddressTest.java
similarity index 90%
rename from protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispListLcafAddressTest.java
rename to protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispListLcafAddressTest.java
index 4ffd1f1..625cf7d 100644
--- a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispListLcafAddressTest.java
+++ b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispListLcafAddressTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import com.google.common.collect.Lists;
 import com.google.common.testing.EqualsTester;
@@ -25,9 +25,11 @@
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
-
-import org.onosproject.lisp.msg.types.LispListLcafAddress.ListLcafAddressWriter;
-import org.onosproject.lisp.msg.types.LispListLcafAddress.ListLcafAddressReader;
+import org.onosproject.lisp.msg.types.LispAfiAddress;
+import org.onosproject.lisp.msg.types.LispIpv4Address;
+import org.onosproject.lisp.msg.types.LispIpv6Address;
+import org.onosproject.lisp.msg.types.lcaf.LispListLcafAddress.ListLcafAddressReader;
+import org.onosproject.lisp.msg.types.lcaf.LispListLcafAddress.ListLcafAddressWriter;
 
 import java.util.List;
 
diff --git a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispNatLcafAddressTest.java b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispNatLcafAddressTest.java
similarity index 93%
rename from protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispNatLcafAddressTest.java
rename to protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispNatLcafAddressTest.java
index 624d7b1..d97515f 100644
--- a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispNatLcafAddressTest.java
+++ b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispNatLcafAddressTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.testing.EqualsTester;
@@ -25,9 +25,11 @@
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
-import org.onosproject.lisp.msg.types.LispNatLcafAddress.NatAddressBuilder;
-import org.onosproject.lisp.msg.types.LispNatLcafAddress.NatLcafAddressReader;
-import org.onosproject.lisp.msg.types.LispNatLcafAddress.NatLcafAddressWriter;
+import org.onosproject.lisp.msg.types.LispAfiAddress;
+import org.onosproject.lisp.msg.types.LispIpv4Address;
+import org.onosproject.lisp.msg.types.lcaf.LispNatLcafAddress.NatAddressBuilder;
+import org.onosproject.lisp.msg.types.lcaf.LispNatLcafAddress.NatLcafAddressReader;
+import org.onosproject.lisp.msg.types.lcaf.LispNatLcafAddress.NatLcafAddressWriter;
 
 import java.util.List;
 
diff --git a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispSegmentLcafAddressTest.java b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispSegmentLcafAddressTest.java
similarity index 90%
rename from protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispSegmentLcafAddressTest.java
rename to protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispSegmentLcafAddressTest.java
index 73246f1..865c679 100644
--- a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispSegmentLcafAddressTest.java
+++ b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispSegmentLcafAddressTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import com.google.common.testing.EqualsTester;
 import io.netty.buffer.ByteBuf;
@@ -24,9 +24,10 @@
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
-import org.onosproject.lisp.msg.types.LispSegmentLcafAddress.SegmentAddressBuilder;
-import org.onosproject.lisp.msg.types.LispSegmentLcafAddress.SegmentLcafAddressReader;
-import org.onosproject.lisp.msg.types.LispSegmentLcafAddress.SegmentLcafAddressWriter;
+import org.onosproject.lisp.msg.types.LispIpv4Address;
+import org.onosproject.lisp.msg.types.lcaf.LispSegmentLcafAddress.SegmentAddressBuilder;
+import org.onosproject.lisp.msg.types.lcaf.LispSegmentLcafAddress.SegmentLcafAddressReader;
+import org.onosproject.lisp.msg.types.lcaf.LispSegmentLcafAddress.SegmentLcafAddressWriter;
 
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.is;
diff --git a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispSourceDestLcafAddressTest.java b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispSourceDestLcafAddressTest.java
similarity index 91%
rename from protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispSourceDestLcafAddressTest.java
rename to protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispSourceDestLcafAddressTest.java
index f50c52a..7720c96 100644
--- a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispSourceDestLcafAddressTest.java
+++ b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispSourceDestLcafAddressTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import com.google.common.testing.EqualsTester;
 import io.netty.buffer.ByteBuf;
@@ -24,9 +24,10 @@
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
-import org.onosproject.lisp.msg.types.LispSourceDestLcafAddress.SourceDestAddressBuilder;
-import org.onosproject.lisp.msg.types.LispSourceDestLcafAddress.SourceDestLcafAddressReader;
-import org.onosproject.lisp.msg.types.LispSourceDestLcafAddress.SourceDestLcafAddressWriter;
+import org.onosproject.lisp.msg.types.LispIpv4Address;
+import org.onosproject.lisp.msg.types.lcaf.LispSourceDestLcafAddress.SourceDestAddressBuilder;
+import org.onosproject.lisp.msg.types.lcaf.LispSourceDestLcafAddress.SourceDestLcafAddressReader;
+import org.onosproject.lisp.msg.types.lcaf.LispSourceDestLcafAddress.SourceDestLcafAddressWriter;
 
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.is;
diff --git a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispTeLcafAddressTest.java b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispTeLcafAddressTest.java
similarity index 93%
rename from protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispTeLcafAddressTest.java
rename to protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispTeLcafAddressTest.java
index 789b2c6..0d31c08 100644
--- a/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/LispTeLcafAddressTest.java
+++ b/protocols/lisp/msg/src/test/java/org/onosproject/lisp/msg/types/lcaf/LispTeLcafAddressTest.java
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.onosproject.lisp.msg.types;
+package org.onosproject.lisp.msg.types.lcaf;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.testing.EqualsTester;
@@ -25,10 +25,11 @@
 import org.onosproject.lisp.msg.exceptions.LispParseError;
 import org.onosproject.lisp.msg.exceptions.LispReaderException;
 import org.onosproject.lisp.msg.exceptions.LispWriterException;
-import org.onosproject.lisp.msg.types.LispTeLcafAddress.TeAddressBuilder;
-import org.onosproject.lisp.msg.types.LispTeLcafAddress.TeLcafAddressReader;
-import org.onosproject.lisp.msg.types.LispTeLcafAddress.TeLcafAddressWriter;
-import org.onosproject.lisp.msg.types.LispTeRecord.TeRecordBuilder;
+import org.onosproject.lisp.msg.types.LispIpv4Address;
+import org.onosproject.lisp.msg.types.lcaf.LispTeLcafAddress.TeAddressBuilder;
+import org.onosproject.lisp.msg.types.lcaf.LispTeLcafAddress.TeLcafAddressReader;
+import org.onosproject.lisp.msg.types.lcaf.LispTeLcafAddress.TeLcafAddressWriter;
+import org.onosproject.lisp.msg.types.lcaf.LispTeRecord.TeRecordBuilder;
 
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.is;