- leaf dscp {
- type inet:dscp; // TODO: Define DSCP type
- }
- }
- grouping ip_ecn {
- description "IP ECN (2 bits in ToS field).";
- leaf ecn {
- type uint8; // TODO define ECN
- }
- }
- grouping ip_proto {
- description "IP protocol.";
- leaf protocol-number {
- type uint8; // TODO define IP protocol number
- }
- }
- grouping ipv4_src {
- description "IPv4 source address.";
- leaf prefix {
- type inet:ipv4-prefix;
- }
- }
- grouping ipv4_dst {
- description "IPv4 destination address.";
- leaf prefix {
- type inet:ipv4-prefix;
- }
- }
- grouping tcp_src {
- description "TCP source port.";
- leaf port {
- type inet:port-number;
- }
- }
- grouping tcp_dst {
- description "TCP destination port.";
- leaf port {
- type inet:port-number;
- }
- }
- grouping udp_src {
- description "UDP source port.";
- leaf port {
- type inet:port-number;
- }
- }
- grouping udp_dst {
- description "UDP destination port.";
- leaf port {
- type inet:port-number;
- }
- }
- grouping sctp_src {
- description "SCTP source port.";
- leaf port {
- type inet:port-number;
- }
- }
- grouping sctp_dst {
- description "SCTP destination port.";
- leaf port {
- type inet:port-number;
- }
- }
- grouping icmpv4_type {
- description "ICMP type.";
- leaf type {
- type uint8; // Define ICMP Type
- }
- }
- grouping icmpv4_code {
- description "ICMP code.";
- leaf code {
- type uint8; // Define ICMP Code
- }
- }
- grouping arp_op {
- description "ARP opcode.";
- leaf op-code {
- type uint16;
- }
- }
- grouping arp_spa {
- description "ARP source IPv4 address.";
- leaf prefix {
- type inet:ipv4-prefix;
- }
- }
- grouping arp_tpa {
- description "ARP target IPv4 address.";
- leaf prefix {
- type inet:ipv4-prefix;
- }
- }
- grouping arp_sha {
- description "ARP source hardware address.";
- leaf address {
- type yang:mac-address;
- }
- leaf mask {
- type binary;
- }
- }
- grouping arp_tha {
- description "ARP target hardware address.";
- leaf address {
- type yang:mac-address;
- }
- leaf mask {
- type binary;
- }
- }
- grouping ipv6_src {
- description "IPv6 source address.";
- leaf prefix {
- type inet:ipv6-prefix;
- }
- }
- grouping ipv6_dst {
- description "IPv6 destination address.";
- leaf prefix {
- type inet:ipv6-prefix;
- }
- }
- grouping ipv6_flabel {
- description "IPv6 Flow Label";
- leaf label {
- type inet:ipv6-flow-label;
- }
- }
- grouping icmpv6_type {
- description "ICMPv6 type.";
- leaf type {
- type uint8;
- }
- }
- grouping icmpv6_code {
- description "ICMPv6 code.";
- leaf code {
- type uint8;
- }
- }
- grouping ipv6_nd_target {
- description "Target address for ND.";
- leaf address {
- type inet:ipv6-address;
- }
- }
- grouping ipv6_nd_sll {
- description "Source link-layer for ND.";
- leaf address {
- type yang:mac-address;
- }
- }
- grouping ipv6_nd_tll {
- description "Target link-layer for ND.";
- leaf address {
- type yang:mac-address;
- }
- }
- grouping mpls_label {
- description "MPLS label.";
- leaf label {
- type uint32; // TODO define type
- }
- }
- grouping mpls_tc {
- description "MPLS TC.";
- leaf tc {
- type uint8;
- }
- }
- grouping mpls_bos {
- description "MPLS BoS bit.";
- leaf bos {
- type boolean;
- }
- }
- grouping pbb_isid {
- description "PBB I-SID.";
- leaf isid {
- type uint32;
- }
- leaf mask {
- type binary;
- }
- }
- grouping tunnel_id {
- description "Logical Port Metadata.";
- leaf value {
- type oft:metadata;
- }
- leaf mask {
- type oft:metadata;
- }
- }
- grouping ipv6_exthdr {
- description "IPv6 Extension Header pseudo-field";
- leaf pseudo-field {
- type bits {
- bit nonext {
- description "<No next header> encountered.";
- position 0;
- }
- bit esp {
- description "Encrypted Sec Payload header present.";
- position 1;
- }
- bit auth {
- description "Authentication header present.";
- position 2;
- }
- bit dest {
- description "1 or 2 dest headers present.";
- position 3;
- }
- bit frag {
- description "Fragment header present.";
- position 4;
- }
- bit router {
- description "Router header present.";
- position 5;
- }
- bit hop {
- description "Hop-by-hop header present.";
- position 6;
- }
- bit unrep {
- description "Unexpected repeats encountered.";
- position 7;
- }
- bit unseq {
- description "Unexpected sequencing encountered.";
- position 8;
- }
- }
- }
- leaf mask {
- type binary;
- }
- }