[cups.development] Is there any way to derive IP address or Hostname from Device URI

Michael Sweet msweet at apple.com
Tue Nov 17 08:25:13 PST 2009


On Nov 17, 2009, at 2:24 AM, Justin Huang wrote:
> I need to determine the printer's IP address or hostname. I can do that if the URI is in the form of socket://hostname/... but for URI like this "mdns://mfg-model%20(49%3a60%3a18)._printer._tcp.local", are there any way to determine the printer's hostname?


First, why do you need to do this?

Second, you *can* get the hostname for such queues - the cupsBackendDeviceURI function can be used to get the correct device URI, resolved as needed.

___________________________________________________
Michael Sweet, Senior Printing System Engineer







More information about the cups mailing list