[CORD-630] IPv6 filtering rules

Changes:
- Udpates TMAC table in order to handle IPv6 protocol;
- Updates ACL table in order to handle ICMPv6 traffic and traffic for the router;
- Udpates UNICAST table in order to handle the traffic towards the other routers;
- Updates the router ip in the netcfg in order to handle IPv6 address;
- Substitutes IpAddress and IpPrefix in many parts;
- Updates cpqd and ofdpa drivers to handle the above cases;
- Fixes the interaction with NRM when neighbordiscovery is activated;
- Introduces the IPv6 loopback and IPv6 node sid;

Change-Id: I0a3003be6f2f4b581cabe224c47a0cfbf51e8f9c
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultGroupHandler.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultGroupHandler.java
index b76a04c..529a99c 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultGroupHandler.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/grouphandler/DefaultGroupHandler.java
@@ -69,7 +69,8 @@
     protected final ApplicationId appId;
     protected final DeviceProperties deviceConfig;
     protected final List<Integer> allSegmentIds;
-    protected int nodeSegmentId = -1;
+    protected int ipv4NodeSegmentId = -1;
+    protected int ipv6NodeSegmentId = -1;
     protected boolean isEdgeRouter = false;
     protected MacAddress nodeMacAddr = null;
     protected LinkService linkService;
@@ -111,7 +112,8 @@
         this.linkService = checkNotNull(linkService);
         this.allSegmentIds = checkNotNull(config.getAllDeviceSegmentIds());
         try {
-            this.nodeSegmentId = config.getSegmentId(deviceId);
+            this.ipv4NodeSegmentId = config.getIPv4SegmentId(deviceId);
+            this.ipv6NodeSegmentId = config.getIPv6SegmentId(deviceId);
             this.isEdgeRouter = config.isEdgeDevice(deviceId);
             this.nodeMacAddr = checkNotNull(config.getDeviceMac(deviceId));
         } catch (DeviceConfigNotFoundException e) {
@@ -597,7 +599,10 @@
     private boolean isSegmentIdSameAsNodeSegmentId(DeviceId deviceId, int sId) {
         int segmentId;
         try {
-            segmentId = deviceConfig.getSegmentId(deviceId);
+            /*
+             * IPv6 sid is not inserted. this part of the code is not used for now.
+             */
+            segmentId = deviceConfig.getIPv4SegmentId(deviceId);
         } catch (DeviceConfigNotFoundException e) {
             log.warn(e.getMessage() + " Aborting isSegmentIdSameAsNodeSegmentId.");
             return false;
@@ -618,7 +623,7 @@
         // Filter out SegmentIds matching with the
         // nodes in the combo
         for (Integer sId : allSegmentIds) {
-            if (sId.equals(nodeSegmentId)) {
+            if (sId.equals(this.ipv4NodeSegmentId)) {
                 continue;
             }
             boolean filterOut = false;