title: getaddrinfo for ipv6 link local
body: <p>I tried to get the address info in to structred  addrinfo **result .</p>
  
  <p>but I get the below error for the code </p>
  
  <p><strong>error in getaddrinfo: Address family for hostname not supported</strong></p>
  
  <p>code </p>
  
  <pre><code>error = getaddrinfo("fe80::4e80:93ff:fe33:13ff%wlan0", NULL, NULL, &amp;result);
  if (error != 0)
  {
      fprintf(stderr, "error in getaddrinfo: %s\n", gai_strerror(error));
      exit(EXIT_FAILURE);
  }
  </code></pre>
  
  <p>I am able to ping this address
  $ping6 fe80::4e80:93ff:fe33:13ff%wlan0</p>
  
  <p>Here is the ifconfig details </p>
  
  <pre><code>wlan0     Link encap:Ethernet  HWaddr 4c:80:93:33:13:ff  
            inet addr:192.168.43.188  Bcast:192.168.43.255  Mask:255.255.255.0
            inet6 addr: fe80::4e80:93ff:fe33:13ff/64 Scope:Link
            UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
            RX packets:1985 errors:0 dropped:0 overruns:0 frame:0
            TX packets:2748 errors:0 dropped:0 overruns:0 carrier:0
            collisions:0 txqueuelen:1000 
            RX bytes:950126 (950.1 KB)  TX bytes:684317 (684.3 K
  </code></pre>
  
  <p>this works when I tried for the IPv4 but I need get the getaddrinfo for ipv6</p>