Has anyone written out the grammar in BNF for the Internet Printing Protocol Collections record described in RFC3382?

143 Views Asked by At

I am having a little trouble generating the Collection records described in Internet Printing Protocol definition RFC3382. Has anyone written out the grammar in BNF?

2

There are 2 best solutions below

1
On

It's hard to say! I frequently research the internet about IPP and have not come across any work related to IPP and BNF (Backus-Naur-Form) so far.

I guess the PWG IPP mailing list would be a better audience for this question. Most ipp implementations don't use a scanner or parser to deal with ipp messages. I assume you implement an ipp server and have covered the ipp parsing already.

Sometimes it is a good approach to capture an ipp message (response) of a real printer and have a look at its byte sequence. On request (personal mail) I can provide such a response in binary format (including a media-col-default and media-col-database attribute)

0
On

I got an answer from the Printer Working Group (PWG) site. The short answer is that a RFC-in-progress has a more precise grammar for Collections.

From Michael Sweet:

There is an updated ABNF grammar in the upcoming RFC 8010 (which replaces RFCs 2910 and 3382) along with better examples that might be of some help. Here is a link to the authors' review copy (it should be published very soon!):

https://www.rfc-editor.org/authors/rfc8010.txt 

Sections 3.1.6 and 3.1.7 cover the encoding of the collection attribute and its member attributes, respectively.

FWIW, the "design" of collections in 3382 was done specifically to make them look like a 1setOf attribute with a mix of values so that existing clients/printers could more easily deal with them. In practice this makes supporting collections a little more difficult (and the encoding of collection values a little more verbose) than is ideal... :/

(Mr Sweet, I apologize for redistributing your information without consulting you)