[IPP] Docker setup for IPP client | server

[IPP] Docker setup for IPP client | server

Craig Whittle ctwhittle at gmail.com
Wed Nov 30 16:07:55 UTC 2016


Smith / Mike,

I will create issues in the GitHub repository as I see them starting with
the printer-config-change-{date-time,time} issue.   As time permits I will
isolate these issues using the Docker setup using Wireshark / gdb (included
of the Docker environment) and point out unexpected responses or suggest
specific code changes.

Happy trails,

**CW 

-----Original Message-----
From: Kennedy, Smith (Wireless Architect) [mailto:smith.kennedy at hp.com] 
Sent: Wednesday, November 30, 2016 6:51 AM
To: Michael Sweet <msweet at apple.com>
Cc: Craig Whittle <ctwhittle at gmail.com>; ipp at pwg.org
Subject: Re: [IPP] Docker setup for IPP client | server

We *do* want ippserver to pass the self-cert tests so it can serve as an
example of a conforming implementation... :)

Agree! We also can offer that as a good working example of how to construct
a proper full-featured "ippserver" configuration.




Cheers,
Smith
---

   Smith Kennedy
   Wireless Architect - Client Software - IPG-PPS
   Standards - PWG / Bluetooth SIG / Wi-Fi Alliance / NFC Forum
   Chair, IEEE ISTO Printer Working Group
   HP Inc.


On Nov 30, 2016, at 6:05 AM, Michael Sweet
<msweet at apple.com<mailto:msweet at apple.com>> wrote:

Craig,

Thanks for doing this.  If you have no objections, I'll add the the docker
file to the ippsample repository along with the instructions to make this
more widely available.

As for the errors you are seeing when running the self-cert tools against
ippserver, please file an issue in the github repository -
printer-config-change-{date-time,time} are explicitly supported and should
be returned, and printer-icons is normally populated with a default value.
The printer-supply* attributes are currently commented out since I haven't
had a chance to update that code from the original CUPS sources which only
supported a single printer and canned supplies.  We *do* want ippserver to
pass the self-cert tests so it can serve as an example of a conforming
implementation... :)


On Nov 29, 2016, at 10:03 PM, Craig Whittle
<ctwhittle at gmail.com<mailto:ctwhittle at gmail.com>> wrote:

All,

In between applying for new work opportunities and enjoying some time off, I
created an easy way to get the IPP sample code up and running using Docker,
a streamlined container / virtualization technology.  By following the steps
below, you can get both an IPP client and an IPP server going on Linux,
Windows 10 | Server 2016, OS/X in very little time.  The docker file pulls
from the Git repository, builds the IPP sample code, and configures the
container so that network traffic can be captured using tcpdump and viewed
using the Wireshark on the host.  I have the capture files for some of the
IPP operations using these containers if you would like these.  Using
container technology enables us to have a standard way to reproduce and
report issues with the IPP sample code since the environment would always be
consistent.

The results of running the IPP client using the IPP everywhere test file are
attached.  The test on "PWG 5100.14 section 5.1/5.2 - Required Operations
and Attributes" failed.  Is this expected?  As Smith pointed out, the Docker
setup / environment  is not a usable configuration for self-certification.
The greatest value a Docker-based configuration provides is a fast / easy
setup that runs on multiple platforms that can be used for reference;
especially if you need a common platform / environment to reproduce issues.
The Wireshark file for the IPP everywhere test and the IPP server debug
message file are available upon request.

To run IPP sample code on Docker
1.       From a shell prompt in the directory (on Windows 10|2016, OS/X, or
Linux) containing this docker file run:
a.       docker build -t --security-opt seccomp=unconfined ubuntu[-ippserver
| -ippclient] .
b.       docker run -it -v d:\DockerShare:/data --security-opt
seccomp=unconfined ubuntu-[ippclient | ippserver] bash
2.       From the bash prompt on the newly created container as root, start
the services needed for Bonjour
a.       /# service dbus start
b.       /# service avahi-daemon start

To start the IPP Server
1.       In the ippserver container run
a.        /# ippserver -M byMyself -l rightHere -m coolPrinter -n myHost -p
631 -s 72 -vvvv myPrintService
2.       OR to run the server in debug mode using gdb
a.       gdb ippserver
b.       run  -M byMyself -l rightHere -m coolPrinter -n myHost -p 631 -s 72
-vvvv myPrintService

Run the IPP Client
1.       From the bash command prompt on the IPP client container and in the
/root/ippsample/examples directory with the IPP Server running, run:
a.       ippfind
                                      i.            Note the URL returned
(e.g., ipp://f8a365cfc7ec.local:631/ipp/print)
b.       ipptool [use the URL returned in step a.]
identify-printer-display.test
                                      i.            Note the "IDENTIFY from
172.17.0.4: Hello, World!"  message in stdout on the ippserver container
2.       To run the IPP everywhere tests on the IPP Client using setup from
step #1, run:
a.       root at 45f0590216fc:~/ippsample/examples# ipptool -V 2.0 -tf
document-letter.pdf ipp://f8a365cfc7ec.local:631/ipp/print
ipp-everywhere.test

To run Wireshark [using tcpdump and Wireshark]
1.       Prerequisites:
a.       Start IPP server and client as described above
b.       Wireshark will need to be installed on the host
2.       On the host in a command prompt as root, run
a.       docker ps
<image001.jpg>
a.       PS C:\Users\ctwhi\Documents\docker>  docker run -it -v
d:\DockerShare:/data --privileged --net container:[container ID from #2.a]
ubuntu-ippclient /usr/sbin/tcpdump -w /data/ipp.pcap
b.       After you have captured the network traffic, hit <control><C> to
break / interrupt the tcpdump process
NOTES:
.         Used Wireshark nightly build:
Wireshark-win64-2.3.0-1574-g1239336.msi that supports better IPP dissection
.         Wireshark files in C:\Users\ctwhi\OneDrive\Projects\IPP
o    Discovery [ipp-discovery.pcap]
<image002.png>
o    Identify-printer [ipp-identify-printer.pcap]
o    Ipp-everywhere (ipptool -V 2.0 -tf document-letter.pdf
ipp://f8a365cfc7ec.local:631/ipp/print ipp-everywhere.test)
[ipp-everywhere.pcap]

I hope this is helpful.  I enjoyed learning about Docker and getting more
familiar with the IPP sample code (great work Mike).

All the best,

**CW

<ipp.docker><2016.1129-ipp-everywhere-result.txt>___________________________
____________________
ipp mailing list
ipp at pwg.org<mailto:ipp at pwg.org>
https://www.pwg.org/mailman/listinfo/ipp

_________________________________________________________
Michael Sweet, Senior Printing System Engineer

_______________________________________________
ipp mailing list
ipp at pwg.org<mailto:ipp at pwg.org>
https://www.pwg.org/mailman/listinfo/ipp



More information about the ipp mailing list