# 2.11BSD#431 - /usr/src/usr.sbin/named/tools/nslookup/res.h

##### Macros

    ERROR             X
    FALSE             X
    MAXDFLSRCH        X
    NAME_LEN          X
    NONAUTH           X
    NO_INFO           X
    NO_RESPONSE       X
    RES_DEBUG2        X
    SUCCESS           X
    TIME_OUT          X
    TRUE              X

##### typedef's

    Boolean           X

       1: /*
       2:  * Copyright (c) 1985,1989 Regents of the University of California.
       3:  * All rights reserved.
       4:  *
       5:  * Redistribution and use in source and binary forms are permitted provided
       6:  * that: (1) source distributions retain this entire copyright notice and
       7:  * comment, and (2) distributions including binaries display the following
       8:  * acknowledgement:  ``This product includes software developed by the
       9:  * University of California, Berkeley and its contributors'' in the
      10:  * documentation or other materials provided with the distribution and in
      11:  * all advertising materials mentioning features or use of this software.
      12:  * Neither the name of the University nor the names of its contributors may
      13:  * be used to endorse or promote products derived from this software without
      14:  * specific prior written permission.
      15:  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
      16:  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
      17:  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
      18:  *
      19:  *	@(#)res.h	5.10.1 (2.11BSD GTE) 1/26/94
      20:  */
      21:
      22: /*
      23:  *******************************************************************************
      24:  *
      25:  *  res.h --
      26:  *
      27:  *	Definitions used by modules of the name server lookup program.
      28:  *
      29:  *	Copyright (c) 1985
      30:  *	Andrew Cherenson
      31:  *	U.C. Berkeley
      32:  *	CS298-26  Fall 1985
      33:  *
      34:  *******************************************************************************
      35:  */
      36:
      37: /*
      38:  * This really doesn't belong here and can go away when newer resolver routines
      39:  * and include files are ported over.
      40: */
      41: #define MAXDFLSRCH  3
      42:
      43: #define TRUE    1
      44: #define FALSE   0
      45: typedef int Boolean;
      46:
      47: /*
      48:  *  Define return statuses in addtion to the ones defined in namserv.h
      49:  *   let SUCCESS be a synonym for NOERROR
      50:  *
      51:  *	TIME_OUT	- a socket connection timed out.
      52:  *	NO_INFO		- the server didn't find any info about the host.
      53:  *	ERROR		- one of the following types of errors:
      54:  *			   dn_expand, res_mkquery failed
      55:  *			   bad command line, socket operation failed, etc.
      56:  *	NONAUTH		- the server didn't have the desired info but
      57:  *			  returned the name(s) of some servers who should.
      58:  *	NO_RESPONSE	- the server didn't respond.
      59:  *
      60:  */
      61:
      62: #define  SUCCESS        0
      63: #define  TIME_OUT       -1
      64: #define  NO_INFO        -2
      65: #define  ERROR          -3
      66: #define  NONAUTH        -4
      67: #define  NO_RESPONSE        -5
      68:
      69: /*
      70:  *  Define additional options for the resolver state structure.
      71:  *
      72:  *   RES_DEBUG2		more verbose debug level
      73:  */
      74:
      75: #define RES_DEBUG2  0x80000000
      76:
      77: /*
      78:  *  Maximum length of server, host and file names.
      79:  */
      80:
      81: #define NAME_LEN 256
      82:
      83:
      84: /*
      85:  * Modified struct hostent from <netdb.h>
      86:  *
      87:  * "Structures returned by network data base library.  All addresses
      88:  * are supplied in host order, and returned in network order (suitable
      89:  * for use in system calls)."
      90:  */
      91:
      92: typedef struct  {
      93:     char    *name;      /* official name of host */
      94:     char    **domains;  /* domains it serves */
      95:     char    **addrList; /* list of addresses from name server */
      96: } ServerInfo;
      97:
      98: typedef struct  {
      99:     char    *name;      /* official name of host */
     100:     char    **aliases;  /* alias list */
     101:     char    **addrList; /* list of addresses from name server */
     102:     int addrType;   /* host address type */
     103:     int addrLen;    /* length of address */
     104:     ServerInfo **servers;
     105: } HostInfo;
     106:
     107:
     108: /*
     109:  *  FilePtr is used for directing listings to a file.
     110:  *  It is global so the Control-C handler can close it.
     111:  */
     112:
     113: extern FILE *filePtr;
     114:
     115: /*
     116:  * TCP/UDP port of server.
     117:  */
     118: extern unsigned short nsport;
     119:
     120: /*
     121:  *  External routines:
     122:  */
     123:
     124: extern Boolean IsAddr();
     125: extern int  Print_query();
     126: extern char *Print_cdname();
     127: extern char *Print_cdname2();   /* fixed width */
     128: extern char *Print_rr();
     129: extern char *DecodeType();  /* descriptive version of p_type */
     130: extern char *DecodeError();
     131: extern char *Calloc();
     132: extern char *Malloc();
     133: extern void NsError();
     134: extern void PrintServer();
     135: extern void PrintHostInfo();
     136: extern void ShowOptions();
     137: extern void FreeHostInfoPtr();
     138: extern FILE *OpenFile();
     139: extern char *res_skip();
     140: extern char *getenv();

#### Defined typedef's

Boolean defined in line 45; used 16 times

- in line 124
- in /usr/src/usr.sbin/named/tools/nslookup/getinfo.c line 108-110(2), 129-130(2), 365, 518, 524, 607
- in /usr/src/usr.sbin/named/tools/nslookup/list.c line 505, 538
- in /usr/src/usr.sbin/named/tools/nslookup/main.c line 142, 390, 447, 646, 716

#### Defined macros

ERROR defined in line 65; used 34 times

- in /usr/src/usr.sbin/named/tools/nslookup/getinfo.c line 194, 201, 339, 350, 368, 416, 636, 692
- in /usr/src/usr.sbin/named/tools/nslookup/list.c line 231, 256, 264, 282, 297, 465, 478-480(2), 561-565(2), 628, 659, 666, 687, 830, 844, 861, 869, 880
- in /usr/src/usr.sbin/named/tools/nslookup/main.c line 470, 500, 672, 733, 817, 910
- in /usr/src/usr.sbin/named/tools/nslookup/send.c line 513

FALSE defined in line 44; used 12 times

- in /usr/src/usr.sbin/named/tools/nslookup/getinfo.c line 130, 179, 378, 524
- in /usr/src/usr.sbin/named/tools/nslookup/list.c line 520, 586
- in /usr/src/usr.sbin/named/tools/nslookup/main.c line 90, 200, 402, 416, 657, 724

MAXDFLSRCH defined in line 41; used 1 times

- in /usr/src/usr.sbin/named/tools/nslookup/main.c line 931

NAME_LEN defined in line 81; used 23 times

- in /usr/src/usr.sbin/named/tools/nslookup/list.c line 117-118(2), 154-155(2), 210-211(2), 536-537(2), 787-788(2), 822-823(2)
- in /usr/src/usr.sbin/named/tools/nslookup/main.c line 75, 98, 325, 452, 648-649(2), 718-720(3), 804, 1095

NONAUTH defined in line 66; used 4 times

- in /usr/src/usr.sbin/named/tools/nslookup/getinfo.c line 484, 644
- in /usr/src/usr.sbin/named/tools/nslookup/main.c line 505-510(2)

NO_INFO defined in line 64; used 6 times

- in /usr/src/usr.sbin/named/tools/nslookup/getinfo.c line 164, 487, 576-578(2), 593
- in /usr/src/usr.sbin/named/tools/nslookup/list.c line 556

NO_RESPONSE defined in line 67; used 4 times

- in /usr/src/usr.sbin/named/tools/nslookup/getinfo.c line 574
- in /usr/src/usr.sbin/named/tools/nslookup/list.c line 261
- in /usr/src/usr.sbin/named/tools/nslookup/send.c line 506-511(2)

RES_DEBUG2 defined in line 75; used 12 times

- in /usr/src/usr.sbin/named/tools/nslookup/debug.c line 88, 240-242(2)
- in /usr/src/usr.sbin/named/tools/nslookup/getinfo.c line 142
- in /usr/src/usr.sbin/named/tools/nslookup/main.c line 276, 824-826(2), 841, 1000
- in /usr/src/usr.sbin/named/tools/nslookup/send.c line 112, 432, 463

SUCCESS defined in line 62; used 23 times

- in /usr/src/usr.sbin/named/tools/nslookup/getinfo.c line 141, 309-313(2), 490, 539, 574, 590, 695
- in /usr/src/usr.sbin/named/tools/nslookup/list.c line 142, 188, 420, 462, 573, 769, 918
- in /usr/src/usr.sbin/named/tools/nslookup/main.c line 248, 336, 505-510(2), 521, 744, 913
- in /usr/src/usr.sbin/named/tools/nslookup/send.c line 473

TIME_OUT defined in line 63; used 1 times

- in /usr/src/usr.sbin/named/tools/nslookup/send.c line 508

TRUE defined in line 43; used 7 times

- in /usr/src/usr.sbin/named/tools/nslookup/getinfo.c line 197, 235, 278, 381
- in /usr/src/usr.sbin/named/tools/nslookup/list.c line 517
- in /usr/src/usr.sbin/named/tools/nslookup/main.c line 408, 598

#### Usage of this include

res.h used 8 times

- in /usr/src/usr.sbin/named/tools/nslookup/debug.c line 43
- in /usr/src/usr.sbin/named/tools/nslookup/getinfo.c line 45
- in /usr/src/usr.sbin/named/tools/nslookup/list.c line 47
- in /usr/src/usr.sbin/named/tools/nslookup/main.c line 55
- in /usr/src/usr.sbin/named/tools/nslookup/res_debug.c line 30
- in /usr/src/usr.sbin/named/tools/nslookup/send.c line 51
- in /usr/src/usr.sbin/named/tools/nslookup/skip.c line 45
- in /usr/src/usr.sbin/named/tools/nslookup/subr.c line 50

Last modified: 1994-01-27 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 707 |