Skip to content
Skip to link menu
Trinity API Reference
Trinity API Reference
superkaramba
superkaramba
superkaramba
src
networksensor.h
1
/***************************************************************************
2
* Copyright (C) 2003 by Hans Karlsson *
3
* karlsson.h@home.se *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
***************************************************************************/
10
#ifndef NETWORKSENSOR_H
11
#define NETWORKSENSOR_H
12
13
#include "sensor.h"
14
15
#include <tqdatetime.h>
16
#include <tqfile.h>
17
#include <tqregexp.h>
18
#ifdef __FreeBSD__
19
#include <sys/types.h>
20
#include <sys/socket.h>
21
#include <net/if.h>
22
#include <net/if_mib.h>
23
#endif
24
25
class
NetworkSensor :
public
Sensor
26
{
27
TQ_OBJECT
28
29
public
:
30
NetworkSensor( TQString device,
int
interval );
31
~NetworkSensor();
32
void
update();
33
34
35
private
:
36
unsigned
long
receivedBytes;
37
unsigned
long
transmittedBytes;
38
TQTime netTimer;
39
TQString device;
40
#ifdef __FreeBSD__
41
int
if_number;
42
ifmibdata if_mib;
43
#endif
44
void
getInOutBytes (
unsigned
long
&in,
unsigned
long
&out)
const
;
45
46
};
47
#endif
// NETWORKSENSOR_H
48
superkaramba
Skip menu "superkaramba"
Main Page
Alphabetical List
Class List
File List
Class Members
superkaramba
Skip menu "superkaramba"
kcalc
knumber
superkaramba