aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl')
-rw-r--r--framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java84
-rw-r--r--framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java274
-rw-r--r--framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java295
-rw-r--r--framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/package-info.java20
4 files changed, 0 insertions, 673 deletions
diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java
deleted file mode 100644
index 68aa27f0..00000000
--- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/BasicHostOperator.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2014-2015 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.net.host.impl;
-
-import static org.slf4j.LoggerFactory.getLogger;
-
-import org.slf4j.Logger;
-import org.onosproject.net.config.ConfigOperator;
-import org.onosproject.net.config.basics.BasicHostConfig;
-import org.onosproject.net.AnnotationKeys;
-import org.onosproject.net.DefaultAnnotations;
-import org.onosproject.net.SparseAnnotations;
-import org.onosproject.net.host.DefaultHostDescription;
-import org.onosproject.net.host.HostDescription;
-
-/**
- * Implementations of merge policies for various sources of host configuration
- * information. This includes applications, provides, and network configurations.
- */
-public final class BasicHostOperator implements ConfigOperator {
-
- protected static final double DEFAULT_COORD = -1.0;
- private static final Logger log = getLogger(BasicHostOperator.class);
-
- private BasicHostOperator() {
- }
-
- /**
- * Generates a HostDescription containing fields from a HostDescription and
- * a HostConfig.
- *
- * @param cfg the host config entity from network config
- * @param descr a HostDescription
- * @return HostDescription based on both sources
- */
- public static HostDescription combine(BasicHostConfig cfg, HostDescription descr) {
- if (cfg == null) {
- return descr;
- }
- SparseAnnotations sa = combine(cfg, descr.annotations());
- return new DefaultHostDescription(descr.hwAddress(), descr.vlan(), descr.location(),
- descr.ipAddress(), sa);
- }
-
- /**
- * Generates an annotation from an existing annotation and HostConfig.
- *
- * @param cfg the device config entity from network config
- * @param an the annotation
- * @return annotation combining both sources
- */
- public static SparseAnnotations combine(BasicHostConfig cfg, SparseAnnotations an) {
- DefaultAnnotations.Builder newBuilder = DefaultAnnotations.builder();
- if (cfg.name() != null) {
- newBuilder.set(AnnotationKeys.NAME, cfg.name());
- }
- if (cfg.latitude() != DEFAULT_COORD) {
- newBuilder.set(AnnotationKeys.LATITUDE, Double.toString(cfg.latitude()));
- }
- if (cfg.longitude() != DEFAULT_COORD) {
- newBuilder.set(AnnotationKeys.LONGITUDE, Double.toString(cfg.longitude()));
- }
- if (cfg.rackAddress() != null) {
- newBuilder.set(AnnotationKeys.RACK_ADDRESS, cfg.rackAddress());
- }
- if (cfg.owner() != null) {
- newBuilder.set(AnnotationKeys.OWNER, cfg.owner());
- }
- return DefaultAnnotations.union(an, newBuilder.build());
- }
-}
diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java
deleted file mode 100644
index f48b8366..00000000
--- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/HostManager.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright 2014 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.net.host.impl;
-
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Deactivate;
-import org.apache.felix.scr.annotations.Reference;
-import org.apache.felix.scr.annotations.ReferenceCardinality;
-import org.apache.felix.scr.annotations.Service;
-import org.onlab.packet.IpAddress;
-import org.onlab.packet.MacAddress;
-import org.onlab.packet.VlanId;
-import org.onosproject.incubator.net.intf.InterfaceService;
-import org.onosproject.net.edge.EdgePortService;
-import org.onosproject.net.provider.AbstractListenerProviderRegistry;
-import org.onosproject.net.config.NetworkConfigEvent;
-import org.onosproject.net.config.NetworkConfigListener;
-import org.onosproject.net.config.NetworkConfigService;
-import org.onosproject.net.config.basics.BasicHostConfig;
-import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.DeviceId;
-import org.onosproject.net.Host;
-import org.onosproject.net.HostId;
-import org.onosproject.net.device.DeviceService;
-import org.onosproject.net.host.HostAdminService;
-import org.onosproject.net.host.HostDescription;
-import org.onosproject.net.host.HostEvent;
-import org.onosproject.net.host.HostListener;
-import org.onosproject.net.host.HostProvider;
-import org.onosproject.net.host.HostProviderRegistry;
-import org.onosproject.net.host.HostProviderService;
-import org.onosproject.net.host.HostService;
-import org.onosproject.net.host.HostStore;
-import org.onosproject.net.host.HostStoreDelegate;
-import org.onosproject.net.packet.PacketService;
-import org.onosproject.net.provider.AbstractProviderService;
-import org.slf4j.Logger;
-
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.base.Preconditions.checkState;
-import static org.onosproject.security.AppGuard.checkPermission;
-import static org.slf4j.LoggerFactory.getLogger;
-import static org.onosproject.security.AppPermission.Type.*;
-
-/**
- * Provides basic implementation of the host SB & NB APIs.
- */
-@Component(immediate = true)
-@Service
-public class HostManager
- extends AbstractListenerProviderRegistry<HostEvent, HostListener, HostProvider, HostProviderService>
- implements HostService, HostAdminService, HostProviderRegistry {
-
- private final Logger log = getLogger(getClass());
-
- public static final String HOST_ID_NULL = "Host ID cannot be null";
-
- private final NetworkConfigListener networkConfigListener = new InternalNetworkConfigListener();
-
- private HostStoreDelegate delegate = new InternalStoreDelegate();
-
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
- protected HostStore store;
-
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
- protected DeviceService deviceService;
-
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
- protected PacketService packetService;
-
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
- protected NetworkConfigService networkConfigService;
-
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
- protected InterfaceService interfaceService;
-
- @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
- protected EdgePortService edgePortService;
-
- private HostMonitor monitor;
-
- @Activate
- public void activate() {
- store.setDelegate(delegate);
- eventDispatcher.addSink(HostEvent.class, listenerRegistry);
- networkConfigService.addListener(networkConfigListener);
- monitor = new HostMonitor(packetService, this, interfaceService, edgePortService);
- monitor.start();
- log.info("Started");
- }
-
- @Deactivate
- public void deactivate() {
- store.unsetDelegate(delegate);
- eventDispatcher.removeSink(HostEvent.class);
- networkConfigService.removeListener(networkConfigListener);
- log.info("Stopped");
- }
-
- @Override
- protected HostProviderService createProviderService(HostProvider provider) {
- monitor.registerHostProvider(provider);
- return new InternalHostProviderService(provider);
- }
-
- @Override
- public int getHostCount() {
- checkPermission(HOST_READ);
- return store.getHostCount();
- }
-
- @Override
- public Iterable<Host> getHosts() {
- checkPermission(HOST_READ);
- return store.getHosts();
- }
-
- @Override
- public Host getHost(HostId hostId) {
- checkPermission(HOST_READ);
- checkNotNull(hostId, HOST_ID_NULL);
- return store.getHost(hostId);
- }
-
- @Override
- public Set<Host> getHostsByVlan(VlanId vlanId) {
- checkPermission(HOST_READ);
- return store.getHosts(vlanId);
- }
-
- @Override
- public Set<Host> getHostsByMac(MacAddress mac) {
- checkPermission(HOST_READ);
- checkNotNull(mac, "MAC address cannot be null");
- return store.getHosts(mac);
- }
-
- @Override
- public Set<Host> getHostsByIp(IpAddress ip) {
- checkPermission(HOST_READ);
- checkNotNull(ip, "IP address cannot be null");
- return store.getHosts(ip);
- }
-
- @Override
- public Set<Host> getConnectedHosts(ConnectPoint connectPoint) {
- checkPermission(HOST_READ);
- checkNotNull(connectPoint, "Connection point cannot be null");
- return store.getConnectedHosts(connectPoint);
- }
-
- @Override
- public Set<Host> getConnectedHosts(DeviceId deviceId) {
- checkPermission(HOST_READ);
- checkNotNull(deviceId, "Device ID cannot be null");
- return store.getConnectedHosts(deviceId);
- }
-
- @Override
- public void startMonitoringIp(IpAddress ip) {
- checkPermission(HOST_EVENT);
- monitor.addMonitoringFor(ip);
- }
-
- @Override
- public void stopMonitoringIp(IpAddress ip) {
- checkPermission(HOST_EVENT);
- monitor.stopMonitoring(ip);
- }
-
- @Override
- public void requestMac(IpAddress ip) {
- // FIXME!!!! Auto-generated method stub
- }
-
- @Override
- public void removeHost(HostId hostId) {
- checkNotNull(hostId, HOST_ID_NULL);
- store.removeHost(hostId);
- }
-
- // Personalized host provider service issued to the supplied provider.
- private class InternalHostProviderService
- extends AbstractProviderService<HostProvider>
- implements HostProviderService {
- InternalHostProviderService(HostProvider provider) {
- super(provider);
- }
-
- @Override
- public void hostDetected(HostId hostId, HostDescription hostDescription, boolean replaceIps) {
- checkNotNull(hostId, HOST_ID_NULL);
- checkValidity();
- hostDescription = validateHost(hostDescription, hostId);
- store.createOrUpdateHost(provider().id(), hostId,
- hostDescription, replaceIps);
- }
-
- // returns a HostDescription made from the union of the BasicHostConfig
- // annotations if it exists
- private HostDescription validateHost(HostDescription hostDescription, HostId hostId) {
- BasicHostConfig cfg = networkConfigService.getConfig(hostId, BasicHostConfig.class);
- checkState(cfg == null || cfg.isAllowed(), "Host {} is not allowed", hostId);
-
- return BasicHostOperator.combine(cfg, hostDescription);
- }
-
- @Override
- public void hostVanished(HostId hostId) {
- checkNotNull(hostId, HOST_ID_NULL);
- checkValidity();
- store.removeHost(hostId);
- }
-
- @Override
- public void removeIpFromHost(HostId hostId, IpAddress ipAddress) {
- checkNotNull(hostId, HOST_ID_NULL);
- checkValidity();
- store.removeIp(hostId, ipAddress);
- }
- }
-
- // Store delegate to re-post events emitted from the store.
- private class InternalStoreDelegate implements HostStoreDelegate {
- @Override
- public void notify(HostEvent event) {
- post(event);
- }
- }
-
- // listens for NetworkConfigEvents of type BasicHostConfig and removes
- // links that the config does not allow
- private class InternalNetworkConfigListener implements NetworkConfigListener {
- @Override
- public void event(NetworkConfigEvent event) {
- if ((event.type() == NetworkConfigEvent.Type.CONFIG_ADDED ||
- event.type() == NetworkConfigEvent.Type.CONFIG_UPDATED) &&
- event.configClass().equals(BasicHostConfig.class)) {
- log.info("Detected Host network config event {}", event.type());
- kickOutBadHost(((HostId) event.subject()));
- }
- }
- }
-
- // checks if the specified host is allowed by the BasicHostConfig
- // and if not, removes it
- private void kickOutBadHost(HostId hostId) {
- BasicHostConfig cfg = networkConfigService.getConfig(hostId, BasicHostConfig.class);
- if (cfg != null && !cfg.isAllowed()) {
- Host badHost = getHost(hostId);
- if (badHost != null) {
- removeHost(hostId);
- } else {
- log.info("Failed removal: Host {} does not exist", hostId);
- }
- }
- }
-}
diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java
deleted file mode 100644
index 5fb1dcf1..00000000
--- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Copyright 2014-2015 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onosproject.net.host.impl;
-
-import org.jboss.netty.util.Timeout;
-import org.jboss.netty.util.TimerTask;
-import org.onlab.packet.ARP;
-import org.onlab.packet.Ethernet;
-import org.onlab.packet.ICMP6;
-import org.onlab.packet.IPv6;
-import org.onlab.packet.IpAddress;
-import org.onlab.packet.MacAddress;
-import org.onlab.packet.VlanId;
-import org.onlab.packet.ndp.NeighborDiscoveryOptions;
-import org.onlab.packet.ndp.NeighborSolicitation;
-import org.onlab.util.Timer;
-import org.onosproject.incubator.net.intf.Interface;
-import org.onosproject.incubator.net.intf.InterfaceService;
-import org.onosproject.net.ConnectPoint;
-import org.onosproject.net.Host;
-import org.onosproject.net.edge.EdgePortService;
-import org.onosproject.net.flow.DefaultTrafficTreatment;
-import org.onosproject.net.flow.TrafficTreatment;
-import org.onosproject.net.host.HostProvider;
-import org.onosproject.net.host.InterfaceIpAddress;
-import org.onosproject.net.packet.DefaultOutboundPacket;
-import org.onosproject.net.packet.OutboundPacket;
-import org.onosproject.net.packet.PacketService;
-import org.onosproject.net.provider.ProviderId;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.nio.ByteBuffer;
-import java.util.Collections;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Monitors hosts on the dataplane to detect changes in host data.
- * <p>
- * The HostMonitor can monitor hosts that have already been detected for
- * changes. At an application's request, it can also monitor and actively
- * probe for hosts that have not yet been detected (specified by IP address).
- * </p>
- */
-public class HostMonitor implements TimerTask {
-
- private Logger log = LoggerFactory.getLogger(getClass());
-
- private PacketService packetService;
- private HostManager hostManager;
- private InterfaceService interfaceService;
- private EdgePortService edgePortService;
-
- private final Set<IpAddress> monitoredAddresses;
-
- private final ConcurrentMap<ProviderId, HostProvider> hostProviders;
-
- private static final long DEFAULT_PROBE_RATE = 30000; // milliseconds
- private static final byte[] ZERO_MAC_ADDRESS = MacAddress.ZERO.toBytes();
- private long probeRate = DEFAULT_PROBE_RATE;
-
- private Timeout timeout;
-
- /**
- * Creates a new host monitor.
- *
- * @param packetService packet service used to send packets on the data plane
- * @param hostManager host manager used to look up host information and
- * probe existing hosts
- * @param interfaceService interface service for interface information
- * @param edgePortService edge port service
- */
- public HostMonitor(PacketService packetService, HostManager hostManager,
- InterfaceService interfaceService,
- EdgePortService edgePortService) {
-
- this.packetService = packetService;
- this.hostManager = hostManager;
- this.interfaceService = interfaceService;
- this.edgePortService = edgePortService;
-
- monitoredAddresses = Collections.newSetFromMap(new ConcurrentHashMap<>());
- hostProviders = new ConcurrentHashMap<>();
- }
-
- /**
- * Adds an IP address to be monitored by the host monitor. The monitor will
- * periodically probe the host to detect changes.
- *
- * @param ip IP address of the host to monitor
- */
- void addMonitoringFor(IpAddress ip) {
- monitoredAddresses.add(ip);
- }
-
- /**
- * Stops monitoring the given IP address.
- *
- * @param ip IP address to stop monitoring on
- */
- void stopMonitoring(IpAddress ip) {
- monitoredAddresses.remove(ip);
- }
-
- /**
- * Starts the host monitor. Does nothing if the monitor is already running.
- */
- void start() {
- synchronized (this) {
- if (timeout == null) {
- timeout = Timer.getTimer().newTimeout(this, 0, TimeUnit.MILLISECONDS);
- }
- }
- }
-
- /**
- * Stops the host monitor.
- */
- void shutdown() {
- synchronized (this) {
- timeout.cancel();
- timeout = null;
- }
- }
-
- /**
- * Registers a host provider with the host monitor. The monitor can use the
- * provider to probe hosts.
- *
- * @param provider the host provider to register
- */
- void registerHostProvider(HostProvider provider) {
- hostProviders.put(provider.id(), provider);
- }
-
- @Override
- public void run(Timeout timeout) throws Exception {
- for (IpAddress ip : monitoredAddresses) {
- Set<Host> hosts = hostManager.getHostsByIp(ip);
-
- if (hosts.isEmpty()) {
- sendRequest(ip);
- } else {
- for (Host host : hosts) {
- HostProvider provider = hostProviders.get(host.providerId());
- if (provider == null) {
- hostProviders.remove(host.providerId(), null);
- } else {
- provider.triggerProbe(host);
- }
- }
- }
- }
-
- synchronized (this) {
- this.timeout = Timer.getTimer().newTimeout(this, probeRate, TimeUnit.MILLISECONDS);
- }
- }
-
- /**
- * Sends an ARP or NDP request for the given IP address.
- *
- * @param targetIp IP address to send the request for
- */
- private void sendRequest(IpAddress targetIp) {
- Interface intf = interfaceService.getMatchingInterface(targetIp);
-
- if (intf == null) {
- return;
- }
-
- if (!edgePortService.isEdgePoint(intf.connectPoint())) {
- log.warn("Attempt to send probe out non-edge port: {}", intf);
- return;
- }
-
- for (InterfaceIpAddress ia : intf.ipAddresses()) {
- if (ia.subnetAddress().contains(targetIp)) {
- sendProbe(intf.connectPoint(), targetIp, ia.ipAddress(),
- intf.mac(), intf.vlan());
- }
- }
- }
-
- private void sendProbe(ConnectPoint connectPoint,
- IpAddress targetIp,
- IpAddress sourceIp, MacAddress sourceMac,
- VlanId vlan) {
- Ethernet probePacket = null;
-
- if (targetIp.isIp4()) {
- // IPv4: Use ARP
- probePacket = buildArpRequest(targetIp, sourceIp, sourceMac, vlan);
- } else {
- // IPv6: Use Neighbor Discovery
- probePacket = buildNdpRequest(targetIp, sourceIp, sourceMac, vlan);
- }
-
- TrafficTreatment treatment = DefaultTrafficTreatment.builder()
- .setOutput(connectPoint.port())
- .build();
-
- OutboundPacket outboundPacket =
- new DefaultOutboundPacket(connectPoint.deviceId(), treatment,
- ByteBuffer.wrap(probePacket.serialize()));
-
- packetService.emit(outboundPacket);
- }
-
- private Ethernet buildArpRequest(IpAddress targetIp, IpAddress sourceIp,
- MacAddress sourceMac, VlanId vlan) {
-
- ARP arp = new ARP();
- arp.setHardwareType(ARP.HW_TYPE_ETHERNET)
- .setHardwareAddressLength((byte) Ethernet.DATALAYER_ADDRESS_LENGTH)
- .setProtocolType(ARP.PROTO_TYPE_IP)
- .setProtocolAddressLength((byte) IpAddress.INET_BYTE_LENGTH)
- .setOpCode(ARP.OP_REQUEST);
-
- arp.setSenderHardwareAddress(sourceMac.toBytes())
- .setSenderProtocolAddress(sourceIp.toOctets())
- .setTargetHardwareAddress(ZERO_MAC_ADDRESS)
- .setTargetProtocolAddress(targetIp.toOctets());
-
- Ethernet ethernet = new Ethernet();
- ethernet.setEtherType(Ethernet.TYPE_ARP)
- .setDestinationMACAddress(MacAddress.BROADCAST)
- .setSourceMACAddress(sourceMac)
- .setPayload(arp);
-
- if (!vlan.equals(VlanId.NONE)) {
- ethernet.setVlanID(vlan.toShort());
- }
-
- ethernet.setPad(true);
-
- return ethernet;
- }
-
- private Ethernet buildNdpRequest(IpAddress targetIp, IpAddress sourceIp,
- MacAddress sourceMac, VlanId vlan) {
-
- // Create the Ethernet packet
- Ethernet ethernet = new Ethernet();
- ethernet.setEtherType(Ethernet.TYPE_IPV6)
- .setDestinationMACAddress(MacAddress.BROADCAST)
- .setSourceMACAddress(sourceMac);
- if (!vlan.equals(VlanId.NONE)) {
- ethernet.setVlanID(vlan.toShort());
- }
-
- //
- // Create the IPv6 packet
- //
- // TODO: The destination IP address should be the
- // solicited-node multicast address
- IPv6 ipv6 = new IPv6();
- ipv6.setSourceAddress(sourceIp.toOctets());
- ipv6.setDestinationAddress(targetIp.toOctets());
- ipv6.setHopLimit((byte) 255);
-
- // Create the ICMPv6 packet
- ICMP6 icmp6 = new ICMP6();
- icmp6.setIcmpType(ICMP6.NEIGHBOR_SOLICITATION);
- icmp6.setIcmpCode((byte) 0);
-
- // Create the Neighbor Solicitation packet
- NeighborSolicitation ns = new NeighborSolicitation();
- ns.setTargetAddress(targetIp.toOctets());
- ns.addOption(NeighborDiscoveryOptions.TYPE_SOURCE_LL_ADDRESS,
- sourceMac.toBytes());
-
- icmp6.setPayload(ns);
- ipv6.setPayload(icmp6);
- ethernet.setPayload(ipv6);
-
- return ethernet;
- }
-}
diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/package-info.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/package-info.java
deleted file mode 100644
index 1f7d5889..00000000
--- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/host/impl/package-info.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2014 Open Networking Laboratory
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * Core subsystem for tracking global inventory of end-station hosts.
- */
-package org.onosproject.net.host.impl;