com.h3c.sdn.diag

## Interface PathDiagnosticService

-     public interface PathDiagnosticService

  Service for Path Diagnostic tool.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `PacketModel` | `findPacketModel(String pid)` Returns the packet model for the specified packet ID.
    `String` | `getFingerPrint()` Returns the finger print data used to recognize the packet.
    `Set<ConnectionPoint>` | `getNextHop(DataPathId dpid, String pid)` Returns the set of next hop connection point on the path for a given data path ID and packet ID.
    `Set<DataPathId>` | `getNextHopDevice(DataPathId dpid, String pid)` Returns the set of next hop data path IDs on the path for a given data path ID.
    `Set<DataPathId>` | `getObservationPosts(String pid, ProtocolId packetType)` Returns the identity of all the observation posts for a given packet model ID.
    `List<PacketModel>` | `getPacketModels(ProtocolId packetType)` Returns all registered packet models present in the system.
    `L2Path` | `getPath(String pid)` Returns the path for the given packet model ID.
    `boolean` | `packetArrived(DataPathId dpid, String pid)` Determines whether the last packet sent on the network arrived at the specified observation post.
    `PacketModel` | `registerPacket(Packet packet)` Registers and returns a packet model for the specified packet.
    `void` | `removeObservationPost(DataPathId dpid, String pid)` Removes the observation post from the specified data path.
    `void` | `sendPacket(String pid)` Sends the packet matching the given packet model ID into the network.
    `void` | `sendPacket(String pid, DataPathId dpid, BigPortNumber outPort)` Sends the packet matching the given packet model ID into the network.
    `void` | `setObservationPost(DataPathId dpid, String pid)` Sets an observation post on the given data path.
    `PacketModel` | `unregisterPacket(String pid)` Unregisters the packet model with the specified packet ID.

- - ### Method Detail

    - #### registerPacket

          PacketModel registerPacket(Packet packet)

      Registers and returns a packet model for the specified packet.
      Parameters:
        `packet` - the packet used to create a packet model
      Returns:
        the packet model
      Throws:
        `NullPointerException` - if packet is null

    - #### unregisterPacket

          PacketModel unregisterPacket(String pid)

      Unregisters the packet model with the specified packet ID.
      Parameters:
        `pid` - the packet model ID
      Returns:
        the unregistered packet model
      Throws:
        `NullPointerException` - if pid is null

    - #### sendPacket

          void sendPacket(String pid)
                          throws OpenflowException

      Sends the packet matching the given packet model ID into the network.
      Parameters:
        `pid` - the packet model ID
      Throws:
        `NullPointerException` - if pid is null
        `NotFoundException` - if the corresponding packet model does not exist
        `OpenflowException` - if the PacketOut message could not be sent

    - #### sendPacket

          void sendPacket(String pid,
                        DataPathId dpid,
                        BigPortNumber outPort)
                          throws OpenflowException

      Sends the packet matching the given packet model ID into the network.
      Parameters:
        `pid` - the packet model ID
        `dpid` - the data path ID
        `outPort` - the port through which the packet needs to be sent
      Throws:
        `NullPointerException` - if any parameter is null
        `NotFoundException` - if the corresponding packet model does not exist
        `OpenflowException` - if the PacketOut message could not be sent

    - #### setObservationPost

          void setObservationPost(DataPathId dpid,
                                String pid)
                                  throws OpenflowException

      Sets an observation post on the given data path.

      It is assumed that the implementer will update the corresponding flow (based on the packet model) at the specified data path, and add an additional action instructing the data path to send a copy of the packet to the controller.

      Parameters:
        `dpid` - the data path ID
        `pid` - the packet model ID
      Throws:
        `NullPointerException` - if either parameter is null
        `NotFoundException` - if the corresponding packet model does not exist
        `ServiceNotFoundException` - if the corresponding service does not exist or not available
        `OpenflowException` - if the PacketOut message could not be sent

    - #### getPath

          L2Path getPath(String pid)

      Returns the path for the given packet model ID. The path encapsulates the list of links between the source and destination hosts.
      Parameters:
        `pid` - the packet model ID
      Returns:
        the path
      Throws:
        `NullPointerException` - if pid is null
        `NotFoundException` - if the corresponding packet model does not exist

    - #### getNextHopDevice

          Set<DataPathId> getNextHopDevice(DataPathId dpid,
                                         String pid)
                                           throws OpenflowException

      Returns the set of next hop data path IDs on the path for a given data path ID. An empty collection is returned if the specified data path ID is not in the path or the given data path ID is the last node in the path.
      Parameters:
        `dpid` - the data path ID
        `pid` - the packet model ID
      Returns:
        the set of switch data path ID
      Throws:
        `NullPointerException` - if either parameter is null
        `NotFoundException` - if the corresponding packet model does not exist
        `OpenflowException` - if the PacketOut message could not be sent

    - #### getNextHop

          Set<ConnectionPoint> getNextHop(DataPathId dpid,
                                        String pid)

      Returns the set of next hop connection point on the path for a given data path ID and packet ID. An empty collection is returned if the specified data path ID is not in the path or the given data path ID is the last node in the path.
      Parameters:
        `dpid` - the data path ID
        `pid` - the packet model ID
      Returns:
        the set of switch data path ID
      Throws:
        `NullPointerException` - if either parameter is null
        `NotFoundException` - if the corresponding packet model does not exist

    - #### removeObservationPost

          void removeObservationPost(DataPathId dpid,
                                   String pid)
                                     throws OpenflowException

      Removes the observation post from the specified data path.
      Parameters:
        `dpid` - the data path ID
        `pid` - the packet model ID
      Throws:
        `NullPointerException` - if either parameter is null
        `NotFoundException` - if the corresponding packet model does not exist
        `OpenflowException` - if the PacketOut message could not be sent

    - #### getObservationPosts

          Set<DataPathId> getObservationPosts(String pid,
                                            ProtocolId packetType)

      Returns the identity of all the observation posts for a given packet model ID.
      Parameters:
        `pid` - the packet model ID
        `packetType` - the packet type
      Returns:
        the set of IDs for data paths with observation posts
      Throws:
        `NullPointerException` - if pid is null
        `NotFoundException` - if the corresponding packet model does not exist

    - #### packetArrived

          boolean packetArrived(DataPathId dpid,
                              String pid)

      Determines whether the last packet sent on the network arrived at the specified observation post.
      Parameters:
        `dpid` - the data path ID of the observation post
        `pid` - the ID of the packet model
      Returns:
        true, if the last packet sent arrived; false otherwise
      Throws:
        `NullPointerException` - if either parameter is null
        `NotFoundException` - if the corresponding packet model does not exist

    - #### getFingerPrint

          String getFingerPrint()

      Returns the finger print data used to recognize the packet.
      Returns:
        the finger print string

    - #### getPacketModels

          List<PacketModel> getPacketModels(ProtocolId packetType)

      Returns all registered packet models present in the system.
      Parameters:
        `packetType` - the packet type
      Returns:
        all registered packet models

    - #### findPacketModel

          PacketModel findPacketModel(String pid)

      Returns the packet model for the specified packet ID. If the packet model does not exist then returns null.
      Parameters:
        `pid` - the packet model ID
      Returns:
        the packet model with the specified ID

Copyright © 2014. All Rights Reserved.