How to validate Internet Printing Protocol (IPP)?

6k Views Asked by At

I want to validate an IPP port for instance I has IPP like this http://xxx.xxx.xxx.xxx:631/ipp and similar way I want to validate https://xxx.xxx.xxx.xxx/ipp .Are there any API's exist to validate IPP and IPP-SSL if exists please let me know.

If there are no native API's then kindly let me know any other way of doing this.

1

There are 1 best solutions below

0
On

Have a look at the IPP Sample Software on Github. It is provided by the Printer Working Group (PWG), the body which standardized the IPP (Internet Printing Protocol).

This software, will currently still in beta, is already very functional. It ships two main command line tools:

  1. ippserver. Start it (with the appropriate options) and you will have a fully-fledged IPP server instance on your network, serving as virtual IPP printer (or an IPP server hosting multiple virtual IPP queues) which you can use to test any (or your self-written) IPP client software against.

  2. ipptool. This is an IPP client program which can send any combination of IPP requests to any IPP instance on the network (CUPS server, ippserver, IPP-capable printer hardware) and validate its responses. The software ships with a few prepared text files containing example IPP requests, all with a .test suffix for their filenames.

For your purpose, you could run these commands:

  1. ipptool -t -v ipp://xxx.xxx.xxx.xxx/ipp/print get-printer-attributes.test. This command will query any IPP printer about its supported IPP attributes. This should include an item telling about its supposed IPP versions support, for example as ipp-versions-supported (1setOf keyword) = 1.0,1.1,2.0.

  2. ipptool -t -v ipp://xxx.xxx.xxx.xxx/ipp/print ipp-1.1.test. This command will run a complete validation suite against the printer to test for its real-world IPP-1.1 compliance.

  3. ipptool -t -v ipp://xxx.xxx.xxx.xxx/ipp/print ipp-2.0.test. This command will run a complete validation suite against the printer to test for its real-world IPP-2.0 compliance.

  4. ipptool -t -v ipp://xxx.xxx.xxx.xxx/ipp/print ipp-2.0.test. This command will run a complete validation suite against the printer to test for its real-world IPP-2.0 compliance.

  5. ipptool -t -v ipp://xxx.xxx.xxx.xxx/ipp/print ipp-2.1.test. This command will run a complete validation suite against the printer to test for its real-world IPP-2.2 compliance.

  6. ipptool -t -v ipp://xxx.xxx.xxx.xxx/ipp/print ipp-2.2.test. This command will run a complete validation suite against the printer to test for its real-world IPP-2.2 compliance.

  7. ipptool -t -v ipp://xxx.xxx.xxx.xxx/ipp/print ipp-everywhere.test. This command will run a complete IPP Everywhere (which is the latest IPP Standard) validation suite against the printer to test for its real-world IPP Everywhere compliance.

To make this type of testing easy for you guys, I created a ready-made executable AppImage from the IPP Sample software that should be able to directly run (no "installation" needed!) on all x86_64 Linux distros:

  1. Download:

    wget https://github.com/KurtPfeifle/ippsample/releases/download/continuous/ippsample-x86_64.AppImage
    
  2. Make AppImage executable (and optionally rename it to ippsample):

    chmod a+x ippsample-x86_64.AppImage
    mv ippsample-x86_64.AppImage ippsample
    
  3. Have a look at its built-in help screen:

    ippsample --ai-usage
    
  4. Run it:

    ippsample ipptool -t -v ipp://xxx.xxx.xxx.xxx/ipp/print ipp-2.0.test
    

Here is an ASCIInema ascii-cast as an illustration of how to use the IPP Sample software (and its AppImage):

asciicast