Class SegmentRoutingNeighbourHandler

  • Direct Known Subclasses:
    ArpHandler, IcmpHandler

    public class SegmentRoutingNeighbourHandler
    extends Object
    This handler provides provides useful functions to the neighbour handlers (ARP, NDP).
    • Constructor Detail

      • SegmentRoutingNeighbourHandler

        public SegmentRoutingNeighbourHandler​(SegmentRoutingManager srManager)
        Creates an SegmentRoutingNeighbourHandler object.
        Parameters:
        srManager - SegmentRoutingManager object
      • SegmentRoutingNeighbourHandler

        public SegmentRoutingNeighbourHandler()
        Creates an SegmentRoutingNeighbourHandler object.
    • Method Detail

      • getSenderInfo

        protected boolean getSenderInfo​(byte[] mac,
                                        byte[] ip,
                                        org.onosproject.net.DeviceId deviceId,
                                        org.onlab.packet.IpAddress targetAddress)
        Retrieve router (device) info.
        Parameters:
        mac - where to copy the mac
        ip - where to copy the ip
        deviceId - the device id
        targetAddress - the target address
        Returns:
        true if it was possible to get the necessary info. False for errors
      • respondToUnknownHosts

        protected boolean respondToUnknownHosts()
        Reads the boolean configuration for responding to unknown hosts.
        Returns:
        respondToUnknownHosts boolean.
      • sendResponse

        protected void sendResponse​(org.onosproject.net.neighbour.NeighbourMessageContext pkt,
                                    org.onlab.packet.MacAddress targetMac,
                                    org.onosproject.net.host.HostService hostService,
                                    boolean isRouter)
        Utility to send a ND reply using the supplied information.
        Parameters:
        pkt - the request
        targetMac - the target mac
        hostService - the host service
        isRouter - true if this reply is sent on behalf of a router
      • flood

        protected void flood​(org.onlab.packet.Ethernet packet,
                             org.onosproject.net.ConnectPoint inPort,
                             org.onlab.packet.IpAddress targetAddress)
        Flood to all ports in the same subnet.
        Parameters:
        packet - packet to be flooded
        inPort - where the packet comes from
        targetAddress - the target address
      • flood

        protected void flood​(org.onosproject.net.neighbour.NeighbourMessageContext pkt)