/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }