Package org.netfpga.router

Examples of org.netfpga.router.MACAddress


        /* get an input verifier for mac addresses */
        InputVerifier macInputVerifier = new InputVerifier() {
            @Override
            public boolean verify(JComponent input) {
                try{
                    @SuppressWarnings("unused")
                    MACAddress addr = new MACAddress(((JTextField)input).getText());
                } catch (Exception e) {
                    return false;
                }
                return true;
            }
View Full Code Here


    /**
     * Pushes the destination MAC address from the text field to the hardware
     *
     */
    protected void updateDestMac() {
        MACAddress addr;
        try {
            addr = new MACAddress(this.macDestAddrTextField.getText());
            nf2.writeReg(NFDeviceConsts.EVT_CAP_DST_MAC_HI_REG, addr.getHighShort());
            nf2.writeReg(NFDeviceConsts.EVT_CAP_DST_MAC_LO_REG, addr.getLowInt());
            macDestAddrTextField.setBackground(Color.WHITE);
        } catch (Exception e) {
            macDestAddrTextField.setBackground(Color.RED);
        }
    }
View Full Code Here

    /**
     * Pushes the source MAC address from the text field to the hardware
     *
     */
    protected void updateSrcMac() {
        MACAddress addr;
        try {
            addr = new MACAddress(this.macSrcAddrTextField.getText());
            nf2.writeReg(NFDeviceConsts.EVT_CAP_SRC_MAC_HI_REG, addr.getHighShort());
            nf2.writeReg(NFDeviceConsts.EVT_CAP_SRC_MAC_LO_REG, addr.getLowInt());
            macSrcAddrTextField.setBackground(Color.WHITE);
        } catch (Exception e) {
            macSrcAddrTextField.setBackground(Color.RED);
        }
    }
View Full Code Here

TOP

Related Classes of org.netfpga.router.MACAddress

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.