www.delorie.com/gnu/docs/guile/guile_425.html   search  
 
Buy GNU books!


Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

38.11.1.2 IPv6 Address Conversion

Scheme Procedure: inet-ntop family address
C Function: scm_inet_ntop (family, address)
Convert a network address into a printable string. Note that unlike the C version of this function, the input is an integer with normal host byte ordering. family can be AF_INET or AF_INET6. E.g.,

 
(inet-ntop AF_INET 2130706433) => "127.0.0.1"
(inet-ntop AF_INET6 (- (expt 2 128) 1)) =>
ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff

Scheme Procedure: inet-pton family address
C Function: scm_inet_pton (family, address)
Convert a string containing a printable network address to an integer address. Note that unlike the C version of this function, the result is an integer with normal host byte ordering. family can be AF_INET or AF_INET6. E.g.,

 
(inet-pton AF_INET "127.0.0.1") => 2130706433
(inet-pton AF_INET6 "::1") => 1


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003