Index: backend/lpd.c =================================================================== --- backend/lpd.c (revision 10596) +++ backend/lpd.c (working copy) @@ -126,6 +126,7 @@ int port; /* Port number */ char portname[256]; /* Port name (string) */ http_addrlist_t *addrlist; /* List of addresses for printer */ + int snmp_enabled = 1; /* Is SNMP enabled? */ int snmp_fd; /* SNMP socket */ int fd; /* Print file */ int status; /* Status of LPD job */ @@ -356,7 +357,8 @@ */ if (!value[0] || !_cups_strcasecmp(value, "on") || - !_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true") || + !_cups_strcasecmp(value, "yes") || + !_cups_strcasecmp(value, "true") || !_cups_strcasecmp(value, "rfc1179")) reserve = RESERVE_RFC1179; else if (!_cups_strcasecmp(value, "any")) @@ -371,7 +373,8 @@ */ manual_copies = !value[0] || !_cups_strcasecmp(value, "on") || - !_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true"); + !_cups_strcasecmp(value, "yes") || + !_cups_strcasecmp(value, "true"); } else if (!_cups_strcasecmp(name, "sanitize_title")) { @@ -380,8 +383,19 @@ */ sanitize_title = !value[0] || !_cups_strcasecmp(value, "on") || - !_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true"); + !_cups_strcasecmp(value, "yes") || + !_cups_strcasecmp(value, "true"); } + else if (!_cups_strcasecmp(name, "snmp")) + { + /* + * Enable/disable SNMP stuff... + */ + + snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") || + _cups_strcasecmp(value, "yes") || + _cups_strcasecmp(value, "true"); + } else if (!_cups_strcasecmp(name, "timeout")) { /* @@ -428,7 +442,10 @@ } } - snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family); + if (snmp_enabled) + snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family); + else + snmp_fd = -1; /* * Wait for data from the filter... Index: backend/ipp.c =================================================================== --- backend/ipp.c (revision 10603) +++ backend/ipp.c (working copy) @@ -203,6 +203,7 @@ *value, /* Value of option */ sep; /* Separator character */ http_addrlist_t *addrlist; /* Address of printer */ + int snmp_enabled = 1; /* Is SNMP enabled? */ int snmp_fd, /* SNMP socket */ start_count, /* Page count via SNMP at start */ page_count, /* Page count via SNMP */ @@ -508,6 +509,16 @@ value); } } + else if (!_cups_strcasecmp(name, "snmp")) + { + /* + * Enable/disable SNMP stuff... + */ + + snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") || + _cups_strcasecmp(value, "yes") || + _cups_strcasecmp(value, "true"); + } else if (!_cups_strcasecmp(name, "version")) { if (!strcmp(value, "1.0")) @@ -659,11 +670,14 @@ * See if the printer supports SNMP... */ - if ((snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family)) >= 0) - { + if (snmp_enabled) + snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family); + else + snmp_fd = -1; + + if (snmp_fd >= 0) have_supplies = !backendSNMPSupplies(snmp_fd, &(addrlist->addr), &start_count, NULL); - } else have_supplies = start_count = 0; Index: backend/socket.c =================================================================== --- backend/socket.c (revision 10596) +++ backend/socket.c (working copy) @@ -87,6 +87,7 @@ http_addrlist_t *addrlist, /* Address list */ *addr; /* Connected address */ char addrname[256]; /* Address name */ + int snmp_enabled = 1; /* Is SNMP enabled? */ int snmp_fd, /* SNMP socket */ start_count, /* Page count via SNMP at start */ page_count, /* Page count via SNMP */ @@ -246,6 +247,16 @@ waiteof = !value[0] || !_cups_strcasecmp(value, "on") || !_cups_strcasecmp(value, "yes") || !_cups_strcasecmp(value, "true"); } + else if (!_cups_strcasecmp(name, "snmp")) + { + /* + * Enable/disable SNMP stuff... + */ + + snmp_enabled = !value[0] || !_cups_strcasecmp(value, "on") || + _cups_strcasecmp(value, "yes") || + _cups_strcasecmp(value, "true"); + } else if (!_cups_strcasecmp(name, "contimeout")) { /* @@ -286,11 +297,14 @@ * See if the printer supports SNMP... */ - if ((snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family)) >= 0) - { + if (snmp_enabled) + snmp_fd = _cupsSNMPOpen(addrlist->addr.addr.sa_family); + else + snmp_fd = -1; + + if (snmp_fd >= 0) have_supplies = !backendSNMPSupplies(snmp_fd, &(addrlist->addr), &start_count, NULL); - } else have_supplies = start_count = 0; Index: doc/help/network.html =================================================================== --- doc/help/network.html (revision 10596) +++ doc/help/network.html (working copy) @@ -93,16 +93,22 @@
 socket://ip-address-or-hostname
-socket://ip-address-or-hostname/?waiteof=false
+socket://ip-address-or-hostname/?option=value
+socket://ip-address-or-hostname/?option=value&option=value
 socket://ip-address-or-hostname:port-number
-socket://ip-address-or-hostname:port-number/?waiteof=false
+socket://ip-address-or-hostname:port-number/?option=value
+socket://ip-address-or-hostname:port-number/?option=value&option=value
 
+

The "contimeout" option controls the number of seconds that the backend will wait to obtain a connection to the printer. The default is 1 week.

+ +

The "snmp" option controls whether the socket backend queries for supply and page count information via SNMP.

+

The "waiteof" option controls whether the socket backend waits for the printer to complete the printing of the job. The default is to wait.

Internet Printing Protocol (IPP)

-

IPP is the only protocol that CUPS supports natively and is supported by some network printers and print servers. However, since many printers do not implement IPP properly, only use IPP when the vendor actually documents official support for it. IPP printing normally happens over port 631 and uses the http and ipp URI schemes:

+

IPP is the only protocol that CUPS supports natively and is supported by some network printers and print servers. However, since many printers do not implement IPP properly, only use IPP when the vendor actually documents official support for it. IPP printing normally happens over port 631 and uses the http, ipp, and ipps URI schemes:

 http://ip-address-or-hostname:port-number/resource
@@ -114,6 +120,12 @@
 ipp://ip-address-or-hostname:port-number/resource
 ipp://ip-address-or-hostname:port-number/resource?option=value
 ipp://ip-address-or-hostname:port-number/resource?option=value&option=value
+ipps://ip-address-or-hostname/resource
+ipps://ip-address-or-hostname/resource?option=value
+ipps://ip-address-or-hostname/resource?option=value&option=value
+ipps://ip-address-or-hostname:port-number/resource
+ipps://ip-address-or-hostname:port-number/resource?option=value
+ipps://ip-address-or-hostname:port-number/resource?option=value&option=value
 

The ipp backend supports many options, which are summarized in Table 2.

@@ -148,16 +160,20 @@ Specifies that the connection to the IPP server should be encrypted using TLS. + snmp=false + Specifies that SNMP supply and page count queries should not be performed. + + version=1.0 - Specifies that version 1.0 of the IPP protocol should be used instead of the default version 1.1. + Specifies that version 1.0 of the IPP protocol should be used instead of the default version 2.0. - version=2.0 - Specifies that version 2.0 of the IPP protocol should be used instead of the default version 1.1. + version=1.1 + Specifies that version 1.1 of the IPP protocol should be used instead of the default version 2.0. version=2.1 - Specifies that version 2.1 of the IPP protocol should be used instead of the default version 1.1. + Specifies that version 2.1 of the IPP protocol should be used instead of the default version 2.0. waitjob=false @@ -267,6 +283,10 @@ Specifies that the job title string should be restricted to ASCII characters. + snmp=false + Specifies that SNMP supply and page count queries should not be performed. + + timeout=seconds Specifies the number of seconds to wait for LPD commands to complete. Index: cups/http-support.c =================================================================== --- cups/http-support.c (revision 10596) +++ cups/http-support.c (working copy) @@ -82,6 +82,7 @@ char *buffer; /* Pointer to buffer */ size_t bufsize; /* Size of buffer */ int options; /* Options passed to _httpResolveURI */ + const char *resource; /* Resource from URI */ } _http_uribuf_t; @@ -1523,6 +1524,7 @@ uribuf.buffer = resolved_uri; uribuf.bufsize = resolved_size; uribuf.options = options; + uribuf.resource = resource; resolved_uri[0] = '\0'; @@ -2064,8 +2066,14 @@ * Assemble the final device URI... */ - httpAssembleURI(HTTP_URI_CODING_ALL, uribuf->buffer, uribuf->bufsize, scheme, - NULL, hostTarget, ntohs(port), resource); + if ((!strcmp(scheme, "ipp") || !strcmp(scheme, "ipps")) && + !strcmp(uribuf->resource, "/cups")) + httpAssembleURIf(HTTP_URI_CODING_ALL, uribuf->buffer, uribuf->bufsize, + scheme, NULL, hostTarget, ntohs(port), "%s?snmp=false", + resource); + else + httpAssembleURI(HTTP_URI_CODING_ALL, uribuf->buffer, uribuf->bufsize, + scheme, NULL, hostTarget, ntohs(port), resource); DEBUG_printf(("8http_resolve_cb: Resolved URI is \"%s\"...", uribuf->buffer)); }