"Fossies" - the Fresh Open Source Software Archive

Member "argus-3.0.8.2/argus/ArgusEvents.h" (14 Apr 2015, 2762 Bytes) of package /linux/misc/argus-3.0.8.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ArgusEvents.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 3.0.8_vs_3.0.8.1.

    1 /*
    2  * Argus Software.  Argus files - Modeler
    3  * Copyright (c) 2000-2015 QoSient, LLC
    4  * All rights reserved.
    5  *
    6  * This program is free software; you can redistribute it and/or modify
    7  * it under the terms of the GNU General Public License as published by
    8  * the Free Software Foundation; either version 2, or (at your option)
    9  * any later version.
   10 
   11  * This program is distributed in the hope that it will be useful,
   12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   14  * GNU General Public License for more details.
   15 
   16  * You should have received a copy of the GNU General Public License
   17  * along with this program; if not, write to the Free Software
   18  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   19  *
   20  * Written by Carter Bullard
   21  * QoSient, LLC
   22  *
   23  */
   24 
   25 /* 
   26  * $Id: //depot/argus/argus/argus/ArgusEvents.h#7 $
   27  * $DateTime: 2015/04/06 10:38:44 $
   28  * $Change: 2973 $
   29  */
   30 
   31 
   32 #ifndef ArgusEvents_h
   33 #define ArgusEvents_h
   34 
   35 #include <unistd.h>
   36 #include <stdlib.h>
   37 #include <limits.h>
   38 
   39 #include <stdio.h>
   40 #include <errno.h>
   41 #include <string.h>
   42 #include <strings.h>
   43 
   44 #include <sys/types.h>
   45 #include <sys/stat.h>
   46 #include <sys/socket.h>
   47 
   48 #if defined(__NetBSD__)
   49 #include <sys/sched.h>
   50 #else
   51 #include <sched.h>
   52 #endif
   53 
   54 #include <fcntl.h>
   55 #include <signal.h>
   56 
   57 #if defined(ARGUS_TILERA)
   58 #include <argus_tilera.h>
   59 #else
   60 #include <pcap.h>
   61 #endif
   62 
   63 #include <argus_def.h>
   64 #include <argus_filter.h>
   65 
   66 #ifdef ARGUS_SASL
   67 #include <sasl/sasl.h>
   68 #endif
   69 
   70 #define ARGUS_EVENT_OS_STATUS   0x00000001
   71 #define ARGUS_ZLIB_COMPRESS 0x00000001
   72 #define ARGUS_ZLIB_COMPRESS2    0x00000002
   73 
   74 struct ArgusEventRecordStruct {
   75    struct ArgusListObjectStruct *nxt;
   76    struct timespec poptime, remaining;
   77    char *entry;
   78    int status, interval;
   79    char *method;
   80    char *filename;
   81    long long runs;
   82 };
   83 
   84 struct ArgusEventsStruct {
   85    int status;
   86 
   87 #if defined(ARGUS_THREADS)
   88    pthread_t thread;
   89    pthread_mutex_t lock;
   90 #endif
   91 
   92    struct ArgusListStruct *ArgusEventsList;
   93    struct ArgusListStruct *ArgusOutputList;
   94    struct ArgusModelerStruct *ArgusModel;
   95    struct ArgusSourceStruct *ArgusSrc;
   96 };
   97 
   98 
   99 #if defined(ArgusEvents)
  100 struct ArgusEventsStruct *ArgusEventsTask = NULL;
  101 void ArgusInitEvents (struct ArgusEventsStruct *);
  102 void ArgusCloseEvents (struct ArgusEventsStruct *);
  103 int ArgusSortEventList (const void *, const void *);
  104 struct ArgusEventsStruct *ArgusNewEvents (void);
  105 #else
  106 extern struct ArgusEventsStruct *ArgusEventsTask;
  107 extern void ArgusInitEvents (struct ArgusEventsStruct *);
  108 extern void ArgusCloseEvents (struct ArgusEventsStruct *);
  109 extern int ArgusSortEventList (const void *, const void *);
  110 extern struct ArgusEventsStruct *ArgusNewEvents (void);
  111 #endif
  112 #endif /* #ifndef ArgusEvents_h */
  113