00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef DYN_IWSPY_REC_H
00014 #define DYN_IWSPY_REC_H
00015
00016 #include <sys/time.h>
00017 #include <sys/types.h>
00018 #include <asm/types.h>
00019 #include <linux/wireless.h>
00020 #include <sys/socket.h>
00021 #include "hashtable.h"
00022 #include "agentadv.h"
00023
00024 #define MAX_GROUP_PREFIX_LEN 80
00025 #define PLOT_STR_SIZE 2048
00026 #define REC_NODE_CHUNK 256
00027 #define REC_HASH_SIZE 256
00028
00029
00030 struct qual_entry {
00031 struct iw_quality qual[REC_NODE_CHUNK+1];
00032 struct timeval tstamp[REC_NODE_CHUNK+1];
00033 unsigned int current;
00034 struct qual_entry *next;
00035 };
00036
00037 struct hw_record {
00038 struct node hashnode;
00039 char hw[ETH_ALEN];
00040 struct in_addr ip_addr;
00041 struct qual_entry *quals;
00042 struct qual_entry *tail;
00043 };
00044
00045 struct dump {
00046 char plot_str[PLOT_STR_SIZE];
00047 int output_type;
00048 int interval;
00049 };
00050
00051 int rec_dump(int, int);
00052 int rec_init(void);
00053 void rec_clean_up(void);
00054 int rec_add_long(struct sockaddr *hwa, unsigned char *hw,
00055 struct in_addr addr, struct iw_quality *qual,
00056 struct timeval *t, int monitored);
00057 int rec_add_qual(char *hw, struct iw_quality *qual, struct timeval *t);
00058 int rec_add(char *hw, struct iw_quality *qual, struct timeval *t,
00059 struct in_addr addr);
00060 #endif