/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Licensed under the Academic Free License version 2.1
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <strings.h>
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include "logger.h"
#include "printer.h"
static int
char **description)
{
char *s;
return (-1);
/* if it has : and ; in it, it's probably a 1284 device id */
} else {
rc = 0;
*s++ = NULL;
}
}
return (rc);
}
static struct snmp_pdu *
{
int status;
/* initialize the SNMP session */
return (NULL);
/* add the requested data */
/* initialize the request PDU */
snmp_close(ss);
return (result);
}
static char *
{
if (v->type == ASN_OCTET_STR) {
}
}
return (result);
}
static int
char ***command_set)
{
/*
* Brother printers appear to store
* 1284 DevID SNMPv2-SMI::enterprises.2435.2.3.9.1.1.7.0
* Serial Number SNMPv2-SMI::enterprises.2435.2.3.9.4.2.1.5.5.1.0
*/
"SNMPv2-SMI::enterprises.2435.2.3.9.1.1.7.0");
"SNMPv2-SMI::enterprises.2435.2.3.9.4.2.1.5.5.1.0");
}
return (rc);
}
static int
char ***command_set)
{
/*
* OKI printers appear to store
* 1284 DevID SNMPv2-SMI::enterprises.367.3.2.1.1.1.11.0
* Serial Number SNMPv2-SMI::enterprises.367.3.2.1.2.1.4.0
*/
"SNMPv2-SMI::enterprises.367.3.2.1.1.1.11.0");
"SNMPv2-SMI::enterprises.367.3.2.1.2.1.4.0");
}
return (rc);
}
static int
char ***command_set)
{
/*
* Lexmark printers appear to store
* 1284 DevID SNMPv2-SMI::enterprises.641.2.1.2.1.3.1
* Serial Number SNMPv2-SMI::enterprises.641.2.1.2.1.6.1
*/
"SNMPv2-SMI::enterprises.641.2.1.2.1.3.1");
"SNMPv2-SMI::enterprises.641.2.1.2.1.6.1");
}
return (rc);
}
static int
{
/*
* Xerox Phaser XXXX printers store their
* 1284 DevID SNMPv2-SMI::enterprises.253.8.51.1.2.1.20.1
* Manufacturer:
* SNMPv2-SMI::enterprises.128.2.1.3.1.1.0
* SNMPv2-SMI::enterprises.23.2.32.3.2.1.10.1.16
* SNMPv2-SMI::enterprises.23.2.32.4.1.0
* Model:
* SNMPv2-SMI::enterprises.128.2.1.3.1.2.0
* SNMPv2-SMI::enterprises.23.2.32.3.2.1.10.1.17
* SNMPv2-SMI::enterprises.23.2.32.4.2.0
* Description SNMPv2-SMI::enterprises.253.8.53.3.2.1.2.1
* Serial Number SNMPv2-SMI::enterprises.253.8.53.3.2.1.3.1
* Uri SNMPv2-SMI::enterprises.128.2.1.3.6.23.1.5.1
*/
"SNMPv2-SMI::enterprises.253.8.51.1.2.1.20.1");
}
if (*manufacturer == NULL)
"SNMPv2-SMI::enterprises.128.2.1.3.1.1.0");
if (*manufacturer == NULL)
"SNMPv2-SMI::enterprises.23.2.32.3.2.1.10.1.16");
if (*manufacturer == NULL)
"SNMPv2-SMI::enterprises.23.2.32.4.1.0");
"SNMPv2-SMI::enterprises.128.2.1.3.1.2.0");
"SNMPv2-SMI::enterprises.23.2.32.3.2.1.10.1.17");
"SNMPv2-SMI::enterprises.23.2.32.4.2.0");
"SNMPv2-SMI::enterprises.253.8.53.3.2.1.3.1");
rc = 0;
return (rc);
}
static int
char ***command_set, char **uri)
{
/*
* MINOLTA-QMS printers appear to store
* Prouct Name SNMPv2-SMI::enterprises.2590.1.1.2.1.5.7.14.2.1.1.16.1
* Serial Number SNMPv2-SMI::enterprises.2590.1.1.1.5.5.1.1.3.2
* URI SNMPv2-SMI::enterprises.2590.1.1.2.1.5.7.14.2.2.1.3.1.1
* SNMPv2-SMI::enterprises.2590.1.1.2.1.5.7.14.2.2.1.3.1.2
*/
"SNMPv2-SMI::enterprises.2590.1.1.2.1.5.7.14.2.1.1.16.1");
"SNMPv2-SMI::enterprises.2590.1.1.1.5.5.1.1.3.2");
"SNMPv2-SMI::enterprises.2590.1.1.2.1.5.7.14.2.2.1.3.1.2");
"SNMPv2-SMI::enterprises.2590.1.1.2.1.5.7.14.2.2.1.3.1.1");
}
return (rc);
}
static int
char ***command_set)
{
/*
* OKI printers appear to store
* Prouct Name SNMPv2-SMI::enterprises.2001.1.2.683.1.3
* Serial Number SNMPv2-SMI::enterprises.2001.1.2.683.1.5
*/
"SNMPv2-SMI::enterprises.2001.1.2.683.1.3");
"SNMPv2-SMI::enterprises.2001.1.2.683.1.5");
}
return (rc);
}
static int
char ***command_set)
{
/*
* HP printers appear to store
* 1284 DevID SNMPv2-SMI::enterprises.11.2.3.9.1.1.7.0
* Serial Number SNMPv2-SMI::enterprises.2.3.9.4.2.2.5.1.1.17
*/
"SNMPv2-SMI::enterprises.11.2.3.9.1.1.7.0");
"SNMPv2-SMI::enterprises.2.3.9.4.2.2.5.1.1.17");
}
return (rc);
}
static int
char ***command_set)
{
/*
* The PWG portMon MIB stores
* 1284 DevID SNMPv2-SMI::enterprises.2699.1.2.1.1.1.3`
*/
"SNMPv2-SMI::enterprises.2699.1.2.1.1.1.3");
}
return (rc);
}
static int
char ***command_set)
{
/*
* The Printer Printer MIB stores
* Vendor SNMPv2-SMI::mib-2.43.8.2.1.14.1.1
* Model SNMPv2-SMI::mib-2.43.8.2.1.15.1.1
* Serial SNMPv2-SMI::mib-2.43.8.2.1.17.1.1
*/
if (*manufacturer == NULL)
"SNMPv2-SMI::mib-2.43.8.2.1.14.1.1");
"SNMPv2-SMI::mib-2.43.8.2.1.15.1.1");
"SNMPv2-SMI::mib-2.43.8.2.1.17.1.1");
if (*manufacturer != NULL)
rc = 0;
return (rc);
}
static int
char **serial_no, char ***command_set)
{
"HOST-RESOURCES-MIB::hrDeviceDescr.1");
}
return (rc);
}
int
char ***command_set, char **uri)
{
init_snmp("network-printer-probe");
init_mib();
return (0);
return (0);
return (0);
command_set, uri) == 0) {
return (0);
return (0);
return (0);
return (0);
return (0);
return (0);
command_set) == 0) {
return (0);
}
return (-1);
}
#ifdef NOTDEF
int
{
int i;
int rc;
if (command_set != NULL) {
int j;
printf("\tcommand set = \n");
for (j = 0; command_set[j] != NULL; j++)
}
}
return (0);
}
#endif