Tabnine Logo
RawSocket.sendPacket
Code IndexAdd Tabnine to your IDE (free)

How to use
sendPacket
method
in
libcore.net.RawSocket

Best Java code snippets using libcore.net.RawSocket.sendPacket (Showing top 7 results out of 315)

origin: robovm/robovm

/**
 * Writes a raw packet to the desired interface.  A L2 header will
 * be added which includes the specified destination address, our
 * source MAC, and the specified protocol type.  The caller is responsible
 * for computing correct IP-header and payload checksums.
 */
public int write(byte[] destMac, byte[] packet, int offset, int byteCount) {
  if (destMac == null) {
    throw new NullPointerException("destMac == null");
  }
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destMac.length != 6) {
    throw new IllegalArgumentException("MAC length must be 6: "
      + destMac.length);
  }
  return sendPacket(fd, mInterfaceName, mProtocolType, destMac, packet,
    offset, byteCount);
}
origin: ibinti/bugvm

/**
 * Writes a raw packet to the desired interface.  A L2 header will
 * be added which includes the specified destination address, our
 * source MAC, and the specified protocol type.  The caller is responsible
 * for computing correct IP-header and payload checksums.
 */
public int write(byte[] destMac, byte[] packet, int offset, int byteCount) {
  if (destMac == null) {
    throw new NullPointerException("destMac == null");
  }
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destMac.length != 6) {
    throw new IllegalArgumentException("MAC length must be 6: "
      + destMac.length);
  }
  return sendPacket(fd, mInterfaceName, mProtocolType, destMac, packet,
    offset, byteCount);
}
origin: MobiVM/robovm

/**
 * Writes a raw packet to the desired interface.  A L2 header will
 * be added which includes the specified destination address, our
 * source MAC, and the specified protocol type.  The caller is responsible
 * for computing correct IP-header and payload checksums.
 */
public int write(byte[] destMac, byte[] packet, int offset, int byteCount) {
  if (destMac == null) {
    throw new NullPointerException("destMac == null");
  }
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destMac.length != 6) {
    throw new IllegalArgumentException("MAC length must be 6: "
      + destMac.length);
  }
  return sendPacket(fd, mInterfaceName, mProtocolType, destMac, packet,
    offset, byteCount);
}
origin: com.gluonhq/robovm-rt

/**
 * Writes a raw packet to the desired interface.  A L2 header will
 * be added which includes the specified destination address, our
 * source MAC, and the specified protocol type.  The caller is responsible
 * for computing correct IP-header and payload checksums.
 */
public int write(byte[] destMac, byte[] packet, int offset, int byteCount) {
  if (destMac == null) {
    throw new NullPointerException("destMac == null");
  }
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destMac.length != 6) {
    throw new IllegalArgumentException("MAC length must be 6: "
      + destMac.length);
  }
  return sendPacket(fd, mInterfaceName, mProtocolType, destMac, packet,
    offset, byteCount);
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Writes a raw packet to the desired interface.  A L2 header will
 * be added which includes the specified destination address, our
 * source MAC, and the specified protocol type.  The caller is responsible
 * for computing correct IP-header and payload checksums.
 */
public int write(byte[] destMac, byte[] packet, int offset, int byteCount) {
  if (destMac == null) {
    throw new NullPointerException("destMac == null");
  }
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destMac.length != 6) {
    throw new IllegalArgumentException("MAC length must be 6: "
      + destMac.length);
  }
  return sendPacket(fd, mInterfaceName, mProtocolType, destMac, packet,
    offset, byteCount);
}
origin: com.bugvm/bugvm-rt

/**
 * Writes a raw packet to the desired interface.  A L2 header will
 * be added which includes the specified destination address, our
 * source MAC, and the specified protocol type.  The caller is responsible
 * for computing correct IP-header and payload checksums.
 */
public int write(byte[] destMac, byte[] packet, int offset, int byteCount) {
  if (destMac == null) {
    throw new NullPointerException("destMac == null");
  }
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destMac.length != 6) {
    throw new IllegalArgumentException("MAC length must be 6: "
      + destMac.length);
  }
  return sendPacket(fd, mInterfaceName, mProtocolType, destMac, packet,
    offset, byteCount);
}
origin: FlexoVM/flexovm

/**
 * Writes a raw packet to the desired interface.  A L2 header will
 * be added which includes the specified destination address, our
 * source MAC, and the specified protocol type.  The caller is responsible
 * for computing correct IP-header and payload checksums.
 */
public int write(byte[] destMac, byte[] packet, int offset, int byteCount) {
  if (destMac == null) {
    throw new NullPointerException("destMac == null");
  }
  if (packet == null) {
    throw new NullPointerException("packet == null");
  }
  Arrays.checkOffsetAndCount(packet.length, offset, byteCount);
  if (destMac.length != 6) {
    throw new IllegalArgumentException("MAC length must be 6: "
      + destMac.length);
  }
  return sendPacket(fd, mInterfaceName, mProtocolType, destMac, packet,
    offset, byteCount);
}
libcore.netRawSocketsendPacket

Popular methods of RawSocket

  • close
    Closes the socket. After this method is invoked, subsequent read/write operations will fail.
  • create
  • recvPacket

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • getSharedPreferences (Context)
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JButton (javax.swing)
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now