Examples of EthernetAddress


Examples of com.fasterxml.uuid.EthernetAddress

        String ethernetAddressString)
    {
        try
        {
            /*EthernetAddress ethernet_address =*/
                new EthernetAddress(ethernetAddressString);
            // if we reached here we failed because we didn't get an exception
            fail("Expected exception not caught");
        }
        catch (NumberFormatException ex)
        {
View Full Code Here

Examples of com.fasterxml.uuid.EthernetAddress

   
    private void goodStringEthernetAddressConstructorHelper(
        String ethernetAddressString,
        String expectedEthernetAddressString)
    {
        EthernetAddress ethernet_address = null;
        try
        {
            ethernet_address = new EthernetAddress(ethernetAddressString);
        }
        catch (Exception ex)
        {
            fail("Caught unexpected exception: " + ex);
        }
       
        assertEquals("EthernetAddresses were not equal",
                    expectedEthernetAddressString.toLowerCase(),
                    ethernet_address.toString().toLowerCase());
    }
View Full Code Here

Examples of com.fasterxml.uuid.EthernetAddress

    }
   
    private void goodStringValueOfHelper(String ethernetAddressString,
                                         String expectedEthernetAddressString)
    {
        EthernetAddress ethernet_address = null;
        try
        {
            ethernet_address = EthernetAddress.valueOf(ethernetAddressString);
        }
        catch (Exception ex)
        {
            fail("Caught unexpected exception: " + ex);
        }
       
        assertEquals("EthernetAddresses were not equal",
                    expectedEthernetAddressString.toLowerCase(),
                    ethernet_address.toString().toLowerCase());
    }
View Full Code Here

Examples of org.doomdark.uuid.EthernetAddress

            logger.info("Device address: " + address);
            this.address = InetAddress.getByName(address);
           
        }
        if ( ethernetAddress != null )
            this.ethernetAddress = new EthernetAddress(ethernetAddress);
    }
View Full Code Here

Examples of org.doomdark.uuid.EthernetAddress

                    } else { // For all other IP protocols display number
                        logger.debug(
                                "IP: " + source + " -> " + destination + " protocol=0x"
                                + Integer.toHexString(ipProtocol) );
                    }
                    sourceDevice = new Device(InetAddress.getByName(source.toString()), new EthernetAddress(src.toString()));
                    destinationDevice = new Device(InetAddress.getByName(destination.toString()), new EthernetAddress(dst.toString()));
                   
                    return new Flow(timestamp, sourceDevice, destinationDevice, etherProtocol, ipProtocol, srcPort, dstPort, length);
                   
                } else {
                    logger.debug("Ethernet " + src + " -> " + dst
                            + " Ethertype=0x"
                            + Integer.toHexString(etherProtocol) );
                    sourceDevice = new Device(new EthernetAddress(src.toString()));
                    destinationDevice = new Device(new EthernetAddress(dst.toString()));
                    return new Flow(timestamp, sourceDevice, destinationDevice, etherProtocol, length);
                }
            } else {
                logger.debug("Unsupported packet type: " + linkType);
                return next();
View Full Code Here

Examples of org.doomdark.uuid.EthernetAddress

    public FlowTest() {
    }

    @Before
    public void setUp() throws java.lang.Exception {
        device1 = new Device(InetAddress.getByName("192.168.0.1"), new EthernetAddress("00:11:D8:0C:25:11"));
        device2 = new Device(InetAddress.getByName("10.1.2.3"), new EthernetAddress("00:11:D8:0C:25:22"));
        device3 = new Device(InetAddress.getByName("192.168.0.1"), new EthernetAddress("00:11:D8:0C:25:11"));
        device4 = new Device(InetAddress.getByName("10.1.2.3"), new EthernetAddress("00:11:D8:0C:25:22"));
        device5 = new Device(InetAddress.getByName("102.168.0.2"), new EthernetAddress("00:11:D8:0C:25:22"));
       
        flow1 = new Flow(1115641185, device1, device2, 2048, 6, 1025, 80, 100);
        flow2 = new Flow(1115641188, device3, device4, 2048, 6, 1025, 80, 200);
       
        flow3 = new Flow(1115641188, device1, device5, 2048, 6, 1025, 80, 300);
View Full Code Here

Examples of org.jnode.net.ethernet.EthernetAddress

        final byte[] hwAddrArr = new byte[ETH_ALEN];
        for (int i = 0; i < ETH_ALEN; i++)
            hwAddrArr[i] = (byte) getReg8(byPAR0 + i);

        this.hwAddress = new EthernetAddress(hwAddrArr, 0);

        log.debug("Found " + flags.getName() + " IRQ = " + irq.getIRQ()
            + ", IO Base = 0x" + NumberUtils.hex(ioBase)
            + ", IO Length = " + io_length
            + ", MAC Address = " + hwAddress);
View Full Code Here

Examples of org.jnode.net.ethernet.EthernetAddress

        io.setReg(EVACK, 0xFFFF);

        // Read MAC address
        final byte[] macAddr = new byte[CNFOWNMACADDR.getRecordLength()];
        getConfig(CNFOWNMACADDR, macAddr, 0, CNFOWNMACADDR.getRecordLength());
        this.hwAddress = new EthernetAddress(macAddr, 0);
        log.info("MAC-address for " + flags.getName() + ' ' + hwAddress);

        // Set maximum data length
        setConfig16(CNFMAXDATALEN, WLAN_DATA_MAXLEN);
        // Set transmit rate control
View Full Code Here

Examples of org.jnode.net.ethernet.EthernetAddress

        final byte[] saprom = new byte[32];
        getNicData(0, saprom, 0, 32);

        if (flags.is16bit()) {
            this.hwAddress =
                    new EthernetAddress(saprom[0], saprom[2], saprom[4], saprom[6], saprom[8],
                            saprom[10]);
        } else {
            this.hwAddress = new EthernetAddress(saprom, 0);
        }

        log.debug("Found " + flags.getName() + " IRQ=" + irq + ", IOBase=0x" +
                NumberUtils.hex(iobase) + ", MAC Address=" + hwAddress);
    }
View Full Code Here

Examples of org.jnode.net.ethernet.EthernetAddress

            case LINKSTATUS:
                final LinkStatus lstat = Prism2InfoFrame.getLinkStatus(frame, 0);
                switch (lstat) {
                    case CONNECTED:
                        getConfig(CURRENTBSSID, frame, 0, WLAN_BSSID_LEN);
                        bssid = new EthernetAddress(frame, 0);
                        log.info("Connected to " + bssid);
                        break;
                    case DISCONNECTED:
                        log.info("Disconnected");
                        bssid = null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.