draft-kim-abnf-codegen-01.txt Network Working Group J. Kim Internet Draft VineGen Inc Intended status: Experimental M. Yu Expires: May 26, 2010 VineGen Inc November 26, 2009 An ABNF Extension for code generation Status of this Memo This Internet-Draft is submitted to IETF in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on May 26, 2010. Copyright Notice Copyright (c) 2009 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the BSD License. Kim & Yu Expires May 26, 2010 [Page 1] Internet-Draft ABNF Extension for code generation November 2009 Abstract This document describes an ABNF extension for code generation. ABNF has been widely used for decades. While its popurarity is ascribed to its simplicity and ease of use, the demand for code generation has been fulfilled only marginally, by some sort of non-standard extensions, or by conversion to yet another meta language. One possible solution is to add more detailed specifications to the existing ABNF standard, but this hurts the very competitiveness of ABNF itself. Another solution is to standardize an extension and make it a 'sister' standard in parallel to the existing ABNF standaard. In this document we propose such an extension as a standard. The generated code using the proposed extension would be "complete", meaning no need to modify by hand, if there exist no concepts of unordered groups in the specification. Kim & Yu Expires May 26, 2010 [Page 2] Internet-Draft ABNF Extension for code generation November 2009 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Restrictions on ABNF for code generation . . . . . . . . . . . . 4 2.1. Rule Termination . . . . . . . . . . . . . . . . . . . . . . 4 2.2. Limit on value length . . . . . . . . . . . . . . . . . . . . 5 2.3. No option for alternation elements . . . . . . . . . . . . . . 5 2.4. Rule Termination . . . . . . . . . . . . . . . . . . . . . . 5 2.5. Maximum Repetition . . . . . . . . . . . . . . . . . . . . . . 5 2.6. Character Range . . . . . . . . . . . . . . . . . . . . . . . 5 3. Extension Rule ;--XRule . . . . . . . . . . . . . . . . . . . . . 5 3.1. XPDU . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.2. XCUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.3. XTYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.4. XVAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.5. XCHOICE . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.6. XBITMASK . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.7. XTDEF . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.8. XNCASE . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.9. XDUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.10. XALT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.11. XSTRL . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.12. XNRPT . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.13. XFENC . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.14. XNLCMP . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.15. XMANDA . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4. Security Considerations . . . . . . . . . . . . . . . . . . . . 13 5. References . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 5.1. Normative References . . . . . . . . . . . . . . . . . . . . 13 5.2. Informative References . . . . . . . . . . . . . . . . . . . 14 Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . . . 14 Appendix B. Registry of Extension Rules . . . . . . . . . . . . . . 14 Kim & Yu Expires May 26, 2010 [Page 3] Internet-Draft ABNF Extension for code generation November 2009 1. Introduction ABNF, Augmented BNF(Backus-Naur Form) has been widely used for Internet specifications, ranging from Voice Over IP, instant messaging clients and multimedia players to HTTP servers and proxies. Internet specifications involve processing network protocol messages. A key part of this processing is to decode(parse) messages as they are received from the network, and to encode attributes into messages. As message decoding/encoding represent the front line of interaction between the application and the outside world, the correctness of decoding/encoding is crucial. While, hand-written(fully or partially) network message processing code has been dominant, there have been ABNF code generators to address hand coding problems. Their success is only marginal, though. The main reason is the fact that complete codec code cannot be generated from a sophisticated specification like SIP due to the absense of detailed inforamtion required to generate code. Existing code generators often generate incomplete bare minimum code or require the ABNF specification to be translated into another meta language with additional detailed information. In the light of these observations, we propose an extension for code generation. Directvies necessary to generate code is added to an existing ABNF specification as an Extension Rule, using a special token ";--". Along with Extension Rules, some restrictions and limitations are applied to the ABNF specifications. The size of a variable in the generated code is limited by the language and th platform, as in most languages. 2. Restrictions on ABNF for code generation ABNF is a meta language and an ABNF specification does not specify capacity limits for variables. However, the target language which the specification is generated into, has limited ranges for variables. For instace, in ABNF, the repetition directive *, means from 0 to infinity. The "infinity" is interpreted the largest number the target language allows. The extension we propose, is an add-on, not modifying the ABNF standard, however, some straightforward conversions facilitate code generation, 2.1. Rule Termination A rule should be terminated by ";" or ";--X" for an extension rule The string from ";" to CRLF is regarded as a comment The string from ";--X" to CRLF is regarded as an extension rule Kim & Yu Expires May 26, 2010 [Page 4] Internet-Draft ABNF Extension for code generation November 2009 2.2. Limit on value length In case of bin-val, dec-val and hex-val, the maximum length of concatenation is 80 2.3. Maximum Repetition The maximum value of unlimited repetitions is the size of one word of the most popular CPU i.e 2^32. So *(SP|HT) can occur 0 - (2^32-1) times. 2.4. Character Range A character value should be ranged 0 - 255 ex) 0x01-0xfc : OK 0x01-0xffcc : Not OK 2.5. Optional value conversion for alternation elements An optional element in alternation should be converted. For instance, the rule "A = B / C [D] / E" should be converted to: "A = B / X/ E where X = C [D]" 2.6. Rulename Conversion In ABNF, the identifier "rulename" may contain the minus character '-' in any place, but the first. On the other hand, most popular network programing languages do not allow the minus character in their identifier. Therefore, any minus characters in rulenames need to be removed. For example, message-header would be converted to MsgHdrList. 3. Extension Rule ;--XRule For the code generator to generate code, the following information is needed to be added to the ABNF spefecifications. * Whether or not to generate code from the rule. * Which parts to be generated from the rule * Data type to be used * Choices for a choice data type * Bit Operation Directives The above directive information is added at the end of an ABNF rule, as an Extension Rule. An Extension Rule is specified using ;--X. Appendix B lists a registry of Extension Rules. Each Rule has the reference index 0, and indexes on its right hand side start from 1. For instance, Rule_A in the following can be referenced as 0, and elem_1 as 1, etc. Rule_A = elem_1 elem_2 .. elem_l .. elem_n ;--XtensionRule elem_index_m .. Kim & Yu Expires May 26, 2010 [Page 5] Internet-Draft ABNF Extension for code generation November 2009 Alternation and repeater do not have an index value. 3.1. XPDU XPDU indicates that the rule performs encoding or decoding a PDU, so codec code is generated for the rule. Synopsis: ;--XPDU Example: SIPMessage = StartLine MsgHdrList ;--XPDU SessionDescription = ProtoVersion .... ;--XPDU 3.2. XCUT XCUT is used to cut unnecessary parts when the struct type name is code-generated. Synopsis: ;--XCUT [ *(, )] where is the index number of an element. It does not have any relation with decoding rules. If is 0, then it means "cutting out" the rule, and the rule does not get generated in the user header file Example: HostPort = Host [ ":" Port ] ;--XCUT 3 ==> Cutting out ":" which not to be decoded into a variable Hdrs = "?" Hdr *( "&" Hdr ) ;--XCUT 1,4 ==> Cutting out "?" and "&" 3.3. XTYPE XTYPE is used to specify the data type for the rule. If XTYPE is absent, the struct type is used by default. Synopsis: ;--XTYPE [= *(, = )] where is the index number of an element. and is one of structl, struct, uint, ushort, char*, char, uchar, enum, octet(num), octet, char(num), objId, bit, float, boolean, null or char*esc. The following typenames are used only (idx=0) TYPE: structl, struct, octet(num), octet, objid, bit, enum whareas the following is used only (idx>0) TYPE : null Each typename is described below. structl This type name is used to generate linked struct types. Kim & Yu Expires May 26, 2010 [Page 6] Internet-Draft ABNF Extension for code generation November 2009 Example: UriPrms = 1*( ";" UriPrm) ;--XTYPE 0=structl. From the above ABNF definition, something like following can be generated. typedef struct UriPrms_ { struct UriPrms_* next; UriPrm value; } *UriPrms; struct This type name is used to generate struct types. char*, uint, ushort, char, uchar, enum, char(number), float, and boolean. Their namesake types in C is type-defined by the rule names. Examples: HdrStr = 1*( HnvUnreserved / Unreserved / Escaped ) ;--XTYPE 0=char* BasicTrspPrm = "udp" / "tcp" / "sctp" / "tls" ;--XTYPE 0=enum bit This type name is used to define a string of zero or more bits, and identical to ASN.1 BIT STRING. Example: NotifyCompletionReason = (TimeOutToken / InterruptByEventToken / InterruptByNewSignalsDescrToken / OtherReasonToken) ;--XTYPE 0=bit ;--XVAR 2=onTimeOut, 3=onInterruptByEvent, ;--XVAR 4=onInterruptByNewSignalDescr, 5=otherReason From the above ABNF definition, something like following can be generated. typedef unsigned char NotifyCompletion; #define onTimeOut 0x80 #define onInterruptByEvent 0x40 #define onInterruptByNewSignalDescr 0x20 #define otherReason 0x10 null The type name is mapped to a null type and cannot be assigned to the 0'th index which is the rule itself. Kim & Yu Expires May 26, 2010 [Page 7] Internet-Draft ABNF Extension for code generation November 2009 Example: TransactionReply = ReplyToken EQUAL TransactionID LBRKT [ ImmAckRequiredToken COMMA] TransactionResult RBRKT ;--XCUT 1,2,4,7,9 ;--XVAR 3=transactionId, 6=immAckRequired, 8=transactionResult ;--XTYPE 6=null From the above ABNF definition, something like following can be generated. typedef Nulltype char; typedef struct TransactionReply { unsigned char bit_mask; # define immAckRequired_present 0x80 TransactionId transactionId; Nulltype immAckRequired; TransactionResult transactionResult; } TransactionReply; octet(len) This type name is used to define a string whose length is the given len. Example: TStr = TokenChar 0*TokenEChar ;--XTYPE 0=octet(40) It can be generated into C something like: typedef struct TStr { unsigned short length; unsigned char value[40]; } TStr; octet This type name is used to define an 8-bit string. Example: Username = 1*(%x21-7E/%x80-FF) ;--XTYPE 0=octet It can be generated into C something like: typedef struct Username { unsigned short length; unsigned char* value; } Username; char*esc This type name is used when a hex-digit value is mapped to an ASCII character. For instance, "%61lice" is mapped to "alice" using the following example definition. Kim & Yu Expires May 26, 2010 [Page 8] Internet-Draft ABNF Extension for code generation November 2009 Example: UserInfo = 1*(%x21-3F / %x41-FF) "@" ;--XCUT 4 ;--XTYPE 0=char*esc This can be generated to: typedef char* UserInfo; 3.4. XVAR This extension rule is used to assign variable names and values. Synopsis: ;-XVAR = *(, =) Example: BaseNettype = "IN" / "ATM" / "LOCAL" ;--XTYPE 0=enum ;--XVAR 1=BNType_IN, 2=BNType_ATM, 3=BNType_LOCAL 3.5. XCHOICE XCHOICE is used with alternations to generate into a C structured type containing an integer for the choice tag value followed by a union of all of the equivalent types that make up the XCHOICE elements. Synopsis: ;--XCHOICE = *(, =) The namdId is simply a sequential number starting at one for each alternative in the XCHOICE. A #define constant is generated for each of these values. Examples: HierPartNoPrms = "/" (NetPathNoPrms / AbsPathNoPrms) ;--XCUT 1 ;--XCHOICE 3=HierPartNP_mNet_chosen, 4=HierPartNP_mAbs_chosen UserPrm = "user=" ( BasicUserPrm / Token ) ;--XCUT 1 ;--XNCASE 1 ;--XVAR 4=mOtherUserPrm ;--XALT 4 ;--XCHOICE 3=UserPrm_mBasic_chosen, 4=UserPrm_mOther_chosen This can be generated to: typedef struct UserPrm { xu16 choice; # define UserPrm_mBasic_chosen 1 # define UserPrm_mOther_chosen 2 union { BasicUserPrm mBasicUserPrm; xc8* mOtherUserPrm; Kim & Yu Expires May 26, 2010 [Page 9] Internet-Draft ABNF Extension for code generation November 2009 } u; } UserPrm; 3.6. XBITMASK This extension rule is used to assign bitmask names and values. Synopsis: ;--XBITMASK = *(, =) short bitmask selection method full bitmask name : typename_variablename_present short bitmask name : vairablename_present Example: Accept = 0*1AcceptValue CRLF ;--XCUT 2 ;--XBITMASK 1=Accept_mPld_present This can be generated to: typedef struct Accept { xu8 bit_mask; # define Accept_mPld_present 0x80 struct AcceptValue_* mAcceptValue; /* optional */ } Accept; 3.7. XTDEF This is used to do a typedef in C. It should not be used with the structl type name Synopsis: ;--XTDEF Example: AddRequest = AddToken EQUAL AmmRequest ;--XCUT 1,2 ;--XTDEF 3 Then, the following code is generated: typedef AmmRequest AddRequest 3.8. XNCASE Used to direct case-insensitivity, when strings compared. Synopsis: ;--XNCASE *(, ) Example: BasicTrspPrm = "udp" / "tcp" / "sctp" / "tls" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4 3.9. XDUP Used to specify byte values which the compiler can take. Kim & Yu Expires May 26, 2010 [Page 10] Internet-Draft ABNF Extension for code generation November 2009 Synopsis: ;--XDUP = *(, ) Example : CallId = ( "Call-ID" / "i" ) HCOLON Payload CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XTDEF 5 ;--XDUP 3=0x20,0x09,0x3a Then, the following code can be generated: typedef Payload CallId typedef struct Payload { xu16 length; xu8* value; } Payload; 3.10. XALT This extension rule is used to assign a fall-back option Synopsis: ;--XALT where is the index number of an element. Example : Host = Ipv4 / Ipv6 / HostName ;--XALT 3 HostName = 1*(Alphanum / "-"/ "." ) ;--XTYPE 0=char 3.11. XSTRL This is used to appoint a char as delimiter if there exists no delimiter when one is needed. Synopsis: ;--XSTRL = *(, ) where is the index number of an element and is a hex-digit. Example : ExtHdrList = 1*(ExtHdr) ;--XTYPE 0=structl ;--XSTRL 2=0x21,0x23-27,0x2a-2b,0x2d-2e,0x30-39,0x41-5a,0x5e-7a, 0x7c,0x7e ;In this case, it specifies all the character suitable for ExtHdr = Token ; ExtHdr = Token HCOLON 0*1Payload CRLF ;--XCUT 2,4 ;--XVAR 1=mHdrName, 3=mHdrValue Kim & Yu Expires May 26, 2010 [Page 11] Internet-Draft ABNF Extension for code generation November 2009 3.12. XNRPT Extension data are used as a general rule, when pre-conditions are not met. If extension data use XSTRL for its structl type, it's necessary to check if the pre-conditions are met by setting XNRPT to 1. The following example shows that once ExtHdr is met, there is a chance for it to continue to be met. To avoid this situation, it's forced to check Exthdr only after Acceptlist and ViaList are checked. Synopsis: ;--XNRPT where is the index number. Example : MsgHdrList = *{ 0*1AcceptList ViaList 0*1ExtHdrList } CRLF ExtHdrList = 1*(ExtHdr) ;--XTYPE 0=structl ;--XSTRL 2=0x41-5A,0x61-7A,0x30-39,0x2d,0x2e,0x21 ,0x25, 0x2a,0x5f,0x2b,0x60,0x27,0x7e ;--XNRPT 1 ExtHdr = Token HCOLON Payload CRLF ;--XCUT 2,4 ;--XVAR 1=mHdrName, 3=mHdrValue 3.13. XFENC This extension rule is used when a variable needs to be overriden with a given value. Synopsis: ;--XFENC = where is the index number of an elemnt and is a number. Example: HCOLON = *( SP / HTAB ) ":" 0*1LWS ;--XCUT 0 ;--XFENC 5=0x20 LWS = [*WSP CRLFLWS] 1*WSP ;--XCUT 0 3.14. XNLCMP This extension rule is used when the length in PDU rule and the size of the input stream are not to be compared. Synopsis: ;--XNLCMP Example: SIPMessage = StartLine MsgHdrList ;--XPDU StartLine = *CRLF (StatusLine / ReqLine) ;--XNLCMP ;--XCUT 1 ;--XALT 4 ;--XCHOICE 3=SL_mStatus_chosen, 4=SL_mReq_chosen Kim & Yu Expires May 26, 2010 [Page 12] Internet-Draft ABNF Extension for code generation November 2009 3.15. XMANDA This extension is used for a special case where elements can come in an arbitray order and some of them are mandatory. As seen in the example below, the message-header in RFC 3261 contains some mandatory elements and other optional elements. All its elements are specified as optional in ABNF, and in the text, some of the elements are further specified as mandatory. Using this XMANDA extension rule, its ABNF can include the further specification. Synopsis: ;--XMANDA *(, ) where is an index number Example : Request = Request-Line MsgHdrList ;--XPDU MsgHdrList = *( Accept / CallId / Accept-Encoding / To / From / Accept-Language / ViaList ... ) CRLF ;--XMANDA 3,5,6 As specified by XMANDA, its 3rd, 5th, and 6th elements i.e. CallId, To, and From, are processed as manadatory by the code generater 4. Security Considerations Security is believed to be irrelevant to this document. 5. References 5.1. Normative References [RFC 5234] Crocker, D., Ed., and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 5234, January 2008. [US-ASCII] American National Standards Institute, "Coded Character Set -- 7-bit American Standard Code for Information Interchange", ANSI X3.4, 1986. Kim & Yu Expires May 26, 2010 [Page 13] Internet-Draft ABNF Extension for code generation November 2009 5.2. Informative References Crocker, D., Ed., and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", Draft-2, 1997. Appendix A. Acknowledgements Appendix B. Registry of Extension Rules. XPDU ;--XPDU XCUT ;--XCUT [ *(, )] XTYPE ;--XTYPE [= *(, = )] where is one of the following: structl struct char* uint ushort char uchar enum char(number) float boolean bit null octet(num) octet char*esc XVAR ;-XVAR = *(, =) XCHOICE ;--XCHOICE = *(, =) XBITMASK ;--XBITMASK = *(, =) XTDEF ;--XTDEF XNCASE ;--XNCASE *(, ) XDUP ;--XDUP = *(, ) XALT ;--XALT XSTRL ;--XSTRL = *(, ) Kim & Yu Expires May 26, 2010 [Page 14] Internet-Draft ABNF Extension for code generation November 2009 XNRPT ;--XNRPT XFENC ;--XFENC = XNLCMP ;--XNLCMP XMANDA ;--XMANDA *(, ) Appendix C. Example - SIP re-written with Extension Rules ;---------------------------------------------------------------------- ; RFC 2234 basic rules ;---------------------------------------------------------------------- ALPHA = %x41-5A / %x61-7A ;--XTYPE 0=tok CRLF = %x0d.0a / %x0d / %x0a ;--XCUT 0 ;--XDUP 1=0x00-0x08, 0x0a-0x1f, 0x21-0xff ;--XDUP 2=0x00-0x08, 0x0b-0x1f, 0x21-0xff ECRLF = %x0d.0a / %x0d / %x0a ;--XCUT 0 ;--XDUP 2=0x00-0x09, 0x0b-0xff CRLFLWS = %x0d.0a / %x0d / %x0a ;--XCUT 0 ;--XDUP 1=0x20, 0x09 ;--XDUP 2=0x20, 0x09 ;--XDUP 3=0x20, 0x09 DIGIT = %x30-39 ;--XTYPE 0=tok DQUOTE = %x22 ;--XTYPE 0=tok HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" / "a" / "b" / "c" / "d" / "e" / "f" ;--XTYPE 0=tok HTAB = %x09 ;--XCUT 0 SP = %x20 ;--XCUT 0 WSP = SP / HTAB ;--XCUT 0 Kim & Yu Expires May 26, 2010 [Page 15] Internet-Draft ABNF Extension for code generation November 2009 ;---------------------------------------------------------------------- ; RFC 3261 25.1 Basic Rules ;---------------------------------------------------------------------- ; alphanum = ALPHA / DIGIT ; reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" / "+" ; / "$" / "," ; unreserved = alphanum / mark ; mark = "-" / "_" / "." / "!" / "~" / "*" / "'" ; / "(" / ")" ; escaped = "%" HEXDIG HEXDIG ;---------------------------------------------------------------------- Alphanum = ALPHA / DIGIT ;--XTYPE 0=tok Reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" / "+" / "$" / "," ;--XTYPE 0=tok Unreserved = Alphanum / Mark ;--XTYPE 0=tok Mark = "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")" ;--XTYPE 0=tok Escaped = "%" HEXDIG HEXDIG ;--XTYPE 0=tok ;---------------------------------------------------------------------- ; LWS = [*WSP CRLF] 1*WSP ; linear whitespace ; SWS = [LWS] ; sep whitespace ; HCOLON = *( SP / HTAB ) ":" SWS ; LHEX = DIGIT / %x61-66 ;lowercase a-f ;---------------------------------------------------------------------- LWS = [*WSP CRLFLWS] 1*WSP ;--XCUT 0 HCOLON = *( SP / HTAB ) ":" 0*1LWS ;--XCUT 0 ;--XFENC 5=0x20 LHEX = DIGIT / %x61-66 ;--XTYPE 0=tok LDQUOT = 0*1LWS %x22 ;--XCUT 0 ;---------------------------------------------------------------------- ; token = 1*(alphanum / "-" / "." / "!" / "%" / "*" ; / "_" / "+" / "`" / "'" / "~" ) ; separators = "(" / ")" / "<" / ">" / "@" / ; "," / ";" / ":" / "\" / DQUOTE / ; "/" / "[" / "]" / "?" / "=" / ; "{" / "}" / SP / HTAB ; word = 1*(alphanum / "-" / "." / "!" / "%" / "*" / ; "_" / "+" / "`" / "'" / "~" / ; "(" / ")" / "<" / ">" / ":" / "\" / DQUOTE / ; "/" / "[" / "]" / "?" / "{" / "}" ) ;---------------------------------------------------------------------- Kim & Yu Expires May 26, 2010 [Page 16] Internet-Draft ABNF Extension for code generation November 2009 Token = 1*(Alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" ) ;--XTYPE 0=char* Word = 1*(Alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" / "(" / ")" / "<" / ">" / ":" / "\" / DQUOTE / "/" / "[" / "]" / "?" / "{" / "}" ) ;--XTYPE 0=char* ;---------------------------------------------------------------------- ; STAR = SWS "*" SWS ; asterisk ; SLASH = SWS "/" SWS ; slash ; EQUAL = SWS "=" SWS ; equal ; LPAREN = SWS "(" SWS ; left parenthesis ; RPAREN = SWS ")" SWS ; right parenthesis ; RAQUOT = ">" SWS ; right angle quote ; LAQUOT = SWS "<"; left angle quote ; COMMA = SWS "," SWS ; comma ; SEMI = SWS ";" SWS ; semicolon ; COLON = SWS ":" SWS ; colon ; LDQUOT = SWS DQUOTE; open double quotation mark ; RDQUOT = DQUOTE SWS ; close double quotation mark ;---------------------------------------------------------------------- STAR = 0*1LWS "*" 0*1LWS ;--XCUT 1, 3 ;--XTYPE 0=char STARONLY = "*" ;--XTYPE 0=tok SLASH = 0*1LWS "/" 0*1LWS ;--XCUT 0 EQUAL = 0*1LWS "=" 0*1LWS ;--XCUT 0 LPAREN = 0*1LWS "(" 0*1LWS ;--XCUT 0 RPAREN = 0*1LWS ")" 0*1LWS ;--XCUT 0 RAQUOT = ">" 0*1LWS ;--XCUT 0 LAQUOT = 0*1LWS "<" ;--XCUT 0 COMMA = 0*1LWS "," 0*1LWS ;--XCUT 0 SEMI = 0*1LWS ";" 0*1LWS ;--XCUT 0 COLON = 0*1LWS ":" 0*1LWS ;--XCUT 0 Kim & Yu Expires May 26, 2010 [Page 17] Internet-Draft ABNF Extension for code generation November 2009 LDQUOT = 0*1LWS %x22 ;--XCUT 0 RDQUOT = %x22 0*1LWS ;--XCUT 0 ;---------------------------------------------------------------------- ; comment = LPAREN *(ctext / quoted-pair / comment) RPAREN ; ctext = %x21-27 / %x2A-5B / %x5D-7E / UTF8-NONASCII / LWS ; quoted-string = SWS DQUOTE *(qdtext / quoted-pair ) DQUOTE ; qdtext = LWS / %x21 / %x23-5B / %x5D-7E ; / UTF8-NONASCII ; quoted-pair = "\" (%x00-09 / %x0B-0C / %x0E-7F) ;---------------------------------------------------------------------- Comment = LPAREN *(Ctext / QuotedPair) RPAREN ;--XCUT 1,5 ;--XTYPE 0=octet Ctext = %x21-27 / %x2A-5B / %x5D-FF / LWS_TOK ;--XTYPE 0=tok LWS_TOK = %x09 / %x20/ %x0D/ %x0a ;--XTYPE 0=tok QStr = %x22 *(LWS_TOK / %x21 / %x23-5B / %x5D-FF / QuotedPair) %x22 0*1LWS ;--XCUT 1,8,9 ;--XTYPE 0=octet(80) QuotedPair = "\" (%x00-09 / %x0B-0C / %x0E-7F) ;--XTYPE 0=tok ;---------------------------------------------------------------------- ; SIP-URI = "sip:" [ userinfo ] hostport ; uri-parameters [ headers ] ; SIPS-URI = "sips:" [ userinfo ] hostport ; uri-parameters [ headers ] ; userinfo = ( user / telephone-subscriber ) [ ":" password ] "@" ; user = 1*( unreserved / escaped / user-unreserved ) ; user-unreserved = "&" / "=" / "+" / "$" / "," / ";" / "?" / "/" ; password = *( unreserved / escaped / ; "&" / "=" / "+" / "$" / "," ) ;---------------------------------------------------------------------- SipUri = "sip:" 0*1UserInfo HostPort 0*1UriPrms 0*1Hdrs ;--XCUT 1 ;--XNCASE 1 SipsUri = "sips:" 0*1UserInfo HostPort 0*1UriPrms 0*1Hdrs ;--XCUT 1 ;--XNCASE 1 SipUriNoPrms = "sip:" 0*1UserInfo HostPort ;--XCUT 1 ;--XNCASE 1 ;--XBITMASK 2=SipUriNP_mUserInfo_present Kim & Yu Expires May 26, 2010 [Page 18] Internet-Draft ABNF Extension for code generation November 2009 SipsUriNoPrms = "sips:" 0*1UserInfo HostPort ;--XCUT 1 ;--XNCASE 1 ;--XBITMASK 2=SipsUriNP_mUserInfo_present UserInfo = 1*(%x21-3F / %x41-FF) "@" ;--XCUT 4 ;--XTYPE 0=char*esc ;---------------------------------------------------------------------- ; hostport = host [ ":" port ] ; host = hostname / IPv4address / IPv6reference ; hostname = *( domainlabel "." ) toplabel [ "." ] ; domainlabel = alphanum ; / alphanum *( alphanum / "-" ) alphanum ; toplabel = ALPHA / ALPHA *( alphanum / "-" ) alphanum ; Pv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT ; IPv6reference = "[" IPv6address "]" ; IPv6address = hexpart [ ":" IPv4address ] ; hexpart = hexseq / hexseq "::" [ hexseq ] / "::" [ hexseq ] ; hexseq = hex4 *( ":" hex4) ; hex4 = 1*4HEXDIG ; port = 1*DIGIT ;---------------------------------------------------------------------- HostPort = Host [ ":" Port ] ;--XCUT 3 Host = Ipv4 / Ipv6 / HostName ;--XALT 3 HostName = 1*(Alphanum / "-"/ "." ) ;--XTYPE 0=char* Ipv4 = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT ;--XTYPE 0=char* Ipv6 = "[" HexPart [ ":" Ipv4 ] "]" ;--XCUT 1, 4, 6 HexPart = HexSeq [ "::" 0*1HexSeq ] / "::" 0*1HexSeq ;--XTYPE 0=char* HexSeq = Hex4 *( ":" Hex4) ;--XTYPE 0=tok Hex4 = 1*4HEXDIG ;--XTYPE 0=tok Port = 1*DIGIT ;--XTYPE 0=uint Kim & Yu Expires May 26, 2010 [Page 19] Internet-Draft ABNF Extension for code generation November 2009 ;---------------------------------------------------------------------- ; uri-parameters = *( ";" uri-parameter) ; uri-parameter = transport-param / user-param / method-param ; / ttl-param / maddr-param / lr-param / other-param ; transport-param = "transport=" ; ( "udp" / "tcp" / "sctp" / "tls" / other-transport) ; other-transport = token ;---------------------------------------------------------------------- UriPrms = 1*( ";" UriPrm) ;--XCUT 2 ;--XTYPE 0=structl UriPrm = TrspPrm / UserPrm / MethodPrm / TtlPrm / MaddrPrm / LrPrm / OtherPrm ;--XTYPE 6=null ;--XALT 7 TrspPrm = "transport=" ( BasicTrspPrm / Token ) ;--XCUT 1 ;--XNCASE 1 ;--XVAR 4=mOtherTrspPrm ;--XALT 4 ;--XCHOICE 3=TrspPrm_mBasic_chosen, 4=TrspPrm_mOther_chosen BasicTrspPrm = "udp" / "tcp" / "sctp" / "tls" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4 ;--XVAR 1=BasicTrspPrm_udp, 2=BasicTrspPrm_tcp ;--XVAR 3=BasicTrspPrm_sctp, 4=BasicTrspPrm_tls ;---------------------------------------------------------------------- ; user-param = "user=" ( "phone" / "ip" / other-user) ; other-user = token ; method-param = "method=" Method ; ttl-param = "ttl=" ttl ; maddr-param = "maddr=" host ; lr-param = "lr" ; other-param = pname [ "=" pvalue ] ; pname = 1*paramchar ; pvalue = 1*paramchar ; paramchar = param-unreserved / unreserved / escaped ; param-unreserved = "[" / "]" / "/" / ":" / "&" / "+" / "$" ;---------------------------------------------------------------------- UserPrm = "user=" ( BasicUserPrm / Token ) ;--XCUT 1 ;--XNCASE 1 ;--XVAR 4=mOtherUserPrm ;--XALT 4 ;--XCHOICE 3=UserPrm_mBasic_chosen, 4=UserPrm_mOther_chosen BasicUserPrm = "phone" / "ip" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=BasicUserPrm_phone, 2=BasicUserPrm_ip Kim & Yu Expires May 26, 2010 [Page 20] Internet-Draft ABNF Extension for code generation November 2009 MethodPrm = "method=" Method ;--XCUT 1 ;--XNCASE 1 ;--XTDEF 2 TtlPrm = "ttl=" 1*3DIGIT ;--XCUT 1 ;--XNCASE 1 ;--XTYPE 0=uint MaddrPrm = "maddr=" Host ;--XCUT 1 ;--XNCASE 1 ;--XTDEF 2 LrPrm = "lr" ;--XTYPE 0=tok ;--XNCASE 1 OtherPrm = PrmStr [ "=" PrmStr ] ;--XCUT 3 ;--XVAR 1=mPname, 4=mPvalue PrmStr = 1*(PrmUnreserved / Unreserved / Escaped) ;--XTYPE 0=char* PrmUnreserved = "[" / "]" / "/" / ":" / "&" / "+" / "$" ;--XTYPE 0=tok ;---------------------------------------------------------------------- ; headers = "?" header *( "&" header ) ; header = hname "=" hvalue ; hname = 1*( hnv-unreserved / unreserved / escaped ) ; hvalue = *( hnv-unreserved / unreserved / escaped ) ; hnv-unreserved = "[" / "]" / "/" / "?" / ":" / "+" / "$" ;---------------------------------------------------------------------- Hdrs = "?" Hdr *( "&" Hdr ) ;--XCUT 1,4 ;--XTYPE 0=structl Hdr = HdrStr "=" 0*1HdrStr ;--XCUT 2 ;--XVAR 1=mHname, 3=mHvalue HdrStr = 1*( HnvUnreserved / Unreserved / Escaped ) ;--XTYPE 0=char* HnvUnreserved = "[" / "]" / "/" / "?" / ":" / "+" / "$" ;--XTYPE 0=tok ;---------------------------------------------------------------------- ;SIP-message = Request / Response ;Request = Request-Line ; *( message-header ) ; CRLF ; [ message-body ] ;---------------------------------------------------------------------- SIPMessage = StartLine MsgHdrList ;--XPDU Kim & Yu Expires May 26, 2010 [Page 21] Internet-Draft ABNF Extension for code generation November 2009 StartLine = *CRLF ( StatusLine / ReqLine) ;--XNLCMP ;--XCUT 1 ;--XALT 4 ;--XCHOICE 3=SL_mStatus_chosen, 4=SL_mReq_chosen ;---------------------------------------------------------------------- ;Request-Line = Method SP Request-URI SP SIP-Version CRLF ;Request-URI = SIP-URI / SIPS-URI / absoluteURI ;---------------------------------------------------------------------- ReqLine = Method SP ReqUri SP SipVersion CRLF ;--XCUT 2,4,6 ReqUri = SipUri / SipsUri / AbsoluteUri ;--XALT 3 ;--XCHOICE 1=ReqUriVal_mSip_chosen, 2=ReqUriVal_mSips_chosen ;--XCHOICE 3=ReqUriVal_mAbs_chosen ;---------------------------------------------------------------------- ; absoluteURI = scheme ":" ( hier-part / opaque-part ) ; hier-part = ( net-path / absPath ) [ "?" query ] ; net-path = "//" authority [ absPath ] ; abs-path = "/" path-segments ; opaque-part = uric-no-slash *uric ; uric = reserved / unreserved / escaped ; uric-no-slash = unreserved / escaped / ";" / "?" / ":" / "@" ; / "&" / "=" / "+" / "$" / "," ; path-segments = segment *( "/" segment ) ; segment = *pchar *( ";" param ) ; param = *pchar ; pchar = unreserved / escaped / ; ":" / "@" / "&" / "=" / "+" / "$" / "," ; scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) ; authority = srvr / reg-name ; srvr = [ [ userInfo "@" ] hostport ] ; reg-name = 1*( unreserved / escaped / "$" / "," ; / ";" / ":" / "@" / "&" / "=" / "+" ) ; query = *uric ; SIP-Version = "SIP" "/" 1*DIGIT "." 1*DIGIT ;---------------------------------------------------------------------- AbsoluteUri = Scheme ":" ( HierPart / OpaquePart ) ;--XCUT 2 HierPart = "/" ( NetPath / AbsPathNoSlash ) [ "?" Query ] ;--XCUT 1,6 ;--XCHOICE 3=HierPart_mNetPath_chosen, 4=HierPart_mAbsPathNS_chosen NetPath = "/" Authority 0*1AbsPath ;--XCUT 1 AbsPath = "/" Segment *( "/" Segment ) ;--XCUT 1,4 ;--XTYPE 0=structl Kim & Yu Expires May 26, 2010 [Page 22] Internet-Draft ABNF Extension for code generation November 2009 AbsPathNoSlash = Segment *( "/" Segment ) ;--XCUT 3 ;--XTYPE 0=structl OpaquePart = UricNoSlash *Uric ;--XTYPE 0=char* Uric = Reserved / Unreserved / Escaped ;--XTYPE 0=tok UricNoSlash = Unreserved / Escaped / ";" / "?" / ":" / "@" / "&" / "=" / "+" / "$" / "," ;--XTYPE 0=tok Segment = 1*(Unreserved / Escaped / ":" / "@" / "&" / "=" / "+" / "$" / "," / ";") ;--XTYPE 0=char* Scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) ;--XTYPE 0=char* Authority = AsciiCharNonLws *( %x00-09 / %x0b-0c / %x0e-2e / %x30-3d / %x40-FF ) ;--XTYPE 0=octet Query = 1*Uric ;--XTYPE 0=char* ;---------------------------------------------------------------------- ;---------------------------------------------------------------------- AbsoluteUriNoPrms = Scheme ":" ( HierPartNoPrms / OpaquePartNoPrms ) ;--XCUT 2 ;--XCHOICE 4=AbsoluteUriNP_mHier_chosen, 5=AbsoluteUriNP_mOpaque_chosen HierPartNoPrms = "/" (NetPathNoPrms / AbsPathNoPrms) ;--XCUT 1 ;--XCHOICE 3=HierPartNP_mNet_chosen, 4=HierPartNP_mAbs_chosen NetPathNoPrms = "/" AuthorityNoPrms 0*1( "/" AbsPathNoPrms ) ;--XCUT 1,4 AbsPathNoPrms = SegmentNoPrms *( "/" SegmentNoPrms ) ;--XCUT 3 ;--XTYPE 0=structl OpaquePartNoPrms = UricNoSlashNoPrms *UricNoPrms ;--XTYPE 0=char* UricNoPrms = ReservedNoPrms / Unreserved / Escaped ;--XTYPE 0=tok ReservedNoPrms = "/" / ":" / "@" / "&" / "=" / "+" / "$" ;--XTYPE 0=tok UricNoSlashNoPrms = Unreserved / Escaped / ":" / "@" / "&" / "=" / "+" / "$" ;--XTYPE 0=tok SegmentNoPrms = 1*(Unreserved / Escaped / ":" / "@" / "&" / "=" / "+" / "$") ;--XTYPE 0=char* AuthorityNoPrms = AsciiCharNonLws *( %x00-09 / %x0b-0c / %x0e-2b / %x2d-2e / %x30-3a / %x3c-3e / %x40-FF ) ;--XTYPE 0=octet Kim & Yu Expires May 26, 2010 [Page 23] Internet-Draft ABNF Extension for code generation November 2009 ;---------------------------------------------------------------------- ; SIP-Version = "SIP" "/" 1*DIGIT "." 1*DIGIT ;---------------------------------------------------------------------- SipVersion = "SIP/" ( 1*DIGIT "." 1*DIGIT ) ;--XNCASE 1 ;--XTYPE 0=char* ;---------------------------------------------------------------------- ;message-header = (Accept ; / Accept-Encoding ; / Accept-Language ; / Alert-Info ; / Allow ; / Authentication-Info ; / Authorization ; / Call-ID ; / Call-Info ; / Contact ; / Content-Disposition ; / Content-Encoding ; / Content-Language ; / Content-Length ; / Content-Type ; / CSeq ; / Date ; / Error-Info ; / Expires ; / From ; / In-Reply-To ; / Max-Forwards ; / MIME-Version ; / Min-Expires ; / Organization ; / Priority ; / Proxy-Authenticate ; / Proxy-Authorization ; / Proxy-Require ; / Record-Route ; / Reply-To ; / Require ; / Retry-After ; / Route ; / Server ; / Subject ; / Supported ; / Timestamp ; / To ; / Unsupported ; / User-Agent ; / Via ; / Warning Kim & Yu Expires May 26, 2010 [Page 24] Internet-Draft ABNF Extension for code generation November 2009 ; / WWW-Authenticate ; / extension-header) CRLF ;---------------------------------------------------------------------- MsgHdrList = *{ CallId / 0*1ContDisp / 0*1ContLeng / CSeq / 0*1CallInfoList / 0*1ContactList / 0*1ContEncList / 0*1ContLangList / 0*1ContType / 0*1Date / 0*1Expires / From / 0*1MaxForwards / 0*1MimeVersion / 0*1MinExpires / 0*1Org / 0*1Event / 0*1Priority / 0*1RemPtyIdList / 0*1RpidPrivacyList / 0*1ReferredBy / 0*1ReplyTo / 0*1RetryAfter / 0*1Replaces / 0*1RAck / 0*1RSeq / 0*1SubsState / 0*1Server / 0*1SupportedList / 0*1Subject / 0*1Timestamp / To / 0*1UserAgent / 0*1AccLangList / 0*1AccEncList / 0*1AcceptList / 0*1AlertInfoList / 0*1AllowList / 0*1AuthenInfoList / 0*1AuthorList / 0*1ErrorInfoList / 0*1InReplyToList / 0*1ProxyAuthenList / 0*1ProxyAuthorList / 0*1ProxyRequireList / 0*1RecordRouteList / Kim & Yu Expires May 26, 2010 [Page 25] Internet-Draft ABNF Extension for code generation November 2009 0*1RequireList / 0*1ReasonList / 0*1RouteList / 0*1UnsupportedList / 0*1AllowEventsList / 0*1ViaList / 0*1WarningList / 0*1WwwAuthenList / 0*1PEttInfo / 0*1SessExpires / 0*1PAssertedIdList / 0*1PPreferredIdList / 0*1PChargingFnAddr / 0*1PChargingVector / 0*1Privacy / 0*1ReferTo / 0*1ReqDisposition / 0*1AcceptContact / 0*1RejectContact / 0*1DiversionList / 0*1MinSE / 0*1ExtHdrList } ECRLF ;--XNLCMP ;--XCUT 70 ;--XALT 69 ;--XBITMASK 3=MHL_mContDisp_present ;--XBITMASK 4=MHL_mContLeng_present ;--XBITMASK 6=MHL_mCallInfoList_present ;--XBITMASK 7=MHL_mContactList_present ;--XBITMASK 8=MHL_mContEncList_present ;--XBITMASK 9=MHL_mContLangList_present ;--XBITMASK 10=MHL_mContType_present ;--XBITMASK 11=MHL_mDate_present ;--XBITMASK 12=MHL_mExpires_present ;--XBITMASK 14=MHL_mMaxForwards_present ;--XBITMASK 15=MHL_mMimeVersion_present ;--XBITMASK 16=MHL_mMinExpires_present ;--XBITMASK 17=MHL_mOrg_present ;--XBITMASK 18=MHL_mEvent_present ;--XBITMASK 19=MHL_mPriority_present ;--XBITMASK 20=MHL_mRemPtyIdList_present ;--XBITMASK 21=MHL_mRpidPrivacyList_present ;--XBITMASK 22=MHL_mReferredBy_present ;--XBITMASK 23=MHL_mReplyTo_present ;--XBITMASK 24=MHL_mRetryAfter_present ;--XBITMASK 25=MHL_mReplaces_present ;--XBITMASK 26=MHL_mRAck_present ;--XBITMASK 27=MHL_mRSeq_present Kim & Yu Expires May 26, 2010 [Page 26] Internet-Draft ABNF Extension for code generation November 2009 ;--XBITMASK 28=MHL_mSubsState_present ;--XBITMASK 29=MHL_mServer_present ;--XBITMASK 30=MHL_mSupportedList_present ;--XBITMASK 31=MHL_mSubject_present ;--XBITMASK 32=MHL_mTimestamp_present ;--XBITMASK 34=MHL_mUserAgent_present ;--XBITMASK 35=MHL_mAccLangList_present ;--XBITMASK 36=MHL_mAccEncList_present ;--XBITMASK 37=MHL_mAcceptList_present ;--XBITMASK 38=MHL_mAlertInfoList_present ;--XBITMASK 39=MHL_mAllowList_present ;--XBITMASK 40=MHL_mAuthenInfoList_present ;--XBITMASK 41=MHL_mAuthorList_present ;--XBITMASK 42=MHL_mErrorInfoList_present ;--XBITMASK 43=MHL_mInReplyToList_present ;--XBITMASK 44=MHL_mProxyAuthenList_present ;--XBITMASK 45=MHL_mProxyAuthorList_present ;--XBITMASK 46=MHL_mProxyRequireList_present ;--XBITMASK 47=MHL_mRecordRouteList_present ;--XBITMASK 48=MHL_mRequireList_present ;--XBITMASK 49=MHL_mReasonList_present ;--XBITMASK 50=MHL_mRouteList_present ;--XBITMASK 51=MHL_mUnsupportedList_present ;--XBITMASK 52=MHL_mAllowEventsList_present ;--XBITMASK 53=MHL_mViaList_present ;--XBITMASK 54=MHL_mWarningList_present ;--XBITMASK 55=MHL_mWwwAuthenList_present ;--XBITMASK 56=MHL_mPEttInfo_present ;--XBITMASK 57=MHL_mSessExpires_present ;--XBITMASK 58=MHL_mPAssertedIdList_present ;--XBITMASK 59=MHL_mPPreferredIdList_present ;--XBITMASK 60=MHL_mPChargingFnAddr_present ;--XBITMASK 61=MHL_mPChargingVector_present ;--XBITMASK 62=MHL_mPrivacy_present ;--XBITMASK 63=MHL_mReferTo_present ;--XBITMASK 64=MHL_mReqDisposition_present ;--XBITMASK 65=MHL_mAcceptContact_present ;--XBITMASK 66=MHL_mRejectContact_present ;--XBITMASK 67=MHL_mDiversionList_present ;--XBITMASK 68=MHL_mMinSE_present ;--XBITMASK 69=MHL_mExtHdrList_present ;---------------------------------------------------------------------- ; Message Hdrs ;---------------------------------------------------------------------- AsciiCharNonLws = %x00-08 / %x0b-0c / %x0e-1f / %x21-7f ;--XTYPE 0=tok Payload = ( %x00-08 / %x0b-0c / %x0e-1f / %x21-ff ) *( %x00-09 / %x0b-0c / %x0e-ff / Folding / Folding2) ;--XTYPE 0=octet Kim & Yu Expires May 26, 2010 [Page 27] Internet-Draft ABNF Extension for code generation November 2009 Folding = %x0d [%x0a] 1*(%x20 / %x09) ;--XTYPE 0=tok Folding2 = %x0a 1*(%x20 / %x09) ;--XTYPE 0=tok ;---------------------------------------------------------------------- ; INVITEm = %x49.4E.56.49.54.45 ; INVITE in caps ; ACKm = %x41.43.4B ; ACK in caps ; OPTIONSm = %x4F.50.54.49.4F.4E.53 ; OPTIONS in caps ; BYEm = %x42.59.45 ; BYE in caps ; CANCELm = %x43.41.4E.43.45.4C ; CANCEL in caps ; REGISTERm = %x52.45.47.49.53.54.45.52 ; REGISTER in caps ; Method = INVITEm / ACKm / OPTIONSm / BYEm ; / CANCELm / REGISTERm ; / extension-method ; extension-method = token ;---------------------------------------------------------------------- Method = BaseMethod / Token ;--XVAR 2=mExtMethod ;--XALT 2 ;--XCHOICE 1=Method_mBase_chosen, 2=Method_mExt_chosen BaseMethod = "INVITE" | "ACK" | "OPTIONS" | "BYE" | "CANCEL" | "REGISTER" | "PRACK" | "INFO" | "COMET" | "REFER" | "SUBSCRIBE" | "NOTIFY" | "MESSAGE" | "UPDATE" | "DO" | "PUBLISH" ;--XTYPE 0=enum ;--XVAR 1=BM_INVITE, 2=BM_ACK, 3=BM_OPTIONS ;--XVAR 4=BM_BYE, 5=BM_CANCEL, 6=BM_REGISTER ;--XVAR 7=BM_PRACK, 8=BM_INFO, 9=BM_COMET ;--XVAR 10=BM_REFER, 11=BM_SUBSCRIBE, 12=BM_NOTIFY ;--XVAR 13=BM_MESSAGE, 14=BM_UPDATE, 15=BM_DO ;--XVAR 16=BM_PUBLISH ;---------------------------------------------------------------------- ;Response = Status-Line ; *( message-header ) ; CRLF ; [ message-body ] ; ;Status-Line = SIP-Version SP Status-Code SP Reason-Phrase CRLF ;Status-Code = Informational ; / Redirection ; / Success ; / Client-Error ; / Server-Error ; / Global-Failure ; / extension-code ;extension-code = 3DIGIT ;Reason-Phrase = *(reserved / unreserved / escaped ; / UTF8-NONASCII / UTF8-CONT / SP / HTAB) ;---------------------------------------------------------------------- Kim & Yu Expires May 26, 2010 [Page 28] Internet-Draft ABNF Extension for code generation November 2009 StatusLine = SipVersion SP StatusCode SP ReasonPhrase CRLF ;--XCUT 2,4,6 StatusCode = 3DIGIT ;--XTYPE 0=ushort ReasonPhrase = 1*(Reserved / Unreserved / Escaped / %x80-FF / %x20 / %x09) ;--XTYPE 0=char* ;---------------------------------------------------------------------- ;Informational = "100" ; Trying ; / "180" ; Ringing ; / "181" ; Call Is Being Forwarded ; / "182" ; Queued ; / "183" ; Session Progress ;Success = "200" ; OK ;Redirection = "300" ; Multiple Choices ; / "301" ; Moved Permanently ; / "302" ; Moved Temporarily ; / "305" ; Use Proxy ; / "380" ; Alternative Service ;Client-Error = "400" ; Bad Request ; / "401" ; Unauthorized ; / "402" ; Payment Required ; / "403" ; Forbidden ; / "404" ; Not Found ; / "405" ; Method Not Allowed ; / "406" ; Not Acceptable ; / "407" ; Proxy Authentication Required ; / "408" ; Request Timeout ; / "410" ; Gone ; / "413" ; Request Entity Too Large ; / "414" ; Request-URI Too Large ; / "415" ; Unsupported Media Type ; / "416" ; Unsupported URI Scheme ; / "420" ; Bad Extension ; / "421" ; Extension Required ; / "423" ; Interval Too Brief ; / "480" ; Temporarily not available ; / "481" ; Call Leg/Transaction Does Not Exist ; / "482" ; Loop Detected ; / "483" ; Too Many Hops ; / "484" ; Address Incomplete ; / "485" ; Ambiguous ; / "486" ; Busy Here ; / "487" ; Request Terminated ; / "488" ; Not Acceptable Here ; / "491" ; Request Pending ; / "493" ; Undecipherable ;Server-Error = "500" ; Internal Server Error ; / "501" ; Not Implemented Kim & Yu Expires May 26, 2010 [Page 29] Internet-Draft ABNF Extension for code generation November 2009 ; / "502" ; Bad Gateway ; / "503" ; Service Unavailable ; / "504" ; Server Time-out ; / "505" ; SIP Version not supported ; / "513" ; Message Too Large ;Global-Failure = "600" ; Busy Everywhere ; / "603" ; Decline ; / "604" ; Does not exist anywhere ; / "606" ; Not Acceptable ; ;---------------------------------------------------------------------- ;---------------------------------------------------------------------- ;Accept = "Accept" HCOLON ; [ accept-range *(COMMA accept-range) ] ;accept-range = media-range *(SEMI accept-param) ;media-range = ( "*/*" ; / ( m-type SLASH "*" ) ; / ( m-type SLASH m-subtype ) ; ) *( SEMI m-parameter ) ;accept-param = ("q" EQUAL qvalue) / generic-param ;qvalue = ( "0" [ "." 0*3DIGIT ] ) ; / ( "1" [ "." 0*3("0") ] ) ;generic-param = token [ EQUAL gen-value ] ;gen-value = token / host / quoted-string ;---------------------------------------------------------------------- AcceptList = 1*("Accept" HCOLON Accept) ;--XTYPE 0=structl ;--XCUT 2,3 ;--XNCASE 2 ;--XDUP 2=0x20,0x09,0x3a Accept = 0*1Payload CRLF ;--XCUT 2 ;--XBITMASK 1=Accept_mPld_present AcceptValue = AccRange *(COMMA AccRange) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl AccRange = MediaRange 0*1AccPrmList ;--XBITMASK 2=AccRange_mPrmList_present ; cf. AccPrmList -> 0*1AccPrmList MediaRange = Token SLASH Token ;--XCUT 2 ;--XVAR 1=mType, 3=mSubType AccPrmList = 1*(SEMI AccPrm) ;--XCUT 2 ;--XTYPE 0=structl AccPrm = QPrm / GenPrm ;--XALT 2 Kim & Yu Expires May 26, 2010 [Page 30] Internet-Draft ABNF Extension for code generation November 2009 QPrm = "q" EQUAL (("0" [ "." 0*3DIGIT ]) / ("1" [ "." 0*3("0") ])) ;--XCUT 1,2 ;--XNCASE 1 ;--XTYPE 0=float GenPrm = Token [ EQUAL GenVal ] ;--XCUT 3 ;--XVAR 1=mGenPrmName, 4=mGenPrmValue ;--XBITMASK 4=GenPrm_mValue_present GenVal = HostVal / QStr / Token ;--XALT 3 HostVal = Ipv4 / Ipv6 / HostNameVal ;--XALT 3 HostNameVal = 1*(Alphanum / "-") "." 1*(Alphanum / "-"/ "." ) ;--XTYPE 0=char* ;---------------------------------------------------------------------- ;Accept-Encoding = "Accept-Encoding" HCOLON ; [ encoding *(COMMA encoding) ] ;encoding = codings *(SEMI accept-param) ;codings = content-coding / "*" ;content-coding = token ;---------------------------------------------------------------------- AccEncList = 1*("Accept-Encoding" HCOLON AccEnc) ;--XTYPE 0=structl ;--XCUT 2,3 ;--XNCASE 2 AccEnc = 0*1Payload CRLF ;--XCUT 2 ;--XBITMASK 1=AccEnc_mPld_present AccEncValue = Encoding *(COMMA Encoding) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl Encoding = Token 0*1AccPrmList ;--XVAR 1=mCodings ;--XBITMASK 2=Enc_mPrmList_present ;---------------------------------------------------------------------- ;Accept-Language = "Accept-Language" HCOLON ; [ language *(COMMA language) ] ;language = language-range *(SEMI accept-param) ;language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) / "*" ) ;---------------------------------------------------------------------- AccLangList = 1*("Accept-Language" HCOLON AccLang) ;--XTYPE 0=structl ;--XNCASE 2 ;--XCUT 2,3 AccLang = 0*1Payload CRLF ;--XCUT 2 ;--XBITMASK 1=AccLang_mPld_present Kim & Yu Expires May 26, 2010 [Page 31] Internet-Draft ABNF Extension for code generation November 2009 AccLangValue = Language *(COMMA Language) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl Language = LanguageRange 0*1AccPrmList ;--XBITMASK 2=Lang_mPrmList_present LanguageRange = 1*8ALPHA *( "-" 1*8ALPHA ) / "*" ;--XTYPE 0=char* ;---------------------------------------------------------------------- ;Alert-Info = "Alert-Info" HCOLON alert-param *(COMMA alert-param) ;alert-param = LAQUOT absoluteURI RAQUOT *( SEMI generic-param ) ;---------------------------------------------------------------------- AlertInfoList = 1*("Alert-Info" HCOLON Payload CRLF) ;--XTYPE 0=structl ;--XCUT 2,3,5 ;--XNCASE 2 AlertInfoValue = AlertPrm *(COMMA AlertPrm) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl AlertPrm = LAQUOT AbsoluteUri RAQUOT 0*1GenPrmList ;--XCUT 1,3 ;--XBITMASK 4=AlertPrm_mPrmList_present GenPrmList = 1*( SEMI GenPrm ) ;--XCUT 2 ;--XTYPE 0=structl ;---------------------------------------------------------------------- ;Allow = "Allow" HCOLON [Method *(COMMA Method)] ;---------------------------------------------------------------------- AllowList = 1*("Allow" HCOLON Allow) ;--XTYPE 0=structl ;--XCUT 2,3 ;--XNCASE 2 ;--XDUP 2=0x20,0x09,0x3a Allow = 0*1Payload CRLF ;--XCUT 2 ;--XBITMASK 1=Allow_mPld_present AllowValue = Method *(COMMA Method) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ;---------------------------------------------------------------------- ;Authorization = "Authorization" HCOLON credentials ;credentials = ("Digest" LWS digest-response) ; / other-response ;digest-response = dig-resp *(COMMA dig-resp) Kim & Yu Expires May 26, 2010 [Page 32] Internet-Draft ABNF Extension for code generation November 2009 ;dig-resp = username / realm / nonce / digest-uri ; / dresponse / algorithm / cnonce ; / opaque / message-qop ; / nonce-count / auth-param ;username = "username" EQUAL username-value ;username-value = quoted-string ;digest-uri = "uri" EQUAL LDQUOT digest-uri-value RDQUOT ;digest-uri-value = rquest-uri ; Equal to request-uri as specified ; by HTTP/1.1 ;message-qop = "qop" EQUAL qop-value ;cnonce = "cnonce" EQUAL cnonce-value ;cnonce-value = nonce-value ;nonce-count = "nc" EQUAL nc-value ;nc-value = 8LHEX ;dresponse = "response" EQUAL request-digest ;request-digest = LDQUOT 32LHEX RDQUOT ;auth-param = auth-param-name EQUAL ; ( token / quoted-string ) ;auth-param-name = token ;other-response = auth-scheme LWS auth-param ; *(COMMA auth-param) ;auth-scheme = token ;---------------------------------------------------------------------- AuthorList = 1*("Authorization" HCOLON Payload CRLF) ;--XTYPE 0=structl ;--XCUT 2,3,5 ;--XNCASE 2 AuthorValue = DigRespList / OtherResp ;--XPDU ;--XALT 2 ;--XCHOICE 1=AuthorVal_mDig_chosen, 2=AuthorVal_mOther_chosen DigRespList = "Digest" LWS DigResp *(COMMA DigResp) ;--XCUT 1,2,5 ;--XTYPE 0=structl ;--XNCASE 1 DigResp = UserName / Realm / Nonce / DigestUri / DResp / Alg / CNonce / Opaque / MessageQop / NonceCount / AuthPrm ;--XALT 11 UserName = "username" EQUAL QStr ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 DigestUri = "uri" EQUAL LDQUOT (STARONLY / AbsoluteUri / AbsPath / Authority) RDQUOT ;--XCUT 1,2,3,9 ;--XNCASE 1 ;--XTYPE 5=null ;--XALT 8 Kim & Yu Expires May 26, 2010 [Page 33] Internet-Draft ABNF Extension for code generation November 2009 ;--XCHOICE 5=DigUri_mSTARONLY_chosen, 6=DigUri_mAbsoluteUri_chosen ;--XCHOICE 7=DigUri_mAbsPath_chosen, 8=DigUri_mAuthority_chosen MessageQop = "qop" EQUAL QopVal ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 CNonce = "cnonce" EQUAL QStr ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 NonceCount = "nc" EQUAL 8LHEX ;--XCUT 1,2 ;--XNCASE 1 ;--XTYPE 0=char* DResp = "response" EQUAL LDQUOT 32LHEX RDQUOT ;--XCUT 1,2,3,5 ;--XNCASE 1 ;--XTYPE 0=char* AuthPrm = Token EQUAL ( Token / QStr ) ;--XCUT 2 ;--XVAR 1=mName ;--XVAR 4=mValueToken, 5=mValueQStr ;--XCHOICE 4=AuthPrm_mToken_chosen, 5=AuthPrm_mQStr_chosen OtherResp = Token LWS AuthPrmList ;--XCUT 2 ;--XVAR 1=mAuthScheme AuthPrmList = AuthPrm *(COMMA AuthPrm) ;--XCUT 3 ;--XTYPE 0=structl ;---------------------------------------------------------------------- ;Authentication-Info = "Authentication-Info" HCOLON ainfo ; *(COMMA ainfo) ;ainfo = nextnonce / message-qop ; / response-auth / cnonce ; / nonce-count ;nextnonce = "nextnonce" EQUAL nonce-value ;response-auth = "rspauth" EQUAL response-digest ;response-digest = LDQUOT *LHEX RDQUOT ;---------------------------------------------------------------------- AuthenInfoList = 1*("Authentication-Info" HCOLON Payload CRLF) ;--XTYPE 0=structl ;--XCUT 2,3,5 ;--XNCASE 2 AuthenInfoValue = AInfo *(COMMA AInfo) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl AInfo = NextNonce / MessageQop / RespAuth / CNonce / NonceCount ; Kim & Yu Expires May 26, 2010 [Page 34] Internet-Draft ABNF Extension for code generation November 2009 NextNonce = "nextnonce" EQUAL QStr ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 RespAuth = "rspauth" EQUAL LDQUOT *LHEX RDQUOT ;--XCUT 1,2,3,5 ;--XNCASE 1 ;--XTYPE 0=char* ;---------------------------------------------------------------------- ;Call-ID = ( "Call-ID" / "i" ) HCOLON callid ;callid = word [ "@" word ] ;---------------------------------------------------------------------- CallId = ( "Call-ID" / "i" ) HCOLON Payload CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XTDEF 5 ;--XDUP 3=0x20,0x09,0x3a CallIdVal = Word [ "@" Word ] ;--XTYPE 0=char* ;---------------------------------------------------------------------- ;Call-Info = "Call-Info" HCOLON info *(COMMA info) ;info = LAQUOT absoluteURI RAQUOT *( SEMI info-param) ;info-param = ( "purpose" EQUAL ( "icon" / "info" ; / "card" / token ) ) / generic-param ;---------------------------------------------------------------------- CallInfoList = 1*("Call-Info" HCOLON CallInfo) ;--XTYPE 0=structl ;--XCUT 2,3 ;--XNCASE 2 ; ! HCOLON2 -> HCOLON (060105) CallInfo = 0*1Payload CRLF ;--XCUT 2 ;--XBITMASK 1=CallInfo_mPld_present CallInfoValue = Info *(COMMA Info) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl Info = LAQUOT AbsoluteUri RAQUOT 0*1InfoPrmList ;--XCUT 1,3 ;--XBITMASK 4=Info_mPrmList_present InfoPrmList = 1*( SEMI InfoPrm ) ;--XCUT 2 ;--XTYPE 0=structl InfoPrm = InfoPrmPurpose / GenPrm ;--XALT 2 ;--XCHOICE 1=InfoPrm_mIPP_chosen, 2=InfoPrm_mGenPrm_chosen InfoPrmPurpose = "purpose" EQUAL ( BasicPurpose / Token ) ;--XCUT 1,2 ;--XNCASE 1 Kim & Yu Expires May 26, 2010 [Page 35] Internet-Draft ABNF Extension for code generation November 2009 ;--XVAR 5=mOtherPurpose ;--XALT 5 ;--XCHOICE 4=InfoPrmPurp_mBasic_chosen, 5=InfoPrmPurp_mOther_chosen BasicPurpose = "icon" / "Info" / "card" ;--XTYPE 0=enum ;--XNCASE 1,2,3 ;--XVAR 1=BasicPurpose_icon, 2=BasicPurpose_Info, 3=BasicPurpose_card ;---------------------------------------------------------------------- ;Contact = ("Contact" / "m" ) HCOLON ; ( STAR / (contact-param *(COMMA contact-param))) ;contact-param = (name-addr / addr-spec) *(SEMI contact-params) ;name-addr = [ display-name ] LAQUOT addr-spec RAQUOT ;addr-spec = SIP-URI / SIPS-URI / absoluteURI ;display-name = *(token LWS)/ quoted-string ;contact-params = c-p-q / c-p-expires / contact-extension ;c-p-q = "q" EQUAL qvalue ;c-p-expires = "expires" EQUAL delta-seconds ;contact-extension = generic-param ;delta-seconds = 1*DIGIT ;---------------------------------------------------------------------- ContactList = 1*( ("Contact" / "m" ) HCOLON ContactValue CRLF) ;--XTYPE 0=structl ;--XCUT 3,4,5,7 ;--XNCASE 3,4 ;--XDUP 4=0x20,0x09,0x3a ContactValue = ContactPrmList / STAR ;--XALT 2 ;--XCHOICE 1=CtctVal_mCtctPrmList_chosen, 2=CtctVal_mSTAR_chosen ContactPrmList = ContactPrm *(COMMA ContactPrm) ;--XCUT 3 ;--XTYPE 0=structl ContactPrm = (NameAddr / AddrSpecNoPrms) 0*1ContactPrmsList ;--XALT 3 ;--XCHOICE 2=CtctPrm_mNameAddr_chosen, 3=CtctPrm_mAddrSpecNP_chosen ;--XBITMASK 4=CtctPrm_mPrmsList_present NameAddr = 0*1DisplayName "<" AddrSpec RAQUOT ;--XCUT 2,4 ;--XBITMASK 1=NameAddr_mDispName_present AddrSpec = SipUri / SipsUri / AbsoluteUri ;--XALT 3 ;--XCHOICE 1=AddrSpec_mSip_chosen, 2=AddrSpec_mSips_chosen ;--XCHOICE 3=AddrSpec_mAbs_chosen AddrSpecNoPrms = SipUriNoPrms / SipsUriNoPrms / AbsoluteUriNoPrms ;--XALT 3 ;--XCHOICE 1=AddrSpecNP_mSip_chosen, 2=AddrSpecNP_mSips_chosen ;--XCHOICE 3=AddrSpecNP_mAbs_chosen DisplayName = TStr / QStr Kim & Yu Expires May 26, 2010 [Page 36] Internet-Draft ABNF Extension for code generation November 2009 TStr = TokenChar 0*TokenEChar ;--XTYPE 0=octet(40) TokenChar = Alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" / %x80-ff / "'" / "~" ;--XTYPE 0=tok TokenEChar = Alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" / %x20/ %x09 / %x0A/ %x0d / %x80-ff ;--XTYPE 0=tok ContactPrmsList = 1*(SEMI ContactPrms) ;--XCUT 2 ;--XTYPE 0=structl ; cf. * -> 1* ContactPrms = CpQ / CpExpires / GenPrm ;--XVAR 3=mCpExt ;--XALT 3 ;--XCHOICE 1=CtctPrms_mCpQ_chosen, 2=CtctPrms_mCpExpires_chosen ;--XCHOICE 3=CtctPrms_mCpExt_chosen CpQ = "q" EQUAL (("0" ["." 0*3DIGIT]) / ("1" ["." 0*3("0")])) ;--XCUT 1,2 ;--XNCASE 1 ;--XTYPE 0=float CpExpires = "expires" EQUAL (DeltaSeconds / Rfc1123Date) ;--XCUT 1,2 ;--XNCASE 1 ;--XCHOICE 4=CpExp_mDeltaSec_chosen, 5=CpExp_mRfc1123Date_chosen DeltaSeconds = 1*DIGIT ;--XTYPE 0=uint ;---------------------------------------------------------------------- ;Content-Disposition = "Content-Disposition" HCOLON ; disp-type *( SEMI disp-param ) ;disp-type = "render" / "session" / "icon" / "alert" ; / disp-extension-token ;disp-param = handling-param / generic-param ;handling-param = "handling" EQUAL ; ( "optional" / "required" ; / other-handling ) ;other-handling = token ;disp-extension-token = token ;---------------------------------------------------------------------- ContDisp = "Content-Disposition" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 ContDispValue = DispType 0*1DispPrmList ;--XPDU ;--XBITMASK 2=ContDispVal_mPrmList_present ; cf. DispPrmList -> 0*1DispPrmList Kim & Yu Expires May 26, 2010 [Page 37] Internet-Draft ABNF Extension for code generation November 2009 DispType = BasicDispType / Token ;--XVAR 2=mOtherDispType ;--XALT 2 ;--XCHOICE 1=DispType_mBasic_chosen, 2=DispType_mOther_chosen BasicDispType = "render" / "session" / "icon" / "alert" /"early-session" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4,5 ;--XVAR 1=BasicDispType_render, 2=BasicDispType_session ;--XVAR 3=BasicDispType_icon, 4=BasicDispType_alert ;--XVAR 5=BasicDispType_early_session DispPrmList = 1*( SEMI DispPrm ) ;--XCUT 2 ;--XTYPE 0=structl DispPrm = HandlingPrm / GenPrm ;--XALT 2 ;--XCHOICE 1=DispPrm_mHandling_chosen, 2=DispPrm_mGen_chosen HandlingPrm = "handling" EQUAL ( BasicHandling / Token ) ;--XCUT 1,2 ;--XNCASE 1 ;--XVAR 5=mOtherHandling ;--XALT 5 ;--XCHOICE 4=HandPrm_mBasic_chosen, 5=HandPrm_mOther_chosen BasicHandling = "optional" / "required" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=BasicHandling_optional, 2=BasicHandling_required ;---------------------------------------------------------------------- ;Content-Encoding = ( "Content-Encoding" / "e" ) HCOLON ; content-coding *(COMMA content-coding) ;---------------------------------------------------------------------- ContEncList = 1*( ( "Content-Encoding" / "e" ) HCOLON Payload CRLF) ;--XTYPE 0=structl ;--XCUT 3,4,5,7 ;--XNCASE 3,4 ;--XDUP 4=0x20,0x09,0x3a ContEncValue = Token *(COMMA Token) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ;---------------------------------------------------------------------- ;Content-Language = "Content-Language" HCOLON ; language-tag *(COMMA language-tag) ;language-tag = primary-tag *( "-" subtag ) ;primary-tag = 1*8ALPHA ;subtag = 1*8ALPHA ;---------------------------------------------------------------------- Kim & Yu Expires May 26, 2010 [Page 38] Internet-Draft ABNF Extension for code generation November 2009 ContLangList = 1*("Content-Language" HCOLON Payload CRLF) ;--XTYPE 0=structl ;--XCUT 2,3,5 ;--XNCASE 2 ContLangValue = LanguageTag *(COMMA LanguageTag) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl LanguageTag = PrimaryTag 0*1SubTagList ;--XBITMASK 2=LangTag_mSubTagList_present PrimaryTag = 1*8ALPHA ;--XTYPE 0=char* SubTagList = 1*( "-" SubTag ) ;--XCUT 2 ;--XTYPE 0=structl SubTag = 1*8ALPHA ;--XTYPE 0=char* ;---------------------------------------------------------------------- ;Content-Length = ( "Content-Length" / "l" ) HCOLON 1*DIGIT ;---------------------------------------------------------------------- ContLeng = ( "Content-Length" / "l" ) HCOLON 1*DIGIT CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XTYPE 0=uint ;--XDUP 3=0x20,0x09,0x3a ;---------------------------------------------------------------------- ;Content-Type = ( "Content-Type" / "c" ) HCOLON media-type ;media-type = m-type SLASH m-subtype *(SEMI m-parameter) ;m-type = discrete-type / composite-type ;discrete-type = "text" / "image" / "audio" / "video" ; / "application" / extension-token ;composite-type = "message" / "multipart" / extension-token ;extension-token = ietf-token / x-token ;ietf-token = token ;x-token = "x-" token ;m-subtype = extension-token / iana-token ;iana-token = token ;m-parameter = m-attribute EQUAL m-value ;m-attribute = token ;m-value = token / quoted-string ;---------------------------------------------------------------------- ContType = ( "Content-Type" / "c" ) HCOLON ContTypeValue CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XTDEF 5 ;--XDUP 3=0x20,0x09,0x3a Kim & Yu Expires May 26, 2010 [Page 39] Internet-Draft ABNF Extension for code generation November 2009 ContTypeValue = MType SLASH Token 0*1MPrmList ;--XCUT 2 ;--XVAR 3=mMSubType ;--XBITMASK 4=ContTypeVal_mPrmList_present MType = BasicMType / Token ;--XVAR 2=mOtherMType ;--XALT 2 ;--XCHOICE 1=MType_mBasic_chosen, 2=MType_mOther_chosen BasicMType = "text" / "image" / "audio" / "video" / "application" / "message" / "multipart" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4,5,6,7 ;--XVAR 1=BasicMType_text, 2=BasicMType_image, 3=BasicMType_audio ;--XVAR 4=BasicMType_video, 5=BasicMType_application ;--XVAR 6=BasicMType_message, 7=BasicMType_multipart MPrmList = 1*(SEMI MPrm) ;--XCUT 2 ;--XTYPE 0=structl MPrm = Token EQUAL ( Token / QStr ) ;--XCUT 2 ;--XVAR 1=mMAttribute, 4=mMValueToken, 5=mMValueQStr ;--XCHOICE 4=MPrm_mToken_chosen, 5=MPrm_mQStr_chosen ;---------------------------------------------------------------------- ;CSeq = "CSeq" HCOLON 1*DIGIT LWS Method ;---------------------------------------------------------------------- CSeq = "CSeq" HCOLON 1*DIGIT LWS Method CRLF ;--XCUT 1,2,4,6 ;--XNCASE 1 ;--XTYPE 3=uint ;--XVAR 3=mCSeqNumber, 5=mCSeqMethod ;---------------------------------------------------------------------- ;Date = "Date" HCOLON SIP-date ;SIP-date = rfc1123-date ;rfc1123-date = wkday "," SP date1 SP time SP "GMT" ;date1 = 2DIGIT SP month SP 4DIGIT ; ; day month year (e.g., 02 Jun 1982) ;time = 2DIGIT ":" 2DIGIT ":" 2DIGIT ; ; 00:00:00 - 23:59:59 ;wkday = "Mon" / "Tue" / "Wed" ; / "Thu" / "Fri" / "Sat" / "Sun" ;month = "Jan" / "Feb" / "Mar" / "Apr" ; / "May" / "Jun" / "Jul" / "Aug" ; / "Sep" / "Oct" / "Nov" / "Dec" ;---------------------------------------------------------------------- Date = "Date" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 Kim & Yu Expires May 26, 2010 [Page 40] Internet-Draft ABNF Extension for code generation November 2009 DateValue = Rfc1123Date ;--XPDU ;--XTDEF 1 Rfc1123Date = WkDay "," SP Date1 SP Time SP "GMT" ;--XCUT 2,3,5,7,8 ;--XNCASE 8 WkDay = "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4,5,6,7 ;--XVAR 1=WkDay_Mon, 2=WkDay_Tue, 3=WkDay_Wed, 4=WkDay_Thu ;--XVAR 5=WkDay_Fri, 6=WkDay_Sat, 7=WkDay_Sun Date1 = 2DIGIT SP Month SP 4DIGIT ;--XCUT 2,4 ;--XVAR 1=mDay, 3=mMonth, 5=mYear ;--XTYPE 1=uint, 5=uint Month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4,5,6,7,8,9,10,11,12 ;--XVAR 1=Month_Jan, 2=Month_Feb, 3=Month_Mar, 4=Month_Apr, ;--XVAR 5=Month_May, 6=Month_Jun, 7=Month_Jul, 8=Month_Aug, ;--XVAR 9=Month_Sep, 10=Month_Oct 11=Month_Nov, 12=Month_Dec Time = 2DIGIT ":" 2DIGIT ":" 2DIGIT ;--XCUT 2,4 ;--XVAR 1=mHour, 3=mMinute, 5=mSecond ;--XTYPE 1=uint, 3=uint, 5=uint ;---------------------------------------------------------------------- ;Error-Info = "Error-Info" HCOLON error-uri *(COMMA error-uri) ;error-uri = LAQUOT absoluteURI RAQUOT *( SEMI generic-param ) ;---------------------------------------------------------------------- ErrorInfoList = 1*("Error-Info" HCOLON Payload CRLF) ;--XTYPE 0=structl ;--XCUT 2,3,5 ;--XNCASE 2 ErrorInfoValue = ErrorUri *(COMMA ErrorUri) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ErrorUri = LAQUOT AbsoluteUri RAQUOT 0*1GenPrmList ;--XCUT 1,3 ;--XBITMASK 4=ErrUri_mPrmList_present ;---------------------------------------------------------------------- ;Expires = "Expires" HCOLON delta-seconds ;---------------------------------------------------------------------- Expires = "Expires" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 Kim & Yu Expires May 26, 2010 [Page 41] Internet-Draft ABNF Extension for code generation November 2009 ExpiresValue = DeltaSeconds / Rfc1123Date ;--XPDU ;--XCHOICE 1=ExpVal_mDeltaSec_chosen, 2=ExpVal_mRfc1123Date_chosen ;---------------------------------------------------------------------- ;From = ( "From" / "f" ) HCOLON from-spec ;from-spec = ( name-addr / addr-spec ) *( SEMI from-param ) ;from-param = tag-param / generic-param ;tag-param = "tag" EQUAL token ;---------------------------------------------------------------------- From = ( "From" / "f" ) HCOLON FromValue CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XTDEF 5 ;--XDUP 3=0x20,0x09,0x3a FromValue = FromToAddr 0*1FromToPrmList ;--XBITMASK 2=FromVal_mPrmList_present FromToAddr = NameAddr / AddrSpecNoPrms ;--XALT 2 ;--XCHOICE 1=FromToAddr_mNameAddr_chosen, ;--XCHOICE 2=FromToAddr_mAddrSpecNP_chosen FromToPrmList = 1*( SEMI FromToPrm ) ;--XCUT 2 ;--XTYPE 0=structl FromToPrm = TagPrm / GenPrm ;--XALT 2 ;--XCHOICE 1=FromToPrm_mTag_chosen, 2=FromToPrm_mGen_chosen TagPrm = "tag" EQUAL Token ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 ;---------------------------------------------------------------------- ;In-Reply-To = "In-Reply-To" HCOLON callid *(COMMA callid) ;---------------------------------------------------------------------- InReplyToList = 1*("In-Reply-To" HCOLON Payload CRLF) ;--XTYPE 0=structl ;--XCUT 2,3,5 ;--XNCASE 2 ; ! former Payload5 InReplyToValue = CallIdVal *(COMMA CallIdVal) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ;---------------------------------------------------------------------- ;Max-Forwards = "Max-Forwards" HCOLON 1*DIGIT ;---------------------------------------------------------------------- MaxForwards = "Max-Forwards" HCOLON 1*DIGIT CRLF ;--XCUT 1,2,4 ;--XNCASE 1 Kim & Yu Expires May 26, 2010 [Page 40] Internet-Draft ABNF Extension for code generation November 2009 ;--XTYPE 0=uint ;---------------------------------------------------------------------- ;MIME-Version = "MIME-Version" HCOLON 1*DIGIT "." 1*DIGIT ;---------------------------------------------------------------------- MimeVersion = "MIME-Version" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 ;---------------------------------------------------------------------- ;Min-Expires = "Min-Expires" HCOLON delta-seconds ;---------------------------------------------------------------------- MinExpires = "Min-Expires" HCOLON 1*DIGIT CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTYPE 0=uint ;---------------------------------------------------------------------- ;Organization = "Organization" HCOLON [TEXT-UTF8-TRIM] ;---------------------------------------------------------------------- Org = "Organization" HCOLON 0*1Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XBITMASK 3=Org_mPld_present ;---------------------------------------------------------------------- ;Priority = "Priority" HCOLON priority-value ;priority-value = "emergency" / "urgent" / "normal" ; / "non-urgent" / other-priority ;other-priority = token ;---------------------------------------------------------------------- Priority = "Priority" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 PriorityValue = BasicPriority / Token ;--XPDU ;--XVAR 2=mOtherPriority ;--XALT 2 ;--XCHOICE 1=PrioVal_mBasic_chosen, 2=PrioVal_mOther_chosen BasicPriority = "emergency" / "urgent" / "normal" / "non-urgent" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4 ;--XVAR 1=BasicPrio_emergency, 2=BasicPrio_urgent ;--XVAR 3=BasicPrio_normal, 4=BasicPrio_nonurgent Kim & Yu Expires May 26, 2010 [Page 41] Internet-Draft ABNF Extension for code generation November 2009 ;---------------------------------------------------------------------- ;Proxy-Authenticate = "Proxy-Authenticate" HCOLON challenge ;challenge = ("Digest" LWS digest-cln *(COMMA digest-cln)) ; / other-challenge ;other-challenge = auth-scheme LWS auth-param ; *(COMMA auth-param) ;digest-cln = realm / domain / nonce ; / opaque / stale / algorithm ; / qop-options / auth-param ;realm = "realm" EQUAL realm-value ;realm-value = quoted-string ;domain = "domain" EQUAL LDQUOT URI ; *( 1*SP URI ) RDQUOT ;URI = absoluteURI / abs-path ;nonce = "nonce" EQUAL nonce-value ;nonce-value = quoted-string ;opaque = "opaque" EQUAL quoted-string ;stale = "stale" EQUAL ( "true" / "false" ) ;algorithm = "algorithm" EQUAL ( "MD5" / "MD5-sess" ; / token ) ;qop-options = "qop" EQUAL LDQUOT qop-value ; *("," qop-value) RDQUOT ;qop-value = "auth" / "auth-int" / token ;---------------------------------------------------------------------- ProxyAuthenList = 1*("Proxy-Authenticate" HCOLON Payload CRLF) ;--XTYPE 0=structl ; cf. * -> 1* ;--XCUT 2,3,5 ;--XNCASE 2 ProxyAuthenValue = DigestClnList / OtherChallenge ;--XPDU ;--XALT 2 ;--XCHOICE 1=PAuthenVal_mDig_chosen, 2=PAuthenVal_mOther_chosen DigestClnList = "Digest" LWS DigestCln *(COMMA DigestCln) ;--XCUT 1,2,5 ;--XNCASE 1 ;--XTYPE 0=structl DigestCln = Realm / Domain / Nonce / Opaque / Stale / Alg / QopOptions / AuthPrm ;--XALT 8 ;--XCHOICE 1=DigCln_mRealm_chosen, 2=DigCln_mDomain_chosen ;--XCHOICE 3=DigCln_mNonce_chosen, 4=DigCln_mOpaque_chosen ;--XCHOICE 5=DigCln_mStale_chosen, 6=DigCln_mAlg_chosen ;--XCHOICE 7=DigCln_mQopOptions_chosen, 8=DigCln_mAuthPrm_chosen Realm = "realm" EQUAL QStr ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 Kim & Yu Expires May 26, 2010 [Page 42] Internet-Draft ABNF Extension for code generation November 2009 Domain = "domain" EQUAL LDQUOT Uri *( 1*SP Uri ) RDQUOT ;--XCUT 1,2,3,6,8 ;--XNCASE 1 ;--XTYPE 0=structl Uri = AbsoluteUri / AbsPath ; Nonce = "nonce" EQUAL QStr ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 Opaque = "opaque" EQUAL QStr ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 Stale = "stale" EQUAL ( "true" / "false" ) ;--XCUT 1,2 ;--XNCASE 1,4,5 ;--XTYPE 0=enum ;--XVAR 4=Stale_true, 5=Stale_false Alg = "algorithm" EQUAL AlgVal ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 AlgVal = BasicAlg / Token ;--XVAR 2=mOtherAlg ;--XALT 2 ;--XCHOICE 1=AlgVal_mBasic_chosen, 2=AlgVal_mOther_chosen BasicAlg = "MD5" / "MD5-sess" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=BasicAlg_MD5, 2=BasicAlg_MD5_sess ;--XDUP 1=0x2c,0x20,0x09,0d QopOptions = "qop" EQUAL LDQUOT QopValList RDQUOT ;--XCUT 1,2,3,5 ;--XNCASE 1 QopValList = QopVal *("," QopVal) ;--XCUT 3 ;--XTYPE 0=structl QopVal = BasicQopVal / Token ;--XVAR 2=mOtherQopVal ;--XALT 2 ;--XCHOICE 1=QopVal_mBasic_chosen, 2=QopVal_mOther_chosen BasicQopVal = "auth" / "auth-int" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=BasicQopVal_auth, 2=BasicQopVal_auth_int ;--XDUP 1=0x2c,0x22 OtherChallenge = Token LWS AuthPrmList ;--XCUT 2 ;--XVAR 1=mAuthScheme Kim & Yu Expires May 26, 2010 [Page 43] Internet-Draft ABNF Extension for code generation November 2009 ;---------------------------------------------------------------------- ;Proxy-Authorization = "Proxy-Authorization" HCOLON credentials ;---------------------------------------------------------------------- ProxyAuthorList = 1*("Proxy-Authorization" HCOLON Payload CRLF) ;--XTYPE 0=structl ;--XCUT 2,3,5 ;--XNCASE 2 ProxyAuthorValue = DigRespList / OtherResp ;--XPDU ;--XALT 2 ;--XCHOICE 1=PAuthorVal_mDig_chosen, 2=PAuthorVal_mOther_chosen ;---------------------------------------------------------------------- ;Proxy-Require = "Proxy-Require" HCOLON option-tag ; *(COMMA option-tag) ;option-tag = token ;---------------------------------------------------------------------- ProxyRequireList = 1*("Proxy-Require" HCOLON Payload CRLF) ;--XTYPE 0=structl ; cf. * -> 1* ;--XCUT 2,3,5 ;--XNCASE 2 ProxyRequireValue = Token *(COMMA Token) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ;---------------------------------------------------------------------- ;Record-Route = "Record-Route" HCOLON rec-route *(COMMA rec-route) ;rec-route = name-addr *( SEMI rr-param ) ;rr-param = generic-param ;---------------------------------------------------------------------- RecordRouteList = 1*("Record-Route" HCOLON Payload CRLF) ;--XTYPE 0=structl ; cf. * -> 1* ;--XCUT 2,3,5 ;--XNCASE 2 RecordRouteValue = RecRoute *(COMMA RecRoute) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl RecRoute = NameAddr 0*1GenPrmList ;--XBITMASK 2=RecRoute_mPrmList_present ;---------------------------------------------------------------------- ;Reply-To = "Reply-To" HCOLON rplyto-spec ;rplyto-spec = ( name-addr / addr-spec ) ; *( SEMI rplyto-param ) ;rplyto-param = generic-param ;---------------------------------------------------------------------- Kim & Yu Expires May 26, 2010 [Page 44] Internet-Draft ABNF Extension for code generation November 2009 ReplyTo = "Reply-To" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 ReplyToValue = ( NameAddr / AddrSpecNoPrms ) 0*1GenPrmList ;--XPDU ;--XALT 3 ;--XCHOICE 2=RplyToVal_mNameAddr_chosen, ;--XCHOICE 3=RplyToVal_mAddrSpecNP_chosen ;--XBITMASK 4=RplyToVal_mPrmList_present ;---------------------------------------------------------------------- ;Require = "Require" HCOLON option-tag *(COMMA option-tag) ;---------------------------------------------------------------------- RequireList = 1*("Require" HCOLON Payload CRLF) ;--XTYPE 0=structl ;--XCUT 2,3,5 ;--XNCASE 2 RequireValue = Token *(COMMA Token) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ;---------------------------------------------------------------------- ;Retry-After = "Retry-After" HCOLON delta-seconds ; [ comment ] *( SEMI retry-param ) ;retry-param = ("duration" EQUAL delta-seconds) ; / generic-param ;---------------------------------------------------------------------- RetryAfter = "Retry-After" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 RetryAfterValue = DeltaSeconds 0*1Comment 0*1RetryPrmList ;--XPDU ;--XBITMASK 2=RtrAftVal_mComment_present, ;--XBITMASK 3=RtrAftVal_mPrmList_present ; cf. RetryPrmList -> 0*1RetryPrmList RetryPrmList = 1*( SEMI RetryPrm ) ;--XCUT 2 ;--XTYPE 0=structl RetryPrm = "duration" EQUAL DeltaSeconds / GenPrm ;--XCUT 1,2 ;--XNCASE 1 ;--XALT 4 ;--XCHOICE 3=RtrPrm_mDeltaSec_chosen, 4=RtrPrm_mGenPrm_chosen ;---------------------------------------------------------------------- ;Route = "Route" HCOLON route-param *(COMMA route-param) ;route-param = name-addr *( SEMI rr-param ) ;---------------------------------------------------------------------- Kim & Yu Expires May 26, 2010 [Page 45] Internet-Draft ABNF Extension for code generation November 2009 RouteList = 1*("Route" HCOLON Payload CRLF) ;--XTYPE 0=structl ;--XCUT 2,3,5 ;--XNCASE 2 RouteValue = RoutePrm *(COMMA RoutePrm) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl RoutePrm = NameAddr 0*1GenPrmList ;--XBITMASK 2=RoutePrm_mPrmList_present ;---------------------------------------------------------------------- ;Server = "Server" HCOLON server-val *(LWS server-val) ;server-val = product / comment ;product = token [SLASH product-version] ;product-version = token ;---------------------------------------------------------------------- Server = "Server" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 ServerValue = ServerVal *(LWS ServerVal) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ServerVal = Product / Comment ;--XCHOICE 1=SvrVal_mProduct_chosen, 2=SvrVal_mComment_chosen Product = Token [SLASH Token] ;--XCUT 3 ;--XVAR 1=mProductName, 4=mProductVersion ;--XBITMASK 4=Product_mVersion_present ;---------------------------------------------------------------------- ;Subject = ( "Subject" / "s" ) HCOLON [TEXT-UTF8-TRIM] ;---------------------------------------------------------------------- Subject = ( "Subject" / "s" ) HCOLON 0*1Payload CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XBITMASK 5=Subject_mPld_present ;--XDUP 3=0x20,0x09,0x3a ;---------------------------------------------------------------------- ;Supported = ( "Supported" / "k" ) HCOLON ; [option-tag *(COMMA option-tag)] ;---------------------------------------------------------------------- SupportedList = 1*(( "Supported" / "k" ) HCOLON Supported) ;--XTYPE 0=structl ;--XCUT 3,4,5 ;--XNCASE 3,4 Kim & Yu Expires May 26, 2010 [Page 46] Internet-Draft ABNF Extension for code generation November 2009 Supported = 0*1Payload CRLF ;--XCUT 2 ;--XBITMASK 1=Supported_mPld_present SupportedValue = Token *(COMMA Token) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ;---------------------------------------------------------------------- ;Timestamp = "Timestamp" HCOLON 1*(DIGIT) ; [ "." *(DIGIT) ] [ LWS delay ] ;delay = *(DIGIT) [ "." *(DIGIT) ] ;To = ( "To" / "t" ) HCOLON ( name-addr ; / addr-spec ) *( SEMI to-param ) ;to-param = tag-param / generic-param ;---------------------------------------------------------------------- Timestamp = "Timestamp" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 ; TimestampValue = StampVal [ LWS StampVal ] TimestampValue = StampVal [ LWS DelayVal ] ;--XPDU ;--XCUT 3 ;--XVAR 1=mTime, 4=mDelayTime ;--XBITMASK 4=TstampVal_mDelay_present StampVal = 1*DIGIT [ "." *DIGIT ] ;--XCUT 3 ;--XTYPE 1=uint, 4=uint ;--XVAR 1=mUpperValue, 4=mLowerValue ;--XBITMASK 1=StampVal_mUpper_present, 4=StampVal_mLower_present DelayVal = 1*DIGIT [ "." *DIGIT ] ;--XCUT 3 ;--XTYPE 1=uint, 4=uint ;--XVAR 1=mUpperValue, 4=mLowerValue ;--XBITMASK 1=DelayVal_mUpper_present, 4=DelayVal_mLower_present ;---------------------------------------------------------------------- ;To = ( "To" / "t" ) HCOLON ( name-addr ; / addr-spec ) *( SEMI to-param ) ;to-param = tag-param / generic-param ;---------------------------------------------------------------------- To = ( "To" / "t" ) HCOLON ToValue CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XTDEF 5 ;--XDUP 3=0x20,0x09,0x3a ToValue = FromToAddr 0*1FromToPrmList ;--XBITMASK 2=ToVal_mPrmList_present ; cf. FromToPrmList -> 0*1FromToPrmList Kim & Yu Expires May 26, 2010 [Page 47] Internet-Draft ABNF Extension for code generation November 2009 ;---------------------------------------------------------------------- ;Unsupported = "Unsupported" HCOLON option-tag *(COMMA option-tag) ;---------------------------------------------------------------------- UnsupportedList = 1*("Unsupported" HCOLON Payload CRLF) ;--XTYPE 0=structl ;--XCUT 2,3,5 ;--XNCASE 2 UnsupportedValue = Token *(COMMA Token) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ;---------------------------------------------------------------------- ; User-Agent = "User-Agent" HCOLON server-val *(LWS server-val) ;---------------------------------------------------------------------- UserAgent = "User-Agent" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 UserAgentValue = ServerVal *(LWS ServerVal) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ;---------------------------------------------------------------------- ;Via = ( "Via" / "v" ) HCOLON via-parm *(COMMA via-parm) ;via-parm = sent-protocol LWS sent-by *( SEMI via-params ) ;via-params = via-ttl / via-maddr ; / via-received / via-branch ; / via-extension ;via-ttl = "ttl" EQUAL ttl ;via-maddr = "maddr" EQUAL host ;via-received = "received" EQUAL (IPv4address / IPv6address) ;via-branch = "branch" EQUAL token ;via-extension = generic-param ;sent-protocol = protocol-name SLASH protocol-version ; SLASH transport ;protocol-name = "SIP" / token ;protocol-version = token ;transport = "UDP" / "TCP" / "TLS" / "SCTP" ; / other-transport ;sent-by = host [ COLON port ] ;ttl = 1*3DIGIT ; 0 to 255 ;---------------------------------------------------------------------- ViaList = 1*(( "Via" / "v" ) HCOLON ViaValue CRLF) ;--XTYPE 0=structl ;--XCUT 3,4,5,7 ;--XNCASE 3,4 ;--XDUP 4=0x20,0x09,0x3a Kim & Yu Expires May 26, 2010 [Page 48] Internet-Draft ABNF Extension for code generation November 2009 ViaValue = ViaParm *(COMMA ViaParm) ;--XCUT 3 ;--XTYPE 0=structl ViaParm = SentProtocol LWS SentBy 0*1ViaPrmsList ;--XCUT 2 ;--XBITMASK 4=ViaParm_mPrmsList_present ; cf. ViaPrmsList -> 0*1ViaPrmsList ViaPrmsList = 1*( SEMI ViaPrms ) ;--XCUT 2 ;--XTYPE 0=structl ; cf. * -> 1* ViaPrms = ViaTtl / ViaMaddr / ViaReceived / ViaBranch / GenPrm ;--XVAR 5=mViaExt ;--XALT 5 ViaTtl = "ttl" EQUAL 1*3DIGIT ;--XCUT 1,2 ;--XNCASE 1 ;--XTYPE 0=uint ViaMaddr = "maddr" EQUAL Host ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 ViaReceived = "received" EQUAL ( Ipv4 / Ipv6 ) ;--XCUT 1,2 ;--XNCASE 1 ;--XCHOICE 4=ViaRcvd_mIpv4_chosen, 5=ViaRcvd_mIpv6_chosen ViaBranch = "branch" EQUAL Token ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 SentProtocol = Token SLASH Token SLASH ViaTrsp ;--XCUT 2,4 ;--XVAR 1=mProtocolName, 3=mProtocolVersion ViaTrsp = BasicViaTrsp / Token ;--XVAR 2=mOtherViaTrsp ;--XALT 2 ;--XCHOICE 1=ViaTrsp_mBasic_chosen, 2=ViaTrsp_mOther_chosen BasicViaTrsp = "UDP" / "TCP" / "TLS" / "SCTP" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4 ;--XVAR 1=BasicViaTrsp_UDP, 2=BasicViaTrsp_TCP ;--XVAR 3=BasicViaTrsp_TLS, 4=BasicViaTrsp_SCTP SentBy = Host [ COLON Port ] ;--XCUT 3 Kim & Yu Expires May 26, 2010 [Page 49] Internet-Draft ABNF Extension for code generation November 2009 ;---------------------------------------------------------------------- ;Warning = "Warning" HCOLON warning-value *(COMMA warning-value) ;warning-value = warn-code SP warn-agent SP warn-text ;warn-code = 3DIGIT ;warn-agent = hostport / pseudonym ; ; the name or pseudonym of the server adding ; ; the Warning header, for use in debugging ;warn-text = quoted-string ;pseudonym = token ;---------------------------------------------------------------------- WarningList = 1*("Warning" HCOLON Payload CRLF) ;--XTYPE 0=structl ; cf. * -> 1* ;--XCUT 2,3,5 ;--XNCASE 2 WarningValue = WarningVal *(COMMA WarningVal) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl WarningVal = 3DIGIT SP WarnAgent SP QStr ;--XCUT 2,4 ;--XVAR 1=mWarnCode, 5=mWarnText ;--XTYPE 1=uint WarnAgent = HostPort / Token ;--XVAR 2=mPseudonym ;--XALT 2 ;---------------------------------------------------------------------- ;WWW-Authenticate = "WWW-Authenticate" HCOLON challenge ;---------------------------------------------------------------------- WwwAuthenList = 1*( "WWW-Authenticate" HCOLON Payload CRLF) ;--XTYPE 0=structl ; cf. * -> 1* ;--XCUT 2,3,5 ;--XNCASE 2 WwwAuthenValue = DigestClnList / OtherChallenge ;--XPDU ;--XALT 2 ;--XCHOICE 1=WwwAuthenVal_mDigest_chosen, ;--XCHOICE 2=WwwAuthenVal_mOther_chosen ;---------------------------------------------------------------------- ;extension-header = header-name HCOLON header-value ;header-name = token ;header-value = *(TEXT-UTF8char / UTF8-CONT / LWS) ;---------------------------------------------------------------------- ExtHdrList = 1*(ExtHdr) ;--XTYPE 0=structl ;--XSTRL 2=0x41-5A,0x61-7A,0x30-39,0x2d,0x2e,0x21,0x25, ; 0x2a,0x5f,0x2b,0x60,0x27,0x7e ;--XNRPT 1 Kim & Yu Expires May 26, 2010 [Page 50] Internet-Draft ABNF Extension for code generation November 2009 ExtHdr = Token HCOLON Payload CRLF ;--XCUT 2,4 ;--XVAR 1=mHdrName, 3=mHdrValue ;---------------------------------------------------------------------- ; message-body = *OCTET ;---------------------------------------------------------------------- ;---------------------------------------------------------------------- ; RFC 3261 End of ABNF ;---------------------------------------------------------------------- ;---------------------------------------------------------------------- ; PEttInfo ;---------------------------------------------------------------------- ; PEttInfo = "P-Ett-Info" HCOLON (Ipv4 / Ipv6) ":" Port 0*1PEIPrmList ;---------------------------------------------------------------------- PEttInfo = "P-Ett-Info" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 PEttInfoValue = (Ipv4 / Ipv6) ":" Port 0*1PEIPrmList ;--XPDU ;--XCUT 4 ;--XCHOICE 2=PEttInfoVal_mIpv4_chosen, 3=PEttInfoVal_mIpv6_chosen ;--XBITMASK 6=PEttInfoVal_mPrmList_present PEIPrmList = 1*(SEMI PEIPrm) ;--XCUT 2 ;--XTYPE 0=structl PEIPrm = TrunkId / RouteId / TrunkName ; TrunkId = "trunkid" EQUAL 1*DIGIT ;--XNCASE 1 ;--XCUT 1,2 ;--XTYPE 0=uint RouteId = "routeid" EQUAL 1*DIGIT ;--XNCASE 1 ;--XCUT 1,2 ;--XTYPE 0=uint TrunkName = "trunkname" EQUAL Token ;--XNCASE 1 ;--XCUT 1,2 ;--XTDEF 3 ;---------------------------------------------------------------------- ; RFC 3841 ReqDisposition ;---------------------------------------------------------------------- Kim & Yu Expires May 26, 2010 [Page 51] Internet-Draft ABNF Extension for code generation November 2009 ; Request-Disposition = ( "Request-Disposition" / "d" ) HCOLON ; directive *(COMMA directive) ; directive = proxy-directive / cancel-directive / ; fork-directive / recurse-directive / ; parallel-directive / queue-directive ; proxy-directive = "proxy" / "redirect" ; cancel-directive = "cancel" / "no-cancel" ; fork-directive = "fork" / "no-fork" ; recurse-directive = "recurse" / "no-recurse" ; parallel-directive = "parallel" / "sequential" ; queue-directive = "queue" / "no-queue" ;---------------------------------------------------------------------- ReqDisposition = ("Request-Disposition" / "d") HCOLON Payload CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XTDEF 5 ;--XDUP 3=0x20,0x09,0x3a ReqDispositionValue = Directive * (COMMA Directive) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl Directive = ProxyDirective / CancelDirective / ForkDirective / RecurseDirective / ParallelDirective / QueueDirective ;--XCHOICE 1=Directive_mProxy_chosen, 2=Directive_mCancel_chosen, ;--XCHOICE 3=Directive_mFork_chosen, 4=Directive_mRecurse_chosen, ;--XCHOICE 5=Directive_mParallel_chosen, 6=Directive_mQueue_chosen ProxyDirective = "proxy" / "redirect" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=ProxyDir_proxy, 2=ProxyDir_redirect CancelDirective = "cancel" / "no-cancel" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=CancelDir_cancel, 2=CancelDir_no_cancel ForkDirective = "fork" / "no-fork" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=ForkDir_fork, 2=ForkDir_no_fork RecurseDirective = "recurse" / "no-recurse" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=RequrseDir_recurse, 2=RequrseDir_no_recurse ParallelDirective = "parallel" / "sequential" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=ParallelDir_parallel, 2=ParalleDir_sequential QueueDirective = "queue" / "no-queue" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=QueueDir_queue, 2=QueueDir_no_queue Kim & Yu Expires May 26, 2010 [Page 52] Internet-Draft ABNF Extension for code generation November 2009 ;---------------------------------------------------------------------- ; AcceptContact / RejectContact (RFC 3841) ;---------------------------------------------------------------------- ; Accept-Contact = ("Accept-Contact" / "a") HCOLON ac-value ; *(COMMA ac-value) ; Reject-Contact = ("Reject-Contact" / "j") HCOLON rc-value ; *(COMMA rc-value) ; ac-value = "*" *(SEMI ac-params) ; rc-value = "*" *(SEMI rc-params) ; ac-params = feature-param / req-param ; / explicit-param / generic-param ; ;;feature param from RFC 3840 ; ;;generic-param from RFC 3261 ; rc-params = feature-param / generic-param ; req-param = "require" ; explicit-param = "explicit" ; ; From RFC 3840 ; feature-param = enc-feature-tag [EQUAL LDQUOT (tag-value-list ; / string-value ) RDQUOT] ; enc-feature-tag = base-tags / other-tags ; base-tags = "audio" / "automata" / ; "class" / "duplex" / "data" / ; "control" / "mobility" / "description" / ; "events" / "priority" / "methods" / ; "schemes" / "application" / "video" / ; "language" / "type" / "isfocus" / ; "actor" / "text" / "extensions" ; other-tags = "+" ftag-name ; ftag-name = ALPHA *( ALPHA / DIGIT / "!" / "'" / ; "." / "-" / "%" ) ; ; tag-value-list = tag-value *("," tag-value) ; tag-value = ["!"] (token-nobang / boolean / numeric) ; token-nobang = 1*(alphanum / "-" / "." / "%" / "*" ; / "_" / "+" / "`" / "'" / "~" ) ; boolean = "TRUE" / "FALSE" ; numeric = "#" numeric-relation number ; numeric-relation = ">=" / "<=" / "=" / (number ":") ; number = [ "+" / "-" ] 1*DIGIT ["." 0*DIGIT] ; string-value = "<" *(qdtext-no-abkt / quoted-pair ) ">" ; qdtext-no-abkt = LWS / %x21 / %x23-3B / %x3D ; / %x3F-5B / %x5D-7E / UTF8-NONASCII ;---------------------------------------------------------------------- AcceptContact = ("Accept-Contact" / "a") HCOLON Payload CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XTDEF 5 ;--XDUP 3=0x20,0x09,0x3a Kim & Yu Expires May 26, 2010 [Page 53] Internet-Draft ABNF Extension for code generation November 2009 AcceptContactValue = ACValue * (COMMA ACValue ) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ACValue = "*" 0*1 ACPrmList ;--XCUT 1 ;--XBITMASK 2=ACValue_mPrmList_present ACPrmList = 1*(SEMI ACParams) ;--XCUT 2 ;--XTYPE 0=structl ACParams = BasicACParam / FeaturePrm / GenPrm ;--XCHOICE 1=ACParams_mBasic_chosen, 2=ACParams_mFeature_chosen, ;--XCHOICE 3=ACParams_mGeneric_chosen ;--XALT 3 BasicACParam = "require" / "explicit" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=BasicACParam_require, 2= BasicACParam_explicit RejectContact = ("Reject-Contact" / "j") HCOLON Payload CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XTDEF 5 ;--XDUP 3=0x20,0x09,0x3a RejectContactValue = RCValue * (COMMA RCValue) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl RCValue = "*" 0*1 RCPrmList ;--XCUT 1 ;--XBITMASK 2=RCValue_mPrmList_present RCPrmList = 1*(SEMI RCParams) ;--XCUT 2 ;--XTYPE 0=structl RCParams = FeaturePrm / GenPrm ;--XCHOICE 1=RCParams_mFeature_chosen, 2=RCParams_mGeneric_chosen ;--XALT 2 FeaturePrm = EncFeatureTag 0*1FeatureOpt ; EncFeatureTag = BaseTags / OtherTags ;--XALT 2 Kim & Yu Expires May 26, 2010 [Page 54] Internet-Draft ABNF Extension for code generation November 2009 BaseTags = "audio" / "automata" / "class" / "duplex" / "data" / "control" / "mobility" / "description" / "events" / "priority" / "methods" / "schemes" / "application" / "video" / "language" / "type" / "isfocus" / "actor" / "text" / "extensions" ;--XTYPE 0=enum ;--XVAR 1=BaseTags_audio, 2=BaseTags_automata, 3=BaseTags_class ;--XVAR 4=BaseTags_duplex, 5=BaseTags_data, 6=BaseTags_control ;--XVAR 7=BaseTags_mobility, 8=BaseTags_description, ;--XVAR 9=BaseTags_events, 10=BaseTags_priority,11=BaseTags_method, ;--XVAR 12=BaseTags_schemes, 13=BaseTags_application, ;--XVAR 14=BaseTags_video, 15=BaseTags_language, ;--XVAR 16=BaseTags_type,17=BaseTags_isfocus, 18=BaseTags_actor, ;--XVAR 19=BaseTags_text, 20=BaseTaga_extensions OtherTags = "+" FTagName ;--XCUT 1 ;--XTYPE 0=char* FTagName = ALPHA * ( ALPHA / DIGIT / "!" / "'" / "." / "-" / "%" ) ;--XTYPE 0=tok FeatureOpt = EQUAL LDQUOT (TagValueList / StringValue ) RDQUOT ;--XTYPE 5=char* ;--XCUT 1,2,6 TagValueList = TagValue * ("," TagValue) ;--XCUT 3 ;--XTYPE 0=structl Exclamation = "!" ;--XTYPE 0=tok TagValue = [Exclamation] TagValueBase ;--XTYPE 2=null TagValueBase = BooleanValue / Numeric / TokenNoBang ;--XTYPE 3=char* ;--XALT 3 TokenNoBang = 1*(Alphanum / "-" / "." / "%" / "*" / "_" / "+" / "`" / "'" / "~" ) ;--XTYPE 0=tok BooleanValue = "TRUE" / "FALSE" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=BooleanValue_true, 2=BooleanValue_false Numeric = "#" NumericRelation Number ;--XCUT 1 Kim & Yu Expires May 26, 2010 [Page 55] Internet-Draft ABNF Extension for code generation November 2009 NumericRelation = BaseRelation / NumberRelation ; BaseRelation = ">=" / "<="/ "=" ;--XTYPE 0=enum ;--XVAR 1=BaseRelation_greate_equal, ;--XVAR 2=BaseRelation_less_equal, 3=BaseRelation_equal NumberRelation = Number ":" ;--XCUT 2 Number = [NumSign] 1*DIGIT ["." 0*DIGIT] ;--XVAR 3=mInteger, 6=mFraction ;--XCUT 5 ;--XTYPE 3=uint,6=uint NumSign = "+" / "-" ;--XTYPE 0=enum ;--XVAR 1=NumSign_positive, 2=NumSign_negative StringValue = "<" *(QdtextNoAbkt / QuotedPair ) ">" ;--XTYPE 0=tok ;--XCUT 1,5 Utf8NonAscii = %xC0-DF 1Utf8Cont / %xE0-EF 2Utf8Cont / %xF0-F7 3Utf8Cont / %xF8-Fb 4Utf8Cont / %xFC-FD 5Utf8Cont ;--XTYPE 0=tok Utf8Cont = %x80-BF ;--XTYPE 0=tok QdtextNoAbkt = LWS / %x21 / %x23-3B / %x3D / %x3F-5B / %x5D-7E / Utf8NonAscii ;--XTYPE 0=tok ;---------------------------------------------------------------------- ; RemPtyId (draft-ietf-sip-privacy-04, SSW) ;---------------------------------------------------------------------- ; Remote-Party-ID = "Remote-Party-ID" HCOLON rpid *(COMMA rpid) ; rpid = [display-name] LAQUOT addr-spec RAQUOT *(SEMI rpi-token) ; rpi-token = rpi-screen / rpi-pty-type / ; rpi-id-type / rpi-privacy / other-rpi-token ; rpi-screen = "screen" EQUAL ("no" / "yes") ; ; rpi-pty-type = "party" EQUAL ("calling" / "called" / token) ; rpi-id-type = "id-type" EQUAL ("subscriber" / "user" / "term" ; / token) ; rpi-privacy = "privacy" EQUAL (rpi-priv-element ; /(LDQUOT rpi-priv-element *(COMMA rpi-priv-element) RDQUOT) ; ) Kim & Yu Expires May 26, 2010 [Page 56] Internet-Draft ABNF Extension for code generation November 2009 ; rpi-priv-element = ("full" / "name" / "uri" / "off" / token) ; ["-" ( "network" / token )] ; other-rpi-token = ["-"] token [EQUAL (token / quoted-string)] ;---------------------------------------------------------------------- RemPtyIdList = 1*("Remote-Party-ID" HCOLON RemPtyId) ;--XTYPE 0=structl ;--XCUT 2,3 ;--XNCASE 2 RemPtyId = 0*1RemPtyIdValue CRLF ;--XCUT 2 ;--XBITMASK 1=RemPtyId_mPld_present RemPtyIdValue = Rpid *(COMMA Rpid) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl Rpid = NameAddr 0*1RpiPrmList ;--XBITMASK 2=Rpid_mPrmList_present RpiPrmList = 1*(SEMI RpiPrm) ;--XCUT 2 ;--XTYPE 0=structl RpiPrm = RpiScreen / RpiPtyType / RpiIdType / RpiPriv / GenPrm ;--XALT 5 RpiScreen = "screen" EQUAL ("no" / "yes") ;--XCUT 1,2 ;--XNCASE 1,4,5 ;--XTYPE 0=enum ;--XVAR 4=RpiScreen_no, 5=RpiScreen_yes RpiPtyType = "party" EQUAL (BasicRpiPtyType / Token) ;--XCUT 1,2 ;--XNCASE 1 ;--XVAR 4=mBasicPty ;--XVAR 5=mOtherPty ;--XCHOICE 4=RpiPty_mBasic_chosen ;--XCHOICE 5=RpiPty_mOther_chosen ;--XALT 5 BasicRpiPtyType = "calling" / "called" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=BasicRpiPty_calling ;--XVAR 2=BasicRpiPty_called RpiIdType = "id-type" EQUAL (BasicRpiIdType / Token) ;--XCUT 1,2 ;--XNCASE 1 ;--XVAR 4=mBasicRpiId ;--XVAR 5=mOtherRpiId ;--XCHOICE 4=RpiId_mBasic_chosen ;--XCHOICE 5=RpiId_mOther_chosen ;--XALT 5 Kim & Yu Expires May 26, 2010 [Page 57] Internet-Draft ABNF Extension for code generation November 2009 BasicRpiIdType = "subscriber" / "user" / "term" ;--XTYPE 0=enum ;--XNCASE 1,2,3 ;--XVAR 1=BasicRpiId_subscriber ;--XVAR 2=BasicRpiId_user ;--XVAR 3=BasicRpiId_term RpiPriv = "privacy" EQUAL (RpiPrivElem / RpiPrivElemList) ;--XCUT 1,2 ;--XNCASE 1 ;--XVAR 5=mRpiPrivList ;--XCHOICE 4=RpiPriv_mElem_chosen ;--XCHOICE 5=RpiPriv_mList_chosen RpiPrivElem = BasicRpiPriv / Token ;--XVAR 2=mOtherRpiPriv ;--XCHOICE 1=RpiPrivElem_mBasic_chosen ;--XCHOICE 2=RpiPrivElem_mOther_chosen ;--XALT 2 BasicRpiPriv = "full" / "full-network" / "name" / "name-network" / "uri" / "uri-network" / "off" / "off-network" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4,5,6,7,8 ;--XVAR 1=BasicRpiPriv_full, 2=BasicRpiPriv_full_nw ;--XVAR 3=BasicRpiPriv_name, 4=BasicRpiPriv_name_nw ;--XVAR 5=BasicRpiPriv_uri, 6=BasicRpiPriv_uri_nw ;--XVAR 7=BasicRpiPriv_off, 8=BasicRpiPriv_off_nw ;--XDUP 1=0x2c, 0x22, 0x3b, 0x20, 0x09, 0x0d, 0x0a ;--XDUP 3=0x2c, 0x22, 0x3b, 0x20, 0x09, 0x0d, 0x0a ;--XDUP 5=0x2c, 0x22, 0x3b, 0x20, 0x09, 0x0d, 0x0a ;--XDUP 7=0x2c, 0x22, 0x3b, 0x20, 0x09, 0x0d, 0x0a RpiPrivElemList = LDQUOT RpiPrivElem *(COMMA RpiPrivElem) RDQUOT ;--XCUT 1,4,6 ;--XTYPE 0=structl ;---------------------------------------------------------------------- ; RpidPrivacy (draft-ietf-sip-privacy-04, SSW) ;---------------------------------------------------------------------- ; RPID-Privacy = "RPID-Privacy" HCOLON rpid-priv *(COMMA rpid-priv) ; rpid-priv = rpid-privacy-token *(SEMI rpid-privacy-token) ; ; rpi-privacy MUST be present ; -> cf. rpi-privacy Mandatory check? App??. ; rpid-privacy-token = rpi-pty-type / rpi-id-type / rpi-privacy ;---------------------------------------------------------------------- RpidPrivacyList = 1*("RPID-Privacy" HCOLON RpidPrivacy) ;--XTYPE 0=structl ;--XCUT 2,3 ;--XNCASE 2 RpidPrivacy = 0*1RpidPrivacyValue CRLF ;--XCUT 2 ;--XBITMASK 1=RpidPrivacy_mPld_present RpidPrivacyValue = RpidPriv *(COMMA RpidPriv) Kim & Yu Expires May 26, 2010 [Page 58] Internet-Draft ABNF Extension for code generation November 2009 ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl RpidPriv = RpidPrivToken *(SEMI RpidPrivToken) ;--XCUT 3 ;--XTYPE 0=structl RpidPrivToken = RpiPtyType / RpiIdType / RpiPriv ;--XCHOICE 1=RpidPrivTkn_mPty_chosen ;--XCHOICE 2=RpidPrivTkn_mId_chosen ;--XCHOICE 3=RpidPrivTkn_mPriv_chosen ;---------------------------------------------------------------------- ; Diversion (draft-levy-sip-diversion-08, SSW) ;---------------------------------------------------------------------- ; Diversion = "Diversion" ":" 1# (name-addr *( ";" diversion_params )) ; diversion-params = diversion-reason | diversion-counter | ; diversion-limit | diversion-privacy | ; diversion-screen | diversion-extension ; diversion-reason = "reason" "=" ( "unknown" | "user-busy" | ; "no-answer" |"unavailable" | "unconditional" | ; "time-of-day" | "do-not-disturb" | ; "deflection" | "follow-me" | ; "out-of-service" | "away" | ; token | quoted-string ) ; diversion-counter = "counter" "=" 1*2DIGIT ; diversion-limit = "limit" "=" 1*2DIGIT ; diversion-privacy = "privacy" "=" ( "full" | "name" | "uri" | ; "off" | token | quoted-string ) ; diversion-screen = "screen" "=" ( "yes" | "no" | token | quoted-string ) ; diversion-extension = token ["=" (token | quoted-string)] ;---------------------------------------------------------------------- DiversionList = 1*("Diversion" HCOLON Diversion) ;--XTYPE 0=structl ;--XCUT 2,3 ;--XNCASE 2 Diversion = 0*1Payload CRLF ;--XCUT 2 ;--XBITMASK 1=Diversion_mPld_present DiversionValue = DivsVal *(COMMA DivsVal) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl DivsVal = NameAddr 0*1DivsPrmList ;--XBITMASK 2=DivsVal_mPrmList_present DivsPrmList = 1*(SEMI DivsPrm) ;--XCUT 2 ;--XTYPE 0=structl DivsPrm = DivsReason / DivsCounter / DivsLimit / DivsPrivacy / DivsScreen / GenPrm ;--XALT 6 Kim & Yu Expires May 26, 2010 [Page 59] Internet-Draft ABNF Extension for code generation November 2009 DivsReason = "reason" EQUAL (BasicDivsRsn / Token / QStr) ;--XCUT 1,2 ;--XNCASE 1 ;--XCHOICE 4=DivsRsn_mBasic_chosen ;--XCHOICE 5=DivsRsn_mToken_chosen ;--XCHOICE 6=DivsRsn_mQStr_chosen ;--XALT 5 BasicDivsRsn = "unknown" / "user-busy" / "no-answer" / "unavailable" / "unconditional" / "time-of-day" / "do-not-disturb" / "deflection" / "follow-me" / "out-of-service" / "away" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4,5,6,7,8,9,10,11 ;--XVAR 1=BasicDivsRsn_unknown, 2=BasicDivsRsn_user_busy ;--XVAR 3=BasicDivsRsn_no_answer, 4=BasicDivsRsn_unavailable ;--XVAR 5=BasicDivsRsn_unconditional, 6=BasicDivsRsn_time_of_day ;--XVAR 7=BasicDivsRsn_dnd, 8=BasicDivsRsn_deflection ;--XVAR 9=BasicDivsRsn_follow_me, 10=BasicDivsRsn_out_of_service ;--XVAR 11=BasicDivsRsn_away DivsCounter = "counter" EQUAL 1*2DIGIT ;--XCUT 1,2 ;--XNCASE 1 ;--XTYPE 0=uint DivsLimit = "limit" EQUAL 1*2DIGIT ;--XCUT 1,2 ;--XNCASE 1 ;--XTYPE 0=uint DivsPrivacy = "privacy" EQUAL (BasicDivsPriv / Token / QStr) ;--XCUT 1,2 ;--XNCASE 1 ;--XCHOICE 4=DivsPriv_mBasic_chosen ;--XCHOICE 5=DivsPriv_mToken_chosen ;--XCHOICE 6=DivsPriv_mQStr_chosen ;--XALT 5 BasicDivsPriv = "full" / "name" / "uri" / "off" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4 ;--XVAR 1=BasicDivsPriv_full, 2=BasicDivsPriv_name ;--XVAR 3=BasicDivsPriv_uri, 4=BasicDivsPriv_off DivsScreen = "screen" EQUAL (BasicDivsScreen / Token / QStr) ;--XCUT 1,2 ;--XNCASE 1 ;--XCHOICE 4=DivsScreen_mBasic_chosen ;--XCHOICE 5=DivsScreen_mToken_chosen ;--XCHOICE 6=DivsScreen_mQStr_chosen ;--XALT 5 BasicDivsScreen = "yes" / "no" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=BasicDivsScreen_yes, 2=BasicDivsScreen_no Kim & Yu Expires May 26, 2010 [Page 60] Internet-Draft ABNF Extension for code generation November 2009 ;---------------------------------------------------------------------- ; Event (RFC 3265) ;---------------------------------------------------------------------- ; Event = ( "Event" / "o" ) HCOLON event-type *( SEMI event-param ) ; event-type = event-package *( "." event-template ) ; event-package = token-nodot ; event-template = token-nodot ; token-nodot = 1*( alphanum / "-" / "!" / "%" / "*" / "_" / "+" / ; "`" / "'" / "~" ) ; event-param = generic-param / ( "id" EQUAL token ) ;---------------------------------------------------------------------- Event = ( "Event" / "o" ) HCOLON Payload CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XTDEF 5 ;--XDUP 3=0x20,0x09,0x3a EventValue = Token 0*1EventPrmList ;--XPDU ;--XVAR 1=mEventType ;--XBITMASK 2=EvtVal_mPrmList_present ; cf. EventPrmList -> 0*1EventPrmList EventPrmList = 1*( SEMI EventPrm) ;--XCUT 2 ;--XTYPE 0=structl EventPrm = EventId / GenPrm ;--XALT 2 EventId = "id" EQUAL Token ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 ;---------------------------------------------------------------------- ; AllowEvents (RFC 3265) ;---------------------------------------------------------------------- ; Allow-Events = ( "Allow-Events" / "u" ) HCOLON event-type ; *(COMMA event-type) ;---------------------------------------------------------------------- AllowEventsList = 1*( ( "Allow-Events" / "u" ) HCOLON Payload CRLF) ;--XTYPE 0=structl ;--XCUT 3,4,5,7 ;--XNCASE 3,4 ;--XDUP 4=0x20,0x09,0x3a AllowEventsValue = Token *(COMMA Token) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl Kim & Yu Expires May 26, 2010 [Page 61] Internet-Draft ABNF Extension for code generation November 2009 ;---------------------------------------------------------------------- ; PAssertedIdList (RFC3325) ;---------------------------------------------------------------------- ; PAssertedID = "P-Asserted-Identity" HCOLON PAssertedID-value ; *(COMMA PAssertedID-value) ; PAssertedID-value = name-addr / addr-spec ;---------------------------------------------------------------------- PAssertedIdList = 1*( "P-Asserted-Identity" HCOLON PAssertedId ) ;--XTYPE 0=structl ;--XCUT 2,3 ;--XNCASE 2 PAssertedId = 0*1PAssertedIdValue CRLF ;--XCUT 2 ;--XBITMASK 1=PAssertedId_mPld_present PAssertedIdValue = NameAddr / AddrSpecNoPrms ;--XALT 2 ;--XCHOICE 1=PAstIdVal_mNameAddr_chosen, ;--XCHOICE 2=PAstIdVal_mAddrSpecNP_chosen ;---------------------------------------------------------------------- ; PPreferredIdList (RFC3325) ;---------------------------------------------------------------------- ; PPreferredID = "P-Preferred-Identity" HCOLON PPreferredID-value ; *(COMMA PPreferredID-value) ; PPreferredID-value = name-addr / addr-spec ;---------------------------------------------------------------------- PPreferredIdList = 1*( "P-Preferred-Identity" HCOLON PPreferredId ) ;--XTYPE 0=structl ;--XCUT 2,3 ;--XNCASE 2 PPreferredId = 0*1PPreferredIdValue CRLF ;--XCUT 2 ;--XBITMASK 1=PPreferredId_mPld_present PPreferredIdValue = NameAddr / AddrSpecNoPrms ;--XALT 2 ;--XCHOICE 1=PPrfIdVal_mNameAddr_chosen, ;--XCHOICE 2=PPrfIdVal_mAddrSpecNP_chosen ;---------------------------------------------------------------------- ; PChargingFnAddr (RFC3455) ;---------------------------------------------------------------------- ; charge-addr-params *(SEMI charge-addr-params) ; charge-addr-params = ccf / ecf / generic-param ; ccf = "ccf" EQUAL gen-value ; ecf = "ecf" EQUAL gen-value ;---------------------------------------------------------------------- PChargingFnAddr= "P-Charging-Function-Addresses" HCOLON 0*1Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XBITMASK 3=PChargingFnAddr_mPld_present Kim & Yu Expires May 26, 2010 [Page 62] Internet-Draft ABNF Extension for code generation November 2009 PChargingFnAddrValue = ChargeAddrPrm *( SEMI ChargeAddrPrm) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ChargeAddrPrm = CcfPrm / EcfPrm / GenPrm ;--XALT 3 ;--XCHOICE 1=ChargeAddrPrm_mCcfPrm_chosen, ;--XCHOICE 2=ChargeAddrPrm_mEcfPrm_chosen ;--XCHOICE 3=ChargeAddrPrm_mGenPrm_chosen CcfPrm = "ccf" EQUAL GenVal ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 EcfPrm = "ecf" EQUAL GenVal ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 ;---------------------------------------------------------------------- ;PChargingVector (RFC3455)plus 3GPP 24.229 access-network-charging-info ;---------------------------------------------------------------------- ; P-Charging-Vector = "P-Charging-Vector" HCOLON icid-value ; *(SEMI charge-params) ; charge-params = icid-gen-addr / orig-ioi / term-ioi ; / access-network-charging-info / generic-param ; icid-value = "icid-value" EQUAL gen-value ; icid-gen-addr = "icid-generated-at" EQUAL host ; orig-ioi = "orig-ioi" EQUAL gen-value ; term-ioi = "term-ioi" EQUAL gen-value ; access-network-charging-info = gprs-charging-info (SKT GTS) ; access-network-charging-info = (gprs-charging-info ; / generic-param) (3GPP) ; gprs-charging-info = ggsn *(SEMI pdp-info) [SEMI extension-param] ; ggsn = "ggsn" EQUAL gen-value ; pdp-info = pdp-sig SEMI gcid SEMI auth-token *(SEMI flow-id) ; pdp-sig = "pdp-sig" EQUAL ("yes" / "no") ; gcid = "gcid" EQUAL gen-value ; auth-token = "auth-token" EQUAL gen-value ; flow-id = "flow-id" EQUAL gen-value ; extension-param = token [EQUAL (token | quoted-string)] ;---------------------------------------------------------------------- PChargingVector = "P-Charging-Vector" HCOLON 0*1Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XBITMASK 3=PChargingVector_mPld_present PChargingVectorValue = IcidVal 0*1ChargePrmList ;--XPDU ;--XBITMASK 2=PChgVecVal_mPrmList_present IcidVal = "icid-value" EQUAL GenVal ;--XCUT 1,2 ;--XNCASE 1 Kim & Yu Expires May 26, 2010 [Page 63] Internet-Draft ABNF Extension for code generation November 2009 ;--XTDEF 3 ChargePrmList = 1*( SEMI ChargePrm) ;--XCUT 2 ;--XTYPE 0=structl ChargePrm = IcidGenAddr / OrigIoi / TermIoi / AccNwChgInfo / GenPrm ;--XALT 5 IcidGenAddr = "icid-generated-at" EQUAL Host ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 OrigIoi = "orig-ioi" EQUAL GenVal ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 TermIoi = "term-ioi" EQUAL GenVal ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 AccNwChgInfo = "ggsn" EQUAL Payload ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 ;---------------------------------------------------------------------- ; Privacy (RFC3323, RFC3325("id")) ;---------------------------------------------------------------------- ; Privacy-hdr = "Privacy" HCOLON priv-value *(";" priv-value) ; priv-value = "header" / "session" / "user" / "none" ; / "critical" / token / "id" ;---------------------------------------------------------------------- Privacy = "Privacy" HCOLON 0*1PrivacyValue CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XBITMASK 3=Privacy_mPld_present PrivacyValue = PrivacyPrm *( SEMI PrivacyPrm ) ;--XCUT 3 ;--XTYPE 0=structl PrivacyPrm = BasicPrivacy / Token ;--XVAR 2=mOtherPrivacy ;--XALT 2 ;--XCHOICE 1=PrivacyPrm_mBasic_chosen, 2=PrivacyPrm_mOther_chosen BasicPrivacy = "id" / "header" / "session" / "user" / "none" / "critical" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4,5,6 ;--XVAR 1=BasicPriv_id, 2=BasicPriv_header, 3=BasicPriv_session ;--XVAR 4=BasicPriv_user, 5=BasicPriv_none, 6=BasicPriv_critical Kim & Yu Expires May 26, 2010 [Page 64] Internet-Draft ABNF Extension for code generation November 2009 ;---------------------------------------------------------------------- ; ReferredBy (draft-sparks-sip-referredby-split-00) ;---------------------------------------------------------------------- ; Referred-By = ("Referred-By" / "b") HCOLON ( name-addr / addr-spec ) ; *(SEMI generic-param) ;---------------------------------------------------------------------- ReferredBy = ("Referred-By" / "b") HCOLON Payload CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XTDEF 5 ReferredByValue = ( NameAddr / AddrSpecNoPrms ) 0*1GenPrmList ;--XPDU ;--XALT 3 ;--XCHOICE 2=RefByVal_mNameAddr_chosen, ;--XCHOICE 3=RefByVal_mAddrSpecNP_chosen ;--XBITMASK 4=RefByVal_mPrmList_present ;---------------------------------------------------------------------- ; ReferTo (draft-ietf-sip-refer-07) ;---------------------------------------------------------------------- ; Refer-To = ("Refer-To" / "r") HCOLON ( name-addr / addr-spec ) ; *(SEMI generic-param) ;---------------------------------------------------------------------- ReferTo = ("Refer-To" / "r") HCOLON Payload CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XTDEF 5 ;--XDUP 3=0x20,0x09,0x3a ReferToValue = ( NameAddr / AddrSpecNoPrms ) 0*1GenPrmList ;--XPDU ;--XALT 3 ;--XCHOICE 2=RefToVal_mNameAddr_chosen, ;--XCHOICE 3=RefToVal_mAddrSpecNP_chosen ;--XBITMASK 4=RefToVal_mPrmList_present ;---------------------------------------------------------------------- ; Reason (RFC 3326) ;---------------------------------------------------------------------- ; Reason = "Reason" HCOLON reason-value *(COMMA reason-value) ; reason-value = protocol *(SEMI reason-params) ; protocol = "SIP" / "Q.850" / token ; reason-params = protocol-cause / reason-text ; / reason-extension ; protocol-cause = "cause" EQUAL cause ; cause = 1*DIGIT ; reason-text = "text" EQUAL quoted-string ; reason-extension = generic-param ;---------------------------------------------------------------------- ReasonList = 1*("Reason" HCOLON Payload CRLF) ;--XTYPE 0=structl Kim & Yu Expires May 26, 2010 [Page 65] Internet-Draft ABNF Extension for code generation November 2009 ;--XCUT 2,3,5 ;--XNCASE 2 ReasonValue = ReasonVal *(COMMA ReasonVal) ;--XPDU ;--XCUT 3 ;--XTYPE 0=structl ReasonVal = ReasonProtocol 0*1ReasonPrmList ;--XBITMASK 2=RsnVal_mPrmList_present ; cf. ReasonPrmList -> 0*1ReasonPrmList ReasonProtocol = BasicRsnProt / Token ;--XVAR 2=mOtherRsnProt ;--XALT 2 ;--XCHOICE 1=RsnProt_mBasic_chosen, 2=RsnProt_mOther_chosen BasicRsnProt = "SIP" / "Q.850" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=BasicRsnProt_SIP, 2=BasicRsnProt_Q850 ReasonPrmList = 1*(SEMI ReasonPrm) ;--XCUT 2 ;--XTYPE 0=structl ReasonPrm = ProtocolCause / ReasonText / GenPrm ;--XALT 3 ;--XCHOICE 1=RsnPrm_mProtCause_chosen, 2=RsnPrm_mRsnTxt_chosen ;--XCHOICE 3=RsnPrm_mGenPrm_chosen ProtocolCause = "cause" EQUAL 1*DIGIT ;--XCUT 1,2 ;--XNCASE 1 ;--XTYPE 0=uint ReasonText = "text" EQUAL QStr ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 ;---------------------------------------------------------------------- ; RAck (RFC 3262) ;---------------------------------------------------------------------- ; RAck = "RAck" HCOLON response-num LWS CSeq-num LWS Method ; response-num = 1*DIGIT ; CSeq-num = 1*DIGIT ;---------------------------------------------------------------------- RAck = "RAck" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 RAckValue = 1*DIGIT LWS 1*DIGIT LWS Method ;--XPDU ;--XCUT 2,4 ;--XVAR 1=mRSeqNumber, 3=mCSeqNumber, 5=mCSeqMethod ;--XTYPE 1=uint, 3=uint Kim & Yu Expires May 26, 2010 [Page 66] Internet-Draft ABNF Extension for code generation November 2009 ;---------------------------------------------------------------------- ; RSeq (RFC 3262) ;---------------------------------------------------------------------- ; RSeq = "RSeq" HCOLON response-num ;---------------------------------------------------------------------- RSeq = "RSeq" HCOLON 1*DIGIT CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTYPE 0=uint ;---------------------------------------------------------------------- ; Replaces (draft-ietf-sip-replaces-02) ;---------------------------------------------------------------------- ; Replaces = "Replaces" HCOLON callid *(SEMI ReplacesPrm) ; ReplacesPrm = to-tag / from-tag / generic-param ; to-tag = "to-tag" EQUAL token ; from-tag = "from-tag" EQUAL token ;---------------------------------------------------------------------- Replaces = "Replaces" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 ReplacesValue = CallIdVal 0*1ReplacesPrmList ;--XPDU ;--XBITMASK 2=RplcVal_mPrmList_present ReplacesPrmList = 1*(SEMI ReplacesPrm) ;--XCUT 2 ;--XTYPE 0=structl ; cf. * -> 1* ReplacesPrm = ToTag / FromTag / GenPrm ;--XALT 3 ;--XCHOICE 1=RplcPrm_mToTag_chosen, 2=RplcPrm_mFromTag_chosen ;--XCHOICE 3=RplcPrm_mGenPrm_chosen ToTag = "to-tag" EQUAL Token ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 FromTag = "from-tag" EQUAL Token ;--XCUT 1,2 ;--XNCASE 1 ;--XTDEF 3 ;---------------------------------------------------------------------- ; SessExpires (RFC 4028) ;---------------------------------------------------------------------- ; Session-Expires = ("Session-Expires" / "x") HCOLON delta-seconds ; *(SEMI se-params) ; se-params = refresher-param / generic-param ; refresher-param = "refresher" EQUAL ("uas" / "uac") ;---------------------------------------------------------------------- Kim & Yu Expires May 26, 2010 [Page 67] Internet-Draft ABNF Extension for code generation November 2009 SessExpires = ( "Session-Expires" / "x" ) HCOLON 0*1Payload CRLF ;--XCUT 2,3,4,6 ;--XNCASE 2,3 ;--XBITMASK 5=SessExpires_mPld_present SessExpiresValue = 1*DIGIT 0*1SePrmList ;--XPDU ;--XTYPE 1=uint ;--XVAR 1=mDeltaSeconds ;--XBITMASK 2=SessExpiresVal_mPrmList_present SePrmList = 1*( SEMI SePrm ) ;--XCUT 2 ;--XTYPE 0=structl SePrm = RefresherPrm / GenPrm ;--XALT 2 ;--XCHOICE 1=SePrm_mRefresher_chosen, 2=SePrm_mGen_chosen RefresherPrm = "refresher" EQUAL ( BasicRefresher / Token ) ;--XCUT 1,2 ;--XNCASE 1 ;--XVAR 5=mOtherRefresher ;--XALT 5 ;--XCHOICE 4=RefresherPrm_mBasic_chosen, ;--XCHOICE 5=RefresherPrm_mOther_chosen BasicRefresher = "uas" / "uac" ;--XTYPE 0=enum ;--XNCASE 1,2 ;--XVAR 1=BasicRefresher_uas, 2=BasicRefresher_uac ;---------------------------------------------------------------------- ; MinSE (RFC 4028) ;---------------------------------------------------------------------- ; Min-SE = "Min-SE" HCOLON delta-seconds *(SEMI generic-param) ;---------------------------------------------------------------------- MinSE = "Min-SE" HCOLON 0*1Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XBITMASK 3=MinSE_mPld_present MinSEValue = 1*DIGIT 0*1GenPrmList ;--XPDU ;--XTYPE 1=uint ;--XVAR 1=mDeltaSeconds ;--XBITMASK 2=MinSEVal_mPrmList_present ;---------------------------------------------------------------------- ; SubsState (RFC 3265) ;---------------------------------------------------------------------- ; SubsState = "Subscription-State" HCOLON substate-value ; *( SEMI subexp-params ) ; substate-value = "active" / "pending" / "terminated" ; / extension-substate ; extension-substate = token Kim & Yu Expires May 26, 2010 [Page 68] Internet-Draft ABNF Extension for code generation November 2009 ; subexp-params = ("reason" EQUAL event-reason-value) ; / ("expires" EQUAL delta-seconds) ; / ("retry-after" EQUAL delta-seconds) ; / generic-param ; event-reason-value = "deactivated" ; / "probation" ; / "rejected" ; / "timeout" ; / "giveup" ; / "noresource" ; / event-reason-extension ; event-reason-extension = token ;---------------------------------------------------------------------- SubsState = "Subscription-State" HCOLON Payload CRLF ;--XCUT 1,2,4 ;--XNCASE 1 ;--XTDEF 3 SubsStateValue = SubsStateVal 0*1SubsStatePrmList ;--XPDU ;--XBITMASK 2=SSVal_mPrmList_present ; cf. SubsStatePrmList -> 0*1SubsStatePrmList SubsStateVal = BasicSubsStateVal / Token ;--XVAR 2=mOtherSubsStateVal ;--XCHOICE 1=SSVal_mBasic_chosen ;--XCHOICE 2=SSVal_mOther_chosen ;--XALT 2 BasicSubsStateVal = "active" / "pending" / "terminated" ;--XTYPE 0=enum ;--XNCASE 1,2,3 ;--XVAR 1=BasicSSVal_active, 2=BasicSSVal_pending ;--XVAR 3=BasicSSVal_terminated SubsStatePrmList = 1*( SEMI SubsStatePrm ) ;--XCUT 2 ;--XTYPE 0=structl SubsStatePrm = SubsStateReason / SubsStateExpires / SubsStateRetryAfter / GenPrm ;--XCHOICE 1=SSPrm_mSSReason_chosen ;--XCHOICE 2=SSPrm_mSSExpires_chosen ;--XCHOICE 3=SSPrm_mSSRetryAfter_chosen ;--XCHOICE 4=SSPrm_mGenPrm_chosen ;--XALT 4 SubsStateReason = "reason" EQUAL (BasicSubsStateReason / Token) ;--XCUT 1,2 ;--XNCASE 1 ;--XVAR 5=mOtherSubsStateReason ;--XCHOICE 4=SSRsn_mBasic_chosen ;--XCHOICE 5=SSRsn_mOther_chosen ;--XALT 5 Kim & Yu Expires May 26, 2010 [Page 69] Internet-Draft ABNF Extension for code generation November 2009 BasicSubsStateReason = "deactivated" / "probation" / "rejected" / "timeout" / "giveup" / "noresource" ;--XTYPE 0=enum ;--XNCASE 1,2,3,4,5,6 ;--XVAR 1=BasicSSRsn_deactivated, 2=BasicSSRsn_probation ;--XVAR 3=BasicSSRsn_rejected, 4=BasicSSRsn_timeout ;--XVAR 5=BasicSSRsn_giveup, 6=BasicSSRsn_noresource SubsStateExpires = "expires" EQUAL 1*DIGIT ;--XCUT 1,2 ;--XNCASE 1 ;--XTYPE 0=uint SubsStateRetryAfter = "retry-after" EQUAL DeltaSeconds ;--XCUT 1,2 ;--XNCASE 1 ;--XTYPE 0=uint Authors' Addresses Jong Sung Kim VineGen Inc. (461-714)5303 Dong-seoul college Business Incubator center 423 Bockjung-dong Sujung-gu Sungnam-si Gyunggy-do S. Korea Phone: +82 031-756-5307 EMail: jskim@vinegen.com Munjo Yu VineGen Inc. 310 Ambermore Place Cary, NC 27519 Phone: +1 919-523-5146 EMail: Munjo.Yu@gmail.com