メインコンテンツまでスキップ

2. 概要

表 1 と表 2 は, ietf-yang-types および ietf-inet-types YANG モジュールで定義される型を一覧にしたものである. 各型について, 型名, 導出元の基本型, およびその型を導入した RFC を示す.

型名および基本型名は YANG 定義の識別子であるため原文のまま保持する.

型の一覧(原文識別子を保持)​

2.  Overview

   Tables 1 and 2 list the types defined in the YANG modules "ietf-yang-
   types" and "ietf-inet-types".  For each type, the name of the type,
   the base type it was derived from, and the RFC introducing the type
   is listed.

       +=======================+===================+===============+
       | Type                  | Base Type         | Introduced in |
       +=======================+===================+===============+
       | counter32             | uint32            | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | zero-based-counter32  | uint32            | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | counter64             | uint64            | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | zero-based-counter64  | uint64            | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | gauge32               | uint32            | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | gauge64               | uint64            | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | object-identifier     | string            | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | object-identifier-128 | object-identifier | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | date-and-time         | string            | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | date                  | string            | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | date-no-zone          | string            | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | time                  | string            | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | time-no-zone          | string            | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | hours32               | int32             | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | minutes32             | int32             | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | seconds32             | int32             | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | centiseconds32        | int32             | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | milliseconds32        | int32             | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | microseconds32        | int32             | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | microseconds64        | int64             | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | nanoseconds32         | int32             | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | nanoseconds64         | int64             | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | timeticks             | int32             | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | timestamp             | timeticks         | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | phys-address          | string            | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | mac-address           | string            | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | xpath1.0              | string            | RFC 6021      |
       +-----------------------+-------------------+---------------+
       | hex-string            | string            | RFC 6991      |
       +-----------------------+-------------------+---------------+
       | uuid                  | string            | RFC 6991      |
       +-----------------------+-------------------+---------------+
       | dotted-quad           | string            | RFC 6991      |
       +-----------------------+-------------------+---------------+
       | language-tag          | string            | RFC 9911      |
       +-----------------------+-------------------+---------------+
       | yang-identifier       | string            | RFC 6991      |
       +-----------------------+-------------------+---------------+

           表 1: "ietf-yang-types" モジュールで定義される型

     +=============================+=================+===============+
     | Type                        | Base Type       | Introduced in |
     +=============================+=================+===============+
     | ip-version                  | enum            | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | dscp                        | uint8           | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | ipv6-flow-label             | uint32          | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | port-number                 | uint16          | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | protocol-number             | uint8           | RFC 9911      |
     +-----------------------------+-----------------+---------------+
     | upper-layer-protocol-number | protocol-number | RFC 9911      |
     +-----------------------------+-----------------+---------------+
     | as-number                   | uint32          | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | ip-address                  | union           | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | ipv4-address                | string          | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | ipv6-address                | string          | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | ip-address-no-zone          | union           | RFC 6991      |
     +-----------------------------+-----------------+---------------+
     | ipv4-address-no-zone        | ipv4-address    | RFC 6991      |
     +-----------------------------+-----------------+---------------+
     | ipv6-address-no-zone        | ipv6-address    | RFC 6991      |
     +-----------------------------+-----------------+---------------+
     | ip-address-link-local       | union           | RFC 9911      |
     +-----------------------------+-----------------+---------------+
     | ipv4-address-link-local     | ipv4-address    | RFC 9911      |
     +-----------------------------+-----------------+---------------+
     | ipv6-address-link-local     | ipv6-address    | RFC 9911      |
     +-----------------------------+-----------------+---------------+
     | ip-prefix                   | union           | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | ipv4-prefix                 | string          | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | ipv6-prefix                 | string          | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | ip-address-and-prefix       | union           | RFC 9911      |
     +-----------------------------+-----------------+---------------+
     | ipv4-address-and-prefix     | string          | RFC 9911      |
     +-----------------------------+-----------------+---------------+
     | ipv6-address-and-prefix     | string          | RFC 9911      |
     +-----------------------------+-----------------+---------------+
     | domain-name                 | string          | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | host-name                   | domain-name     | RFC 9911      |
     +-----------------------------+-----------------+---------------+
     | host                        | union           | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | uri                         | string          | RFC 6021      |
     +-----------------------------+-----------------+---------------+
     | email-address               | string          | RFC 9911      |
     +-----------------------------+-----------------+---------------+

           表 2: "ietf-inet-types" モジュールで定義される型

一部の型には, Structure of Management Information Version 2 (SMIv2) [RFC2578] [RFC2579] の等価なデータ型がある. 二つのデータ型が同じ値集合を持ち, 値の意味が等価である場合, YANG データ型は SMIv2 データ型と等価である.

表 3 は "ietf-yang-types" YANG モジュールで定義される型と対応する SMIv2 型を示す. 表 4 は "ietf-inet-types" モジュールの型と対応する SMIv2 型を示す.

        +=======================+================================+
        | YANG type             | Equivalent SMIv2 type (module) |
        +=======================+================================+
        | counter32             | Counter32 (SNMPv2-SMI)         |
        +-----------------------+--------------------------------+
        | zero-based-counter32  | ZeroBasedCounter32 (RMON2-MIB) |
        +-----------------------+--------------------------------+
        | counter64             | Counter64 (SNMPv2-SMI)         |
        +-----------------------+--------------------------------+
        | zero-based-counter64  | ZeroBasedCounter64 (HCNUM-TC)  |
        +-----------------------+--------------------------------+
        | gauge32               | Gauge32 (SNMPv2-SMI)           |
        +-----------------------+--------------------------------+
        | gauge64               | CounterBasedGauge64 (HCNUM-TC) |
        +-----------------------+--------------------------------+
        | object-identifier-128 | OBJECT IDENTIFIER              |
        +-----------------------+--------------------------------+
        | centiseconds32        | TimeInterval (SNMPv2-TC)       |
        +-----------------------+--------------------------------+
        | timeticks             | TimeTicks (SNMPv2-SMI)         |
        +-----------------------+--------------------------------+
        | timestamp             | TimeStamp (SNMPv2-TC)          |
        +-----------------------+--------------------------------+
        | phys-address          | PhysAddress (SNMPv2-TC)        |
        +-----------------------+--------------------------------+
        | mac-address           | MacAddress (SNMPv2-TC)         |
        +-----------------------+--------------------------------+
        | language-tag          | LangTag (LANGTAG-TC-MIB)       |
        +-----------------------+--------------------------------+

           表 3: "ietf-yang-types" モジュールに対応する SMIv2 型

    +=================+===============================================+
    | YANG type       | Equivalent SMIv2 type (module)                |
    +=================+===============================================+
    | ip-version      | InetVersion (INET-ADDRESS-MIB)                |
    +-----------------+-----------------------------------------------+
    | dscp            | Dscp (DIFFSERV-DSCP-TC)                       |
    +-----------------+-----------------------------------------------+
    | ipv6-flow-label | IPv6FlowLabel (IPV6-FLOW-LABEL-MIB)           |
    +-----------------+-----------------------------------------------+
    | port-number     | InetPortNumber (INET-ADDRESS-MIB)             |
    +-----------------+-----------------------------------------------+
    | as-number       | InetAutonomousSystemNumber (INET-ADDRESS-MIB) |
    +-----------------+-----------------------------------------------+
    | uri             | Uri (URI-TC-MIB)                              |
    +-----------------+-----------------------------------------------+

      表 4: "ietf-inet-types" モジュールに対応する SMIv2 型