Struct tracing_rfc_5424::rfc3164::Tag
source · pub struct Tag(_);
Expand description
A Vec<u8>
instance with the additional constraint that it be ASCII alphanumeric characters
Per the RFC: “The value in the TAG field will be the name of the program or process that generated the message. The TAG is a string of ABNF alphanumeric characters that MUST NOT exceed 32 characters. Any non-alphanumeric character will terminate the TAG field and will be assumed to be the starting character of the CONTENT field.”
An RFC 3164 message field is described, oddly, as having two parts: the “tag” & the “content”. The tag is clearly meant to be a process name, but really only needs to signify the source of the message on the source host. The odd part is, the Process ID is considered to be a part of the content, not the tag: “The process name is commonly displayed in the TAG field. Quite often, additional information is included at the beginning of the CONTENT field. The format of “TAG[pid]:” - without the quote marks - is common. The left square bracket is used to terminate the TAG field in this case and is then the first character in the CONTENT field.
Therefore Tag
simply represents an ASCII alphanumeric string that is less than or equal to
32 characters in length.