Exemplo n.º 1
0
int ServerInspection(HI_SESSION *Session, Packet *p, HttpSessionData *hsd)
{
    int iRet;

    if ((p->data == NULL) || (p->dsize == 0))
    {
        return HI_INVALID_ARG;
    }

    if ( Session->server_conf->inspect_response )
    {
        iRet = HttpResponseInspection(Session, p, p->data, p->dsize, hsd);
    }
    else
    {
        iRet = IsHttpServerData(Session, p, hsd);
    }

    if (iRet)
    {
        return iRet;
    }

    return HI_SUCCESS;
}
Exemplo n.º 2
0
static int ServerInspection(HI_SESSION *Session, unsigned char *data,
                            int dsize)
{
    HI_SERVER *Server;
    int       iRet;

    Server = &(Session->server);

    /*
    **  There's really only one thing that we do right now for server
    **  responses, that's HTTP flow.
    */
    iRet = IsHttpServerData(Server, data, dsize, Session->server_conf->flow_depth);
    if (iRet)
    {
        return iRet;
    }

    return HI_SUCCESS;
}