summaryrefslogtreecommitdiffstats
path: root/src/share/yang/modules/ietf-dhcpv6-types@2018-09-04.yang
blob: 52feb28d9e25c89b01680dac1bdce58fd154e435 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
module ietf-dhcpv6-types {
  yang-version 1.1;
  namespace "urn:ietf:params:xml:ns:yang:ietf-dhcpv6-types";
  prefix "dhcpv6-types";

  import ietf-inet-types {
    prefix inet;
  }
  import ietf-yang-types {
    prefix yang;
  }

  organization "DHC WG";
  contact
   "cuiyong@tsinghua.edu.cn
    lh.sunlinh@gmail.com
    ian.farrer@telekom.de
    sladjana.zechlin@telekom.de
    hezihao9512@gmail.com";

  description "This model defines a YANG data model that can be
    used to define some commonly used DHCPv6 types";

  revision 2018-09-04 {
    description "";
    reference "I-D: draft-ietf-dhc-dhcpv6-yang";
  }

  revision 2018-01-30 {
    description "Initial revision";
    reference "I-D: draft-ietf-dhc-dhcpv6-yang";
  }

  /*
  * Grouping
  */
  grouping vendor-infor {
    description "Vendor information.";
    container vendor-info {
      description "";
      leaf ent-num {
        type uint32;
        mandatory true;
        description "enterprise number";
      }
      leaf-list data {
        type string;
        description "specific vendor info";
      }
    }
  }

  grouping duid {
    description
      "Each server and client has only one DUID (DHCP Unique Identifier).
      The DUID here identifies a unique DHCPv6 server for clients. DUID
      consists of a two-octet type field and an arbitrary length (no more
      than 128 bytes) content field. Currently there are four defined types
      of DUIDs in RFC3315 and RFC6355 - DUID-LLT, DUID-EN, DUID-LL and
      DUID-UUID. DUID-Unknown represents those unconventional DUIDs.";
    reference "RFC3315: Section 9 and RFC6355: Section 4";
    leaf type-code {
      type uint16;
      default 65535;
      description "Type code of this DUID";
    }
    choice duid-type {
    default duid-unknown;
      description "Selects the format for the DUID.";
      case duid-llt {
        description "DUID Based on Link-layer Address Plus Time
          (Type 1 - DUID-LLT)";
        reference "RFC3315 Section 9.2";
        leaf duid-llt-hardware-type {
          type uint16;
          description "Hardware type as assigned by IANA (RFC826).";
        }
        leaf duid-llt-time {
          type yang:timeticks;
          description "The time value is the time that the DUID is
          generated represented in seconds since midnight (UTC),
          January 1, 2000, modulo 2^32.";
        }
        leaf duid-llt-link-layer-addr {
          type yang:mac-address;
          description "Link-layer address as described in RFC2464";
        }
      }
      case duid-en {
        description "DUID Assigned by Vendor Based on Enterprise Number
          (Type 2 - DUID-EN)";
        reference "RFC3315 Section 9.3";
        leaf duid-en-enterprise-number {
          type uint32;
          description "Vendor's registered Private Enterprise Number as
            maintained by IANA";
        }
        leaf duid-en-identifier {
          type string;
          description "Indentifier, unique to the device that is
          using it";
        }
      }
      case duid-ll {
          description "DUID Based on Link-layer Address (Type 3 - DUID-LL)";
          reference "RFC3315 Section 9.4";
          leaf duid-ll-hardware-type {
            type uint16;
            description "Hardware type as assigned by IANA (RFC826).";
          }
          leaf duid-ll-link-layer-addr {
            type yang:mac-address;
            description "Link-layer address as described in RFC2464";
        }
      }
      case duid-uuid {
        description "DUID Based on Universally Unique Identifier
          (Type 4 - DUID-UUID)";
        reference "RFC6335 Defination of the UUID-Based Unique Identifier";
        leaf uuid {
          type yang:uuid;
          description "A Universally Unique IDentifier in the string
            representation defined in RFC 4122. The canonical
            representation uses lowercase characters";
        }
      }
      case duid-unknown {
        description "DUID based on free raw bytes";
        leaf data {
          type binary;
          description "The bits to be used as the identifier";
        }
      }
    }
  }

  grouping portset-para {
    description "portset parameters";
    container port-parameter {
      description "port parameter";
      leaf offset {
        type uint8;
        mandatory true;
        description "offset in a port set";
      }
      leaf psid-len {
        type uint8;
        mandatory true;
        description "length of a psid";
      }
      leaf psid {
        type uint16;
        mandatory true;
        description "psid value";
      }
    }
  }

  grouping iaid {
    description "IA is a construct through which a server and a
        client can identify, group, and manage a set of related IPv6
        addresses. The key of the list is a 4-byte number IAID defined
        in [RFC3315].";
    list identity-association {
      config "false";
      description "IA";
      leaf iaid {
        type uint32;
        mandatory true;
        description "IAID";
      }
      leaf ia-type {
        type string;
        mandatory true;
        description "IA type";
      }
      leaf-list ipv6-addr {
        type inet:ipv6-address;
        description "ipv6 address";
      }
      leaf-list ipv6-prefix {
        type inet:ipv6-prefix;
        description "ipv6 prefix";
      }
      leaf-list prefix-length {
        type uint8;
        description "ipv6 prefix length";
      }
      leaf t1-time {
        type yang:timeticks;
        mandatory true;
        description "t1 time";
      }
      leaf t2-time {
        type yang:timeticks;
        mandatory true;
        description "t2 time";
      }
      leaf preferred-lifetime {
        type yang:timeticks;
        mandatory true;
        description "preferred lifetime";
      }
      leaf valid-lifetime {
        type yang:timeticks;
        mandatory true;
        description "valid lifetime";
      }
    }
  }
}