/* Copyright (c) 2001-2004 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 *net;
    
    setnetent(1);
    while((net = getnetent()) != NULL) {
       printf("%s\n",net->n_name);  
    }
    endnetent(1);
}
