# 2.11BSD#431 - /usr/src/lib/libc/net/getnbyaddr.c

##### Functions

    getnetbyaddr      X

       1: /*
       2:  * Copyright (c) 1983 Regents of the University of California.
       3:  * All rights reserved.  The Berkeley software License Agreement
       4:  * specifies the terms and conditions for redistribution.
       5:  */
       6:
       7: #if defined(LIBC_SCCS) && !defined(lint)
       8: static char sccsid[] = "@(#)getnetbyaddr.c	5.3 (Berkeley) 5/19/86";
       9: #endif LIBC_SCCS and not lint
      10:
      11: #include <netdb.h>
      12:
      13: extern int _net_stayopen;
      14:
      15: struct netent *
      16: getnetbyaddr(net, type)
      17:     register long net;
      18:     register int type;
      19: {
      20:     register struct netent *p;
      21:
      22:     setnetent(_net_stayopen);
      23:     while (p = getnetent())
      24:         if (p->n_addrtype == type && p->n_net == net)
      25:             break;
      26:     if (!_net_stayopen)
      27:         endnetent();
      28:     return (p);
      29: }

#### Defined functions

getnetbyaddr defined in line 15; used 14 times

- in /usr/include/netdb.h line 58
- in /usr/src/include/netdb.h line 56
- in /usr/src/new/crash/dispnet.c line 837
- in /usr/src/new/crash/inet.c line 383
- in /usr/src/new/crash/route.c line 281
- in /usr/src/new/nntp/server/access_inet.c line 58, 69
- in /usr/src/sbin/route/route.c line 316
- in /usr/src/sbin/routed/tools/query.c line 180, 186
- in /usr/src/ucb/PORT/systat/netstat.c line 363
- in /usr/src/ucb/netstat/inet.c line 397
- in /usr/src/ucb/netstat/route.c line 249
- in /usr/src/usr.sbin/htable/htable.c line 308

#### Defined variables

sccsid defined in line 8; never used

Last modified: 1987-08-04 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 465 |