diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2015-05-27 22:12:11 +0300 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2015-05-27 22:12:11 +0300 |
commit | 1316ccd46e18aac5618004bfb10b7101d4917dc8 (patch) | |
tree | e388cc7101cfa124b7a94a69e7778b8860aae29d /src/net/java/sip/communicator/impl | |
parent | 563705b06b3d3c95b5da6c6a72d466acc5711666 (diff) | |
download | jitsi-1316ccd46e18aac5618004bfb10b7101d4917dc8.zip jitsi-1316ccd46e18aac5618004bfb10b7101d4917dc8.tar.gz jitsi-1316ccd46e18aac5618004bfb10b7101d4917dc8.tar.bz2 |
Updates the JNA library to version 4.1.0 because it is dual-licensed under LGPL 2.1 and Apache License 2.0.
Diffstat (limited to 'src/net/java/sip/communicator/impl')
-rw-r--r-- | src/net/java/sip/communicator/impl/netaddr/BsdLocalhostRetriever.java | 58 |
1 files changed, 45 insertions, 13 deletions
diff --git a/src/net/java/sip/communicator/impl/netaddr/BsdLocalhostRetriever.java b/src/net/java/sip/communicator/impl/netaddr/BsdLocalhostRetriever.java index 52ffbab..d87d892 100644 --- a/src/net/java/sip/communicator/impl/netaddr/BsdLocalhostRetriever.java +++ b/src/net/java/sip/communicator/impl/netaddr/BsdLocalhostRetriever.java @@ -2,6 +2,7 @@ package net.java.sip.communicator.impl.netaddr; import java.io.*; import java.net.*; +import java.util.*; import com.sun.jna.*; import com.sun.jna.ptr.*; @@ -136,12 +137,6 @@ public class BsdLocalhostRetriever } @Override - public int getFamily() - { - return LibC.AF_INET; - } - - @Override public sockaddr createEmpty() { sockaddr_in v4 = new sockaddr_in(); @@ -154,6 +149,27 @@ public class BsdLocalhostRetriever { return InetAddress.getByAddress(sin_addr); } + + @Override + public int getFamily() + { + return LibC.AF_INET; + } + + @Override + protected List getFieldOrder() + { + return + Arrays.asList( + new String[] + { + "sin_len", + "sin_family", + "sin_port", + "sin_addr", + "sin_zero" + }); + } } /** @@ -167,7 +183,7 @@ public class BsdLocalhostRetriever public short sin6_port; public int sin6_flowinfo; public byte[] sin6_addr; - public int sin_scope_id; + public int sin6_scope_id; public sockaddr_in6() { @@ -176,12 +192,6 @@ public class BsdLocalhostRetriever } @Override - public int getFamily() - { - return LibC.AF_INET6; - } - - @Override public sockaddr createEmpty() { sockaddr_in6 v6 = new sockaddr_in6(); @@ -194,6 +204,28 @@ public class BsdLocalhostRetriever { return InetAddress.getByAddress(sin6_addr); } + + @Override + public int getFamily() + { + return LibC.AF_INET6; + } + + @Override + protected List getFieldOrder() + { + return + Arrays.asList( + new String[] + { + "sin6_len", + "sin6_family", + "sin6_port", + "sin6_flowinfo", + "sin6_addr", + "sin6_scope_id" + }); + } } /** |