/*************************************************************
/*
/* Program mapnet
/*
/* This program contains an example of how to call the
/* functions contained in the ksnmp library.
/* It allows to retrieve and print the map of the local
/* network.
/*
/* The enviroment variables MIBFILE and ARP_SERVER must be
/* correctly set.
/*
/* E. Pasqualucci 15-4-1996
/*
/*************************************************************

/* standard include files */

#include <stdio.h>

/* snmp include files */

#include "snmp.h"
#include "asn1.h"
#include "snmp_impl.h"
#include "snmp_api.h"

/* specific include files */

#include "netmap.h"

/* prototype files */

#include "ksnmplib_protos.h"

main()
{
/*  This is an example of how the user must call the ksnmp routines */

    struct network_map *map;

    struct port_descr *theport;
    struct node_descr *thenode;

    struct snmp_pdu *pdu;

    init_mib();
    ksnmp_init();
    ksnmp_network_map();
    map = ksnmp_retrieve_network_map();
    ksnmp_print_network_map (stdout, map);
    ksnmp_network_remap();
    map = ksnmp_retrieve_network_map();
    ksnmp_print_network_map (stdout, map);
    ksnmp_close_sessions();
}