Re : Question re. rfc6929 - examples section 9.1
Hi Alan, I hope you are well. Could you please help me understand the example in section 9.1 (page 46) of rfc6929 the extract of which I have copied/pasted below. 9.1<https://tools.ietf.org/html/rfc6929#section-9.1>. Extended Type (example 1) Attribute encapsulating textual data: 241.1 "bob" -> f1 06 01 62 6f 62 (example 2) Attribute encapsulating a TLV with TLV-Type of one (1): 241.2 { 1 23 45 } -> f1 07 02 01 04 23 45 I understand the example-1 fine - but my question is about example-2. 2/ a) in the sentence what does it mean TLV-Type of one (1) ? b) do the values in {} represent type-length-data ? c) f1 07 02 01 04 23 45 does this represent f1=241 (=type), 07=length 02=extended-type, (as in the 2 in 241.2) 01=tlv-type? 04=length of tlv data ? but 23 and 45 ? not sure Thank you in advance for your help. Kind Regards, Robert.
On Jul 9, 2020, at 7:42 AM, robert.stannard@bt.com wrote:
I understand the example-1 fine - but my question is about example-2.
2/ a) in the sentence what does it mean TLV-Type of one (1) ?
The attribute number is one. See https://tools.ietf.org/html/rfc8044#section-3.13 for a description of TLV-Type
b) do the values in {} represent type-length-data ?
They represent type + data. The length is calculated automatically. The RFC includes C source code for the tool which parses the examples. So that should help explain the format.
c) f1 07 02 01 04 23 45 does this represent f1=241 (=type), 07=length 02=extended-type, (as in the 2 in 241.2) 01=tlv-type? 04=length of tlv data ?
Yes
but 23 and 45 ? not sure
It's just the data, i.e. the value. It doesn't mean anything. Alan DeKok.
Hi Alan, Thank you for your answers to my questions - they helped - also I managed to compile and run the c-program that you mentioned below from the RFC. Thanks and have a good day. Robert.? ________________________________ From: Alan DeKok-2 [via FreeRADIUS] <ml+s1045715n5758144h86@n5.nabble.com> Sent: 09 July 2020 13:42 To: Stannard,R,Robert,TLV3 C Subject: Re: Question re. rfc6929 - examples section 9.1 On Jul 9, 2020, at 7:42 AM, [hidden email]</user/SendEmail.jtp?type=node&node=5758144&i=0> wrote:
I understand the example-1 fine - but my question is about example-2.
2/ a) in the sentence what does it mean TLV-Type of one (1) ?
The attribute number is one. See https://tools.ietf.org/html/rfc8044#section-3.13 for a description of TLV-Type
b) do the values in {} represent type-length-data ?
They represent type + data. The length is calculated automatically. The RFC includes C source code for the tool which parses the examples. So that should help explain the format.
c) f1 07 02 01 04 23 45 does this represent f1=241 (=type), 07=length 02=extended-type, (as in the 2 in 241.2) 01=tlv-type? 04=length of tlv data ?
Yes
but 23 and 45 ? not sure
It's just the data, i.e. the value. It doesn't mean anything. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html ________________________________ If you reply to this email, your message will be added to the discussion below: http://freeradius.1045715.n5.nabble.com/Re-request-for-radius-dictionary-EVS... To unsubscribe from FreeRADIUS, click here<http://freeradius.1045715.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2740692&code=cm9iZXJ0LnN0YW5uYXJkQGJ0LmNvbXwyNzQwNjkyfC02OTA4OTczODY=>. NAML<http://freeradius.1045715.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
Hi Alan, could you please confirm my understanding from below, 241.2 { 1 23 45 } -> f1 07 02 01 04 23 45 ? would the dictionary entry for this example be, 241.2 some-dictionary-entry tlv 241.2.1 some-sub-entry integer (for example representing data 23 and 45) this is an example of a tlv-data type encapsulated within an Extended-Type (241) but you could also define a tlv-type as in dictionary rfc6930 - which uses a type from the standard attributes list 173 IPv6-6rd-Configuration tlv 173.1 IPv6-6rd-IPv4MaskLen integer 173.2 IPv6-6rd-Prefix ipv6prefix 173.3 IPv6-6rd-BR-IPv4-Address ipaddr Kind Regards, Robert. ________________________________ From: Alan DeKok-2 [via FreeRADIUS] <ml+s1045715n5758144h86@n5.nabble.com> Sent: 09 July 2020 13:42 To: Stannard,R,Robert,TLV3 C Subject: Re: Question re. rfc6929 - examples section 9.1 On Jul 9, 2020, at 7:42 AM, [hidden email]</user/SendEmail.jtp?type=node&node=5758144&i=0> wrote:
I understand the example-1 fine - but my question is about example-2.
2/ a) in the sentence what does it mean TLV-Type of one (1) ?
The attribute number is one. See https://tools.ietf.org/html/rfc8044#section-3.13 for a description of TLV-Type
b) do the values in {} represent type-length-data ?
They represent type + data. The length is calculated automatically. The RFC includes C source code for the tool which parses the examples. So that should help explain the format.
c) f1 07 02 01 04 23 45 does this represent f1=241 (=type), 07=length 02=extended-type, (as in the 2 in 241.2) 01=tlv-type? 04=length of tlv data ?
Yes
but 23 and 45 ? not sure
It's just the data, i.e. the value. It doesn't mean anything. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html ________________________________ If you reply to this email, your message will be added to the discussion below: http://freeradius.1045715.n5.nabble.com/Re-request-for-radius-dictionary-EVS... To unsubscribe from FreeRADIUS, click here<http://freeradius.1045715.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2740692&code=cm9iZXJ0LnN0YW5uYXJkQGJ0LmNvbXwyNzQwNjkyfC02OTA4OTczODY=>. NAML<http://freeradius.1045715.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
On Jul 10, 2020, at 7:36 AM, <robert.stannard@bt.com> <robert.stannard@bt.com> wrote:
could you please confirm my understanding from below,
241.2 { 1 23 45 } -> f1 07 02 01 04 23 45
?
would the dictionary entry for this example be,
241.2 some-dictionary-entry tlv
241.2.1 some-sub-entry integer (for example representing data 23 and 45)
Well, a 16-bit value, likely octets. RFC 6929 forbids 16-bit integers in RADIUS.
this is an example of a tlv-data type encapsulated within an Extended-Type (241)
241.2 has data type "tlv". 241.2.1 has data type "octets" The "tlv-data" is not a data type. It's just a way to refer *generically* to the contents of a TLV. Which could be in reality almost any data type. We use "tlv-data" as a place-holder name. Previous RFCs referred to it as "Data" or "Value". But "Data" and "Value" were used many times in many different contexts, to mean different things. So in order to distinguish between them, we switched to using qualified names. e.g. "TLV-Data" is data which is inside of a TLV. That's pretty unambiguous.
but you could also define a tlv-type as in dictionary rfc6930 - which uses a type from the standard attributes list
173 IPv6-6rd-Configuration tlv 173.1 IPv6-6rd-IPv4MaskLen integer 173.2 IPv6-6rd-Prefix ipv6prefix 173.3 IPv6-6rd-BR-IPv4-Address ipaddr
The dictionaries use the data types defined in RFC 8044 (mostly). *No* dictionary will ever use "TLV-Type" to define an attribute. Alan DeKok.
participants (2)
-
Alan DeKok -
robert.stannard@bt.com