/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/* a sample program that prints network name. */
#include <stdlib.h>
#include <stdio.h>
#include <netdb.h>
#include <netinet/in.h>

int main() {
    struct netent result;
    char buffer[128];

    while( getnetent_r(&result,buffer,128) != NULL)
      printf("%s\n",result.n_name);  
}
