/home/tai/chorist/xian-1.2/src/include/usei-log.h

Go to the documentation of this file.
00001 /*
00002  *  XIAN USEI - User Space XIAN Extended API
00003  *  Copyright (C) 2006 THALES Communications
00004  *
00005  *  This file is part of XIAN software.
00006  *
00007  *  XIAN is free software; you can redistribute it and/or modify it
00008  *  under the terms of the GNU General Public License as published by
00009  *  the Free Software Foundation.
00010  *
00011  *  XIAN software is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with XIAN software; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00019  *
00020  *  */
00021 
00022 
00023 #ifndef _USEI_LOG_H
00024 #define _USEI_LOG_H
00025 
00026 #define   IFNAMESIZ                   16
00027 #define   IEEE80211_MAC_ADDR_LEN      17
00028 #define   MAX_METRIC_VALUES           60
00029 
00030 /****************************************************************************
00031  *                           METRICS LOG DEFINITIONS
00032  ****************************************************************************/
00033 
00034 struct metrics_log
00035 {
00036   unsigned int id_metric;
00037   unsigned long long last_values[MAX_METRIC_VALUES];
00038   struct metrics_log * next;
00039 };
00040 
00041 struct node
00042 {
00043   char mac_addr[IEEE80211_MAC_ADDR_LEN+1];
00044   struct metrics_log * list_metric_log;
00045   struct node * next;
00046 };
00047 
00048 struct net_dev
00049 {
00050   char dev_name[IFNAMESIZ+1];
00051   struct node * list_node;
00052   struct net_dev * next;
00053 };
00054 
00055 #ifdef DEF_NET_DEV_LIST
00056 struct net_dev * net_dev_list = NULL;
00057 #else
00058 extern struct net_dev * net_dev_list;
00059 #endif
00060 
00061 
00062 /**************************************************************************************
00063  *                               METRICS LOG FUNCTIONS
00064  *************************************************************************************/
00065 
00066 struct net_dev * new_net_dev(char * dev_name);
00067 struct net_dev * lookup_net_dev(char * dev_name, struct net_dev * list);
00068 void add_net_dev(struct net_dev * entry, struct net_dev ** list);
00069 void print_net_dev_list(struct net_dev * list);
00070 
00071 struct node * new_node(char * mac_addr);
00072 struct node * lookup_node(char * mac_addr, struct node * list);
00073 void add_node(struct node * entry, struct node ** list);
00074 void print_node_list(struct node * list);
00075 
00076 struct metrics_log * new_metric(unsigned int id_metric);
00077 void add_metric(struct metrics_log * entry, struct metrics_log **list);
00078 struct metrics_log * lookup_metric(unsigned int id_metric, struct metrics_log *list);
00079 void print_log_metrics_list(struct metrics_log *list);
00080 void set_new_value_metric(unsigned long long value, unsigned long long tab[]);
00081 
00082 #endif

Generated on Mon Jan 21 12:31:45 2008 for XIAN by  doxygen 1.5.3