]> rtime.felk.cvut.cz Git - socketcan-devel.git/blob - kernel/2.4/can/proc.c
added CAN error frame support.
[socketcan-devel.git] / kernel / 2.4 / can / proc.c
1 /*
2  * af_can_proc.c
3  *
4  * Copyright (c) 2002-2005 Volkswagen Group Electronic Research
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  * 1. Redistributions of source code must retain the above copyright
11  *    notice, this list of conditions, the following disclaimer and
12  *    the referenced file 'COPYING'.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  * 3. Neither the name of Volkswagen nor the names of its contributors
17  *    may be used to endorse or promote products derived from this software
18  *    without specific prior written permission.
19  *
20  * Alternatively, provided that this notice is retained in full, this
21  * software may be distributed under the terms of the GNU General
22  * Public License ("GPL") version 2 as distributed in the 'COPYING'
23  * file from the main directory of the linux kernel source.
24  *
25  * The provided data structures and external interfaces from this code
26  * are not restricted to be used by modules with a GPL compatible license.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
39  * DAMAGE.
40  *
41  * Send feedback to <llcf@volkswagen.de>
42  *
43  */
44
45 #include <linux/module.h>
46 #include <linux/proc_fs.h>
47
48 #include "af_can.h"
49 #include "version.h"
50
51 RCSID("$Id$");
52
53 /* proc filenames */
54
55 #define CAN_PROC_VERSION     "version"
56 #define CAN_PROC_STATS       "stats"
57 #define CAN_PROC_RESET_STATS "reset_stats"
58 #define CAN_PROC_RCVLIST_ALL "rcvlist_all"
59 #define CAN_PROC_RCVLIST_FIL "rcvlist_fil"
60 #define CAN_PROC_RCVLIST_INV "rcvlist_inv"
61 #define CAN_PROC_RCVLIST_SFF "rcvlist_sff"
62 #define CAN_PROC_RCVLIST_EFF "rcvlist_eff"
63 #define CAN_PROC_RCVLIST_ERR "rcvlist_err"
64
65 static void can_init_stats(int caller);
66 static void can_stat_update(unsigned long data);
67
68 static struct proc_dir_entry *can_create_proc_read_entry(const char *name, mode_t mode, read_proc_t* read_proc, void *data);
69 static void can_remove_proc_entry(const char *name);
70 static unsigned long calc_rate(unsigned long oldjif, unsigned long newjif, unsigned long count);
71
72 static int can_proc_read_version(char *page, char **start, off_t off, int count, int *eof, void *data);
73 static int can_proc_read_stats(char *page, char **start, off_t off, int count, int *eof, void *data);
74 static int can_proc_read_reset_stats(char *page, char **start, off_t off, int count, int *eof, void *data);
75 static int can_proc_read_rcvlist_all(char *page, char **start, off_t off, int count, int *eof, void *data);
76 static int can_proc_read_rcvlist_fil(char *page, char **start, off_t off, int count, int *eof, void *data);
77 static int can_proc_read_rcvlist_inv(char *page, char **start, off_t off, int count, int *eof, void *data);
78 static int can_proc_read_rcvlist_sff(char *page, char **start, off_t off, int count, int *eof, void *data);
79 static int can_proc_read_rcvlist_eff(char *page, char **start, off_t off, int count, int *eof, void *data);
80 static int can_proc_read_rcvlist_err(char *page, char **start, off_t off, int count, int *eof, void *data);
81
82 static struct proc_dir_entry *can_dir         = NULL;
83 static struct proc_dir_entry *pde_version     = NULL;
84 static struct proc_dir_entry *pde_stats       = NULL;
85 static struct proc_dir_entry *pde_reset_stats = NULL;
86 static struct proc_dir_entry *pde_rcvlist_all = NULL;
87 static struct proc_dir_entry *pde_rcvlist_fil = NULL;
88 static struct proc_dir_entry *pde_rcvlist_inv = NULL;
89 static struct proc_dir_entry *pde_rcvlist_sff = NULL;
90 static struct proc_dir_entry *pde_rcvlist_eff = NULL;
91 static struct proc_dir_entry *pde_rcvlist_err = NULL;
92
93 struct timer_list stattimer; /* timer for statistics update */
94
95 struct s_stats  stats; /* statistics */
96 struct s_pstats pstats;
97
98 extern struct rcv_dev_list *rx_dev_list; /* rx dispatcher structures */
99 extern int stats_timer;                  /* module parameter. default: on */
100
101 /**************************************************/
102 /* procfs init / remove                           */
103 /**************************************************/
104
105 void can_init_proc(void)
106 {
107
108     /* procfs init */
109
110     /* create /proc/can directory */
111     can_dir = proc_mkdir(CAN_PROC_DIR, NULL);
112
113     if (can_dir) {
114
115         can_dir->owner = THIS_MODULE;
116
117         /* own procfs entries from the AF_CAN core */
118         pde_version     = can_create_proc_read_entry(CAN_PROC_VERSION, 0644, can_proc_read_version, NULL);
119         pde_stats       = can_create_proc_read_entry(CAN_PROC_STATS, 0644, can_proc_read_stats, NULL);
120         pde_reset_stats = can_create_proc_read_entry(CAN_PROC_RESET_STATS, 0644, can_proc_read_reset_stats, NULL);
121         pde_rcvlist_all = can_create_proc_read_entry(CAN_PROC_RCVLIST_ALL, 0644, can_proc_read_rcvlist_all, NULL);
122         pde_rcvlist_fil = can_create_proc_read_entry(CAN_PROC_RCVLIST_FIL, 0644, can_proc_read_rcvlist_fil, NULL);
123         pde_rcvlist_inv = can_create_proc_read_entry(CAN_PROC_RCVLIST_INV, 0644, can_proc_read_rcvlist_inv, NULL);
124         pde_rcvlist_sff = can_create_proc_read_entry(CAN_PROC_RCVLIST_SFF, 0644, can_proc_read_rcvlist_sff, NULL);
125         pde_rcvlist_eff = can_create_proc_read_entry(CAN_PROC_RCVLIST_EFF, 0644, can_proc_read_rcvlist_eff, NULL);
126         pde_rcvlist_err = can_create_proc_read_entry(CAN_PROC_RCVLIST_ERR, 0644, can_proc_read_rcvlist_err, NULL);
127
128         if (stats_timer) {
129             /* the statistics are updated every second (timer triggered) */
130             stattimer.function = can_stat_update;
131             stattimer.data = 0;
132             stattimer.expires = jiffies + HZ; /* every second */
133             add_timer(&stattimer); /* start statistics timer */
134         }
135     } else
136         printk(KERN_INFO "af_can: failed to create CAN_PROC_DIR. CONFIG_PROC_FS missing?\n");
137 }
138
139 void can_remove_proc(void)
140 {
141     /* procfs remove */
142     if (pde_version) {
143         can_remove_proc_entry(CAN_PROC_VERSION);
144     }
145
146     if (pde_stats) {
147         can_remove_proc_entry(CAN_PROC_STATS);
148     }
149
150     if (pde_reset_stats) {
151         can_remove_proc_entry(CAN_PROC_RESET_STATS);
152     }
153
154     if (pde_rcvlist_all) {
155         can_remove_proc_entry(CAN_PROC_RCVLIST_ALL);
156     }
157
158     if (pde_rcvlist_fil) {
159         can_remove_proc_entry(CAN_PROC_RCVLIST_FIL);
160     }
161
162     if (pde_rcvlist_inv) {
163         can_remove_proc_entry(CAN_PROC_RCVLIST_INV);
164     }
165
166     if (pde_rcvlist_sff) {
167         can_remove_proc_entry(CAN_PROC_RCVLIST_SFF);
168     }
169
170     if (pde_rcvlist_eff) {
171         can_remove_proc_entry(CAN_PROC_RCVLIST_EFF);
172     }
173
174     if (pde_rcvlist_err) {
175         can_remove_proc_entry(CAN_PROC_RCVLIST_ERR);
176     }
177
178     if (can_dir) {
179         remove_proc_entry(CAN_PROC_DIR, NULL);
180     }
181 }
182
183 /**************************************************/
184 /* proc read functions                            */
185 /**************************************************/
186
187 int can_print_recv_list(char *page, int len, struct rcv_list *rx_list, struct net_device *dev)
188 {
189     struct rcv_list *p;
190
191     if (rx_list) {
192         for (p = rx_list; p; p = p->next) {
193
194             /*                             can1.  00000000  00000000  00000000  .......0  tp20 */
195             if (p->can_id & CAN_EFF_FLAG) /* EFF & CAN_ID_ALL */
196                 len += snprintf(page + len, PAGE_SIZE - len, "   %-5s  %08X  %08x  %08x  %08x  %8ld  %s\n",
197                                dev->name, p->can_id, p->mask, (unsigned int)p->func,
198                                (unsigned int)p->data, p->matches, p->ident);
199             else
200                 len += snprintf(page + len, PAGE_SIZE - len, "   %-5s     %03X    %08x  %08x  %08x  %8ld  %s\n",
201                                dev->name, p->can_id, p->mask, (unsigned int)p->func,
202                                (unsigned int)p->data, p->matches, p->ident);
203
204             /* does a typical line fit into the current buffer? */
205             if (len > PAGE_SIZE - 100) { /* 100 Bytes before end of buffer */
206                 len += snprintf(page + len, PAGE_SIZE - len, "   (..)\n"); /* mark output cutted off */
207                 return len;
208             }
209         }
210     }
211
212     return len;
213 }
214
215 static int can_print_recv_banner(char *page, int len)
216 {
217     /*                  can1.  00000000  00000000  00000000  .......0  tp20 */
218     len += snprintf(page + len, PAGE_SIZE - len,
219                     "  device   can_id   can_mask  function  userdata   matches  ident\n");
220
221     return len;
222 }
223
224 int can_proc_read_stats(char *page, char **start, off_t off, int count, int *eof, void *data)
225 {
226     int len = 0;
227
228     MOD_INC_USE_COUNT;
229
230     len += snprintf(page + len, PAGE_SIZE - len, "\n");
231     len += snprintf(page + len, PAGE_SIZE - len, " %8ld transmitted frames (TXF)\n",
232                     stats.tx_frames);
233     len += snprintf(page + len, PAGE_SIZE - len, " %8ld received frames (RXF)\n",
234                     stats.rx_frames);
235     len += snprintf(page + len, PAGE_SIZE - len, " %8ld matched frames (RXMF)\n",
236                     stats.matches);
237
238     len += snprintf(page + len, PAGE_SIZE - len, "\n");
239
240     len += snprintf(page + len, PAGE_SIZE - len, " %8ld %% total match ratio (RXMR)\n",
241                     stats.total_rx_match_ratio);
242
243     len += snprintf(page + len, PAGE_SIZE - len, " %8ld frames/s total tx rate (TXR)\n",
244                     stats.total_tx_rate);
245     len += snprintf(page + len, PAGE_SIZE - len, " %8ld frames/s total rx rate (RXR)\n",
246                     stats.total_rx_rate);
247
248     len += snprintf(page + len, PAGE_SIZE - len, "\n");
249
250     len += snprintf(page + len, PAGE_SIZE - len, " %8ld %% current match ratio (CRXMR)\n",
251                     stats.current_rx_match_ratio);
252
253     len += snprintf(page + len, PAGE_SIZE - len, " %8ld frames/s current tx rate (CTXR)\n",
254                     stats.current_tx_rate);
255     len += snprintf(page + len, PAGE_SIZE - len, " %8ld frames/s current rx rate (CRXR)\n",
256                     stats.current_rx_rate);
257
258     len += snprintf(page + len, PAGE_SIZE - len, "\n");
259
260     len += snprintf(page + len, PAGE_SIZE - len, " %8ld %% max match ratio (MRXMR)\n",
261                     stats.max_rx_match_ratio);
262
263     len += snprintf(page + len, PAGE_SIZE - len, " %8ld frames/s max tx rate (MTXR)\n",
264                     stats.max_tx_rate);
265     len += snprintf(page + len, PAGE_SIZE - len, " %8ld frames/s max rx rate (MRXR)\n",
266                     stats.max_rx_rate);
267
268     len += snprintf(page + len, PAGE_SIZE - len, "\n");
269
270     len += snprintf(page + len, PAGE_SIZE - len, " %8ld current receive list entries (CRCV)\n", pstats.rcv_entries);
271     len += snprintf(page + len, PAGE_SIZE - len, " %8ld maximum receive list entries (MRCV)\n", pstats.rcv_entries_max);
272
273     if (pstats.stats_reset)
274         len += snprintf(page + len, PAGE_SIZE - len, "\n %8ld statistic resets (STR)\n", pstats.stats_reset);
275
276     len += snprintf(page + len, PAGE_SIZE - len, "\n");
277
278     MOD_DEC_USE_COUNT;
279
280     *eof = 1;
281     return len;
282 }
283
284 int can_proc_read_reset_stats(char *page, char **start, off_t off, int count, int *eof, void *data)
285 {
286     int len = 0;
287
288     MOD_INC_USE_COUNT;
289
290     can_init_stats(1);
291
292     len += snprintf(page + len, PAGE_SIZE - len, "CAN statistic reset #%ld done.\n", pstats.stats_reset);
293
294     MOD_DEC_USE_COUNT;
295
296     *eof = 1;
297     return len;
298 }
299
300 int can_proc_read_version(char *page, char **start, off_t off, int count, int *eof, void *data)
301 {
302     int len = 0;
303
304     MOD_INC_USE_COUNT;
305
306     len += snprintf(page + len, PAGE_SIZE - len,
307                     "%06X [ Volkswagen AG - Low Level CAN Framework (LLCF) v%s ]\n",
308                     LLCF_VERSION_CODE, VERSION);
309
310     MOD_DEC_USE_COUNT;
311
312     *eof = 1;
313     return len;
314 }
315
316 int can_proc_read_rcvlist_all(char *page, char **start, off_t off, int count, int *eof, void *data)
317 {
318     int len = 0;
319     struct rcv_dev_list *p;
320
321     MOD_INC_USE_COUNT;
322
323     /* RX_ALL */
324     len += snprintf(page + len, PAGE_SIZE - len, "\nreceive list 'rx_all':\n");
325
326     /* find receive list for this device */
327     for (p = rx_dev_list; p; p = p->next) {
328
329         if (p->rx_all) {
330             len = can_print_recv_banner(page, len);
331             len = can_print_recv_list(page, len, p->rx_all, p->dev);
332         } else
333             if (p->dev)
334                 len += snprintf(page + len, PAGE_SIZE - len, "  (%s: no entry)\n", p->dev->name);
335     }
336
337     len += snprintf(page + len, PAGE_SIZE - len, "\n");
338
339     MOD_DEC_USE_COUNT;
340
341     *eof = 1;
342     return len;
343 }
344
345 int can_proc_read_rcvlist_fil(char *page, char **start, off_t off, int count, int *eof, void *data)
346 {
347     int len = 0;
348     struct rcv_dev_list *p;
349
350     MOD_INC_USE_COUNT;
351
352     /* RX_FIL */
353     len += snprintf(page + len, PAGE_SIZE - len, "\nreceive list 'rx_fil':\n");
354
355     /* find receive list for this device */
356     for (p = rx_dev_list; p; p = p->next) {
357
358         if (p->rx_fil) {
359             len = can_print_recv_banner(page, len);
360             len = can_print_recv_list(page, len, p->rx_fil, p->dev);
361         } else
362             if (p->dev)
363                 len += snprintf(page + len, PAGE_SIZE - len, "  (%s: no entry)\n", p->dev->name);
364     }
365
366     len += snprintf(page + len, PAGE_SIZE - len, "\n");
367
368     MOD_DEC_USE_COUNT;
369
370     *eof = 1;
371     return len;
372 }
373
374 int can_proc_read_rcvlist_inv(char *page, char **start, off_t off, int count, int *eof, void *data)
375 {
376     int len = 0;
377     struct rcv_dev_list *p;
378
379     MOD_INC_USE_COUNT;
380
381     /* RX_INV */
382     len += snprintf(page + len, PAGE_SIZE - len, "\nreceive list 'rx_inv':\n");
383
384     /* find receive list for this device */
385     for (p = rx_dev_list; p; p = p->next) {
386
387         if (p->rx_inv) {
388             len = can_print_recv_banner(page, len);
389             len = can_print_recv_list(page, len, p->rx_inv, p->dev);
390         } else
391             if (p->dev)
392                 len += snprintf(page + len, PAGE_SIZE - len, "  (%s: no entry)\n", p->dev->name);
393     }
394
395     len += snprintf(page + len, PAGE_SIZE - len, "\n");
396
397     MOD_DEC_USE_COUNT;
398
399     *eof = 1;
400     return len;
401 }
402
403 int can_proc_read_rcvlist_sff(char *page, char **start, off_t off, int count, int *eof, void *data)
404 {
405     int len = 0;
406     unsigned long id = 0;
407     int i;
408     struct rcv_dev_list *p;
409
410     MOD_INC_USE_COUNT;
411
412     /* RX_SFF */
413     len += snprintf(page + len, PAGE_SIZE - len, "\nreceive list 'rx_sff':\n");
414
415     /* find receive list for this device */
416     for (p = rx_dev_list; p; p = p->next) {
417
418         for(i=0; i<0x800; i++)
419             id |= (unsigned long) p->rx_sff[i]; /* check if any entry available */
420
421         if (id) {
422             len = can_print_recv_banner(page, len);
423             for(i=0; i<0x800; i++) {
424                 if ((p->rx_sff[i]) && (len < PAGE_SIZE - 100))
425                     len = can_print_recv_list(page, len, p->rx_sff[i], p->dev);
426             }
427         } else
428             if (p->dev)
429                 len += snprintf(page + len, PAGE_SIZE - len, "  (%s: no entry)\n", p->dev->name);
430     }
431
432     len += snprintf(page + len, PAGE_SIZE - len, "\n");
433
434     MOD_DEC_USE_COUNT;
435
436     *eof = 1;
437     return len;
438 }
439
440 int can_proc_read_rcvlist_eff(char *page, char **start, off_t off, int count, int *eof, void *data)
441 {
442     int len = 0;
443     struct rcv_dev_list *p;
444
445     MOD_INC_USE_COUNT;
446
447     /* RX_EFF */
448     len += snprintf(page + len, PAGE_SIZE - len, "\nreceive list 'rx_eff':\n");
449
450     /* find receive list for this device */
451     for (p = rx_dev_list; p; p = p->next) {
452
453         if (p->rx_eff) {
454             len = can_print_recv_banner(page, len);
455             len = can_print_recv_list(page, len, p->rx_eff, p->dev);
456         } else
457             if (p->dev)
458                 len += snprintf(page + len, PAGE_SIZE - len, "  (%s: no entry)\n", p->dev->name);
459     }
460
461     len += snprintf(page + len, PAGE_SIZE - len, "\n");
462
463     MOD_DEC_USE_COUNT;
464
465     *eof = 1;
466     return len;
467 }
468
469 int can_proc_read_rcvlist_err(char *page, char **start, off_t off, int count, int *eof, void *data)
470 {
471     int len = 0;
472     struct rcv_dev_list *p;
473
474     MOD_INC_USE_COUNT;
475
476     /* RX_ERR */
477     len += snprintf(page + len, PAGE_SIZE - len, "\nreceive list 'rx_err':\n");
478
479     /* find receive list for this device */
480     for (p = rx_dev_list; p; p = p->next) {
481
482         if (p->rx_err) {
483             len = can_print_recv_banner(page, len);
484             len = can_print_recv_list(page, len, p->rx_err, p->dev);
485         } else
486             if (p->dev)
487                 len += snprintf(page + len, PAGE_SIZE - len, "  (%s: no entry)\n", p->dev->name);
488     }
489
490     len += snprintf(page + len, PAGE_SIZE - len, "\n");
491
492     MOD_DEC_USE_COUNT;
493
494     *eof = 1;
495     return len;
496 }
497
498 /**************************************************/
499 /* proc utility functions                         */
500 /**************************************************/
501
502 static struct proc_dir_entry *can_create_proc_read_entry(const char *name, mode_t mode, read_proc_t* read_proc, void *data)
503 {
504     if (can_dir)
505         return create_proc_read_entry(name, mode, can_dir, read_proc, data);
506     else
507         return NULL;
508 }
509
510 static void can_remove_proc_entry(const char *name)
511 {
512     if (can_dir)
513         remove_proc_entry(name, can_dir);
514 }
515
516 static unsigned long calc_rate(unsigned long oldjif, unsigned long newjif, unsigned long count){
517
518     unsigned long ret = 0;
519
520     if (oldjif == newjif)
521         return 0;
522
523     if (count > (ULONG_MAX / HZ)) { /* see can_rcv() - this should NEVER happen! */
524         printk(KERN_ERR "af_can: calc_rate: count exceeded! %ld\n", count);
525         return 99999999;
526     }
527
528     ret = ((count * HZ) / (newjif - oldjif));
529
530     return ret;
531 };
532
533 /**************************************************/
534 /* af_can statistics stuff                        */
535 /**************************************************/
536
537 static void can_init_stats(int caller){
538
539     memset(&stats, 0, sizeof(stats));
540     stats.jiffies_init  = jiffies;
541     pstats.stats_reset++;
542 };
543
544 static void can_stat_update(unsigned long data){
545
546     unsigned long j = jiffies; /* snapshot */
547
548     //DBG("af_can: can_stat_update() jiffies = %ld\n", j);
549
550     if (j < stats.jiffies_init) /* jiffies overflow */
551         can_init_stats(2);
552
553     /* stats.rx_frames is the definitively max. statistic value */
554     if (stats.rx_frames > (ULONG_MAX / HZ)) /* prevent overflow in calc_rate() */
555         can_init_stats(3); /* restart */
556
557     if (stats.matches > (ULONG_MAX / 100)) /* matches overflow - very improbable */
558         can_init_stats(4);
559
560     /* calc total values */
561     if (stats.rx_frames)
562          stats.total_rx_match_ratio = (stats.matches * 100) / stats.rx_frames;
563
564     stats.total_tx_rate = calc_rate(stats.jiffies_init, j, stats.tx_frames);
565     stats.total_rx_rate = calc_rate(stats.jiffies_init, j, stats.rx_frames);
566
567     /* calc current values */
568     if (stats.rx_frames_delta)
569         stats.current_rx_match_ratio = (stats.matches_delta * 100) / stats.rx_frames_delta;
570
571     stats.current_tx_rate = calc_rate(0, HZ, stats.tx_frames_delta);
572     stats.current_rx_rate = calc_rate(0, HZ, stats.rx_frames_delta);
573
574     /* check / update maximum values */
575     if (stats.max_tx_rate < stats.current_tx_rate)
576         stats.max_tx_rate = stats.current_tx_rate;
577
578     if (stats.max_rx_rate < stats.current_rx_rate)
579         stats.max_rx_rate = stats.current_rx_rate;
580
581     if (stats.max_rx_match_ratio < stats.current_rx_match_ratio)
582         stats.max_rx_match_ratio = stats.current_rx_match_ratio;
583
584     /* clear values for 'current rate' calculation */
585     stats.tx_frames_delta = 0;
586     stats.rx_frames_delta = 0;
587     stats.matches_delta   = 0;
588
589     /* restart timer */
590     stattimer.expires = jiffies + HZ; /* every second */
591     add_timer(&stattimer);
592 };
593
594 /**************************************************/
595 /* EOF                                            */
596 /**************************************************/