Annotation of embedaddon/iftop/iftop.h, revision 1.1.1.2

1.1       misho       1: /*
                      2:  * iftop.h:
                      3:  *
                      4:  */
                      5: 
                      6: #ifndef __IFTOP_H_ /* include guard */
                      7: #define __IFTOP_H_
                      8: 
                      9: #include "config.h"
                     10: 
                     11: /* 40 / 2  */
                     12: #define HISTORY_LENGTH  20
                     13: #define RESOLUTION 2
1.1.1.2 ! misho      14: #define DUMP_RESOLUTION 300
        !            15: 
        !            16: /* At least OpenBSD and NexentaCore do not
        !            17:  * define s6_addr32 for user land settings.
        !            18:  */
        !            19: #if !defined s6_addr32 && defined __sun__
        !            20: #      define s6_addr32 _S6_un._S6_u32
        !            21: #elif !defined s6_addr32 && \
        !            22:                ( defined __OpenBSD__ || defined __FreeBSD__ )
        !            23: #      define s6_addr32 __u6_addr.__u6_addr32
        !            24: #endif /* !defined s6_addr32 */
1.1       misho      25: 
                     26: typedef struct {
                     27:     long recv[HISTORY_LENGTH];
                     28:     long sent[HISTORY_LENGTH];
                     29:     double long total_sent;
                     30:     double long total_recv;
                     31:     int last_write;
                     32: } history_type;
                     33: 
                     34: void tick(int print);
                     35: 
                     36: void *xmalloc(size_t n);
                     37: void *xcalloc(size_t n, size_t m);
                     38: void *xrealloc(void *w, size_t n);
                     39: char *xstrdup(const char *s);
                     40: void xfree(void *v);
                     41: 
                     42: /* options.c */
                     43: void options_read(int argc, char **argv);
                     44: 
1.1.1.2 ! misho      45: struct pfloghdr {
        !            46:       unsigned char            length;
        !            47:       unsigned char            af;
        !            48:       unsigned char            action;
        !            49:       unsigned char            reason;
        !            50:       char                             ifname[16];
        !            51:       char                             ruleset[16];
        !            52:       unsigned int             rulenr;
        !            53:       unsigned int             subrulenr;
        !            54:       unsigned char            dir;
        !            55:       unsigned char            pad[3];
        !            56: };
1.1       misho      57: 
                     58: #endif /* __IFTOP_H_ */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>