Skip to content

Instantly share code, notes, and snippets.

@flash-gordon
Created January 30, 2013 17:28
Show Gist options
  • Save flash-gordon/4674899 to your computer and use it in GitHub Desktop.
Save flash-gordon/4674899 to your computer and use it in GitHub Desktop.
CREATE OR REPLACE FUNCTION parse_ipv6(src varchar2)
RETURN RAW
AS LANGUAGE JAVA
NAME 'sun.net.util.IPAddressUtil.textToNumericFormatV6(java.lang.String) return java.lang.Byte[]';
/
begin
dbms_output.put_line(rawtohex(parse_ipv6('::1')));
end;
/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment