~ubuntu-branches/ubuntu/feisty/jnettop/feisty

« back to all changes in this revision

Viewing changes to jbase.h

  • Committer: Bazaar Package Importer
  • Author(s): Ari Pollak
  • Date: 2006-04-19 22:44:18 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060419224418-3w4fik5kkveqbuz1
Tags: 0.12.0-2
Fix a small display bug that wasn't fixed in the previous revision

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 *    along with this program; if not, write to the Free Software
17
17
 *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
18
 *
19
 
 *    $Header: /cvsroot/jnettop/jnettop/jbase.h,v 1.3 2005/07/01 10:02:08 merunka Exp $
 
19
 *    $Header: /cvsroot/jnettop/jnettop/jbase.h,v 1.6 2006/04/12 07:47:01 merunka Exp $
20
20
 *
21
21
 */
22
22
 
57
57
#include "icmp.h"
58
58
#include "icmp6.h"
59
59
#include "sll.h"
 
60
#include "ieee8021q.h"
60
61
#include <net/if.h>
61
62
#include <netinet/if_ether.h>
62
 
#if HAVE_NCURSES_H
63
 
# include <ncurses.h>
64
 
#elif HAVE_NCURSES_NCURSES_H
65
 
# include <ncurses/ncurses.h>
66
 
#else
67
 
# error "No ncurses.h file found by configure."
 
63
#if WITH_NCURSES
 
64
# if HAVE_NCURSES_H
 
65
#  include <ncurses.h>
 
66
#  define SUPPORT_NCURSES
 
67
# elif HAVE_NCURSES_NCURSES_H
 
68
#  include <ncurses/ncurses.h>
 
69
#  define SUPPORT_NCURSES
 
70
# endif
68
71
#endif
69
72
#include <time.h>
70
73
#include <netdb.h>
71
74
#include <sys/ioctl.h>
72
75
#include <netinet/ip6.h>
 
76
#include <ctype.h>
 
77
#if WITH_SYSLOG
 
78
# if HAVE_SYSLOG_H
 
79
#  include <syslog.h>
 
80
#  define SUPPORT_SYSLOG
 
81
# endif
 
82
#endif
73
83
 
74
84
#define HISTORY_LENGTH                  5
75
85
#define FREEPACKETSTACK_PEEK            50
96
106
extern volatile int     threadCount;
97
107
 
98
108
void    jbase_cb_DrawStatus(const char *statusMesage);
99
 
void    debug(const char *format, ...);
 
109
void    debug(int priority, const char *format, ...);
100
110
 
101
111
typedef union __jbase_mutableaddress {
102
112
        struct in_addr addr4;
183
193
                g_snprintf((stream)->filterDataString, FILTER_DATA_STRING_LENGTH, format, arg0, arg1); \
184
194
        }
185
195
 
 
196
typedef struct __jbase_display {
 
197
        gboolean        supported;
 
198
        gboolean        (*presetup)();
 
199
        void            (*setup)();
 
200
        void            (*prerun)();
 
201
        gboolean        (*run)();
 
202
        void            (*shutdown)();
 
203
        void            (*drawstatus)(const gchar *msg);
 
204
        int             (*processargument)(const gchar **arg, int cnt);
 
205
} jbase_display;
 
206
 
 
207
typedef struct _jbase_network_mask_list {
 
208
        jbase_mutableaddress    network;
 
209
        jbase_mutableaddress    netmask;
 
210
        int                     af;
 
211
        struct _jbase_network_mask_list * next;
 
212
} jbase_network_mask_list;
 
213
 
186
214
#define JBASE_PROTO_UNKNOWN     0
187
215
#define JBASE_PROTO_IP          1
188
216
#define JBASE_PROTO_TCP         2
216
244
extern gchar *JBASE_PROTOCOLS[];
217
245
extern gchar *JBASE_AGGREGATION[];
218
246
 
 
247
#ifndef LOG_NOTICE
 
248
#define LOG_NOTICE      5       /* normal but significant condition */
 
249
#endif
 
250
#ifndef LOG_WARNING
 
251
#define LOG_WARNING     4       /* warning conditions */
 
252
#endif
 
253
#ifndef LOG_ERR
 
254
#define LOG_ERR         3       /* error conditions */
 
255
#endif
 
256
#ifndef LOG_DEBUG
 
257
#define LOG_DEBUG       7       /* debug-level messages */
 
258
#endif
 
259
 
219
260
#endif