Package org.jnode.net

Examples of org.jnode.net.ProtocolAddress


    /**
     * Swap the two src and target addresses
     */
    public void swapAddresses() {
        final HardwareAddress hwTmp = destinationHardwareAddress;
        final ProtocolAddress pTmp = destinationProtocolAddress;
        destinationHardwareAddress = sourceHardwareAddress;
        destinationProtocolAddress = sourceProtocolAddress;
        sourceHardwareAddress = hwTmp;
        sourceProtocolAddress = pTmp;
    }
View Full Code Here


            try {
                final NetDeviceAPI api = dev.getAPI(NetDeviceAPI.class);
                final ProtocolAddressInfo addrInfo =
                    api.getProtocolAddressInfo(EthernetConstants.ETH_P_IP);
                if (addrInfo != null) {
                    final ProtocolAddress addr = addrInfo.getDefaultAddress();
                    if (addr != null) {
                        return addr.toInetAddress();
                    }
                }
            } catch (ApiNotFoundException ex) {
                // Strange, but ignore
            }
View Full Code Here

                if (list == null) {
                    list = new ArrayList<byte[]>();
                }
                final int cnt = addrs.length;
                for (int j = 0; j < cnt; j++) {
                    final ProtocolAddress pa = addrs[j];
                    if (pa != null) {
                        list.add(pa.toByteArray());
                    }
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.jnode.net.ProtocolAddress

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.