home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.umcs.maine.edu
/
2015-02-07.ftp.umcs.maine.edu.tar
/
ftp.umcs.maine.edu
/
pub
/
thesis
/
zhongy
/
snmp
/
snmp.shar
/
snmprint.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-11
|
883b
|
55 lines
/*
This package includes routines to print the snmp MIB object values
according to their different type
programmer: Zhong Yunxiang
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#include <sys/types.h>
#include "asn1.h"
#include "snmp.h"
/*
print the value according to the type of test
*/
void print_value(struct snbentry sn)
{
printf("\n in the print function");
switch (sn.sb_val.sv_type) {
case ASN1_INT:
case ASN1_COUNTER:
case ASN1_GAUGE:
case ASN1_TIMETICKS:
printf("\n %s = %d\n",sn.name,sn.sb_val.sv_val.sv_int);
case ASN1_OCTSTR:
break;
case ASN1_NULL:
break;
case ASN1_OBJID:
break;
case ASN1_IPADDR:
break;
default:
break;
}
}