Annotation of 42BSD/lib/libc/inet/inet_lnaof.c, revision 1.1.1.1

1.1       root        1: /*     inet_lnaof.c    4.3     82/11/14        */
                      2: 
                      3: #include <sys/types.h>
                      4: #include <netinet/in.h>
                      5: 
                      6: /*
                      7:  * Return the local network address portion of an
                      8:  * internet address; handles class a/b/c network
                      9:  * number formats.
                     10:  */
                     11: inet_lnaof(in)
                     12:        struct in_addr in;
                     13: {
                     14:        register u_long i = ntohl(in.s_addr);
                     15: 
                     16:        if (IN_CLASSA(i))
                     17:                return ((i)&IN_CLASSA_HOST);
                     18:        else if (IN_CLASSB(i))
                     19:                return ((i)&IN_CLASSB_HOST);
                     20:        else
                     21:                return ((i)&IN_CLASSC_HOST);
                     22: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.