Package org.netfpga.router

Examples of org.netfpga.router.IPAddress


        /* create an IP address input verifier */
        InputVerifier ipInputVerifier = new InputVerifier() {
            @Override
            public boolean verify(JComponent input) {
                try{
                    new IPAddress(((JTextField)input).getText());
                } catch (Exception e) {
                    return false;
                }
                return true;
            }
View Full Code Here


        /* create the register table model which we want to monitor */
        statsRegTableModel = new StatsRegTableModel(nf2, aAddresses, descriptions);
    }

    protected void updateIP() {
        IPAddress ip;
        JTextField field = ipDestAddrTextField;
        try {
            ip = new IPAddress(field.getText());
            field.setBackground(Color.WHITE);
            nf2.writeReg(NFDeviceConsts.EVT_CAP_IP_DST_REG, ip.getIpInt());
        } catch (Exception e) {
            field.setBackground(Color.RED);
        }

        field = ipSrcAddrTextField;
        try {
            ip = new IPAddress(field.getText());
            field.setBackground(Color.WHITE);
            nf2.writeReg(NFDeviceConsts.EVT_CAP_IP_SRC_REG, ip.getIpInt());
        } catch (Exception e) {
            field.setBackground(Color.RED);
        }

        nf2.writeReg(NFDeviceConsts.EVT_CAP_ETHERTYPE_REG, EthernetProtocol.IP);
View Full Code Here

TOP

Related Classes of org.netfpga.router.IPAddress

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.