Network Operations and Control Wiki
Advertisement

Background: Know: Type-Length-Value (TLV) formatting, OCTET STRING, Object identifiers (OIDs)

Recognize: Prerequisites - programming: 2s-complement, NULL termination of strings


Up
Previous Next
Down

BER Length and Value[]

Length Fields[]

The length component of the data element indicates the length of the content component:


  • Short form - the length is given in one octet representing a range of numbers, because the first bit should be 0, so the value of the length is from 0 to 127
  • Long form - the length is given in 2 to 127 octets, the value of the length is from 128 through 21016-1. In practice, numbers are in the lower end of the range. A 1 or 0 in bit 8 of each octet has the same meaning as in the identifier field.
  • Indefinite form - the content of a structured data element (the only kind allowed with this form) has a specific end- of-content data element, given by two consecutive octets of all zeros. The length field contains one octet, 10000000, which signals that the end-of-content octets are present.
  • ===​Values Fields===

  • INTEGER: values are encoded in 2s-complement form These give a concrete representation of the value or the value of the underlying type, if the type is derived by implicit tagging.
  • OCTET STRINGS:
  • For simple string types and types derived from them by implicit tagging, the concatenation of the BER encodings of consecutive substrings of the value.
  • For structured types and types derived from them by implicit tagging, the concatenation of the BER encodings of components of the value

    Reference

    http://www.csc.villanova.edu/~cassel/netbook/ber/node4.html http://subjects.ee.unsw.edu.au/tele9752/kaliski93.txt

  • Advertisement