[IPP] Docker setup for IPP client | server

[IPP] Docker setup for IPP client | server

[IPP] Docker setup for IPP client | server

Craig Whittle ctwhittle at gmail.com
Wed Nov 30 03:03:24 UTC 2016



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
<https://www.docker.com/> , 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.]

                                       i.            Note the "IDENTIFY from 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


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

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


*         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]

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)


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,




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pwg.org/pipermail/ipp/attachments/20161129/7f82e163/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 9973 bytes
Desc: not available
URL: <http://www.pwg.org/pipermail/ipp/attachments/20161129/7f82e163/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 3366 bytes
Desc: not available
URL: <http://www.pwg.org/pipermail/ipp/attachments/20161129/7f82e163/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipp.docker
Type: application/octet-stream
Size: 1037 bytes
Desc: not available
URL: <http://www.pwg.org/pipermail/ipp/attachments/20161129/7f82e163/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 2016.1129-ipp-everywhere-result.txt
URL: <http://www.pwg.org/pipermail/ipp/attachments/20161129/7f82e163/attachment.txt>

More information about the ipp mailing list