Allows duplicating packets when requesting packet-in via PacketService

If false, the original packet is always sent to the controller.
If true, a copy of the packet is sent to the controller, as long as the packet can be duplicated.
If duplication is not supported, the original packet will be sent to the controller.

Change-Id: I566c799bb0afed03c3fae5815aa926b338cad953
diff --git a/core/api/src/main/java/org/onosproject/net/packet/PacketService.java b/core/api/src/main/java/org/onosproject/net/packet/PacketService.java
index adaea07..88bbbb5 100644
--- a/core/api/src/main/java/org/onosproject/net/packet/PacketService.java
+++ b/core/api/src/main/java/org/onosproject/net/packet/PacketService.java
@@ -69,6 +69,22 @@
     void requestPackets(TrafficSelector selector, PacketPriority priority,
                         ApplicationId appId);
 
+    /**
+     * Requests that packets matching the given selector are punted from the
+     * dataplane to the controller.
+     *
+     * @param selector the traffic selector used to match packets
+     * @param priority the priority of the rule
+     * @param appId    the application ID of the requester
+     * @param copy     request a copy of the matching packet to be punted to the controller.
+     *                 <p>
+     *                 If false, the original packet is always sent to the controller.
+     *                 If true, a copy of the packet is sent to the controller,
+     *                 as long as the packet can be duplicated.
+     *                 If duplication is not supported, the original packet will be sent to the controller.
+     */
+    void requestPackets(TrafficSelector selector, PacketPriority priority,
+                        ApplicationId appId, boolean copy);
 
     /**
      * Requests that packets matching the given selector are punted from the
@@ -97,6 +113,23 @@
 
     /**
      * Cancels previous packet requests for packets matching the given
+     * selector to be punted from the dataplane to the controller.
+     *
+     * @param selector the traffic selector used to match packets
+     * @param priority the priority of the rule
+     * @param appId    the application ID of the requester
+     * @param copy     request a copy of the matching packet to be punted to the controller.
+     *                 <p>
+     *                 If false, the original packet is always sent to the controller.
+     *                 If true, a copy of the packet is sent to the controller,
+     *                 as long as the packet can be duplicated.
+     *                 If duplication is not supported, the original packet will be sent to the controller.
+     */
+    void cancelPackets(TrafficSelector selector, PacketPriority priority,
+                       ApplicationId appId, boolean copy);
+
+    /**
+     * Cancels previous packet requests for packets matching the given
      * selector to be punted from the dataplane to the controller. If a
      * deviceId is specified then the packet request is only withdrawn from
      * the device represented by that deviceId.