Send a UDP packet using java (jamvm)... error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

  I'm trying do send a UDP packet to a ipv6 host but without success:
  Exception in thread "main" java.io.IOException: Address family not
supported by protocol
     at gnu.java.nio.VMChannel.send6(Native Method)
     at gnu.java.nio.VMChannel.send(VMChannel.java:310)
     at
gnu.java.net.PlainDatagramSocketImpl.send(PlainDatagramSocketImpl.java:261)
     at java.net.DatagramSocket.send(DatagramSocket.java:659)
     at teste.main(teste.java:28)

  When I try to send to a ipv4 it seems all ok...

In other hand, when I try receive a packet (using a java app in jamvm), my
app freezes in "socket.receive"....
  ....
  [Linking class gnu/java/nio/charset/ByteEncodeLoopHelper]
  [Loaded gnu/java/nio/charset/ISO_8859_1$Encoder$1 from
/usr/share/classpath/glibj.zip]
  [Linking class gnu/java/nio/charset/ISO_8859_1$Encoder$1]
  heeeyyyyyyyyy <----------- a println before "socket.receive"
  [Loaded java/net/DatagramPacket from /usr/share/classpath/glibj.zip]
  [Linking class java/net/DatagramPacket]
  [Loaded java/nio/VMDirectByteBuffer from /usr/share/classpath/glibj.zip]
  [Linking class java/nio/VMDirectByteBuffer]
  (and stays here...)
  after that socket.receive have another println but don't appears the
message.

  When I create the DatagramSocket I think it is normal do the bind but
looking to tcpdump (and having another app in another pc sending the
packets), says destination unreachable, a common message when the
destination port is not binded.

  I'm compiling in windows using java 1.6 (jamvm uses 1.5)... can be one of
the problems?


  I'm using openWRT KAMIKAZE (bleeding edge, r22417)

  Installed packages:
  6in4 - 3-1
  avahi-daemon - 0.6.25-1
  base-files - 51-r22417
  busybox - 1.16.2-1
  crda - 1.1.0-2
  dbus - 1.2.4.6permissive-2
  dnsmasq - 2.55-3
  dropbear - 0.52-5
  hotplug2 - 1.0-beta-2
  ip - 2.6.29-1-2
  ip6tables - 1.4.6-2
  iptables - 1.4.6-2
  iptables-mod-nat - 1.4.6-2
  iw - 0.9.20-1
  kernel - 2.6.32.16-1
  kmod-arptables - 2.6.32.16-1
  kmod-ath - 2.6.32.16+2010-07-26-1
  kmod-ath9k - 2.6.32.16+2010-07-26-1
  kmod-batman-adv - 2.6.32.16+2010.0.0-1
  kmod-bluetooth - 2.6.32.16-1
  kmod-button-hotplug - 2.6.32.16-2
  kmod-cfg80211 - 2.6.32.16+2010-07-26-1
  kmod-crc-ccitt - 2.6.32.16-1
  kmod-crc16 - 2.6.32.16-1
  kmod-crypto-aes - 2.6.32.16-1
  kmod-crypto-arc4 - 2.6.32.16-1
  kmod-crypto-core - 2.6.32.16-1
  kmod-crypto-des - 2.6.32.16-1
  kmod-crypto-hmac - 2.6.32.16-1
  kmod-crypto-md5 - 2.6.32.16-1
  kmod-crypto-sha1 - 2.6.32.16-1
  kmod-fs-cifs - 2.6.32.16-1
  kmod-fs-ext2 - 2.6.32.16-1
  kmod-fs-ext3 - 2.6.32.16-1
  kmod-fs-nfs - 2.6.32.16-1
  kmod-fs-nfs-common - 2.6.32.16-1
  kmod-fs-ntfs - 2.6.32.16-1
  kmod-fs-vfat - 2.6.32.16-1
  kmod-gre - 2.6.32.16-1
  kmod-hid - 2.6.32.16-1
  kmod-input-core - 2.6.32.16-1
  kmod-input-evdev - 2.6.32.16-1
  kmod-input-gpio-buttons - 2.6.32.16-1
  kmod-input-polldev - 2.6.32.16-1
  kmod-ip6-tunnel - 2.6.32.16-1
  kmod-ip6tables - 2.6.32.16-1
  kmod-ipip - 2.6.32.16-1
  kmod-ipsec - 2.6.32.16-1
  kmod-ipsec4 - 2.6.32.16-1
  kmod-ipsec6 - 2.6.32.16-1
  kmod-ipt-conntrack - 2.6.32.16-1
  kmod-ipt-conntrack-extra - 2.6.32.16-1
  kmod-ipt-core - 2.6.32.16-1
  kmod-ipt-extra - 2.6.32.16-1
  kmod-ipt-filter - 2.6.32.16-1
  kmod-ipt-imq - 2.6.32.16-1
  kmod-ipt-ipopt - 2.6.32.16-1
  kmod-ipt-iprange - 2.6.32.16-1
  kmod-ipt-ipsec - 2.6.32.16-1
  kmod-ipt-ipset - 2.6.32.16+4.2-1
  kmod-ipt-nat - 2.6.32.16-1
  kmod-ipt-nat-extra - 2.6.32.16-1
  kmod-ipt-nathelper - 2.6.32.16-1
  kmod-ipt-nathelper-extra - 2.6.32.16-1
  kmod-ipt-queue - 2.6.32.16-1
  kmod-ipt-ulog - 2.6.32.16-1
  kmod-iptunnel4 - 2.6.32.16-1
  kmod-iptunnel6 - 2.6.32.16-1
  kmod-ipv6 - 2.6.32.16-1
  kmod-leds-gpio - 2.6.32.16-1
  kmod-mac80211 - 2.6.32.16+2010-07-26-1
  kmod-mppe - 2.6.32.16-1
  kmod-nls-base - 2.6.32.16-1
  kmod-ppp - 2.6.32.16-1
  kmod-pppoe - 2.6.32.16-1
  kmod-pppol2tp - 2.6.32.16-1
  kmod-rfkill - 2.6.32.16-1
  kmod-sched - 2.6.32.16-1
  kmod-scsi-core - 2.6.32.16-1
  kmod-sit - 2.6.32.16-1
  kmod-textsearch - 2.6.32.16-1
  kmod-tun - 2.6.32.16-1
  kmod-usb-core - 2.6.32.16-1
  kmod-usb-hid - 2.6.32.16-1
  kmod-usb-ohci - 2.6.32.16-1
  kmod-usb-printer - 2.6.32.16-1
  kmod-usb-serial - 2.6.32.16-1
  kmod-usb-serial-ftdi - 2.6.32.16-1
  kmod-usb-serial-pl2303 - 2.6.32.16-1
  kmod-usb-storage - 2.6.32.16-1
  kmod-usb2 - 2.6.32.16-1
  kmod-wprobe - 2.6.32.16+1-1
  libavahi - 0.6.25-1
  libc - 0.9.30.1-51
  libdaemon - 0.14-2
  libdbus - 1.2.4.6permissive-2
  libexpat - 2.0.1-1
  libffi - 3.0.9-1
  libgcc - 4.3.3+cs-51
  libgdbm - 1.8.3-1
  libiptc - 1.4.6-2
  libltdl - 1.5.26-1
  liblua - 5.1.4-6
  libncurses - 5.7-2
  libnetsnmp - 5.4.2.1-2
  libnl-tiny - 0.1-1
  libol - 0.3.18-2
  libopenssl - 0.9.8m-3
  libpcap - 1.0.0-2
  libpopt - 1.7-5
  libpthread - 0.9.30.1-51
  librt - 0.9.30.1-51
  libuci - 12012009.5-2
  libuci-lua - 12012009.5-2
  libxtables - 1.4.8-1
  lua - 5.1.4-6
  mtd - 13
  openssh-keygen - 5.5p1-1
  openssh-server - 5.5p1-1
  opkg - 528-1
  radvd - 1.6-1
  snmpd - 5.4.2.1-2
  swconfig - 6
  syslog-ng - 1.6.12-2
  tcpdump - 4.0.0-3
  uci - 12012009.5-2
  ucitrigger - 12012009.5-2
  udevtrigger - 106-1
  wireless-tools - 29-4
  zlib - 1.2.3-5

[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux