2005/03/31 IPP

Internet Printing Protocol which is what CUPS uses. You may know that if you fire up your web browser and point it at http://localhost:631 you get the CUPS administration screen, but did you realize that CUPS itself sends print and status requests to the same port?

There's nothing secret about this: CUPS documentation (which you can find at http://localhost:631/ipp.html ) explains all of it. If you wanted to, you could control CUPS directly with HTTP requests. We can demonstrate that with a little tom-foolery: let's create a little shell script that we'll run on port 631. First the script, which logs attempted connections.


#!/bin/bash
echo "Connection" >> /tmp/fakecupsd
date >> /tmp/fakecupsd
read line
echo $line >> /tmp/fakecupsd



Hate these ads?

We turn that on by creating a file in /etc/xinetd, stopping the real cups, and telling xinetd to start using ours for port 631 connections.



# cat /etc/xinetd.d/fakecups
service ipp
{
        socket_type     = stream
        wait            = no
        user            = root
        server          = /root/fakecups
}
/etc/init.d/cups stop
kill -1 `cat /var/run/xinetd.pid`


Now do an "lpstat -v" - it will hang, so ctrl-c it, and look in /tmp/fakecupsd. You'll see something like this repeated multiple times:


Connection
Sat Mar 26 05:36:30 EST 2005
POST / HTTP/1.1


The reason lpstat hangs is that it is sending more data with that http post, which the real cups daemon would process and acknowledge.



Comments /Words2005/2005_03_31.html


Thu Mar 31 13:46:18 2005: Subject:   drag



I prefer using IPP over using something like SAMBA. It seems much nicer to me.

Windows clients support IPP since Windows 2000, and I've tried it and it works very well... for me. IPP basicly turns your computer in a postscript-compatable networked printer.

But I've been told that Windows IPP support is sub-par and usually SAMBA is going to be better for large numbers of windows clients.

Although if you use Unix ones, especially ones that use CUPS (ie: Linux or FreeBSD or OS 10.2(10.2.4(?)) or newer) then it rocks.

--Drag

Add your comments
cartoon
Need eyes on the ground at your customer's site?
Installation and light training Boston and New England
Reliable and experienced, punctual and professional.

Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


Views for this page
Today This Week This Month This Year  Overall
1215410 1,713

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

pavatar.jpg
More:
       - Printing




Related Posts

Cups print to file

Redhat /etc/alternatives

Sco/Linux transition guide

CUPS and Netgear PS110

Print to FAX with custom tags

Cups bought by Apple

Using System V interface scripts with CUPS printing


Unix/Linux Consultants

Your ad here - $24.00 yearly!

http://www.vss3.com SCO/Caldera OpenServer, Unixware & Linux. Tarantella & Non-stop Clustering


http://www.cleverminds.net Need expert advice? Want a second opinion? CleverMinds is a one-stop-shop for a wide range of technology solutions. We support Unix, Linux, SCO as well as CMS, ecom, blogs, podcasts, search engines consulting and more. Contact us at web2.0@cleverminds.net 0r (617) 894-1282


UBB Computer Services Support for Openserver, Unixware and Linux. Windows integration with Unix/Linux servers. Hardware, Backup and Networking issues. Located near Sacramento CA, we provide onsite support throughout Northern CA and Nationwide via remote access. We are a SCO Authorized Partner and a Microlite BackupEdge Certified Reseller.









Change Congress


Related Posts