JavaLinuxNet icon indicating copy to clipboard operation
JavaLinuxNet copied to clipboard

Some documentation

Open Hesam-Naderi-Dehkordi opened this issue 9 years ago • 2 comments

Hi there Being sorry. But i coudn't find any good documentations. Could you provide me any help on how to create a tap adapter and sending some data to it by using your library?

So many thanks

Hesam-Naderi-Dehkordi avatar Oct 21 '15 10:10 Hesam-Naderi-Dehkordi

I found how to do so. Opening a tun device have no problem. All the things (permision , fd , ...) are OK but when i try to write to a tunnel i get the following error :

Write error: len=98 writen=-1  errno=14Bad address errno: 14
    at org.it4y.jni.tuntap.writeByteBuffer(Native Method)

Hesam-Naderi-Dehkordi avatar Oct 24 '15 12:10 Hesam-Naderi-Dehkordi

What type of ByteBuffer are you using. it must be direct byteBuffer (native memory) not HEAP based byteBuffer

lucwillems avatar Nov 01 '15 07:11 lucwillems