Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IP Address of a network printer ?



Hi,

For CUPS queues, ou can also get the CUPS info by constructing an IPP query, using the CUPS APIs, and querying the CUPS daemon that way. More expensive, but there is state information and other configuration information about that "printer object" that is maintained by the CUPS daemon that isn't found in the "/etc/cups/printers.conf" file. One other point is that that file is usually only readable by the root user.

Mac OS X doesn't ship with the headers for doing CUPS development, but the libraries are there. If you check which version of CUPS is installed on your version of Mac OS X (point your browser at http://127.0.0.1:631, the version will be in the page title), and download that distribution from cups.org, you can get the needed header files from there. Some developer documentation is available from that same URL, but it can be out-of-date, and isn't that complete. The CUPS book is a much better source of developer information, but includes some features that are apparently due in CUPS 2.0, but 2.0 hasn't shipped yet.

As for Tioga-style queues, on Mac OS 10.1, you can get this information from this file: "/var/spool/printing/com.apple.printing.plist".

For Tioga queues on Mac OS 10.2, I don't have a solution yet, and Apple won't tell me where this information is hidden, but it isn't "/var/spool/printing/com.apple.printing.plist", because that file never gets created. If anybody has a solution for this scenario, I would love to hear about it, because this is a showstopper for me at the moment.

Smith


On Wednesday, June 11, 2003, at 11:20 PM, John Rice wrote:

Mansur,
Take what I am about to say with a large grain of salt.
I don't know if you are building PDE/PBM/CUPS filter/CUPS backend or
whadevah.

However if you want to get the IP address of an existing CUPS printer
( postscript printer built with Jaguar).... a possible quick and dirty way
might be...

Mac OS X CUPS maintains a configuration(text) file for all existing
printers at '/private/etc/cups/printers.conf' take a peek at the 'Device
URI' line for each printer and see if it helps you.
- lpd printers should have useful addresses
- pap ( AppleTalk printers ) addresses are a little more arcane
parse that pup programmatically and you may be good to go.

John Rice
Group Logic, Inc.

----- Original Message -----
From: "Mansur_Milky" <email@hidden>
To: <email@hidden>
Sent: Thursday, June 12, 2003 12:44 AM
Subject: IP Address of a network printer ?


hello fellas ,

i posted this problem a few days back. i am really desperate to solve this
problem. i really need to know some mechanism by which i may be able to
find
a way out. i know there is no api in MacOS X which will help me solve this
problem. Even CUPS documentation does not address this problem. dunno what
to do ;-(

best regards
mansur

-----Original Message-----
From: Mansur_Milky
Sent: Wednesday, June 11, 2003 10:45 AM
To: email@hidden
Subject: IP Address of a network printer ?


Hi all,

i am trying to get the ip address of a network printer. i have gone thro
the
CUPS documentation and gone through PMCore.h and all MacOS X printing
documentation but am unable to find anything.


any pointers ?????

best regards
mansur
********************************************************************** ****
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying
or
distribution or forwarding of any or all of the contents in this message
is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
********************************************************************** ****
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.
********************************************************************** ****
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying
or
distribution or forwarding of any or all of the contents in this message
is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
********************************************************************** ****
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: IP Address of a network printer ? (From: "John Rice" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.