|
sipxtacklib
Version 3.3
|
#include <assert.h>#include "os/OsDefs.h"#include "os/OsSysLog.h"#include "utl/UtlDListIterator.h"#include "utl/UtlRegex.h"#include "net/Url.h"#include "utl/UtlNameValueTokenizer.h"#include "net/NameValuePair.h"#include "net/NameValuePairInsensitive.h"#include "net/SipMessage.h"#include "net/HttpRequestContext.h"
Macros | |
| #define | LOG_TIME(x) /* x */ |
| #define | DQUOTE "\"" |
| #define | LWS "\\s+" |
| #define | SWS "\\s*" |
| #define | SLASH "\\" |
| #define | SIP_TOKEN "[a-zA-Z0-9.!%*#_+`'~-]++" |
| #define | SUPPORTED_SCHEMES "(?i:(sip)|(sips)|(http)|(https)|(ftp)|(file)|(mailto)|(rtsp))" |
| #define | DOMAIN_LABEL "(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)" |
Functions | |
| const RegEx | SipTokenSequenceOrQuoted ("^(?:"SIP_TOKEN"(?:"LWS SIP_TOKEN")*""|"DQUOTE"(?:[^"SLASH DQUOTE"]++""|"SLASH DQUOTE"|"SLASH SLASH")*"DQUOTE")$") |
| const RegEx | DisplayName (SWS"(?:("SIP_TOKEN"(?:"LWS SIP_TOKEN")*)""|"DQUOTE"((?:[^"SLASH DQUOTE"]++""|"SLASH DQUOTE"|"SLASH SLASH")*)"DQUOTE")""(?="SWS"<)") |
| const RegEx | AngleBrackets (SWS"<([^>]+)>") |
| const RegEx | SupportedScheme (SWS SUPPORTED_SCHEMES SWS":") |
| const RegEx | SupportedSchemeExact ("^"SUPPORTED_SCHEMES"$") |
| const RegEx | UsernameAndPassword ("(""(?:""[a-zA-Z0-9_.!~*#'()&=+$,;?/-]++""|""%[0-9a-fA-F]{2}"")+"")""(?:"":""(""(?:""[a-zA-Z0-9_.!~*#'()&=+$,-]++""|""%[0-9a-fA-F]{2}"")*"")"")?""@") |
| const RegEx | HostAndPort ("(""(?:"DOMAIN_LABEL"\\.)*"DOMAIN_LABEL"\\.?""|""(?:[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})""|""(?:\\[[0-9a-fA-F:.]++\\])"")""(?:"":""([0-9]{1,6}))?") |
| const RegEx | UrlPath ("([^?\\s]++)\\??") |
| const RegEx | UrlParams (SWS";([^?>]++)") |
| const RegEx | FieldParams (SWS";(.+)$") |
| const RegEx | HeaderOrQueryParams (SWS"\\?([^>]++)>?") |
| const RegEx | AllDigits ("^\\+?[0-9*]++$") |
| const RegEx | TheEnd ("^"SWS"$") |
Variables | |
| const char * | SchemeName [Url::NUM_SUPPORTED_URL_SCHEMES] |
| #define LOG_TIME | ( | x | ) | /* x */ |
| #define DQUOTE "\"" |
| #define LWS "\\s+" |
| #define SWS "\\s*" |
| #define SLASH "\\" |
| #define SIP_TOKEN "[a-zA-Z0-9.!%*#_+`'~-]++" |
| #define SUPPORTED_SCHEMES "(?i:(sip)|(sips)|(http)|(https)|(ftp)|(file)|(mailto)|(rtsp))" |
| #define DOMAIN_LABEL "(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)" |
| const RegEx SipTokenSequenceOrQuoted | ( | "^(?:"SIP_TOKEN"(?:"LWS SIP_TOKEN")*""|"DQUOTE"(?:[^"SLASH DQUOTE"]++""|"SLASH DQUOTE"|"SLASH SLASH")*"DQUOTE")$" | ) |
| const RegEx DisplayName | ( | SWS"(?:("SIP_TOKEN"(?:"LWS SIP_TOKEN")*)""|"DQUOTE"((?:[^"SLASH DQUOTE"]++""|"SLASH DQUOTE"|"SLASH SLASH")*)"DQUOTE")""(?="SWS"<)" | ) |
| const RegEx AngleBrackets | ( | SWS"<([^>]+ | ) |
| const RegEx SupportedScheme | ( | SWS SUPPORTED_SCHEMES SWS":" | ) |
| const RegEx SupportedSchemeExact | ( | "^"SUPPORTED_SCHEMES"$" | ) |
| const RegEx UsernameAndPassword | ( | "(""(?:""[a-zA-Z0-9_.!~*#'()&=+$,;?/-]++""|""%[0-9a-fA-F]{2}"")+"")""(?:"":""(""(?:""[a-zA-Z0-9_.!~*#'()&=+$,-]++""|""%[0-9a-fA-F]{2}"")*"")"")?""@" | ) |
| const RegEx HostAndPort | ( | "(""(?:"DOMAIN_LABEL"\\.)*"DOMAIN_LABEL"\\.?""|""(?:[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})""|""(?:\\[[0-9a-fA-F:.]++\\])"")""(?:"":""([0-9]{1,6}))?" | ) |
| const RegEx UrlPath | ( | "([^?\\s]++)\\??" | ) |
| const RegEx UrlParams | ( | SWS";([^?>]++)" | ) |
| const RegEx FieldParams | ( | SWS";(.+)$" | ) |
| const RegEx HeaderOrQueryParams | ( | SWS"\\? | [^>]++, |
| ?" | |||
| ) |
| const RegEx AllDigits | ( | "^\\+?++$" | [0-9 *] | ) |
| const RegEx TheEnd | ( | "^"SWS"$" | ) |
| const char* SchemeName[Url::NUM_SUPPORTED_URL_SCHEMES] |