Expand description
The RFC 4475 SIP torture-test corpus.
RFC 4475 collects messages designed to break naive parsers: legal ones that look illegal, illegal ones that look legal, and a long tail of whitespace, escaping and scalar-range edge cases. It is the standard correctness bar for a SIP implementation, so sipx runs it continuously rather than at the end.
The messages are recovered from the bit-exact archive in that RFC’s Appendix A by
scripts/import-rfc4475-corpus.sh, not retyped: several cases hinge on octets that do not
survive transcription (escaped NULs, UTF-8 display names, trailing whitespace). Run the
script with --check to verify the committed corpus still matches the RFC.
§What the classification is for
The RFC groups its messages by the layer that should object to them, and that grouping
is the useful part. A negative Content-Length is a framing failure — the byte stream
cannot be cut into messages at all. An overlarge CSeq is nothing of the sort: the message
frames and forwards perfectly well, and the fault appears only when something reads
CSeq. An implementation that conflates the two either drops messages it could have
forwarded, or accepts messages it cannot frame.
So each case carries an Expect naming which layer must object, and the parser tests
assert against that rather than against a bare pass/fail.
Structs§
- Case
- One message from the corpus.
Enums§
- Expect
- Which layer must object to a message, and how.
- Fault
- The structural fault a
Expect::ParseErrcase must produce.
Statics§
- CASES
- Every message in the corpus, in RFC section order.
Functions§
- case
- Look up a case by its RFC name.
- classified
- Every case the parser tests assert on.
- expecting
- Cases matching a given expectation.