si alguien ya sabe de JNA o ya a utilizado esta libreria antes les ruego k me ayuden.!!!
Miren este es el error:
Citar
--------------------Configuration: <Default>--------------------
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x04c1bbb3, pid=4016, tid=5720
#
# JRE version: 6.0_17-b04
# Java VM: Java HotSpot(TM) Client VM (14.3-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [Libnet.dll+0x2bbb3]
#
# An error report file with more information is saved as:
# C:\Users\Los_flais\Desktop\Pruebas programadas Libnet\hs_err_pid4016.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Process completed.
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x04c1bbb3, pid=4016, tid=5720
#
# JRE version: 6.0_17-b04
# Java VM: Java HotSpot(TM) Client VM (14.3-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [Libnet.dll+0x2bbb3]
#
# An error report file with more information is saved as:
# C:\Users\Los_flais\Desktop\Pruebas programadas Libnet\hs_err_pid4016.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Process completed.
Y este es el Codigo en Java:
Código
import com.sun.jna.Library;
import com.sun.jna.Native;
import com.sun.jna.Platform;
import javax.swing.*;
public class Arp {
public interface CLibrary extends Library {
CLibrary INSTANCE = (CLibrary)Native.loadLibrary(
(Platform.isWindows() ? "Libnet" : "c"),
CLibrary.class);
//Firma de los metodos de la libreria
double TipoDeDireccionDeProtocolo,
byte DireccionDeHardwareDeLongitud,
byte DireccionDeProtocoloDeLongitud,
double CodigoDeOperacionDeComandos, //ARPOP_REQUEST o ARPOP_REPLY
String HardwareRemitenteLaDireccion, //Remitente es YO persona que escribe la carta
String EmisorDeUnProtocoloIPDireccion,
String HardwareDeDestinoLaDireccion,
String LosObjetivoDelProtocoloIPDireccion,
String sepaa,
int sepab,int uno,int cero);
}
//Llamada al metodo
//libnet_build_arp envio de paquete arp
.0800, //0x0806 0x0800
0002, //PETICION 0x0001 //Respuesta 0x0002 ARPOP_REQUEST
"00:22:f0:f0:1f:5c",
"192.168.1.103",
"64:16:f0:f0:1f:5c",
"192.168.1.254",
null,0,1,0);
}
}
Aiii caray!!!! y estoy tratando de poner los atributos segun el tamaño en bits de los campos.!!!
Aqui estan los estandares del paquete ARP
Citar
Campos en los datagramas ARP:
* Hardware protocol: 16bits. Tecnología de red empleada por debajo de TCP/IP.
* Network protocol: 16 bits. Tipo de protocolo empleado a nivel 3.
* Hardware address length: 8 bits. Longitud de la dirección de red de hardware.
* Network address length: 8 bits. Longitud de la dirección de red IP.
* Operación: 16 bits. Tipo de operación que nos da información sobre si se trata de una petición o de una respuesta ARP.
* Sender hardware address: 48 bits. Dirección física MAC. de la interfaz de red del emisor.
* Sender network address: 32 bits. Direction IP del emisor.
* Target hardware address: 48 bits. Dirección física mace e la interfaz de red del receptor.
* Target network address: 32 bits. La direction IP del receptor.
* Hardware protocol: 16bits. Tecnología de red empleada por debajo de TCP/IP.
* Network protocol: 16 bits. Tipo de protocolo empleado a nivel 3.
* Hardware address length: 8 bits. Longitud de la dirección de red de hardware.
* Network address length: 8 bits. Longitud de la dirección de red IP.
* Operación: 16 bits. Tipo de operación que nos da información sobre si se trata de una petición o de una respuesta ARP.
* Sender hardware address: 48 bits. Dirección física MAC. de la interfaz de red del emisor.
* Sender network address: 32 bits. Direction IP del emisor.
* Target hardware address: 48 bits. Dirección física mace e la interfaz de red del receptor.
* Target network address: 32 bits. La direction IP del receptor.
cualquier Ayuda Gracias!!


 
  




 Autor
 Autor
		




 En línea
									En línea
								






 
  me preció haber leido JNI xD
 me preció haber leido JNI xD

