3 * kPPP: A pppd front end for the KDE project
7 * (c) 1997-1998 Bernd Johannes Wuebben <wuebben@kde.org>
8 * (c) 1997-1999 Mario Weilguni <mweilguni@kde.org>
9 * (c) 1998-1999 Harri Porten <porten@kde.org>
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
21 * You should have received a copy of the GNU Library General Public
22 * License along with this program; if not, write to the Free
23 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30 #include "kpppconfig.h"
34 #include <sys/types.h>
35 #include <sys/socket.h>
36 #include <net/ppp_defs.h>
38 #include <net/if_ppp.h>
43 class PPPStats
: public QObject
{
57 void statsChanged(int);
65 int ipackets
, opackets
;
70 int packetsunc
, packetsoutunc
;
72 QString local_ip_address
;
73 QString remote_ip_address
;
75 enum IOStatus
{ BytesNone
= 0, BytesIn
, BytesOut
, BytesBoth
};
78 bool get_ppp_stats(struct ppp_stats
*curp
);
79 bool strioctl(int fd
, int cmd
, char* ptr
,int ilen
, int olen
);
81 int ibytes_last
, obytes_last
;
82 int s
; // socket file descriptor
88 enum IOStatus ioStatus
;