/* inetlnao.c (emx+gcc) -- Copyright (c) 1994-1995 by Eberhard Mattes */

#include <sys/types.h>
#include <netinet/in.h>

unsigned long inet_lnaof (struct in_addr in)
{
  unsigned long temp;

  temp = ntohl (in.s_addr);
  if (IN_CLASSA (temp))
    return temp & IN_CLASSA_HOST;
  else if (IN_CLASSB (temp))
    return temp & IN_CLASSB_HOST;
  else
    return temp & IN_CLASSC_HOST;
}
