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


Guile Reference Manual

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

38.11.1.1 IPv4 Address Conversion

Scheme Procedure: inet-aton address
C Function: scm_inet_aton (address)
Convert an IPv4 Internet address from printable string (dotted decimal notation) to an integer. E.g.,

 
(inet-aton "127.0.0.1") => 2130706433

Scheme Procedure: inet-ntoa inetid
C Function: scm_inet_ntoa (inetid)
Convert an IPv4 Internet address to a printable (dotted decimal notation) string. E.g.,

 
(inet-ntoa 2130706433) => "127.0.0.1"

Scheme Procedure: inet-netof address
C Function: scm_inet_netof (address)
Return the network number part of the given IPv4 Internet address. E.g.,

 
(inet-netof 2130706433) => 127

Scheme Procedure: inet-lnaof address
C Function: scm_lnaof (address)
Return the local-address-with-network part of the given IPv4 Internet address, using the obsolete class A/B/C system. E.g.,

 
(inet-lnaof 2130706433) => 1

Scheme Procedure: inet-makeaddr net lna
C Function: scm_inet_makeaddr (net, lna)
Make an IPv4 Internet address by combining the network number net with the local-address-within-network number lna. E.g.,

 
(inet-makeaddr 127 1) => 2130706433


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