/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h> 

struct netent *getnetbyaddr(long net, int type) {
    void *fptr;
    struct netent * retval;

    fptr = dlsym(_ChNetdb_handle, "getnetbyaddr_chdl");
    if(fptr == NULL)  {
       printf("Error: %s(): dlsym(): %s\n", __func__, dlerror());
       return NULL;
    }
    dlrunfun(fptr, &retval, getnetbyaddr, net, type);
    return retval;
}
