Adding a new method
From reSIProcate
A method not known to the parser will have type resip::UNKNOWN. You can get to the string with, for example:
if (msg->header(h_RequestLine).getMethod() == UNKNOWN)
{
const Data& methodName = msg->header(h_RequestLine).unknownMethodName();
...
}
To add a built in header:
You must have gperf.
- MethodTypes.hxx: add defineMethod(name, "name", "RFC ref"),
before MAX_METHODS - MethodTypes.cxx: add defineMethod(name, "name", "RFC ref"),
to MethodNames[] initializer in the same position - Methodhash.gperf: add name, name
on its own line before the last %% - compile and run stack/test/testParserCategories