~ubuntu-branches/ubuntu/utopic/suricata/utopic-proposed

« back to all changes in this revision

Viewing changes to src/source-pfring.c

  • Committer: Package Import Robot
  • Author(s): Pierre Chifflier
  • Date: 2014-06-29 18:27:56 UTC
  • mfrom: (1.1.26)
  • Revision ID: package-import@ubuntu.com-20140629182756-2tv7awjwgu4dxude
Tags: 2.0.2-1
ImportedĀ UpstreamĀ versionĀ 2.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
 
69
69
TmEcode DecodePfringThreadInit(ThreadVars *, void *, void **);
70
70
TmEcode DecodePfring(ThreadVars *, Packet *, void *, PacketQueue *, PacketQueue *);
 
71
TmEcode DecodePfringThreadDeinit(ThreadVars *tv, void *data);
71
72
 
72
73
extern int max_pending_packets;
73
74
extern uint8_t suricata_ctl_flags;
183
184
    tmm_modules[TMM_DECODEPFRING].ThreadInit = DecodePfringThreadInit;
184
185
    tmm_modules[TMM_DECODEPFRING].Func = DecodePfring;
185
186
    tmm_modules[TMM_DECODEPFRING].ThreadExitPrintStats = NULL;
186
 
    tmm_modules[TMM_DECODEPFRING].ThreadDeinit = NULL;
 
187
    tmm_modules[TMM_DECODEPFRING].ThreadDeinit = DecodePfringThreadDeinit;
187
188
    tmm_modules[TMM_DECODEPFRING].RegisterTests = NULL;
188
189
    tmm_modules[TMM_DECODEPFRING].flags = TM_FLAG_DECODE_TM;
189
190
}
471
472
 
472
473
    if ((ptv->threads == 1) && (strncmp(ptv->interface, "dna", 3) == 0)) {
473
474
        SCLogInfo("DNA interface detected, not adding thread to cluster");
 
475
    } else if (strncmp(ptv->interface, "zc", 2) == 0) {
 
476
        SCLogInfo("ZC interface detected, not adding thread to cluster");
474
477
    } else {
475
478
#ifdef HAVE_PFRING_CLUSTER_TYPE
476
479
        ptv->ctype = pfconf->ctype;
662
665
 
663
666
    return TM_ECODE_OK;
664
667
}
 
668
 
 
669
TmEcode DecodePfringThreadDeinit(ThreadVars *tv, void *data)
 
670
{
 
671
    if (data != NULL)
 
672
        DecodeThreadVarsFree(data);
 
673
    SCReturnInt(TM_ECODE_OK);
 
674
}
 
675
 
 
676
 
665
677
#endif /* HAVE_PFRING */
666
678
/* eof */