Don't call glibtop_init_s(), this is deprecated.
2000-11-22 Martin Baulig <martin@home-of-linux.org> * *.c: Don't call glibtop_init_s(), this is deprecated. * netinfo.c: New file.
This commit is contained in:
committed by
Martin Baulig
parent
158dec2b2a
commit
035b387463
@@ -1,3 +1,11 @@
|
|||||||
|
2000-11-22 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
|
* Makefile.am: Don't install libgtop_sysdeps.la.
|
||||||
|
|
||||||
|
* *.c: Don't call glibtop_init_s(), this is deprecated.
|
||||||
|
|
||||||
|
* netinfo.c: New file.
|
||||||
|
|
||||||
1998-10-26 Martin Baulig <martin@home-of-linux.org>
|
1998-10-26 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* netload.c: New file.
|
* netload.c: New file.
|
||||||
|
@@ -2,16 +2,14 @@ LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
|||||||
|
|
||||||
INCLUDES = @INCLUDES@ -D_IN_LIBGTOP_SERVER
|
INCLUDES = @INCLUDES@ -D_IN_LIBGTOP_SERVER
|
||||||
|
|
||||||
lib_LTLIBRARIES = libgtop_sysdeps.la
|
noinst_LTLIBRARIES = libgtop_sysdeps.la
|
||||||
|
|
||||||
libgtop_sysdeps_la_SOURCES = open.c close.c cpu.c mem.c swap.c \
|
libgtop_sysdeps_la_SOURCES = open.c close.c cpu.c mem.c swap.c \
|
||||||
uptime.c loadavg.c shm_limits.c msg_limits.c \
|
uptime.c loadavg.c shm_limits.c msg_limits.c \
|
||||||
sem_limits.c proclist.c procstate.c procuid.c \
|
sem_limits.c proclist.c procstate.c procuid.c \
|
||||||
proctime.c procmem.c procsignal.c prockernel.c \
|
proctime.c procmem.c procsignal.c prockernel.c \
|
||||||
procsegment.c procargs.c procmap.c netload.c \
|
procsegment.c proccwd.c procargs.c procmap.c \
|
||||||
interfaces.c ppp.c
|
netload.c netinfo.c interfaces.c ppp.c
|
||||||
|
|
||||||
libgtop_sysdeps_la_LDFLAGS = $(LT_VERSION_INFO)
|
|
||||||
|
|
||||||
noinst_HEADERS = glibtop_server_private.h
|
noinst_HEADERS = glibtop_server_private.h
|
||||||
|
|
||||||
|
@@ -43,8 +43,6 @@ glibtop_init_cpu_s (glibtop_server *server)
|
|||||||
int
|
int
|
||||||
glibtop_get_cpu_s (glibtop_server *server, glibtop_cpu *buf)
|
glibtop_get_cpu_s (glibtop_server *server, glibtop_cpu *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_CPU, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_cpu));
|
memset (buf, 0, sizeof (glibtop_cpu));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -49,8 +49,6 @@ glibtop_get_interface_names_s (glibtop_server *server, glibtop_array *array,
|
|||||||
u_int64_t interface, u_int64_t number,
|
u_int64_t interface, u_int64_t number,
|
||||||
u_int64_t instance, u_int64_t strategy)
|
u_int64_t instance, u_int64_t strategy)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_INTERFACE_NAMES, 0);
|
|
||||||
|
|
||||||
memset (array, 0, sizeof (glibtop_array));
|
memset (array, 0, sizeof (glibtop_array));
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -43,8 +43,6 @@ glibtop_init_loadavg_s (glibtop_server *server)
|
|||||||
int
|
int
|
||||||
glibtop_get_loadavg_s (glibtop_server *server, glibtop_loadavg *buf)
|
glibtop_get_loadavg_s (glibtop_server *server, glibtop_loadavg *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_LOADAVG, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_loadavg));
|
memset (buf, 0, sizeof (glibtop_loadavg));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -43,8 +43,6 @@ glibtop_init_mem_s (glibtop_server *server)
|
|||||||
int
|
int
|
||||||
glibtop_get_mem_s (glibtop_server *server, glibtop_mem *buf)
|
glibtop_get_mem_s (glibtop_server *server, glibtop_mem *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_MEM, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_mem));
|
memset (buf, 0, sizeof (glibtop_mem));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -43,8 +43,6 @@ glibtop_init_msg_limits_s (glibtop_server *server)
|
|||||||
int
|
int
|
||||||
glibtop_get_msg_limits_s (glibtop_server *server, glibtop_msg_limits *buf)
|
glibtop_get_msg_limits_s (glibtop_server *server, glibtop_msg_limits *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_MSG_LIMITS, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_msg_limits));
|
memset (buf, 0, sizeof (glibtop_msg_limits));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
52
sysdeps/stub/netinfo.c
Normal file
52
sysdeps/stub/netinfo.c
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/* Copyright (C) 1998-99 Martin Baulig
|
||||||
|
This file is part of LibGTop 1.0.
|
||||||
|
|
||||||
|
Contributed by Martin Baulig <martin@home-of-linux.org>, October 1998.
|
||||||
|
|
||||||
|
LibGTop is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License,
|
||||||
|
or (at your option) any later version.
|
||||||
|
|
||||||
|
LibGTop is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with LibGTop; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
|
Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glibtop.h>
|
||||||
|
#include <glibtop/error.h>
|
||||||
|
#include <glibtop/netinfo.h>
|
||||||
|
|
||||||
|
static const unsigned long _glibtop_sysdeps_netinfo = 0;
|
||||||
|
|
||||||
|
/* Init function. */
|
||||||
|
|
||||||
|
int
|
||||||
|
glibtop_init_netinfo_s (glibtop_server *server)
|
||||||
|
{
|
||||||
|
server->info->sysdeps.netinfo = _glibtop_sysdeps_netinfo;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Provides network statistics. */
|
||||||
|
|
||||||
|
glibtop_ifaddr *
|
||||||
|
glibtop_get_netinfo_s (glibtop_server *server, glibtop_array *array,
|
||||||
|
glibtop_netinfo *buf, const char *interface,
|
||||||
|
u_int64_t transport)
|
||||||
|
{
|
||||||
|
memset (buf, 0, sizeof (glibtop_netinfo));
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
@@ -46,8 +46,6 @@ glibtop_get_netload_s (glibtop_server *server, glibtop_netload *buf,
|
|||||||
const char *interface, unsigned transport,
|
const char *interface, unsigned transport,
|
||||||
unsigned protocol)
|
unsigned protocol)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_NETLOAD, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_netload));
|
memset (buf, 0, sizeof (glibtop_netload));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -45,8 +45,6 @@ int
|
|||||||
glibtop_get_ppp_s (glibtop_server *server, glibtop_ppp *buf,
|
glibtop_get_ppp_s (glibtop_server *server, glibtop_ppp *buf,
|
||||||
unsigned short device, unsigned short isdn)
|
unsigned short device, unsigned short isdn)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_PPP, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_ppp));
|
memset (buf, 0, sizeof (glibtop_ppp));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -45,8 +45,6 @@ glibtop_init_proc_args_s (glibtop_server *server)
|
|||||||
char **
|
char **
|
||||||
glibtop_get_proc_args_s (glibtop_server *server, glibtop_array *array, pid_t pid)
|
glibtop_get_proc_args_s (glibtop_server *server, glibtop_array *array, pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_PROC_ARGS, 0);
|
|
||||||
|
|
||||||
memset (array, 0, sizeof (glibtop_array));
|
memset (array, 0, sizeof (glibtop_array));
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -45,8 +45,6 @@ glibtop_init_proc_cwd_s (glibtop_server *server)
|
|||||||
char *
|
char *
|
||||||
glibtop_get_proc_cwd_s (glibtop_server *server, glibtop_proc_cwd *buf, pid_t pid)
|
glibtop_get_proc_cwd_s (glibtop_server *server, glibtop_proc_cwd *buf, pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_PROC_CWD, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_cwd));
|
memset (buf, 0, sizeof (glibtop_proc_cwd));
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -44,8 +44,6 @@ int
|
|||||||
glibtop_get_proc_kernel_s (glibtop_server *server, glibtop_proc_kernel *buf,
|
glibtop_get_proc_kernel_s (glibtop_server *server, glibtop_proc_kernel *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_PROC_KERNEL, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_kernel));
|
memset (buf, 0, sizeof (glibtop_proc_kernel));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -51,8 +51,6 @@ unsigned *
|
|||||||
glibtop_get_proclist_s (glibtop_server *server, glibtop_proclist *buf,
|
glibtop_get_proclist_s (glibtop_server *server, glibtop_proclist *buf,
|
||||||
int64_t which, int64_t arg)
|
int64_t which, int64_t arg)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_PROCLIST, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proclist));
|
memset (buf, 0, sizeof (glibtop_proclist));
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -47,8 +47,6 @@ glibtop_map_entry *
|
|||||||
glibtop_get_proc_map_s (glibtop_server *server, glibtop_proc_map *buf,
|
glibtop_get_proc_map_s (glibtop_server *server, glibtop_proc_map *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_PROC_MAP, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_map));
|
memset (buf, 0, sizeof (glibtop_proc_map));
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -44,8 +44,6 @@ int
|
|||||||
glibtop_get_proc_mem_s (glibtop_server *server, glibtop_proc_mem *buf,
|
glibtop_get_proc_mem_s (glibtop_server *server, glibtop_proc_mem *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_PROC_MEM, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_mem));
|
memset (buf, 0, sizeof (glibtop_proc_mem));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -44,8 +44,6 @@ int
|
|||||||
glibtop_get_proc_segment_s (glibtop_server *server, glibtop_proc_segment *buf,
|
glibtop_get_proc_segment_s (glibtop_server *server, glibtop_proc_segment *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_segment));
|
memset (buf, 0, sizeof (glibtop_proc_segment));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -44,8 +44,6 @@ int
|
|||||||
glibtop_get_proc_signal_s (glibtop_server *server, glibtop_proc_signal *buf,
|
glibtop_get_proc_signal_s (glibtop_server *server, glibtop_proc_signal *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_PROC_SIGNAL, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_signal));
|
memset (buf, 0, sizeof (glibtop_proc_signal));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -44,8 +44,6 @@ int
|
|||||||
glibtop_get_proc_state_s (glibtop_server *server, glibtop_proc_state *buf,
|
glibtop_get_proc_state_s (glibtop_server *server, glibtop_proc_state *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_PROC_STATE, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_state));
|
memset (buf, 0, sizeof (glibtop_proc_state));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -44,8 +44,6 @@ int
|
|||||||
glibtop_get_proc_time_s (glibtop_server *server, glibtop_proc_time *buf,
|
glibtop_get_proc_time_s (glibtop_server *server, glibtop_proc_time *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_PROC_TIME, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_time));
|
memset (buf, 0, sizeof (glibtop_proc_time));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -44,8 +44,6 @@ int
|
|||||||
glibtop_get_proc_uid_s (glibtop_server *server, glibtop_proc_uid *buf,
|
glibtop_get_proc_uid_s (glibtop_server *server, glibtop_proc_uid *buf,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_PROC_UID, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_uid));
|
memset (buf, 0, sizeof (glibtop_proc_uid));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -43,8 +43,6 @@ glibtop_init_swap_s (glibtop_server *server)
|
|||||||
int
|
int
|
||||||
glibtop_get_swap_s (glibtop_server *server, glibtop_swap *buf)
|
glibtop_get_swap_s (glibtop_server *server, glibtop_swap *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_SWAP, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_swap));
|
memset (buf, 0, sizeof (glibtop_swap));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -43,8 +43,6 @@ glibtop_init_uptime_s (glibtop_server *server)
|
|||||||
int
|
int
|
||||||
glibtop_get_uptime_s (glibtop_server *server, glibtop_uptime *buf)
|
glibtop_get_uptime_s (glibtop_server *server, glibtop_uptime *buf)
|
||||||
{
|
{
|
||||||
glibtop_init_s (server, GLIBTOP_SYSDEPS_UPTIME, 0);
|
|
||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_uptime));
|
memset (buf, 0, sizeof (glibtop_uptime));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user