1

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.

IPP Nerd
  • 992
  • 9
  • 25
Siva
  • 1,281
  • 2
  • 19
  • 41
  • What do you want to validate? – deviantfan Nov 27 '14 at 13:12
  • I want to validate the entire IPP URL for instance "http://242.29.242.36:631/ipp " and similarly "https://242.29.242.36/ipp".Now I want to validate entire URL what I mentioned here whether it is a valid format or not and similarly for IPP-SSL also.Kindly help me out how to validate the entire is whether a valid format or not. – Siva Nov 28 '14 at 04:56
  • http://stackoverflow.com/questions/2616011/easy-way-to-parse-a-url-in-c-cross-platform and http://stackoverflow.com/questions/2986306/standard-c-method-for-validating-a-urls-format . Instead of waiting 20 hours, Google would got you a solution within seconds. (An IPP url is nothing special) – deviantfan Nov 28 '14 at 09:47
  • 1
    @deviantfan: I do not see that this question is limited to validate the IPP ***URL*** only. The headline talks about the IPP ***protocol*** -- which is a completely different beast. Your comment is a bit sarcastic and snarky, don't you think? – Kurt Pfeifle Dec 08 '18 at 23:10
  • @KurtPfeifle Quote from Siva: "I want to validate entire URL what I mentioned here whether it is a valid format or not". Anyways, maybe it was snarky, but it would really help people if they remember to search before asking, for their own sake. And since my comment is 4 years old, I think I pass on further discussion. – deviantfan Dec 09 '18 at 03:51
  • I'm answering the OP question, below (4 years after being put online), not a comment underneath the OP.... If you are right (which you may well be), the headline should better have read *'How to validate an IPP URI?'* – Kurt Pfeifle Dec 09 '18 at 04:01

1 Answers1

3

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

Kurt Pfeifle
  • 86,724
  • 23
  • 248
  • 345