Next: , Up: Networking


38.11.1 Network Address Conversion

This section describes procedures which convert internet addresses between numeric and string formats.

38.11.1.1 IPv4 Address Conversion
— Scheme Procedure: inet-aton address
— C Function: scm_inet_aton (address)

Convert a string containing an Internet host address in the traditional dotted decimal notation into an integer.

          (inet-aton "127.0.0.1") ⇒ 2130706433
          
— Scheme Procedure: inet-ntoa inetid
— C Function: scm_inet_ntoa (inetid)

Convert an integer Internet host address into a string with the traditional dotted decimal representation.

          (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 integer Internet address.

          (inet-netof 2130706433) ⇒ 127
— Scheme Procedure: inet-lnaof address
— C Function: scm_lnaof (address)

Return the local-address-with-network part of the given Internet address.

          (inet-lnaof 2130706433) ⇒ 1
— Scheme Procedure: inet-makeaddr net lna
— C Function: scm_inet_makeaddr (net, lna)

Make an Internet host address by combining the network number net with the local-address-within-network number lna.

          (inet-makeaddr 127 1) ⇒ 2130706433