rfc-5935

Expressing SNMP SMI Datatypes in XML Schema Definition Language

M. Ellison, B. Natale
date2010-08 streamIETF areaops wgopsawg statusPROPOSED STANDARD pages14 canonicalhttps://www.rfc-editor.org/rfc/rfc5935 doi10.17487/RFC5935 errataview
This memo defines the IETF standard expression of Structure of Management Information (SMI) base datatypes in XML Schema Definition (XSD) language. The primary objective of this memo is to enable the production of XML documents that are as faithful to the SMI as possible, using XSD as the validation mechanism. [STANDARDS-TRACK]

Extracted elements (22)

design-rationale §5.4

IPv6 address representation is explicitly out of scope because the SMI relies on Textual Conventions (specifically InetAddress from RFC 4001) to specify IPv6 addresses, not the IpAddress base datatype.

snmp, ip, v6ops

design-rationale §5.2

OctetString is mapped to hexBinary rather than xs:string because xs:string cannot faithfully represent all valid octet values (0–255) in a way that provides easy human readability. The hexBinary canonical form reliably encodes arbitrary binary data.

snmp

design-rationale §4

The BITS pseudo-type is excluded from the base datatype mapping and treated as a Textual Convention because RFC 2578 itself classifies it as a construct rather than a base datatype.

snmp

design-rationale §5.5

The ObjectIdentifier pattern enforces a minimum of two sub-ids and limits the first two arcs to their ASN.1/BER-defined ranges (first arc 0–2; second arc 0–39 for arcs 0 and 1), avoiding a separate minLength restriction since the pattern itself enforces minimum length.

snmp

interoperability-note §5.1

Application developers must account for special semantics of Gauge32, Counter32, Counter64, and TimeTicks (as specified in RFC 2578) when using their values for anything beyond display, storage, or literal transmission; XSD compliance alone does not capture those semantics.

snmp

interoperability-note §1

Values of MIB objects defined with Textual Convention syntax are always encoded in XML as the underlying SMI base datatype, not as the TC type. This means, for example, InetAddress-typed objects use OctetString encoding, not IpAddress.

snmp

interoperability-note §1

Various independent schemes for expressing SMI datatypes in XSD existed prior to this RFC, exhibiting commonality on numeric types but significant differences on non-numeric types. This document establishes the IETF standard mapping to ensure uniform expression and general interoperability.

snmp

normative-requirement §3 MUST

All SMI base datatypes MUST have a corresponding XSD datatype.

snmp, yang, json

normative-requirement §3 MUST

SMIv2 is the normative SMI for this document. Legacy SMIv1 modules MUST be converted (at least logically) in accordance with Section 2.1 of RFC 3584 (the Coexistence RFC) prior to mapping datatypes into XSD.

snmp

normative-requirement §3 SHOULD

The XML output produced as a result of meeting the foregoing requirements SHOULD be the most coherent and succinct representation (avoiding superfluous decoration) from the perspective of readability by humans.

snmp

normative-requirement §3 MUST

The XSD datatype for a given SMI datatype MUST include any restrictions on values associated with the SMI datatype.

snmp

normative-requirement §3 MUST

The XSD datatype MUST be the most logical XSD datatype, with the fewest necessary restrictions on its set of values, consistent with the foregoing requirements.

snmp

protocol-element §4

The eleven SMIv2 ObjectSyntax base datatypes covered by this XSD mapping are: INTEGER, Integer32, Unsigned32, Gauge32, Counter32, TimeTicks, Counter64, OCTET STRING, Opaque, IpAddress, and OBJECT IDENTIFIER. The BITS construct is treated as a Textual Convention, not a base datatype.

snmp

registry §7.1

IANA registered the SMI Base Datatypes XML namespace 'urn:ietf:params:xml:ns:smi:base:1.0' in the IETF XML registry per RFC 3688.

snmp, registry

registry §7.2

IANA registered the SMI Base Datatypes XML schema 'urn:ietf:params:xml:schema:smi:base:1.0' in the IETF XML registry per RFC 3688, pointing to the XSD defined in Section 4 of this document.

snmp, registry

security-consideration §6

If proxies or gateways are developed to convey SNMP management information to XML-based applications via this XSD mapping, special care must be taken to ensure all applicable SNMP security mechanisms are supported appropriately.

snmp, security

security-consideration §6

The XSD/SMI datatype mapping itself does not introduce new security considerations. Security considerations for any given SMI MIB module remain relevant to its XSD/XML mapping.

snmp, security

wire-format §4

INTEGER and Integer32 are mapped to xs:int; Unsigned32, Gauge32, Counter32, and TimeTicks to xs:unsignedInt; Counter64 to xs:unsignedLong. No additional restriction statements beyond the base XSD type are required.

snmp

wire-format §4

IpAddress is mapped to xs:string with a pattern restriction enforcing a dotted-decimal string of four values between 0 and 255 separated by periods, with leading zeros precluded.

snmp, ip

wire-format §4

ObjectIdentifier is mapped to xs:string with a pattern restriction producing a dotted-decimal string of up to 128 sub-ids, each an Unsigned32 integer value. The minimum representation is two sub-ids (e.g., '0.0').

snmp

wire-format §4

OctetString is mapped to xs:hexBinary with a maxLength restriction of 65535 octets. Each octet is encoded as two hexadecimal digits; canonical representation limits hex digits to 0-9 and uppercase A-F.

snmp

wire-format §4

Opaque is mapped to xs:hexBinary with no length restriction. Like OctetString, each octet is encoded as two hexadecimal digits.

snmp