Added Layer 2 Types model
[yangtools.git] / model / l2-types / src / main / yang / opendaylight-l2-types.yang
1 module opendaylight-l2-types {
2         namespace "urn:opendaylight:l2:types";
3         prefix "ethertype";
4
5         revision "2013-08-27" {
6                 description "Initial revision";
7         }
8
9         typedef vlan-pcp {
10                 description 
11                         "IEEE 802.1p priority. It indicates the frame priority level. 
12                          Values are from 0 (best effort) to 7 (highest); 
13                          1 represents the lowest priority.";
14                 type uint8 {
15                         //range "0..7";
16                 }
17         }
18
19         typedef vlan-dei {
20                 description 
21                         "Drop Eligible Indicator (DEI): a 1-bit field. (formerly CFI). 
22                          May be used separately or in conjunction with PCP to indicate frames 
23                          eligible to be dropped in the presence of congestion.";
24                 type boolean;
25         }
26
27         typedef vlan-id {
28                 type uint16 {
29                         //range "0..4095";
30                 }
31         }
32
33
34         typedef ether-type {
35                 type uint32;
36         }
37         /*
38         typedef known-ether-type {
39                 type enumeration {      
40                         enum "ipv4" {
41                                 value 2048; // 0x0800
42                                 description "Internet Protocol version 4 (IPv4)";
43                         }
44                         enum "arp" {
45                                 value 2054; // 0x0806
46                                 description "Address Resolution Protocol (ARP)";
47                         }
48                         enum "wake-on-lan" {
49                                 value 2114; // 0x0842
50                                 description "Wake-on-LAN[3]";
51                         }
52                         enum "ietf-trill" {
53                                 value 8947; // 0x22F3
54                                 description "IETF TRILL Protocol";
55                         }
56                         enum "decnet-phase-iv" {
57                                 value 24579; // 0x6003
58                                 description "DECnet Phase IV";
59                         }
60                         enum "reverse-arp" {
61                                 value 32821; // 0x8035
62                                 description "Reverse Address Resolution Protocol";
63                         }
64                         enum "apple-talk" {
65                                 value 32923; // 0x809B
66                                 description "AppleTalk (Ethertalk)";
67                         }
68                         enum "apple-talk-arp" {
69                                 value 33011; // 0x80F3
70                                 description "AppleTalk Address Resolution Protocol (AARP)";
71                         }
72                         enum "vlan-tagged" {
73                                 value 33024; // 0x8100
74                                 description "VLAN-tagged frame (IEEE 802.1Q) & Shortest Path Bridging IEEE 802.1aq[4]";
75                         }
76                         enum "ipx" {
77                                 value 33079; // 0x8137
78                                 description "IPX";
79                         }
80                         enum "ipx2" {
81                                 value 33080; // 0x8138
82                                 description "IPX";
83                         }
84                         enum "qnx-qnet" {
85                                 value 33284; // 0x8204
86                                 description "QNX Qnet";
87                         }
88                         enum "ipv6" {
89                                 value 34525; // 0x86DD
90                                 description "Internet Protocol Version 6 (IPv6)";
91                         }
92                         enum "ethernet-flow-control" {
93                                 value 34824; // 0x8808
94                                 description "Ethernet flow control";
95                         }
96                         enum "slow-protocols" {
97                                 value 34825; // 0x8809
98                                 description "Slow Protocols (IEEE 802.3)";
99                         }
100                         enum "cobra-net" {
101                                 value 34841; // 0x8819
102                                 description "CobraNet";
103                         }
104                         enum "mpls-unicast" {
105                                 value 34887; // 0x8847
106                                 description "MPLS unicast";
107                         }
108                         enum "mpls-multicast" {
109                                 value 34888; // 0x8848
110                                 description "MPLS multicast";
111                         }
112                         enum "PPP-over-ethernet-discovery" {
113                                 value 34915; // 0x8863
114                                 description "PPPoE Discovery Stage";
115                         }
116                         enum "PPP-over-ethernet-session" {
117                                 value 34916; // 0x8864
118                                 description "PPPoE Session Stage";
119                         }
120                         enum "jumbo" {
121                                 value 34928; // 0x8870
122                                 description "Jumbo Frames[2]";
123                         }
124                         enum "homeplug" {
125                                 value 34939; // 0x887B
126                                 description "HomePlug 1.0 MME";
127                         }
128                         enum "eap-over-lan" {
129                                 value 34958; // 0x888E
130                                 description "EAP over LAN (IEEE 802.1X)";
131                         }
132                         enum "profinet" {
133                                 value 34962; // 0x8892
134                                 description "PROFINET Protocol";
135                         }
136                         enum "hyper-scsi" {
137                                 value 34970; // 0x889A
138                                 description "HyperSCSI (SCSI over Ethernet)";
139                         }
140                         enum "ata-over-ethernet" {
141                                 value 34978; // 0x88A2
142                                 description "ATA over Ethernet";
143                         }
144                         enum "ethercat" {
145                                 value 34980; // 0x88A4
146                                 description "EtherCAT Protocol";
147                         }
148                         enum "provider-bridging" {
149                                 value 34984; // 0x88A8
150                                 description "Provider Bridging (IEEE 802.1ad) & Shortest Path Bridging IEEE 802.1aq[5]";
151                         }
152                         enum "ethernet-powerlink" {
153                                 value 34987; // 0x88AB
154                                 description "Ethernet Powerlink[citation needed]";
155                         }
156                         enum "lldp" {
157                                 value 35020; // 0x88CC
158                                 description "Link Layer Discovery Protocol (LLDP)";
159                         }
160                         enum "sercos-3" {
161                                 value 35021; // 0x88CD
162                                 description "SERCOS III";
163                         }
164                         enum "homeplug-av-mme" {
165                                 value 35041; // 0x88E1
166                                 description "HomePlug AV MME[citation needed]";
167                         }
168                         enum "media-redudancy-protocol" {
169                                 value 35043; // 0x88E3
170                                 description "Media Redundancy Protocol (IEC62439-2)";
171                         }
172                         enum "mac-security" {
173                                 value 35045; // 0x88E5
174                                 description "MAC security (IEEE 802.1AE)";
175                         }
176                         enum "precision-time-protocol" {
177                                 value 35063; // 0x88F7
178                                 description "Precision Time Protocol (IEEE 1588)";
179                         }
180                         enum "connectivity-fault-management" {
181                                 value 35074; // 0x8902
182                                 description "IEEE 802.1ag Connectivity Fault Management (CFM) Protocol / ITU-T Recommendation Y.1731 (OAM)";
183                         }
184                         enum "fibre-channel-over-ethernet" {
185                                 value 35078; // 0x8906
186                                 description "Fibre Channel over Ethernet (FCoE)";
187                         }
188                         enum "fibre-channel-over-ethernet-initialization" {
189                                 value 35092; // 0x8914
190                                 description "FCoE Initialization Protocol";
191                         }
192                         enum "rmda-over-converged-ethernet" {
193                                 value 35093; // 0x8915
194                                 description "RDMA over Converged Ethernet (RoCE)";
195                         }
196                         enum "high-availability-seamless-redudancy" {
197                                 value 35119; // 0x892F
198                                 description "High-availability Seamless Redundancy (HSR)";
199                         }
200                         enum "ethernet-configuration-testing-protocol" {
201                                 value 36864; // 0x9000
202                                 description "Ethernet Configuration Testing Protocol[6]";
203                         }
204                         enum "q-in-q" {
205                                 value 37120; // 0x9100
206                                 description "Q-in-Q";
207                         }
208                         enum "veritas-low-latency" {
209                                 value 51966; // 0xCAFE
210                                 description "Veritas Low Latency Transport (LLT)[7] for Veritas Cluster Server";
211                         }
212                 }
213
214         }
215         */
216 }