Package org.jnetpcap.nio

Examples of org.jnetpcap.nio.JNumber


  @SuppressWarnings("deprecation")
  public void testLookupDevAndLookupNetNewAPI() {
    String device = Pcap.lookupDev(errbuf);
    assertNotNull(errbuf.toString(), device);

    JNumber netp = new JNumber(Type.INT);
    JNumber maskp = new JNumber(Type.INT);

    int r = Pcap.lookupNet(device, netp, maskp, errbuf);
    assertEquals(errbuf.toString(), 0, r);

    System.out.printf("device=%s netp=%X maskp=%X errbuf=%s\n", device, netp.intValue(),
        maskp.intValue(), errbuf.toString());
  }
View Full Code Here


  @SuppressWarnings("deprecation")
  public void testLookupDevAndLookupNetDeprecatedAPI() {
    String device = Pcap.lookupDev(errbuf);
    assertNotNull(errbuf.toString(), device);

    JNumber netp = new JNumber(Type.INT);
    JNumber maskp = new JNumber(Type.INT);

    int r = Pcap.lookupNet(device, netp, maskp, errbuf);
    assertEquals(errbuf.toString(), 0, r);

    System.out.printf("device=%s netp=%X maskp=%X errbuf=%s\n", device, netp
        .intValue(), maskp.intValue(), errbuf.toString());
  }
View Full Code Here

TOP

Related Classes of org.jnetpcap.nio.JNumber

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.