APG
… an ABNF Parser Generator
|
Library of UDT functions for SIP messages. More...
Go to the source code of this file.
Macros | |
#define | isalphanum(c) (((c) >= 97 && (c) <= 122) || ((c) >= 48 && (c) <= 57) || ((c) >= 65 && (c) <= 90)) |
#define | ishexdigit(c) (((c) >= 48 && (c) <= 57) || ((c) >= 65 && (c) <= 70) || ((c) >= 97 && (c) <= 102)) |
Functions | |
void | u_Digit (callback_data *spData) |
void | u_Digit1 (callback_data *spData) |
void | u_DomainLabel (callback_data *spData) |
Evaluates the lower elements of a host name. More... | |
void | e_MessageBody (callback_data *spData) |
Evaluates the message body. More... | |
void | u_CRLF (callback_data *spData) |
Evaluates the line end character sequence. More... | |
void | u_LWS (callback_data *spData) |
Linear white space. White space with possible line breaks allowed. More... | |
void | e_SWS (callback_data *spData) |
Optional linear white space. (See u_LWS.) More... | |
void | u_WSP (callback_data *spData) |
void | e_Alphanum0 (callback_data *spData) |
void | u_Alphanum1 (callback_data *spData) |
void | u_alphanum (callback_data *spData) |
void | u_ALPHA (callback_data *spData) |
void | u_paramchar1 (callback_data *spData) |
void | u_unreserved (callback_data *spData) |
void | vSip1UdtCallbacks (void *vpParserCtx) |
Set the UDT callback functions for the SIP2.bnf grammar to their respective parse tree nodes. More... | |
Library of UDT functions for SIP messages.
A few of the rules most often "hit" or evaluated during the parsing of a SIP message are have been hand written as UDTs. Those functions are defined here.
Definition in file udtlib.c.
#define isalphanum | ( | c | ) | (((c) >= 97 && (c) <= 122) || ((c) >= 48 && (c) <= 57) || ((c) >= 65 && (c) <= 90)) |
#define ishexdigit | ( | c | ) | (((c) >= 48 && (c) <= 57) || ((c) >= 65 && (c) <= 70) || ((c) >= 97 && (c) <= 102)) |
void e_Alphanum0 | ( | callback_data * | spData | ) |
void e_MessageBody | ( | callback_data * | spData | ) |
Evaluates the message body.
Note that this function never fails and simply accepts the remainder of the input string, no matter what it is.
spData | the callback_data passed to the function by the parser |
void e_SWS | ( | callback_data * | spData | ) |
Optional linear white space. (See u_LWS.)
spData | the callback_data passed to the function by the parser |
void u_ALPHA | ( | callback_data * | spData | ) |
void u_alphanum | ( | callback_data * | spData | ) |
void u_Alphanum1 | ( | callback_data * | spData | ) |
void u_CRLF | ( | callback_data * | spData | ) |
Evaluates the line end character sequence.
CRLF = CR LF / LF / CR
The line end sequence has been modified from the original ABNF to be forgiving.
spData | the callback_data passed to the function by the parser |
void u_Digit | ( | callback_data * | spData | ) |
void u_Digit1 | ( | callback_data * | spData | ) |
void u_DomainLabel | ( | callback_data * | spData | ) |
Evaluates the lower elements of a host name.
hostname = *( domainlabel "." &(alphanum/"-")) toplabel [ "." ] domainlabel = 1*alphanum *(1*"-" 1*alphanum)
eg. my.example.com
"my" and "example" are domain labels
spData | the callback_data passed to the function by the parser |
void u_LWS | ( | callback_data * | spData | ) |
Linear white space. White space with possible line breaks allowed.
LWS = [*WSP u_CRLF] 1*WSP
spData | the callback_data passed to the function by the parser |
void u_paramchar1 | ( | callback_data * | spData | ) |
void u_unreserved | ( | callback_data * | spData | ) |
void u_WSP | ( | callback_data * | spData | ) |