HTML Version of ABNF for <rtsp1.abnf>

This HTML version of ABNF is automatically generated using Jabnf. The protocol syntax is presented in ABNF according to RFC 2234 This version of ABNF is for informational purposes only. It is intended as a tool to help read the ABNF. Errors may have been introduced in translating to HTML. The original ABNF2HTML tool is implemeted by perl and provited by Inet Technologies, Inc.

COPYRIGHT 2005-2007 by Juphoon System Software, Inc. All rights reserved.
Written by Jalor You. For the ABNF parser technical support please mail to vik.qian@juphoon.com

This file consists of:

ABNF Specification

The productions for the ABNF specification are provided below.

ABNF Productions
Rule Name Production or Comment

OCTET

= %x00-FF   ;

CHAR

= %x00-7F   ;

UPALPHA

= %x41-5A   ;

LOALPHA

= %x61-7A

ALPHA

= UPALPHA / LOALPHA   ;

DIGIT

= %x30-39   ;
CTL = %x00-1F / %x7F   ;

CR

= %x0D   ;

LF

= %x0A   ;

SP

= %x20   ;

HT

= %x09   ;

DQUOTE

= %x22

CRLF

= CR LF

LWS

= [CRLF] 1*(SP / HT)

TEXT

= <any OCTET except CTLs>
tspecials = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / DQUOTE / "/" / "[" / "]" / "?" / "=" / "{" / "}" / SP / HT

token

= 1*<any CHAR except CTLs or tspecials>

quoted-string

= (DQUOTE *(qdtext) DQUOTE)

qdtext

= <any TEXT except DQUOTE>

quoted-pair

= "\" CHAR

safe

= "$" / "-" / "_" / "." / "+"

extra

= "!" / "*" / "'" / "(" / ")" / ","

hex

= DIGIT / "A" / "B" / "C" / "D" / "E" / "F" / "a" / "b" / "c" / "d" / "e" / "f"

escape

= "%" hex hex

reserved

= ";" / "/" / "?" / ":" / "@" / "&" / "="

unreserved

= ALPHA / DIGIT / safe / extra

xchar

= unreserved / reserved / escape

pchar

= uchar / ":" / "@" / "&" / "=" / "+"

uchar

= unreserved / escape

rtsp_URL

= ("rtsp:" / "rtspu:") "//" host [":" port] [abs_path]   ;

host

= IPv4address

IPv4address

= 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT

port

= *DIGIT

absoluteURI

= scheme ":" *(uchar / reserved)

relativeURI

= net_path / abs_path / rel_path

net_path

= "//" net_loc [abs_path]

abs_path

= "/" rel_path

rel_path

= [path] [";" params] ["?" query]

path

= fsegment *("/" segment)

scheme

= 1*(ALPHA / DIGIT / "+" / "-" / ".")

net_loc

= *(pchar / ";" / "?")

fsegment

= 1*pchar

segment

= *pchar

params

= param *(";" param)

param

= *(pchar / "/")

query

= *(uchar / reserved)

option-tag

= 1*xchar
RTSP-message = Request / Response   ; RTSP/1.1 messages

Request

= Request-Line *(general-header / request-header / entity-header) CRLF [message-body]

Response

= Status-Line *(general-header / response-header / entity-header) CRLF [message-body]

Request-Line

= Method SP Request-URI SP RTSP-Version CRLF

Status-Line

= RTSP-Version SP Status-Code SP Reason-Phrase CRLF

general-header

= Cache-Control / Connection-header / Date / Via

request-header

= Accept / Accept-Encoding / Accept-Language / Authorization / From / If-Modified-Since / Range / Referer / User-Agent / Bandwidth / Blocksize / Conference / Host / If-Match

response-header

= Location / Proxy-Authenticate / Public / Retry-After / Server / Vary / WWW-Authenticate

entity-header

= Allow / Content-Base / Content-Encoding / Content-Language / Content-Length / Content-Location / Content-Type / Expires / Last-Modified / extension-header

extension-header

= message-header

message-header

= field-name ":" [field-value] CRLF

field-name

= token

field-value

= *(field-content / LWS)

field-content

= <the OCTETs making up the field-value and consisting of either *TEXT or combinations of token, tspecials, and quoted-string>

message-body

= entity-body / <entity-body encoded as per Transfer-Encoding>

entity-body

= *OCTET

Method

= "DESCRIBE" / "ANNOUNCE" / "GET_PARAMETER" / "OPTIONS" / "PAUSE" / "PLAY" / "RECORD" / "REDIRECT" / "SETUP" / "SET_PARAMETER" / "TEARDOWN" / extension-method

extension-method

= token

Request-URI

= "*" / absoluteURI

RTSP-Version

= "RTSP" "/" 1*DIGIT "." 1*DIGIT

Status-Code

= "100"   ; Continue
/ "200"   ; OK
/ "201"   ; Created
/ "250"   ; Low on Storage Space
/ "300"   ; Multiple Choices
/ "301"   ; Moved Permanently
/ "302"   ; Moved Temporarily
/ "303"   ; See Other
/ "304"   ; Not Modified
/ "305"   ; Use Proxy
/ "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 Time-out
/ "410"   ; Gone
/ "411"   ; Length Required
/ "412"   ; Precondition Failed
/ "413"   ; Request Entity Too Large
/ "414"   ; Request-URI Too Large
/ "415"   ; Unsupported Media Type
/ "451"   ; Parameter Not Understood
/ "452"   ; Conference Not Found
/ "453"   ; Not Enough Bandwidth
/ "454"   ; Session Not Found
/ "455"   ; Method Not Valid in This State
/ "456"   ; Header Field Not Valid for Resource
/ "457"   ; Invalid Range
/ "458"   ; Parameter Is Read-Only
/ "459"   ; Aggregate operation not allowed
/ "460"   ; Only aggregate operation allowed
/ "461"   ; Unsupported transport
/ "462"   ; Destination unreachable
/ "500"   ; Internal Server Error
/ "501"   ; Not Implemented
/ "502"   ; Bad Gateway
/ "503"   ; Service Unavailable
/ "504"   ; Gateway Time-out
/ "505"   ; RTSP Version not supported
/ "551"   ; Option not supported
/ extension-code

extension-code

= 3DIGIT

Reason-Phrase

= *<TEXT, excluding CR, LF>

Accept

= "Accept" ":" [media-range [accept-params] *("," media-range [accept-params])]

media-range

= ("*/*" / (type "/" "*") / (type "/" subtype)) *(";" parameter)

parameter

= attribute "=" value

attribute

= token

value

= token / quoted-string

accept-params

= ";" "q" "=" qvalue *(accept-extension)

qvalue

= ("0" ["." 0*3DIGIT]) / ("1" ["." 0*3("0")])

accept-extension

= ";" token ["=" (token / quoted-string)]

Accept-Encoding

= "Accept-Encoding" ":" [content-coding *("," content-coding)]

content-coding

= token

Accept-Language

= "Accept-Language" ":" (language-range [";" "q" "=" qvalue]) *("," language-range [";" "q" "=" qvalue])

language-range

= ((1*8ALPHA *("-" 1*8ALPHA)) / "*")

Allow

= "Allow" ":" Method *("," Method)

Authorization

= "Authorization" ":" credentials

credentials

= basic-credentials / auth-scheme [auth-param *("," auth-param)]

basic-credentials

= "Basic" SP basic-cookie

basic-cookie

= <base64 [7] encoding of user-pass, except not limited to 76 char/line>
user-pass = userid ":" password

userid

= *<TEXT excluding ":">

password

= *TEXT

auth-scheme

= token

auth-param

= token "=" quoted-string

challenge

= auth-scheme 1*SP realm *("," auth-param)

realm

= "realm" "=" realm-value

realm-value

= quoted-string

Bandwidth

= "Bandwidth" ":" 1*DIGIT   ; positive decimal number

Blocksize

= "Blocksize" ":" 1*DIGIT

Cache-Control

= "Cache-Control" ":" cache-directive *("," cache-directive)

cache-directive

= cache-request-directive / cache-response-directive

cache-request-directive

= "no-cache" / "max-stale" / "min-fresh" / "only-if-cached" / cache-extension

cache-response-directive

= "public" / "private" / "no-cache" / "no-transform" / "must-revalidate" / "proxy-revalidate" / "max-age" "=" delta-seconds / cache-extension

delta-seconds

= 1*DIGIT

cache-extension

= token ["=" (token / quoted-string)]

Conference

= "Conference" ":" conference-id

conference-id

= 1*xchar

Connection-header

= "Connection" ":" connection-token *("," connection-token)

connection-token

= token

Content-Base

= "Content-Base" ":" absoluteURI

Content-Encoding

= "Content-Encoding" ":" content-coding *("," content-coding)

Content-Language

= "Content-Language" ":" language-tag *("," language-tag)

language-tag

= primary-tag *("-" subtag)

primary-tag

= 1*8ALPHA

subtag

= 1*8ALPHA

Content-Length

= "Content-Length" ":" 1*DIGIT

Content-Location

= "Content-Location" ":" (absoluteURI / relativeURI)

Content-Type

= "Content-Type" ":" media-type

media-type

= type "/" subtype *(";" parameter)

type

= token

subtype

= token
CSeq = "CSeq" ":" 1*DIGIT

Date

= "Date" ":" HTTP-date

HTTP-date

= rfc1123-date / rfc850-date / asctime-date

rfc1123-date

= wkday "," SP date1 SP time SP "GMT"

rfc850-date

= weekday "," SP date2 SP time SP "GMT"

asctime-date

= wkday SP date3 SP time SP 4DIGIT

date1

= 2DIGIT SP month SP 4DIGIT   ; day month year (e.g., 02 Jun 1982)

date2

= 2DIGIT "-" month "-" 2DIGIT   ; day-month-year (e.g., 02-Jun-82)

date3

= month SP (2DIGIT / (SP 1DIGIT))   ; month day (e.g., Jun 2)

time

= 2DIGIT ":" 2DIGIT ":" 2DIGIT   ; 00:00:00 - 23:59:59

wkday

= "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun"

weekday

= "Monday" / "Tuesday" / "Wednesday" / "Thursday" / "Friday" / "Saturday" / "Sunday"

month

= "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec"

Expires

= "Expires" ":" HTTP-date

From

= "From" ":" mailbox

mailbox

= addr-spec   ; simple address
/ [phrase] route-addr   ; name & addr-spec

addr-spec

= local-part "@" domain   ; global address

local-part

= word *("." word)   ; uninterpreted

domain

= sub-domain *("." sub-domain)

sub-domain

= domain-ref / domain-literal

domain-ref

= atom   ; symbolic reference

domain-literal

= "[" *(dtext / quoted-pair) "]"

dtext

= <any CHAR excluding "[", "]", "\" & CR, & including linear-white-space>

phrase

= 1*word   ; Sequence of words

word

= atom / quoted-string

atom

= 1*<any CHAR except specials, SPACE and CTLs>
specials = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / DQUOTE / "." / "[" / "]"

route-addr

= "<" [route] addr-spec ">"

route

= "@" domain *("," "@" domain) ":"   ; path-relative

Host

= "Host" ":" host [":" port]

If-Match

= "If-Match" ":" ("*" / (entity-tag *("," entity-tag)))

entity-tag

= [weak] opaque-tag

weak

= "W/"

opaque-tag

= quoted-string

If-Modified-Since

= "If-Modified-Since" ":" HTTP-date

Last-Modified

= "Last-Modified" ":" HTTP-date

Location

= "Location" ":" absoluteURI

Proxy-Authenticate

= "Proxy-Authenticate" ":" challenge
Proxy-Require = "Proxy-Require" ":" option-tag *("," option-tag)

Public

= "Public" ":" Method *("," Method)

Range

= "Range" ":" ranges-specifier *("," ranges-specifier) [";" "time" "=" utc-time]

ranges-specifier

= npt-range / utc-range / smpte-range

npt-range

= (npt-time "-" [npt-time]) / ("-" npt-time)

npt-time

= "now" / npt-sec / npt-hhmmss

npt-sec

= 1*DIGIT ["." *DIGIT]

npt-hhmmss

= npt-hh ":" npt-mm ":" npt-ss ["." *DIGIT]

npt-hh

= 1*DIGIT   ; any positive number

npt-mm

= 1*2DIGIT   ; 0-59

npt-ss

= 1*2DIGIT   ; 0-59

utc-range

= "clock" "=" utc-datetime "-" [utc-datetime]

utc-datetime

= utc-date "T" utc-time "Z"

utc-date

= 8DIGIT   ; < YYYYMMDD >

utc-time

= 6DIGIT ["." fraction]   ; < HHMMSS.fraction >

fraction

= *DIGIT

smpte-range

= smpte-type "=" smpte-time "-" [smpte-time]

smpte-type

= "smpte" / "smpte-30-drop" / "smpte-25"   ; other timecodes may be added

smpte-time

= 1*2DIGIT ":" 1*2DIGIT ":" 1*2DIGIT [":" 1*2DIGIT] ["." 1*2DIGIT]

Referer

= "Referer" ":" (absoluteURI / relativeURI)

Retry-After

= "Retry-After" ":" (HTTP-date / delta-seconds)
Require = "Require" ":" option-tag *("," option-tag)
RTP-Info = "RTP-Info" ":" stream-url *("," stream-url) 1*RTP-parameter

stream-url

= "url" "=" rtsp_URL   ;url

RTP-parameter

= ";" "seq" "=" 1*DIGIT / ";" "rtptime" "=" 1*DIGIT
Scale = "Scale" ":" ["-"] 1*DIGIT ["." *DIGIT]
Speed = "Speed" ":" 1*DIGIT ["." *DIGIT]

Server

= "Server" ":" 1*(product / comment)

product

= token ["/" product-version]

product-version

= token

comment

= "(" *(ctext / comment) ")"

ctext

= <any TEXT excluding "(" and ")">
Session = "Session" ":" session-id [";" "timeout" "=" delta-seconds]

session-id

= 1*(ALPHA / DIGIT / safe)
Timestamp = "Timestamp" ":" *(DIGIT) ["." *(DIGIT)] [delay]

delay

= *(DIGIT) ["." *(DIGIT)]
Transport = "Transport" ":" transport-spec *("," transport-spec)

transport-spec

= transport-protocol "/" profile ["/" lower-transport] *transport-parameter

transport-protocol

= "RTP"

profile

= "AVP"

lower-transport

= "TCP" / "UDP"

transport-parameter

= ("unicast" / "multicast") / ";" "destination" ["=" address] / ";" "interleaved" "=" channel ["-" channel] / ";" "append" / ";" "ttl" "=" ttl / ";" "layers" "=" 1*DIGIT / ";" "port" "=" port ["-" port] / ";" "client_port" "=" port ["-" port] / ";" "server_port" "=" port ["-" port] / ";" "ssrc" "=" ssrc / ";" "mode" "=" DQUOTE mode *("," mode) DQUOTE

ttl

= 1*3(DIGIT)   ;port = 1*5(DIGIT)

ssrc

= 8*8(hex)

channel

= 1*3(DIGIT)

address

= host

mode

= DQUOTE *Method DQUOTE / Method
Unsupported = "Unsupported" ":" option-tag *("," option-tag)

User-Agent

= "User-Agent" ":" 1*(product / comment)

Vary

= "Vary" ":" ("*" / (field-name *("," field-name)))

Via

= "Via" ":" (received-protocol received-by [comment]) *("," received-protocol received-by [comment])

received-protocol

= [protocol-name "/"] protocol-version

protocol-name

= token

protocol-version

= token

received-by

= (host [":" port]) / pseudonym

pseudonym

= token

WWW-Authenticate

= "WWW-Authenticate" ":" challenge *("," challenge)

Symbol Cross Reference List

Following is a cross-reference list for the ABNF.On the left are references to productions, on the right are links to the rules in which those productions are referenced.

Symbol Cross-Reference Table
Reference Productions which Reference this Symbol
OCTET entity-body
CHAR quoted-pair
UPALPHA ALPHA
LOALPHA ALPHA
ALPHA unreserved, scheme, language-range, language-range, primary-tag, subtag, session-id
DIGIT hex, unreserved, IPv4address, IPv4address, IPv4address, IPv4address, port, scheme, RTSP-Version, RTSP-Version, extension-code, qvalue, Bandwidth, Blocksize, delta-seconds, Content-Length, CSeq, asctime-date, date1, date1, date2, date2, date3, date3, time, time, time, npt-sec, npt-sec, npt-hhmmss, npt-hh, npt-mm, npt-ss, utc-date, utc-time, fraction, smpte-time, smpte-time, smpte-time, smpte-time, smpte-time, RTP-parameter, RTP-parameter, Scale, Scale, Speed, Speed, session-id, Timestamp, Timestamp, delay, delay, transport-parameter, ttl, channel
CR CRLF
LF CRLF
SP LWS, tspecials, Request-Line, Request-Line, Status-Line, Status-Line, basic-credentials, challenge, rfc1123-date, rfc1123-date, rfc1123-date, rfc850-date, rfc850-date, rfc850-date, asctime-date, asctime-date, asctime-date, date1, date1, date3, date3
HT LWS, tspecials
DQUOTE tspecials, quoted-string, quoted-string, specials, transport-parameter, transport-parameter, mode, mode
CRLF LWS, Request, Response, Request-Line, Status-Line, message-header
LWS field-value
TEXT password
token field-name, extension-method, attribute, value, accept-extension, accept-extension, content-coding, auth-scheme, auth-param, cache-extension, cache-extension, connection-token, type, subtype, product, product-version, protocol-name, protocol-version, pseudonym
quoted-string value, accept-extension, auth-param, realm-value, cache-extension, word, opaque-tag
qdtext quoted-string
quoted-pair domain-literal
safe unreserved, session-id
extra unreserved
hex escape, escape, ssrc
escape xchar, uchar
reserved xchar, absoluteURI, query
unreserved xchar, uchar
xchar option-tag, conference-id
pchar net_loc, fsegment, segment, param
uchar pchar, absoluteURI, query
rtsp_URL stream-url
host rtsp_URL, Host, address, received-by
IPv4address host
port rtsp_URL, Host, transport-parameter, transport-parameter, transport-parameter, transport-parameter, transport-parameter, transport-parameter, received-by
absoluteURI Request-URI, Content-Base, Content-Location, Location, Referer
relativeURI Content-Location, Referer
net_path relativeURI
abs_path rtsp_URL, relativeURI, net_path
rel_path relativeURI, abs_path
path rel_path
scheme absoluteURI
net_loc net_path
fsegment path
segment path
params rel_path
param params, params
query rel_path
option-tag Proxy-Require, Proxy-Require, Require, Require, Unsupported, Unsupported
Request RTSP-message
Response RTSP-message
Request-Line Request
Status-Line Response
general-header Request, Response
request-header Request
response-header Response
entity-header Request, Response
extension-header entity-header
message-header extension-header
field-name message-header, Vary, Vary
field-value message-header
field-content field-value
message-body Request, Response
entity-body message-body
Method Request-Line, Allow, Allow, Public, Public, mode, mode
extension-method Method
Request-URI Request-Line
RTSP-Version Request-Line, Status-Line
Status-Code Status-Line
extension-code Status-Code
Reason-Phrase Status-Line
Accept request-header
media-range Accept, Accept
parameter media-range, media-type
attribute parameter
value parameter
accept-params Accept, Accept
qvalue accept-params, Accept-Language, Accept-Language
accept-extension accept-params
Accept-Encoding request-header
content-coding Accept-Encoding, Accept-Encoding, Content-Encoding, Content-Encoding
Accept-Language request-header
language-range Accept-Language, Accept-Language
Allow entity-header
Authorization request-header
credentials Authorization
basic-credentials credentials
basic-cookie basic-credentials
userid user-pass
password user-pass
auth-scheme credentials, challenge
auth-param credentials, credentials, challenge
challenge Proxy-Authenticate, WWW-Authenticate, WWW-Authenticate
realm challenge
realm-value realm
Bandwidth request-header
Blocksize request-header
Cache-Control general-header
cache-directive Cache-Control, Cache-Control
cache-request-directive cache-directive
cache-response-directive cache-directive
delta-seconds cache-response-directive, Retry-After, Session
cache-extension cache-request-directive, cache-response-directive
Conference request-header
conference-id Conference
Connection-header general-header
connection-token Connection-header, Connection-header
Content-Base entity-header
Content-Encoding entity-header
Content-Language entity-header
language-tag Content-Language, Content-Language
primary-tag language-tag
subtag language-tag
Content-Length entity-header
Content-Location entity-header
Content-Type entity-header
media-type Content-Type
type media-range, media-range, media-type
subtype media-range, media-type
Date general-header
HTTP-date Date, Expires, If-Modified-Since, Last-Modified, Retry-After
rfc1123-date HTTP-date
rfc850-date HTTP-date
asctime-date HTTP-date
date1 rfc1123-date
date2 rfc850-date
date3 asctime-date
time rfc1123-date, rfc850-date, asctime-date
wkday rfc1123-date, asctime-date
weekday rfc850-date
month date1, date2, date3
Expires entity-header
From request-header
mailbox From
addr-spec mailbox, route-addr
local-part addr-spec
domain addr-spec, route, route
sub-domain domain, domain
domain-ref sub-domain
domain-literal sub-domain
dtext domain-literal
phrase mailbox
word local-part, local-part, phrase
atom domain-ref, word
route-addr mailbox
route route-addr
Host request-header
If-Match request-header
entity-tag If-Match, If-Match
weak entity-tag
opaque-tag entity-tag
If-Modified-Since request-header
Last-Modified entity-header
Location response-header
Proxy-Authenticate response-header
Public response-header
Range request-header
ranges-specifier Range, Range
npt-range ranges-specifier
npt-time npt-range, npt-range, npt-range
npt-sec npt-time
npt-hhmmss npt-time
npt-hh npt-hhmmss
npt-mm npt-hhmmss
npt-ss npt-hhmmss
utc-range ranges-specifier
utc-datetime utc-range, utc-range
utc-date utc-datetime
utc-time Range, utc-datetime
fraction utc-time
smpte-range ranges-specifier
smpte-type smpte-range
smpte-time smpte-range, smpte-range
Referer request-header
Retry-After response-header
stream-url RTP-Info, RTP-Info
RTP-parameter RTP-Info
Server response-header
product Server, User-Agent
product-version product
comment Server, comment, User-Agent, Via, Via
ctext comment
session-id Session
delay Timestamp
transport-spec Transport, Transport
transport-protocol transport-spec
profile transport-spec
lower-transport transport-spec
transport-parameter transport-spec
ttl transport-parameter
ssrc transport-parameter
channel transport-parameter, transport-parameter
address transport-parameter
mode transport-parameter, transport-parameter
User-Agent request-header
Vary response-header
Via general-header
received-protocol Via, Via
protocol-name received-protocol
protocol-version received-protocol
received-by Via, Via
pseudonym received-by
WWW-Authenticate response-header

General Directions

Rule-Names

References