Package org.jnode.net

Examples of org.jnode.net.NetworkLayer


     *
     * @param protocolID
     * @throws NoSuchProtocolException
     */
    public NetworkLayer getNetworkLayer(int protocolID) throws NoSuchProtocolException {
        final NetworkLayer pt = (NetworkLayer) layers.get(Integer.valueOf(protocolID));
        if (pt == null) {
            throw new NoSuchProtocolException("protocolID " + protocolID);
        }
        return pt;
    }
View Full Code Here


                throw new NetworkException("Device in SocketBuffer is not a network device");
            }

            // Find all the packettype that want to process the given packet
            try {
                final NetworkLayer pt = getNetworkLayer(protoID);
                if (pt.isAllowedForDevice(dev)) {
                    pt.receive(skbuf, deviceAPI);
                }
            } catch (NoSuchProtocolException ex) {
                log.debug("No network layer handler for protocol 0x" + NumberUtils.hex(protoID, 4));
            }
        } catch (SocketException ex) {
View Full Code Here

        final String className = element.getAttribute("class");
        if (className != null) {
            try {
                final Class<?> cls =
                        Thread.currentThread().getContextClassLoader().loadClass(className);
                final NetworkLayer layer = (NetworkLayer) cls.newInstance();
                layers.put(layer.getProtocolID(), layer);
            } catch (ClassNotFoundException ex) {
                log.error("Cannot find networklayer class " + className);
            } catch (IllegalAccessException ex) {
                log.error("Cannot access networklayer class " + className);
            } catch (InstantiationException ex) {
View Full Code Here

TOP

Related Classes of org.jnode.net.NetworkLayer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.