src/org/jnetpcap/Pcap.java
public int sendPacket(final byte[] buf) {
		checkIsActive(); // Check if Pcap.close wasn't called

		final int length = buf.length;
		final ByteBuffer direct = ByteBuffer.allocateDirect(length);
		direct.put(buf);

		return sendPacketPrivate(direct, 0, length);
	}
/**
	 * This method allows to send a raw packet to the network. The MAC CRC doesn't
	 * need to be included, because it is transparently calculated and added by
	 * the network interface driver. The data will be taken from the supplied
	 * buffer where the start of the packet is buffer's current position()
	 * property and end its limit() properties.
	 * 
	 * @param buf
	 *          contains the data of the packet to send (including the various
	 *          protocol headers)
	 * @return 0 on success and -1 on failure
	 */
This method allows to send a raw packet to the network. The MAC CRC doesn't
need to be included, because it is transparently calculated and added by
the network interface driver. The data will be taken from the supplied
buffer where the start of the packet is buffer's current position()
property and end its limit() properties.

@param buf
contains the data of the packet to send (including the various
protocol headers)
@return 0 on success and -1 on failure
This method allows to send a raw packet to the network . The MAC CRC doesn ' t need to be included because it is transparently calculated and added by the network interface driver . The data will be taken from the supplied buffer where the start of the packet is buffer ' s current position () property and end its limit () properties . @param buf contains the data of the packet to send ( including the various protocol headers ) @return 0 on success and - 1 on failure
public int sendPacket(final byte[] buf) {
		checkIsActive(); 
		final int length = buf.length;
		final ByteBuffer direct = ByteBuffer.allocateDirect(length);
		direct.put(buf);
		return sendPacketPrivate(direct, 0, length);
	}
public int sendPacket ( final byte [ ] buf ) { checkIsActive ( ) ; final int length = buf . length ; final ByteBuffer direct = ByteBuffer . allocateDirect ( length ) ; direct . put ( buf ) ; return sendPacketPrivate ( direct , 0 , length ) ; }
This method allows to send a raw packet to the network.
This method allows to send a raw packet to the network .
// Check if Pcap.close wasn't called