Package org.doomdark.uuid

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


                    } 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

    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

TOP

Related Classes of org.doomdark.uuid.EthernetAddress

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.