*** empty log message ***
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
1999-12-25 Martin Baulig <martin@home-of-linux.org>
|
1999-12-25 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* safeio.h: Removed. This is now included in <glibtop-private.h>.
|
* safeio.h: Removed. This is now included in <glibtop_private.h>.
|
||||||
|
|
||||||
* netinfo.c: New file.
|
* netinfo.c: New file.
|
||||||
|
|
||||||
|
@@ -23,5 +23,5 @@ libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO)
|
|||||||
|
|
||||||
|
|
||||||
include_HEADERS = glibtop_server.h glibtop_machine.h
|
include_HEADERS = glibtop_server.h glibtop_machine.h
|
||||||
noinst_HEADERS = glibtop_private.h glibtop_suid.h safeio.h
|
noinst_HEADERS = glibtop_private.h glibtop_suid.h
|
||||||
|
|
||||||
|
@@ -41,10 +41,10 @@ glibtop_init_interface_names_s (glibtop *server)
|
|||||||
|
|
||||||
/* Provides network statistics. */
|
/* Provides network statistics. */
|
||||||
|
|
||||||
char *
|
glibtop_interface *
|
||||||
glibtop_get_interface_names_s (glibtop *server, glibtop_interface_names *buf,
|
glibtop_get_interface_names_s (glibtop *server, glibtop_interface_names *buf,
|
||||||
unsigned interface, unsigned number,
|
u_int64_t interface, u_int64_t number,
|
||||||
unsigned instance, unsigned strategy)
|
u_int64_t instance, u_int64_t strategy)
|
||||||
{
|
{
|
||||||
glibtop_init_s (&server, GLIBTOP_SYSDEPS_INTERFACE_NAMES, 0);
|
glibtop_init_s (&server, GLIBTOP_SYSDEPS_INTERFACE_NAMES, 0);
|
||||||
|
|
||||||
|
@@ -33,13 +33,18 @@ int
|
|||||||
glibtop_init_netload_s (glibtop *server)
|
glibtop_init_netload_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.netload = _glibtop_sysdeps_netload;
|
server->sysdeps.netload = _glibtop_sysdeps_netload;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides network statistics. */
|
/* Provides network statistics. */
|
||||||
|
|
||||||
int
|
int
|
||||||
glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
|
glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
|
||||||
const char *interface)
|
const char *interface, unsigned transport,
|
||||||
|
unsigned protocol)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_netload));
|
memset (buf, 0, sizeof (glibtop_netload));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,8 @@ int
|
|||||||
glibtop_init_ppp_s (glibtop *server)
|
glibtop_init_ppp_s (glibtop *server)
|
||||||
{
|
{
|
||||||
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
|
server->sysdeps.ppp = _glibtop_sysdeps_ppp;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provides PPP/ISDN information. */
|
/* Provides PPP/ISDN information. */
|
||||||
@@ -41,4 +43,6 @@ int
|
|||||||
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
|
glibtop_get_ppp_s (glibtop *server, glibtop_ppp *buf, unsigned short device)
|
||||||
{
|
{
|
||||||
memset (buf, 0, sizeof (glibtop_ppp));
|
memset (buf, 0, sizeof (glibtop_ppp));
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -31,8 +31,8 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* The differences between old and new procfs API are:
|
* The differences between old and new procfs API are:
|
||||||
* - old has /proc/<pid> file and ioctl() is used to obtain the data.
|
* - old has '/proc/<pid>' file and ioctl() is used to obtain the data.
|
||||||
* - new has /proc/<pid>/* files and read() & friends are used to
|
* - new has '/proc/<pid>/*' files and read() & friends are used to
|
||||||
* obtain the data.
|
* obtain the data.
|
||||||
* - names of structures and members are different. It's mostly the
|
* - names of structures and members are different. It's mostly the
|
||||||
* prefix. Old uses `pr' and new uses `ps'.
|
* prefix. Old uses `pr' and new uses `ps'.
|
||||||
@@ -127,7 +127,7 @@ glibtop_get_proc_credentials_s(glibtop *server,
|
|||||||
else
|
else
|
||||||
toread = GLIBTOP_MAX_GROUPS * sizeof(gid_t);
|
toread = GLIBTOP_MAX_GROUPS * sizeof(gid_t);
|
||||||
if(s_pread(fd, groups, toread,
|
if(s_pread(fd, groups, toread,
|
||||||
&(((struct prcred *)0)->pr_groups[0])) != toread)
|
(off_t)&(((struct prcred *)0)->pr_groups[0])) != toread)
|
||||||
prcred->pr_ngroups = 0;
|
prcred->pr_ngroups = 0;
|
||||||
}
|
}
|
||||||
s_close(fd);
|
s_close(fd);
|
||||||
|
Reference in New Issue
Block a user