Class IcmpHandler


  • public class IcmpHandler
    extends SegmentRoutingNeighbourHandler
    Handler of ICMP packets that responses or forwards ICMP packets that are sent to the controller.
    • Constructor Detail

      • IcmpHandler

        public IcmpHandler​(SegmentRoutingManager srManager)
        Creates an IcmpHandler object.
        Parameters:
        srManager - SegmentRoutingManager object
    • Method Detail

      • processIcmp

        public void processIcmp​(org.onlab.packet.Ethernet eth,
                                org.onosproject.net.ConnectPoint inPort)
        Process incoming ICMP packet. If it is an ICMP request to router, then sends an ICMP response. Otherwise ignore the packet.
        Parameters:
        eth - inbound ICMP packet
        inPort - the input port
      • processIcmpv6

        public void processIcmpv6​(org.onlab.packet.Ethernet eth,
                                  org.onosproject.net.ConnectPoint inPort)
        Process incoming ICMPv6 packet. If it is an ICMPv6 request to router, then sends an ICMPv6 response. Otherwise ignore the packet.
        Parameters:
        eth - the incoming ICMPv6 packet
        inPort - the input port
      • processPacketIn

        public void processPacketIn​(org.onosproject.net.neighbour.NeighbourMessageContext pkt,
                                    org.onosproject.net.host.HostService hostService)
        Process incoming NDP packet. If it is an NDP request for the router or for the gateway, then sends a NDP reply. If it is an NDP request to unknown host flood in the subnet. If it is an NDP packet to known host forward the packet to the host. FIXME If the NDP packets use link local addresses we fail.
        Parameters:
        pkt - inbound packet
        hostService - the host service
      • sendNdpRequest

        public void sendNdpRequest​(org.onosproject.net.DeviceId deviceId,
                                   org.onlab.packet.IpAddress targetAddress,
                                   org.onosproject.net.ConnectPoint inPort)
        Sends a NDP request for the target IP address to all ports except in-port.
        Parameters:
        deviceId - Switch device ID
        targetAddress - target IP address for ARP
        inPort - in-port