Fix the LispMessageEncoder to reply with UDP message sender
- Add AbstractLispMessage to store sender IP address per message
- Fix the LispMacAuthentication class to accept byte array as input
- Rename LispMessageEncoderTest class
- Try to use MessageToMessageEncoder to result in UDP message
Change-Id: I977302cdadf5c96c60c889be291ad5d90e3bc7cf
diff --git a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/LispMessage.java b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/LispMessage.java
index 4e3cdfa..77ebfb6 100644
--- a/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/LispMessage.java
+++ b/protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/protocols/LispMessage.java
@@ -18,6 +18,8 @@
import io.netty.buffer.ByteBuf;
import org.onosproject.lisp.msg.exceptions.LispWriterException;
+import java.net.InetSocketAddress;
+
/**
* LISP message interface.
*/
@@ -31,6 +33,22 @@
LispType getType();
/**
+ * Configures the sender's IP address with port number.
+ * Note that this information is used to make the UDP datagram packet.
+ *
+ * @param sender LISP message sender
+ */
+ void configSender(InetSocketAddress sender);
+
+ /**
+ * Obtains the sender's IP address with port number.
+ * Note that this information is used to make the UDP datagram packet.
+ *
+ * @return send's IP address with port number
+ */
+ InetSocketAddress getSender();
+
+ /**
* Writes LISP message object into communication channel.
*
* @param byteBuf byte buffer