module ietf-ethertypes {
  namespace "urn:ietf:params:xml:ns:yang:ietf-ethertypes";
  prefix ethertypes;

  organization
    "IETF NETMOD (Network Modeling) Working Group.";

  contact
    "WG Web:   <https://datatracker.ietf.org/wg/netmod/>
     WG List:  <mailto:netmod@ietf.org>

     Editor:   Mahesh Jethanandani
               <mjethanandani@gmail.com>";

  description
    "This module contains common definitions for the
     Ethertype used by different modules.  It is a
     placeholder module, till such time that IEEE
     starts a project to define these Ethertypes
     and publishes a standard.

     At that time, this module can be deprecated.

     Copyright (c) 2019 IETF Trust and the persons identified as
     the document authors.  All rights reserved.

     Redistribution and use in source and binary forms, with or
     without modification, is permitted pursuant to, and subject
     to the license terms contained in, the Simplified BSD
     License set forth in Section 4.c of the IETF Trust's Legal
     Provisions Relating to IETF Documents
     (http://trustee.ietf.org/license-info).

     This version of this YANG module is part of RFC 8519; see
     the RFC itself for full legal notices.";

  revision 2019-03-04 {
    description
      "Initial revision.";
    reference
      "RFC 8519: YANG Data Model for Network Access Control
                 Lists (ACLs).";
  }

  typedef ethertype {
    type union {
      type uint16;
      type enumeration {
        enum ipv4 {
          value 2048;
          description
            "Internet Protocol version 4 (IPv4) with a
             hex value of 0x0800.";
          reference
            "RFC 791: Internet Protocol.";
        }
        enum arp {
          value 2054;
          description
            "Address Resolution Protocol (ARP) with a
             hex value of 0x0806.";
          reference
            "RFC 826: An Ethernet Address Resolution Protocol: Or
                      Converting Network Protocol Addresses to 48.bit
                      Ethernet Address for Transmission on Ethernet
                      Hardware.";
        }
        enum wlan {
          value 2114;
          description
            "Wake-on-LAN.  Hex value of 0x0842.";
        }
        enum trill {
          value 8947;
          description
            "Transparent Interconnection of Lots of Links.
             Hex value of 0x22F3.";
          reference
            "RFC 6325: Routing Bridges (RBridges): Base Protocol
                       Specification.";
        }
        enum srp {
          value 8938;
          description
            "Stream Reservation Protocol.  Hex value of
             0x22EA.";
          reference
            "IEEE 801.1Q-2011.";
        }
        enum decnet {
          value 24579;
          description
            "DECnet Phase IV.  Hex value of 0x6003.";
        }
        enum rarp {
          value 32821;
          description
            "Reverse Address Resolution Protocol.
             Hex value 0x8035.";
          reference
            "RFC 903: A Reverse Address Resolution Protocol.";
        }
        enum appletalk {
          value 32923;
          description
            "Appletalk (Ethertalk).  Hex value of 0x809B.";
        }
        enum aarp {
          value 33011;
          description
            "Appletalk Address Resolution Protocol.  Hex value
             of 0x80F3.";
        }
        enum vlan {
          value 33024;
          description
            "VLAN-tagged frame (IEEE 802.1Q) and Shortest Path
             Bridging IEEE 802.1aq with Network-Network
             Interface (NNI) compatibility.  Hex value of
             0x8100.";
          reference
            "IEEE 802.1Q.";
        }
        enum ipx {
          value 33079;
          description
            "Internetwork Packet Exchange (IPX).  Hex value
             of 0x8137.";
        }
        enum qnx {
          value 33284;
          description
            "QNX Qnet.  Hex value of 0x8204.";
        }
        enum ipv6 {
          value 34525;
          description
            "Internet Protocol Version 6 (IPv6).  Hex value
             of 0x86DD.";
          reference
            "RFC 8200: Internet Protocol, Version 6 (IPv6)
                       Specification
             RFC 8201: Path MTU Discovery for IP version 6.";
        }
        enum efc {
          value 34824;
          description
            "Ethernet flow control using pause frames.
             Hex value of 0x8808.";
          reference
            "IEEE 802.1Qbb.";
        }
        enum esp {
          value 34825;
          description
            "Ethernet Slow Protocol.  Hex value of 0x8809.";
          reference
            "IEEE 802.3-2015.";
        }
        enum cobranet {
          value 34841;
          description
            "CobraNet.  Hex value of 0x8819.";
        }
        enum mpls-unicast {
          value 34887;
          description
            "Multiprotocol Label Switching (MPLS) unicast traffic.
             Hex value of 0x8847.";
          reference
            "RFC 3031: Multiprotocol Label Switching Architecture.";
        }
        enum mpls-multicast {
          value 34888;
          description
            "MPLS multicast traffic.  Hex value of 0x8848.";
          reference
            "RFC 3031: Multiprotocol Label Switching Architecture.";
        }
        enum pppoe-discovery {
          value 34915;
          description
            "Point-to-Point Protocol over Ethernet.  Used during
             the discovery process.  Hex value of 0x8863.";
          reference
            "RFC 2516: A Method for Transmitting PPP Over Ethernet
                       (PPPoE).";
        }
        enum pppoe-session {
          value 34916;
          description
            "Point-to-Point Protocol over Ethernet.  Used during
             session stage.  Hex value of 0x8864.";
          reference
            "RFC 2516: A Method for Transmitting PPP Over Ethernet
                       (PPPoE).";
        }
        enum intel-ans {
          value 34925;
          description
            "Intel Advanced Networking Services.  Hex value of
             0x886D.";
        }
        enum jumbo-frames {
          value 34928;
          description
            "Jumbo frames or Ethernet frames with more than
             1500 bytes of payload, up to 9000 bytes.";
        }
        enum homeplug {
          value 34939;
          description
            "Family name for the various power line
             communications.  Hex value of 0x887B.";
        }
        enum eap {
          value 34958;
          description
            "Ethernet Access Protocol (EAP) over LAN.  Hex value
             of 0x888E.";
          reference
            "IEEE 802.1X.";
        }
        enum profinet {
          value 34962;
          description
            "PROcess FIeld Net (PROFINET).  Hex value of 0x8892.";
        }
        enum hyperscsi {
          value 34970;
          description
            "Small Computer System Interface (SCSI) over Ethernet.
             Hex value of 0x889A.";
        }
        enum aoe {
          value 34978;
          description
            "Advanced Technology Advancement (ATA) over Ethernet.
             Hex value of 0x88A2.";
        }
        enum ethercat {
          value 34980;
          description
            "Ethernet for Control Automation Technology (EtherCAT).
             Hex value of 0x88A4.";
        }
        enum provider-bridging {
          value 34984;
          description
            "Provider Bridging (802.1ad) and Shortest Path Bridging
             (801.1aq).  Hex value of 0x88A8.";
          reference
            "IEEE 802.1ad and IEEE 802.1aq).";
        }
        enum ethernet-powerlink {
          value 34987;
          description
            "Ethernet Powerlink.  Hex value of 0x88AB.";
        }
        enum goose {
          value 35000;
          description
            "Generic Object Oriented Substation Event (GOOSE).
             Hex value of 0x88B8.";
          reference
            "IEC/ISO 8802-2 and 8802-3.";
        }
        enum gse {
          value 35001;
          description
            "Generic Substation Events.  Hex value of 88B9.";
          reference
            "IEC 61850.";
        }
        enum sv {
          value 35002;
          description
            "Sampled Value Transmission.  Hex value of 0x88BA.";
          reference
            "IEC 61850.";
        }
        enum lldp {
          value 35020;
          description
            "Link Layer Discovery Protocol (LLDP).  Hex value of
             0x88CC.";
          reference
            "IEEE 802.1AB.";
        }
        enum sercos {
          value 35021;
          description
            "Sercos Interface.  Hex value of 0x88CD.";
        }
        enum wsmp {
          value 35036;
          description
            "WAVE Short Message Protocol (WSMP).  Hex value of
             0x88DC.";
        }
        enum homeplug-av-mme {
          value 35041;
          description
            "HomePlug AV Mobile Management Entity (MME).  Hex value
             of 88E1.";
        }
        enum mrp {
          value 35043;
          description
            "Media Redundancy Protocol (MRP).  Hex value of
             0x88E3.";
          reference
            "IEC 62439-2.";
        }
        enum macsec {
          value 35045;
          description
            "MAC Security.  Hex value of 0x88E5.";
          reference
            "IEEE 802.1AE.";
        }
        enum pbb {
          value 35047;
          description
            "Provider Backbone Bridges (PBB).  Hex value of
             0x88E7.";
          reference
            "IEEE 802.1ah.";
        }
        enum cfm {
          value 35074;
          description
            "Connectivity Fault Management (CFM).  Hex value of
             0x8902.";
          reference
            "IEEE 802.1ag.";
        }
        enum fcoe {
          value 35078;
          description
            "Fiber Channel over Ethernet (FCoE).  Hex value of
             0x8906.";
          reference
            "T11 FC-BB-5.";
        }
        enum fcoe-ip {
          value 35092;
          description
            "FCoE Initialization Protocol.  Hex value of 0x8914.";
        }
        enum roce {
          value 35093;
          description
            "RDMA over Converged Ethernet (RoCE).  Hex value of
             0x8915.";
        }
        enum tte {
          value 35101;
          description
            "TTEthernet Protocol Control Frame (TTE).  Hex value
             of 0x891D.";
          reference
            "SAE AS6802.";
        }
        enum hsr {
          value 35119;
          description
            "High-availability Seamless Redundancy (HSR).  Hex
             value of 0x892F.";
          reference
            "IEC 62439-3:2016.";
        }
      }
    }
    description
      "The uint16 type placeholder is defined to enable
       users to manage their own ethertypes not
       covered by the module.  Otherwise, the module contains
       enum definitions for the more commonly used ethertypes.";
  }
}
