Examples of MACAddress


Examples of org.iosgi.outpost.util.ipr.MacAddress

  public synchronized void destroy() throws IOException {
    URL url = virtualBox.getManagerUrl();
    final VirtualBoxManager vboxMgr = VirtualBoxManager
        .createInstance(null);
    vboxMgr.connect(url.toString(), "user", "pwd");
    MacAddress mac = null;
    for (Map.Entry<MacAddress, InterfaceAddress> e : MacAddress
        .getAddresses().entrySet()) {
      if (e.getValue().getAddress()
          .equals(Networking.getPrimaryAddress())) {
        mac = e.getKey();
      }
    }
    IVirtualBox vbox = vboxMgr.getVBox();
    for (final IMachine m : vbox.getMachines()) {
      MacAddress mmac = new MacAddress(m.getNetworkAdapter(0L)
          .getMACAddress());
      if (mmac.equals(mac)) {
        EXEC_SVC.submit(new Callable<Void>() {
          @Override
          public Void call() throws Exception {
            synchronized (OperatingSystemIE.this) {
              context.getBundle(0).stop();
View Full Code Here

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

Examples of org.netfpga.router.MACAddress

    /**
     * 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

Examples of org.netfpga.router.MACAddress

    /**
     * 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

Examples of org.pcap4j.util.MacAddress

      = nif.openLive(SNAPLEN, PromiscuousMode.PROMISCUOUS, READ_TIMEOUT);
    PcapHandle sendHandle
      = nif.openLive(SNAPLEN, PromiscuousMode.PROMISCUOUS, READ_TIMEOUT);
    ExecutorService pool = Executors.newSingleThreadExecutor();

    MacAddress srcMacAddr = MacAddress.getByName(strSrcMacAddress, ":");
    try {
      handle.setFilter(
        "icmp and ether dst " + Pcaps.toBpfString(srcMacAddr),
        BpfCompileMode.OPTIMIZE
      );
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.