@JRubyMethod(name = "ipv6_v4mapped?") public IRubyObject ipv6_v4mapped_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && // Java always converts mapped ipv6 addresses to ipv4 form in6.getHostAddress().indexOf(":") == -1); }
@JRubyMethod(name = "ipv6_v4mapped?") public IRubyObject ipv6_v4mapped_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && // Java always converts mapped ipv6 addresses to ipv4 form in6.getHostAddress().indexOf(":") == -1); }
@JRubyMethod(name = "ipv6_mc_linklocal?") public IRubyObject ipv6_mc_linklocal_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isMCLinkLocal()); }
@JRubyMethod(name = "ipv6_mc_orglocal?") public IRubyObject ipv6_mc_orglocal_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isMCOrgLocal()); }
@JRubyMethod(name = "ipv6_mc_linklocal?") public IRubyObject ipv6_mc_linklocal_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isMCLinkLocal()); }
@JRubyMethod(name = "ipv6_mc_orglocal?") public IRubyObject ipv6_mc_orglocal_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isMCOrgLocal()); }
@JRubyMethod(name = "ipv6_mc_nodelocal?") public IRubyObject ipv6_mc_nodelocal_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isMCNodeLocal()); }
@JRubyMethod(name = "ipv6_mc_nodelocal?") public IRubyObject ipv6_mc_nodelocal_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isMCNodeLocal()); }
@JRubyMethod(name = "ipv6_mc_sitelocal?") public IRubyObject ipv6_mc_sitelocal_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isMCSiteLocal()); }
@JRubyMethod(name = "ipv6_unspecified?") public IRubyObject ipv6_unspecified_p(ThreadContext context) { if (getAddressFamily() == AF_INET6) { return context.runtime.newBoolean(getInet6Address().getHostAddress().equals("::")); } return context.fals; }
@JRubyMethod(name = "ipv6_v4compat?") public IRubyObject ipv6_v4compat_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isIPv4CompatibleAddress()); }
@JRubyMethod(name = "ipv6_mc_global?") public IRubyObject ipv6_mc_global_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isMCGlobal()); }
@JRubyMethod(name = "ipv6_unspecified?") public IRubyObject ipv6_unspecified_p(ThreadContext context) { if (getAddressFamily() == AF_INET6) { return context.runtime.newBoolean(getInet6Address().getHostAddress().equals("::")); } return context.fals; }
@JRubyMethod(name = "ipv6_mc_sitelocal?") public IRubyObject ipv6_mc_sitelocal_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isMCSiteLocal()); }
@JRubyMethod(name = "ipv6_v4compat?") public IRubyObject ipv6_v4compat_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isIPv4CompatibleAddress()); }
@JRubyMethod(name = "ipv6_mc_global?") public IRubyObject ipv6_mc_global_p(ThreadContext context) { Inet6Address in6 = getInet6Address(); return context.runtime.newBoolean(in6 != null && in6.isMCGlobal()); }
@JRubyMethod(name = "ipv6_multicast?") public IRubyObject ipv6_multicast_p(ThreadContext context) { if (getAddressFamily() == AF_INET6) { return context.runtime.newBoolean(getInet6Address().isMulticastAddress()); } return context.fals; }
@JRubyMethod(name = "ipv6_multicast?") public IRubyObject ipv6_multicast_p(ThreadContext context) { if (getAddressFamily() == AF_INET6) { return context.runtime.newBoolean(getInet6Address().isMulticastAddress()); } return context.fals; }