rfc2723.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 1,236 行 · 第 1/3 页
TXT
1,236 行
Appendix C below lists the RTFM attributes by name. Since SRL only
refers to attributes by name, SRL users do not have to know the
attribute numbers.
The size (in bytes) of the various attribute values is also listed in
Appendix C. These sizes reflect the object sizes for the attribute
values as they are stored in the RTFM Meter MIB [RTFM-MIB].
IANA considerations for allocating new attributes are discussed in
detail in the RTFM Architecture document [RTFM-ARC].
Brownlee Informational [Page 15]
RFC 2723 SRL: A Traffic Flow Language October 1999
7 APPENDICES
7.1 Appendix A: SRL Syntax in BNF
<SRL program> ::= <S or D> | <SRL program> <S or D>
<S or D> ::= <statement> | <declaration>
<declaration> ::= <Subroutine declaration>
<statement> ::= <IF statement> |
<Compound statement> |
<Imperative statement> |
<CALL statement>
<IF statement> ::= IF <expression> <if action> <opt else>
<if action> ::= SAVE ; |
SAVE , <statement> |
<statement>
<opt else> ::= <null> |
ELSE <statement>
<expression> ::= <term> | <term> || <term>
<term> ::= <factor> | <factor> && <factor>
<factor> ::= <attribute> == <operand list> |
( <expression> )
<operand list> ::= <operand> | ( <actual operand list> )
<actual operand list> ::= <operand> |
<actual operand list> , <operand>
<operand> ::= <value> |
<value> / <width> |
<value> & <mask>
<Compound statement> ::= <opt label> { <statement seq> }
<opt label> ::= <null> |
<identifier> :
<statement seq> ::= <statement> | <statement seq> <statement>
<Imperative statement> ::= ; |
Brownlee Informational [Page 16]
RFC 2723 SRL: A Traffic Flow Language October 1999
SAVE <attribute> <opt operand> ; |
COUNT ; |
EXIT <label> ; |
IGNORE ; |
NOMATCH ; |
RETURN <integer> ; |
RETURN ; |
STORE <variable> := <value> ;
<opt operand> ::= <null> |
<width or mask> |
= <operand>
<width or mask> ::= / <width> | & <mask>
<Subroutine declaration> ::=
SUBROUTINE <sub header> <sub body> ENDSUB ;
<sub header> ::= <subname> ( ) |
<subname> ( <sub param list> )
<sub param list> ::= <sub param> | <sub param list> , <sub param>
<sub param> ::= ADDRESS <pname> | VARIABLE <pname>
<pname> ::= <identifier>
<sub body> ::= <statement sequence>
<CALL statement> ::= CALL <call header> <opt call body> ENDCALL ;
<call header> ::= <subname> ( ) |
<subname> ( <call param list> )
<call param list> ::= <call param> |
<call param list> , <call param>
<call param> ::= <attribute> | <variable>
<opt call body> ::= <null> |
<actual call body>
<actual call body> ::= <numbered statement> |
<actual call body> <numbered statement>
<numbered statement> ::= <int label seq> <statement>
<int label seq> ::= <integer> : | <int label seq> <integer> :
Brownlee Informational [Page 17]
RFC 2723 SRL: A Traffic Flow Language October 1999
The following are terminals, recognised by the scanner:
<identifier> Described in section 2
<integer> A decimal integer
<attribute> Attribute name, as listed in Appendix C
<value>, <mask> Described in section 5.2
<width> ::= <integer>
<label> ::= <identifier>
<variable> ::= SourceClass | DestClass | FlowClass |
SourceKind | DestKind | FlowKind
7.2 Appendix B: Syntax for Values and Masks
Values and masks consist of sequences of numeric fields, each of one
or more bytes. The non-blank character following a field indicates
the field width, and whether the number is decimal or hexadecimal.
These 'field type' characters may be:
. period decimal, single byte
- minus hex, single byte
! exclaim decimal, two bytes
For example, 130.216.0.0 is an IP address (in dotted decimal), and
FF-FF-00-00 is an IP address in hexadecimal.
The last field of a value or mask has no field width character.
Instead it takes the same width as the preceding field. For example,
1.3.10!50 and 1.3.0.10.0.50 are two different ways to specify the
same value.
Unspecified fields (at the right-hand side of a value or mask) are
set to zero, i.e. 130.216 is the same as 130.216.0.0.
If only a single field is specified (no field width character), the
value given fills the whole field. For example, 23 and 0.23 specify
the same value for a SourceTransAddress operand. For variables
(which have one-byte values) a C-style character constant may also be
used.
IPv6 addresses and masks may also be used, following the conventions
set out in the IP Version 6 Addressing Architecture RFC [V6-ADR].
Brownlee Informational [Page 18]
RFC 2723 SRL: A Traffic Flow Language October 1999
7.3 Appendix C: RTFM Attribute Information
The following attributes may be tested in an IF statement, and their
values may be SAVEd (except for MatchingStoD). Their maximum size (in
bytes) is shown to the left, and a brief description is given for
each. The names given here are reserved words in SRL (they are
<attribute> terminals in the grammar given in Appendix A).
Note that this table gives only a very brief summary. The Meter MIB
[RTFM-MIB] provides the definitive specification of attributes and
their allowed values. The MIB variables which represent flow
attributes have 'flowData' prepended to their names to indicate that
they belong to the MIB's flowData table.
1 SourceInterface, DestInterface
Interface(s) on which the flow was observed
1 SourceAdjacentType, DestAdjacentType
Indicates the interface type(s), i.e. an ifType from [ASG-NBR],
or an Address Family Number (if metering within a tunnel)
0 SourceAdjacentAddress, DestAdjacentAddress
For IEEE 802.x interfaces, the MAC addresses for the flow
1 SourcePeerType, DestPeerType
Peer protocol types, i.e. Address Family Number from [ASG-NBR],
such as IPv4, Novell, Ethertalk, ..
0 SourcePeerAddress, DestPeerAddress
Peer Addresses (size varies, e.g. 4 for IPv4, 3 for Ethertalk))
1 SourceTransType, DestTransType
Transport layer type, i.e. Protocol Number from [ASG-NBR]
such as tcp(6), udp(17), ospf(89), ..
2 SourceTransAddress, DestTransAddress
Transport layer addresses (e.g. port numbers for TCP and UDP)
1 FlowRuleset
Rule set number for the flow
1 MatchingStoD
Indicates whether the packet is being matched with its
addresses in 'wire order.' See [RTFM-ARC] for details.
The following variables may be tested in an IF, and their values may
be set by a STORE. They all have one-byte values.
Brownlee Informational [Page 19]
RFC 2723 SRL: A Traffic Flow Language October 1999
SourceClass, DestClass, FlowClass,
SourceKind, DestKind, FlowKind
The following RTFM attributes are not address attributes - they are
measured attributes of a flow. Their values may be read from an RTFM
meter. (For example, NeTraMet uses a FORMAT statement to specify
which attribute values are to be read from the meter.)
8 ToOctets, FromOctets
Total number of octets seen for each direction of the flow
8 ToPDUs, FromPDUs
Total number of PDUs seen for each direction of the flow
4 FirstTime, LastActiveTime
Time (in centiseconds) that first and last PDUs were seen
for the flow
Other attributes will be defined by the RTFM working group from time
to time.
8 Acknowledgments
The SRL language is part of the RTFM Working Group's efforts to make
the RTFM traffic measurement system easier to use. Initial work on
the language was done by Cyndi Mills and Brad Frazee in Boston. SRL
was developed in Auckland; it was greatly assisted by detailed
discussion with John White and Russell Fulton. Discussion has
continued on the RTFM and NeTraMet mailing lists.
9 References
[ASG-NBR] Reynolds, J. and J. Postel, "Assigned Numbers",
STD 2, RFC 1700, October 1994.
[NETRAMET] Brownlee, N., NeTraMet home page,
http://www.auckland.ac.nz/net/NeTraMet
[RTFM-ARC] Brownlee, N., Mills, C. and G. Ruth, "Traffic Flow
Measurement: Architecture", RFC 2722, October 1999.
[RTFM-MIB] Brownlee, N., "Traffic Flow Measurement: Meter MIB",
RFC 2720, October 1999.
[V6-ADDR] Hinden, R. and S. Deering, "IP Version 6 Addressing
Architecture," RFC 2373, July 1998.
Brownlee Informational [Page 20]
RFC 2723 SRL: A Traffic Flow Language October 1999
10 Author's Address
Nevil Brownlee
Information Technology Systems & Services
The University of Auckland
Private Bag 92-019
Auckland, New Zealand
Phone: +64 9 373 7599 x8941
EMail: n.brownlee@auckland.ac.nz
Brownlee Informational [Page 21]
RFC 2723 SRL: A Traffic Flow Language October 1999
11 Full Copyright Statement
Copyright (C) The Internet Society (1999). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing
the copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Brownlee Informational [Page 22]
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?