From 70b26f6b6373f4f076fba5b9fdd660313444affb Mon Sep 17 00:00:00 2001 From: Tony Tkacik Date: Thu, 29 Aug 2013 13:45:18 -0700 Subject: [PATCH] Added Layer 2 Types model Change-Id: Ib250b44bea812a1d1b7900a2cf2567adeecd917b Signed-off-by: Tony Tkacik --- model/l2-types/pom.xml | 14 ++ .../src/main/yang/opendaylight-l2-types.yang | 216 ++++++++++++++++++ model/pom.xml | 1 + 3 files changed, 231 insertions(+) create mode 100644 model/l2-types/pom.xml create mode 100644 model/l2-types/src/main/yang/opendaylight-l2-types.yang diff --git a/model/l2-types/pom.xml b/model/l2-types/pom.xml new file mode 100644 index 0000000000..9eaf12fda0 --- /dev/null +++ b/model/l2-types/pom.xml @@ -0,0 +1,14 @@ + + + + model-parent + org.opendaylight.yangtools.model + 0.5.7-SNAPSHOT + + + 4.0.0 + opendaylight-l2-types + 2013.08.27-SNAPSHOT + bundle + \ No newline at end of file diff --git a/model/l2-types/src/main/yang/opendaylight-l2-types.yang b/model/l2-types/src/main/yang/opendaylight-l2-types.yang new file mode 100644 index 0000000000..2efd6355a0 --- /dev/null +++ b/model/l2-types/src/main/yang/opendaylight-l2-types.yang @@ -0,0 +1,216 @@ +module opendaylight-l2-types { + namespace "urn:opendaylight:l2:types"; + prefix "ethertype"; + + revision "2013-08-27" { + description "Initial revision"; + } + + typedef vlan-pcp { + description + "IEEE 802.1p priority. It indicates the frame priority level. + Values are from 0 (best effort) to 7 (highest); + 1 represents the lowest priority."; + type uint8 { + //range "0..7"; + } + } + + typedef vlan-dei { + description + "Drop Eligible Indicator (DEI): a 1-bit field. (formerly CFI). + May be used separately or in conjunction with PCP to indicate frames + eligible to be dropped in the presence of congestion."; + type boolean; + } + + typedef vlan-id { + type uint16 { + //range "0..4095"; + } + } + + + typedef ether-type { + type uint32; + } + /* + typedef known-ether-type { + type enumeration { + enum "ipv4" { + value 2048; // 0x0800 + description "Internet Protocol version 4 (IPv4)"; + } + enum "arp" { + value 2054; // 0x0806 + description "Address Resolution Protocol (ARP)"; + } + enum "wake-on-lan" { + value 2114; // 0x0842 + description "Wake-on-LAN[3]"; + } + enum "ietf-trill" { + value 8947; // 0x22F3 + description "IETF TRILL Protocol"; + } + enum "decnet-phase-iv" { + value 24579; // 0x6003 + description "DECnet Phase IV"; + } + enum "reverse-arp" { + value 32821; // 0x8035 + description "Reverse Address Resolution Protocol"; + } + enum "apple-talk" { + value 32923; // 0x809B + description "AppleTalk (Ethertalk)"; + } + enum "apple-talk-arp" { + value 33011; // 0x80F3 + description "AppleTalk Address Resolution Protocol (AARP)"; + } + enum "vlan-tagged" { + value 33024; // 0x8100 + description "VLAN-tagged frame (IEEE 802.1Q) & Shortest Path Bridging IEEE 802.1aq[4]"; + } + enum "ipx" { + value 33079; // 0x8137 + description "IPX"; + } + enum "ipx2" { + value 33080; // 0x8138 + description "IPX"; + } + enum "qnx-qnet" { + value 33284; // 0x8204 + description "QNX Qnet"; + } + enum "ipv6" { + value 34525; // 0x86DD + description "Internet Protocol Version 6 (IPv6)"; + } + enum "ethernet-flow-control" { + value 34824; // 0x8808 + description "Ethernet flow control"; + } + enum "slow-protocols" { + value 34825; // 0x8809 + description "Slow Protocols (IEEE 802.3)"; + } + enum "cobra-net" { + value 34841; // 0x8819 + description "CobraNet"; + } + enum "mpls-unicast" { + value 34887; // 0x8847 + description "MPLS unicast"; + } + enum "mpls-multicast" { + value 34888; // 0x8848 + description "MPLS multicast"; + } + enum "PPP-over-ethernet-discovery" { + value 34915; // 0x8863 + description "PPPoE Discovery Stage"; + } + enum "PPP-over-ethernet-session" { + value 34916; // 0x8864 + description "PPPoE Session Stage"; + } + enum "jumbo" { + value 34928; // 0x8870 + description "Jumbo Frames[2]"; + } + enum "homeplug" { + value 34939; // 0x887B + description "HomePlug 1.0 MME"; + } + enum "eap-over-lan" { + value 34958; // 0x888E + description "EAP over LAN (IEEE 802.1X)"; + } + enum "profinet" { + value 34962; // 0x8892 + description "PROFINET Protocol"; + } + enum "hyper-scsi" { + value 34970; // 0x889A + description "HyperSCSI (SCSI over Ethernet)"; + } + enum "ata-over-ethernet" { + value 34978; // 0x88A2 + description "ATA over Ethernet"; + } + enum "ethercat" { + value 34980; // 0x88A4 + description "EtherCAT Protocol"; + } + enum "provider-bridging" { + value 34984; // 0x88A8 + description "Provider Bridging (IEEE 802.1ad) & Shortest Path Bridging IEEE 802.1aq[5]"; + } + enum "ethernet-powerlink" { + value 34987; // 0x88AB + description "Ethernet Powerlink[citation needed]"; + } + enum "lldp" { + value 35020; // 0x88CC + description "Link Layer Discovery Protocol (LLDP)"; + } + enum "sercos-3" { + value 35021; // 0x88CD + description "SERCOS III"; + } + enum "homeplug-av-mme" { + value 35041; // 0x88E1 + description "HomePlug AV MME[citation needed]"; + } + enum "media-redudancy-protocol" { + value 35043; // 0x88E3 + description "Media Redundancy Protocol (IEC62439-2)"; + } + enum "mac-security" { + value 35045; // 0x88E5 + description "MAC security (IEEE 802.1AE)"; + } + enum "precision-time-protocol" { + value 35063; // 0x88F7 + description "Precision Time Protocol (IEEE 1588)"; + } + enum "connectivity-fault-management" { + value 35074; // 0x8902 + description "IEEE 802.1ag Connectivity Fault Management (CFM) Protocol / ITU-T Recommendation Y.1731 (OAM)"; + } + enum "fibre-channel-over-ethernet" { + value 35078; // 0x8906 + description "Fibre Channel over Ethernet (FCoE)"; + } + enum "fibre-channel-over-ethernet-initialization" { + value 35092; // 0x8914 + description "FCoE Initialization Protocol"; + } + enum "rmda-over-converged-ethernet" { + value 35093; // 0x8915 + description "RDMA over Converged Ethernet (RoCE)"; + } + enum "high-availability-seamless-redudancy" { + value 35119; // 0x892F + description "High-availability Seamless Redundancy (HSR)"; + } + enum "ethernet-configuration-testing-protocol" { + value 36864; // 0x9000 + description "Ethernet Configuration Testing Protocol[6]"; + } + enum "q-in-q" { + value 37120; // 0x9100 + description "Q-in-Q"; + } + enum "veritas-low-latency" { + value 51966; // 0xCAFE + description "Veritas Low Latency Transport (LLT)[7] for Veritas Cluster Server"; + } + } + + } + */ +} \ No newline at end of file diff --git a/model/pom.xml b/model/pom.xml index 5a82068297..aa88d70575 100644 --- a/model/pom.xml +++ b/model/pom.xml @@ -25,6 +25,7 @@ iana ietf + l2-types -- 2.36.6