FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/src/sniffer.c
/* See if we need to process any pending FIN captures */
/* Return 0=normal, else = session removed */
See if we need to process any pending FIN captures
Return 0=normal, else = session removed
See if we need to process any pending FIN captures Return 0 = normal else = session removed
static int CheckFinCapture(IpInfo* ipInfo, TcpInfo* tcpInfo,
                            SnifferSession* session)
{
    int ret = 0;
    if (session->finCapture.cliFinSeq && session->finCapture.cliFinSeq <=
                                         session->cliExpected) {
        if (session->finCapture.cliCounted == 0) {
            session->flags.finCount += 1;
            session->finCapture.cliCounted = 1;
            TraceClientFin(session->finCapture.cliFinSeq, session->cliExpected);
        }
    }
    if (session->finCapture.srvFinSeq && session->finCapture.srvFinSeq <=
                                         session->srvExpected) {
        if (session->finCapture.srvCounted == 0) {
            session->flags.finCount += 1;
            session->finCapture.srvCounted = 1;
            TraceServerFin(session->finCapture.srvFinSeq, session->srvExpected);
        }
    }
    if (session->flags.finCount >= 2) {
        RemoveSession(session, ipInfo, tcpInfo, 0);
        ret = 1;
    }
    return ret;
}
static int CheckFinCapture ( IpInfo * ipInfo , TcpInfo * tcpInfo , SnifferSession * session ) { int ret = 0 ; if ( session -> finCapture . cliFinSeq && session -> finCapture . cliFinSeq <= session -> cliExpected ) { if ( session -> finCapture . cliCounted == 0 ) { session -> flags . finCount += 1 ; session -> finCapture . cliCounted = 1 ; TraceClientFin ( session -> finCapture . cliFinSeq , session -> cliExpected ) ; } } if ( session -> finCapture . srvFinSeq && session -> finCapture . srvFinSeq <= session -> srvExpected ) { if ( session -> finCapture . srvCounted == 0 ) { session -> flags . finCount += 1 ; session -> finCapture . srvCounted = 1 ; TraceServerFin ( session -> finCapture . srvFinSeq , session -> srvExpected ) ; } } if ( session -> flags . finCount >= 2 ) { RemoveSession ( session , ipInfo , tcpInfo , 0 ) ; ret = 1 ; } return ret ; }
See if we need to process any pending FIN captures
Return 0=normal, else = session removed
See if we need to process any pending FIN captures Return 0 = normal else = session removed