Albert,
this is how far I came with the ABNF. I didn't run it through the
validator, so there might still be some issues:
TAG = full-stat-id [full-dyn-id] (':' / SP)
full-stat-id = [path] progname
full-dyn-id = '[' proc-id [thread-part] ']'
path = path-part 1*(path-sep [path])
path-part = 1*VISUAL
path-sep = '/' / '\'
progname = 1*VISUAL
proc-id = 1*ALFANUM ; recommended: number
thread-part = thread-sep thread-id
thread-sep = VISUAL ; recommended: ",", or ':', or '.'
thread-id = 1*ALFANUM ; recommended: number
VISUAL = ([a-zA-Z0-9...], excusing '['
SP = %d32
By updating it, some more points were raised (it is much like
implementing;)):
- I made full-dyn-id optional - was that the intetion (mine it is;))
- VISUAL must allow non US-ASCII characters
- do we really need to describe the path?
- why not fix thread-sep to ","?
- MUST proc-id/thread-id by ALFANUM - would a SHOULD be sufficient (what
do we gain from a MUST)?
- The ABNF is still not fully correct in the terminating SP of the
message... This can not be done only by specifying the tag. But I think
it is sufficiently to convey the idea.
I hope I got the spirit right, but you may check. All in all, I am very
happy with the propsal, except for the points raised ;)
HTH
Rainer
On Tue, 2003-09-30 at 12:03, Albert Mietus wrote:
> Based on Rainers text, the issue's/problems of Chris, and the
> expirence in implementing it. The following text is proposed to be
> included in syslog-sign.
>
> """
> The TAG is a string of visible (printing) characters excluding SP,
> that MUST NOT exceed 64 characters in length.
> The first occurrence of a SP (space) will terminate the TAG field,
> but is not part of it.
> It is RECOMMENDED to terminate the TAG with a colon (':'), which if
> used, is part of the TAG.
>
> The TAG is used to denote the sender of the message. And is
> RECOMMENDED to have the following syntax:
>
> TAG = full-stat-id full-dyn-id ':'
> full-stat-id = path path-sep progname
> full-dyn-id = '[' proc-id thread-part ']'
> path = VISUAL *
> path-sep = ( '/' | '\' )
> progname = VISUAL *
> proc-id = ALFANUM * ; recommended: number
> thread-part = ( EMPTY | thread-sep ALFANUM )
> thread-sep = VISUAL ; recommended: ",", or ':', or '.'
> EMPTY = "" ; nothing!
> VISUAL = ([a-zA-Z0-9...], excusing '['
>
> (hope I have the this syntax OK --please correct ALbert)
>
> The PROGNAME part is special, as it is frequently used by relays to
> determine the routing of a message. As a note to implementors: it
> can be found by getting the visual part before the first occurrence
> of '[', and after the last '\' of '/' part of that segment.
>
> An example of a TAG is: (without the quotes)
> "/path/to/PROGNAME[123,456]:"
>
> Systems that use both process-ID's and thead-IDs, SHOULD fill both
> the proc-id and the thread-part. For other systems it is
> RECOMMENDED to use the proc-id only.
>
> Receivers SHOULD, to be consistent with the format described in
> RFC3164, accept TAGs that terminate with a single colon, without a
> space following it. Then the colon is both the last character of
> that TAG, and the field separator with the next field (MSG).
> """
>
>
>