|
|
bee9347 |
From 48655d013efbbebf5cb489458789e15356ea63eb Mon Sep 17 00:00:00 2001
|
|
|
bee9347 |
From: Tim Waugh <twaugh@redhat.com>
|
|
|
bee9347 |
Date: Tue, 9 Aug 2016 18:11:30 +0200
|
|
|
bee9347 |
Subject: [PATCH] Let snmp backend also use manufacturer-specific MIBs
|
|
|
bee9347 |
MIME-Version: 1.0
|
|
|
bee9347 |
Content-Type: text/plain; charset=UTF-8
|
|
|
bee9347 |
Content-Transfer-Encoding: 8bit
|
|
|
bee9347 |
|
|
|
bee9347 |
… of HP and Ricoh to obtain the device IDs of network-connected
|
|
|
bee9347 |
printers. This way we get more reliable information about make and model
|
|
|
bee9347 |
and in addition the supported page description languages, which allows one to
|
|
|
bee9347 |
identify whether an optional PostScript add-on is installed or for an
|
|
|
bee9347 |
unsupported printer which generic PPD is the best choice (requested by
|
|
|
bee9347 |
Ricoh).
|
|
|
bee9347 |
Bug: https://github.com/apple/cups/issues/3552
|
|
|
bee9347 |
Patch-Name: Let-snmp-backend-also-use-manufacturer-specific-MIBs.patch
|
|
|
bee9347 |
---
|
|
|
bee9347 |
backend/snmp.c | 8 ++++++++
|
|
|
bee9347 |
1 file changed, 8 insertions(+)
|
|
|
bee9347 |
|
|
|
bee9347 |
diff --git a/backend/snmp.c b/backend/snmp.c
|
|
|
bee9347 |
index 66ac884c6..9572822a8 100644
|
|
|
bee9347 |
--- a/backend/snmp.c
|
|
|
bee9347 |
+++ b/backend/snmp.c
|
|
|
bee9347 |
@@ -154,6 +154,8 @@ static const int UriOID[] = { CUPS_OID_ppmPortServiceNameOrURI, 1, 1, -1 };
|
|
|
bee9347 |
static const int LexmarkProductOID[] = { 1,3,6,1,4,1,641,2,1,2,1,2,1,-1 };
|
|
|
bee9347 |
static const int LexmarkProductOID2[] = { 1,3,6,1,4,1,674,10898,100,2,1,2,1,2,1,-1 };
|
|
|
bee9347 |
static const int LexmarkDeviceIdOID[] = { 1,3,6,1,4,1,641,2,1,2,1,3,1,-1 };
|
|
|
bee9347 |
+static const int HPDeviceIdOID[] = { 1,3,6,1,4,1,11,2,3,9,1,1,7,0,-1 };
|
|
|
bee9347 |
+static const int RicohDeviceIdOID[] = { 1,3,6,1,4,1,367,3,2,1,1,1,11,0,-1 };
|
|
|
bee9347 |
static const int XeroxProductOID[] = { 1,3,6,1,4,1,128,2,1,3,1,2,0,-1 };
|
|
|
bee9347 |
static cups_array_t *DeviceURIs = NULL;
|
|
|
bee9347 |
static int HostNameLookups = 0;
|
|
|
bee9347 |
@@ -969,9 +971,15 @@ read_snmp_response(int fd) /* I - SNMP socket file descriptor */
|
|
|
bee9347 |
_cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
|
|
|
bee9347 |
packet.community, CUPS_ASN1_GET_REQUEST,
|
|
|
bee9347 |
DEVICE_ID, LexmarkDeviceIdOID);
|
|
|
bee9347 |
+ _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
|
|
|
bee9347 |
+ packet.community, CUPS_ASN1_GET_REQUEST,
|
|
|
bee9347 |
+ DEVICE_ID, RicohDeviceIdOID);
|
|
|
bee9347 |
_cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
|
|
|
bee9347 |
packet.community, CUPS_ASN1_GET_REQUEST,
|
|
|
bee9347 |
DEVICE_PRODUCT, XeroxProductOID);
|
|
|
bee9347 |
+ _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
|
|
|
bee9347 |
+ packet.community, CUPS_ASN1_GET_REQUEST,
|
|
|
bee9347 |
+ DEVICE_ID, HPDeviceIdOID);
|
|
|
bee9347 |
break;
|
|
|
bee9347 |
|
|
|
bee9347 |
case DEVICE_DESCRIPTION :
|
|
|
bee9347 |
--
|
|
|
bee9347 |
2.26.2
|
|
|
bee9347 |
|