|
| HttpResponseLayer (uint8_t *data, size_t dataLen, Layer *prevLayer, Packet *packet) |
|
| HttpResponseLayer (HttpVersion version, const HttpResponseStatusCode &statusCode, const std::string &statusCodeString) |
|
| HttpResponseLayer (HttpVersion version, const HttpResponseStatusCode &statusCode) |
|
| HttpResponseLayer (const HttpResponseLayer &other) |
|
HttpResponseLayer & | operator= (const HttpResponseLayer &other) |
|
HttpResponseFirstLine * | getFirstLine () const |
|
HeaderField * | setContentLength (int contentLength, const std::string &prevFieldName="") |
|
int | getContentLength () const |
|
std::string | toString () const override |
|
HeaderField * | addField (const std::string &fieldName, const std::string &fieldValue) override |
|
HeaderField * | addField (const HeaderField &newField) override |
|
HeaderField * | insertField (HeaderField *prevField, const std::string &fieldName, const std::string &fieldValue) override |
|
HeaderField * | insertField (HeaderField *prevField, const HeaderField &newField) override |
|
OsiModelLayer | getOsiModelLayer () const override |
|
HeaderField * | getFieldByName (std::string fieldName, int index=0) const |
|
HeaderField * | getFirstField () const |
|
HeaderField * | getNextField (HeaderField *prevField) const |
|
int | getFieldCount () const |
|
HeaderField * | addEndOfHeader () |
|
virtual HeaderField * | insertField (std::string prevFieldName, const std::string &fieldName, const std::string &fieldValue) |
|
bool | removeField (HeaderField *fieldToRemove) |
|
bool | removeField (std::string fieldName, int index=0) |
|
bool | isHeaderComplete () const |
|
void | parseNextLayer () override |
|
size_t | getHeaderLen () const override |
|
void | computeCalculateFields () override |
|
| ~Layer () override |
|
Layer * | getNextLayer () const |
|
Layer * | getPrevLayer () const |
|
ProtocolType | getProtocol () const |
|
bool | isMemberOfProtocolFamily (ProtocolTypeFamily protocolTypeFamily) const |
|
uint8_t * | getData () const |
|
size_t | getDataLen () const |
|
uint8_t * | getLayerPayload () const |
|
size_t | getLayerPayloadSize () const |
|
bool | isAllocatedToPacket () const |
|
void | copyData (uint8_t *toArr) const |
|
uint8_t * | getDataPtr (size_t offset=0) const override |
|
Represents an HTTP response header and inherits all basic functionality of HttpMessage and TextBasedProtocolMessage. The functionality that is added for this class is the HTTP first line concept. An HTTP response has the following first line: 200 OK HTTP/1.1 Since it's not an "ordinary" HTTP field, it requires a special treatment and gets a class of it's own: HttpResponseFirstLine. Unlike most L2-4 protocols, an HTTP response header can spread over more than 1 packet. PcapPlusPlus currently doesn't support a header that is spread over more than 1 packet so in such cases: 1) only the first packet will be parsed as HttpResponseLayer (the other packets won't be recognized as HttpResponseLayer) and 2) the HTTP header for the first packet won't be complete (as it continues in the following packets), this why PcapPlusPlus can indicate that HTTP response header is complete or not (doesn't end with "\r\n\r\n" or "\n\n") using HttpMessage::isHeaderComplete()