"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "dispdata.c" between
netwatch-1.3.0-1.tgz and netwatch-1.3.1-2.tgz

About: NETWATCH views the Ethernet for hosts, packet counts, protocols and displays hosts activity.

dispdata.c  (netwatch-1.3.0-1.tgz):dispdata.c  (netwatch-1.3.1-2.tgz)
skipping to change at line 42 skipping to change at line 42
#else #else
#include <linux/in.h> #include <linux/in.h>
#endif #endif
#include <signal.h> #include <signal.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include "semaphore.h" #include "semaphore.h"
extern destroy_program; void setupauxscr (int *xoff, int bigscreen);
void setupwatch (int bigscreen);
extern int show_help;
extern int show_watch;
extern int destroy_program;
extern Semaphore masterdo; extern Semaphore masterdo;
EXT_CREATE_LOCK(indisp); EXT_CREATE_LOCK(indisp);
EXT_CREATE_LOCK(inrlist); EXT_CREATE_LOCK(inrlist);
EXT_CREATE_LOCK(inllist); EXT_CREATE_LOCK(inllist);
EXT_CREATE_LOCK(resolvechange); EXT_CREATE_LOCK(resolvechange);
void clearnetresolv (); void clearnetresolv ();
void startnetresolv (); void startnetresolv ();
char *inet_ntoa (); char *inet_ntoa ();
#define MAXREFRESH 85 #define MAXREFRESH 85
skipping to change at line 96 skipping to change at line 101
extern unsigned char netmask[]; extern unsigned char netmask[];
extern unsigned char localaddr[]; extern unsigned char localaddr[];
extern int dupcount; extern int dupcount;
extern int isbridge; extern int isbridge;
extern int localcount; extern int localcount;
extern int remotecount; extern int remotecount;
#define MAXSTATUS 14 #define MAXSTATUS 14
#define STATUSSIZE 200 #define STATUSSIZE 512
extern char status_lines[MAXSTATUS][STATUSSIZE]; extern char status_lines[MAXSTATUS][STATUSSIZE];
extern int cur_status_line; extern int cur_status_line;
extern int sentclear; extern int sentclear;
extern int recresolv; extern int recresolv;
extern int timeresolv; extern int timeresolv;
extern int sendresolv; extern int sendresolv;
extern int errread; extern int errread;
extern int errioctl; extern int errioctl;
skipping to change at line 492 skipping to change at line 497
} }
void dispdata (int errnum) void dispdata (int errnum)
{ {
int xleft = 1; /* int xleft = 1; /*
* Offset for Local Info * Offset for Local Info
*/ */
int xright; int xright;
int y; int y;
static char tmbuf[31]; static char tmbuf[80];
static char tmpbuf[80]; static char tmpbuf[512];
static int refreshscr = 0; static int refreshscr = 0;
static int routerstats = 0; static int routerstats = 0;
extern double maxburst; extern double maxburst;
extern double absmaxburst; extern double absmaxburst;
static time_t bursttime; static time_t bursttime;
static char burst[80]; static char burst[512];
static time_t routertime; static time_t routertime;
static unsigned long int oldrouteruse = 0; static unsigned long int oldrouteruse = 0;
static unsigned long int oldrouterto = 0; static unsigned long int oldrouterto = 0;
static unsigned long int oldrouterfrom = 0; static unsigned long int oldrouterfrom = 0;
unsigned long int tfuse; unsigned long int tfuse;
unsigned long int ttuse; unsigned long int ttuse;
unsigned long int ttotal; unsigned long int ttotal;
static unsigned long int minfuse; static unsigned long int minfuse;
static unsigned long int mintuse; static unsigned long int mintuse;
static unsigned long int sec; static unsigned long int sec;
static unsigned long int use; static unsigned long int use;
double fuse; double fuse;
extern unsigned long int routeruse; extern unsigned long int routeruse;
int lcnt = 0; int lcnt = 0;
int rcnt = 0; int rcnt = 0;
static char ttt[260]; static char ttt[512];
static char thost[60]; static char thost[256];
static int statsonce = FALSE; static int statsonce = FALSE;
static int disableburst = FALSE; static int disableburst = FALSE;
int yact; int yact;
unsigned char *pc; unsigned char *pc;
extern int help; extern int help;
extern int watch; extern int watch;
extern int llockout; extern int llockout;
extern int rlockout; extern int rlockout;
extern int lydisp; extern int lydisp;
extern int rydisp; extern int rydisp;
skipping to change at line 599 skipping to change at line 604
if (topflag) if (topflag)
dotop = TRUE; dotop = TRUE;
} }
rs = mnew - oldmnew; rs = mnew - oldmnew;
if (printtospeclog && speclog) if (printtospeclog && speclog)
{ {
strcpy (tmpbuf, ctime (&mnew)); strcpy (tmpbuf, ctime (&mnew));
fprintf (fpspeclog, "\nStatistics\tfrom %s\t\t to %s\n\n", fprintf (fpspeclog, "\nStatistics\tfrom %s\t\t to %s\n\n",
ctime (&starttime), tmpbuf); ctime (&starttime), tmpbuf);
} }
if (show_watch)
{
setupwatch(magnafull);
show_watch = FALSE;
}
if (show_help)
{
setuphelp();
show_help = FALSE;
}
localbypass = (!localkey && (watch || help)); localbypass = (!localkey && (watch || help));
remotebypass = (localkey && (watch || help)); remotebypass = (localkey && (watch || help));
colred = mnew - sREDTIME; /* colred = mnew - sREDTIME; /*
* 1 min * 1 min
*/ */
colyel = mnew - sYELLOWTIME; /* colyel = mnew - sYELLOWTIME; /*
* 5 min * 5 min
*/ */
colgreen = mnew - sGREENTIME; /* colgreen = mnew - sGREENTIME; /*
* 30 min * 30 min
skipping to change at line 1755 skipping to change at line 1770
sprintf (ttt, "%s.%03d", speclogfile, speclogext); sprintf (ttt, "%s.%03d", speclogfile, speclogext);
fpspeclog = fopen (ttt, "w"); fpspeclog = fopen (ttt, "w");
} }
UNLOCK(indisp); UNLOCK(indisp);
while (semaphore_down(&masterdo)>0); while (semaphore_down(&masterdo)>0);
// semaphore_down (&masterdo); // semaphore_down (&masterdo);
uthread_wait(1000); uthread_wait(1000);
internal_loop_count++; internal_loop_count++;
} }
while (!destroy_program); while (!destroy_program);
clrscr();
} }
 End of changes. 7 change blocks. 
7 lines changed or deleted 23 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS