Subject: [ipfix-protocol] Encoding of IPFIX Data Types

From: Lutz Mark <[email-masked]>
Date: Tue, 03 May 2005 11:54:50 +0200

> 6.1.5   string and octetarray
 >
 >   The data type string represents a finite length string of valid
 >   characters of the Unicode character encoding set.  It is expected
 >   that strings will be encoded in UTF-8 format. The string is sent as
 >   an array of octets.  The length of the string and the octetArray is
 >   encoded as described in Section 7 (Variable Length Information
 >   Element).  The length is followed by that many octets as encoded in
 >   the length.

The section implies that you have to use variable length IEs to
export strings and octetarrays (or does the text mean that you
have to send the length twice? It's not clear to me).
I suggest to change the text to allow the export of strings and 
octetarrays in an IE of fixed length.

For example:

    The data type string represents a finite length string of valid
    characters of the Unicode character encoding set. It is expected
    that strings will be encoded in UTF-8 format. The string is sent as
    an array of octets. The length of the information element
    specifies the length of the octedarray.

Regards,
Lutz

--
Help        mailto:[email-masked] and say "help" in message body
Unsubscribe mailto:[email-masked] and say
"unsubscribe ipfix" in message body
Archive     http://ipfix.doit.wisc.edu/archive/

---

From: Stewart Bryant <[email-masked]>
Date: Tue, 03 May 2005 13:22:22 +0100

> have to send the length twice? It's not clear to me).

There are three possible ways to send a string:

1) Fixed length
2) Short variable length
3) Long variable length.

In case 1, you put the length in the template and the string
is always that length, and if your string is shorter you have
to pad.

In case 2 and 3 you use a special length value in the template
which says that the length is encoded at the start of the string.

>    specifies the length of the octedarray.

This is only true for fixed length strings.

Regards

Stewart

---

From: Lutz Mark <[email-masked]>
Date: Wed, 04 May 2005 14:02:18 +0200

Hi Steward,

> which says that the length is encoded at the start of the string.

thank you for the clarification.
I suggest to change section 6.1.5.

What about:
    The data type string represents a finite length string of valid
    characters of the Unicode character encoding set. It is expected
    that strings will be encoded in UTF-8 format. The string is sent as
    an array of octets using an information element of fixed or variable
    length. The length of the information element specifies the length
    of the octetarray.

Best regards,
Lutz

---

From: Juergen Quittek <[email-masked]>
Date: Sun, 08 May 2005 00:52:15 +0200

>     length. The length of the information element specifies the length

I support Lutz' proposal.

    Juergen
-- 
Juergen Quittek        [email-masked]       Tel: +49 6221 90511-15
NEC Europe Ltd.,       Network Laboratories        Fax: +49 6221 90511-55
Kurfuersten-Anlage 36, 69115 Heidelberg, Germany   http://www.netlab.nec.de

---

From: Benoit Claise <[email-masked]>
Date: Thu, 12 May 2005 12:09:46 +0200

Lutz,

Draft changed.
I would like to add the last sentence, in order to specify that we must 
pad with NUL character.

What about:
   The data type string represents a finite length string of valid
   characters of the Unicode character encoding set. It is expected
   that strings will be encoded in UTF-8 format. The string is sent as
   an array of octets using an information element of fixed or variable
   length. The length of the information element specifies the length
   of the octetarray. In case of fixed length Information Element, 
   if padding is required, padding MUST be composed of NUL character(s).

Regards, Benoit.