NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: _res value related query



In article 
<515c64960903100429m6cce52bje2c0d8cf14cbb30b%mail.gmail.com@localhost>,
Channa  <channa.kad%gmail.com@localhost> wrote:
>Hi,
>
>I have a query with respect to '_res' resolver state in NetBSD.
>Which is define in resolv.h as
>
>$ cat include/resolv.h
>
>:
>#define _res (*__res_state())
>:
>
>The have the following test case.
>
>#include <stdio.h>
>#include <resolv.h>
>#include <netdb.h>
>
>int main(int argc,char *argv[])
>{
>  printf("The _res value is %d\n",_res);
>
>  return 0 ;
>}
>
>when executed gives the following output:
>
>$ ./test
>The _res value is 5
>
>It always prints the value '5'.
>Could anyone tell me why the value 5??

The first value of the struct is retrans which is set to RES_TIMEOUT.

christos



Home | Main Index | Thread Index | Old Index