title: Haskell bind socket to specific IP
body: <p>In the Haskell <code>network</code> package</p>
  
  <p><code>bindSocket</code> uses <code>HostAddress</code> and <code>HostAddress6</code></p>
  
  <p>which are defined as:</p>
  
  <pre><code>-- | Network byte order.
  type HostAddress = Word32
  
  -- | Host byte order.
  type HostAddress6 = (Word32, Word32, Word32, Word32)
  </code></pre>
  
  <ul>
  <li>How can I go from <code>123.123.123.123</code> to a <code>Word32</code>?</li>
  <li>How can I go from an <code>IPv6</code> string to <code>(Word32, Word32, Word32, Word32)</code>?</li>
  <li>Does endianness play a role on different OSes (Windows, Linux, OS X, FreeBSD)?</li>
  </ul>