module packet-fields { yang-version 1; namespace "urn:ietf:params:xml:ns:yang:packet-fields"; prefix packet-fields; import ietf-inet-types { prefix "inet"; } import ietf-yang-types { prefix "yang"; } revision 2014-06-25 { description "Initial version of packet fields used by access-lists"; } grouping acl-transport-header-fields { description "Transport header fields"; container source-port-range { description "inclusive range of source ports"; leaf lower-port { mandatory true; type inet:port-number; } leaf upper-port { type inet:port-number; } } container destination-port-range { description "inclusive range of destination ports"; leaf lower-port { mandatory true; type inet:port-number; } leaf upper-port { type inet:port-number; } } } grouping acl-ip-header-fields { description "Header fields common to ipv4 and ipv6"; uses acl-transport-header-fields; leaf dscp { type inet:dscp; } leaf ip-protocol { type uint8; } } grouping acl-ipv4-header-fields { description "fields in IPv4 header"; leaf destination-ipv4-address { type inet:ipv4-prefix; } leaf source-ipv4-address { type inet:ipv4-prefix; } } grouping acl-ipv6-header-fields { description "fields in IPv6 header"; leaf destination-ipv6-address { type inet:ipv6-prefix; } leaf source-ipv6-address { type inet:ipv6-prefix; } leaf flow-label { type inet:ipv6-flow-label; } } grouping acl-eth-header-fields { description "fields in ethernet header"; leaf destination-mac-address { type yang:mac-address; } leaf destination-mac-address-mask { type yang:mac-address; } leaf source-mac-address { type yang:mac-address; } leaf source-mac-address-mask { type yang:mac-address; } } grouping timerange { description "Define time range entries to restrict the access. The time range is identified by a name and then referenced by a function, so that those time restrictions are imposed on the function itself."; container absolute { description "Absolute time and date that the associated function starts going into effect."; leaf start { type yang:date-and-time; description "Start time and date"; } leaf end { type yang:date-and-time; description "Absolute end time and date"; } leaf active { type boolean; default "true"; description "Specify the associated function active or inactive state when starts going into effect"; } } // container absolute } //grouping timerange grouping metadata { description "Fields associated with a packet but not in the header"; leaf input-interface { description "Packet was received on this interface"; type string; } uses timerange; } }