# 2.11BSD#431 - /usr/src/lib/libc/inet/inet_lnaof.c

##### Functions

    inet_lnaof        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[] = "@(#)inet_lnaof.c	5.2 (Berkeley) 3/9/86";
       9: #endif LIBC_SCCS and not lint
      10:
      11: #include <sys/types.h>
      12: #include <netinet/in.h>
      13:
      14: /*
      15:  * Return the local network address portion of an
      16:  * internet address; handles class a/b/c network
      17:  * number formats.
      18:  */
      19: u_long
      20: inet_lnaof(in)
      21:     struct in_addr in;
      22: {
      23:     register u_long i = ntohl(in.s_addr);
      24:
      25:     if (IN_CLASSA(i))
      26:         return ((i)&IN_CLASSA_HOST);
      27:     else if (IN_CLASSB(i))
      28:         return ((i)&IN_CLASSB_HOST);
      29:     else
      30:         return ((i)&IN_CLASSC_HOST);
      31: }

#### Defined functions

inet_lnaof defined in line 19; used 12 times

- in /usr/include/arpa/inet.h line 29
- in /usr/src/include/arpa/inet.h line 29
- in /usr/src/new/crash/inet.c line 96, 380
- in /usr/src/new/nntp/server/subnet.c line 200, 215
- in /usr/src/sbin/route/route.c line 496
- in /usr/src/sbin/routed/tools/query.c line 174
- in /usr/src/ucb/PORT/systat/netstat.c line 154, 360
- in /usr/src/ucb/netstat/inet.c line 99, 394

#### Defined variables

sccsid defined in line 8; never used

Last modified: 1988-12-26 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1081 |