Added use_isdn' and
lockfile' arguments. When `use_isdn' is TRUE, we
2000-01-22 Martin Baulig <martin@home-of-linux.org> * include/glibtop/ppp.h (glibtop_get_ppp): Added `use_isdn' and `lockfile' arguments. When `use_isdn' is TRUE, we return ISDN statistics, otherwise `lockfile' is expected to be the modem lockfile and we return PPP statistics for that Modem. Note that for Modem statistics, you need to set both `device' and `lockfile' for some sysdeps ports; so if you have more than one PPP connection active and want to get statistics on the second one you need to set `device' to 1 and `lockfile' to the correct modem lockfile. * include/glibtop/error.h (GLIBTOP_ERROR_NEED_MODEM_LOCKFILE): New error constant; this is returned when you call glibtop_get_ppp () without a modem lockfile and the current sysdeps port requires it.
This commit is contained in:
committed by
Martin Baulig
parent
8da7cfd032
commit
931ba0fa8d
@@ -49,8 +49,9 @@ BEGIN_LIBGTOP_DECLS
|
||||
#define GLIBTOP_ERROR_NO_BACKEND_OPENED 12
|
||||
|
||||
#define GLIBTOP_ERROR_DEMARSHAL_ERROR 13
|
||||
#define GLIBTOP_ERROR_NEED_MODEM_LOCKFILE 14
|
||||
|
||||
#define GLIBTOP_MAX_ERROR 14
|
||||
#define GLIBTOP_MAX_ERROR 15
|
||||
|
||||
char *
|
||||
glibtop_get_error_string_l (glibtop *server, unsigned error_number);
|
||||
|
@@ -53,7 +53,7 @@ struct _glibtop_ppp
|
||||
bytes_out; /* GLIBTOP_PPP_BYTES_OUT */
|
||||
};
|
||||
|
||||
#define glibtop_get_ppp(ppp,device) glibtop_get_ppp_l(glibtop_global_server, ppp, device)
|
||||
#define glibtop_get_ppp(ppp,device,use_isdn,lockfile) glibtop_get_ppp_l(glibtop_global_server, ppp, device, use_isdn, lockfile)
|
||||
|
||||
#if GLIBTOP_SUID_PPP
|
||||
#define glibtop_get_ppp_r glibtop_get_ppp_p
|
||||
@@ -61,14 +61,14 @@ struct _glibtop_ppp
|
||||
#define glibtop_get_ppp_r glibtop_get_ppp_s
|
||||
#endif
|
||||
|
||||
int glibtop_get_ppp_l (glibtop *server, glibtop_ppp *buf, unsigned short device);
|
||||
int glibtop_get_ppp_l (glibtop *server, glibtop_ppp *buf, unsigned short device, unsigned short use_isdn, const char *lockfile);
|
||||
|
||||
#if GLIBTOP_SUID_PPP
|
||||
int glibtop_init_ppp_p (glibtop *server);
|
||||
int glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device);
|
||||
int glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device, unsigned short use_isdn, const char *lockfile);
|
||||
#else
|
||||
int glibtop_init_ppp_s (glibtop *server);
|
||||
int glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device);
|
||||
int glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device, unsigned short use_isdn, const char *lockfile);
|
||||
#endif
|
||||
|
||||
#ifdef GLIBTOP_NAMES
|
||||
|
Reference in New Issue
Block a user