Annotation of embedaddon/iftop/options.h, revision 1.1
1.1 ! misho 1: /*
! 2: * options.h:
! 3: *
! 4: */
! 5:
! 6: #ifndef __OPTIONS_H_ /* include guard */
! 7: #define __OPTIONS_H_
! 8:
! 9: #include <sys/types.h>
! 10: #include <sys/socket.h>
! 11: #include <netinet/in.h>
! 12: #include <arpa/inet.h>
! 13:
! 14:
! 15: typedef enum {
! 16: OPTION_PORTS_OFF,
! 17: OPTION_PORTS_SRC,
! 18: OPTION_PORTS_DEST,
! 19: OPTION_PORTS_ON
! 20: } option_port_t;
! 21:
! 22: typedef enum {
! 23: OPTION_SORT_DIV1,
! 24: OPTION_SORT_DIV2,
! 25: OPTION_SORT_DIV3,
! 26: OPTION_SORT_SRC,
! 27: OPTION_SORT_DEST
! 28: } option_sort_t;
! 29:
! 30: typedef enum {
! 31: OPTION_LINEDISPLAY_TWO_LINE,
! 32: OPTION_LINEDISPLAY_ONE_LINE_BOTH,
! 33: OPTION_LINEDISPLAY_ONE_LINE_RECV,
! 34: OPTION_LINEDISPLAY_ONE_LINE_SENT
! 35: } option_linedisplay_t;
! 36:
! 37: /*
! 38: * This structure has to be defined in the same order as the config
! 39: * directives in cfgfile.c. Clearly this is EBW.
! 40: */
! 41: typedef struct {
! 42: /* interface on which to listen */
! 43: char *interface;
! 44:
! 45: int dnsresolution;
! 46: int portresolution;
! 47: /* pcap filter code */
! 48: char *filtercode;
! 49:
! 50: int showbars;
! 51: option_port_t showports;
! 52:
! 53: int promiscuous;
! 54: int promiscuous_but_choosy;
! 55: int aggregate_src;
! 56: int aggregate_dest;
! 57: int paused;
! 58: int showhelp;
! 59: int bandwidth_in_bytes;
! 60: option_sort_t sort;
! 61:
! 62: int bar_interval;
! 63:
! 64: char* screenfilter;
! 65: int freezeorder;
! 66:
! 67: int screen_offset;
! 68:
! 69: option_linedisplay_t linedisplay;
! 70:
! 71: int show_totals;
! 72:
! 73: long long max_bandwidth;
! 74: int log_scale;
! 75:
! 76: /* Cross network filter */
! 77: int netfilter;
! 78: struct in_addr netfilternet;
! 79: struct in_addr netfiltermask;
! 80:
! 81: char *config_file;
! 82: int config_file_specified;
! 83:
! 84: } options_t;
! 85:
! 86:
! 87: void options_set_defaults();
! 88: void options_read(int argc, char **argv);
! 89:
! 90: #endif /* __OPTIONS_H_ */
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>