snmp_util.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef SQUID_SNMP_UTIL_H
10#define SQUID_SNMP_UTIL_H
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16/* call a function at regular intervals (in seconds): */
17extern void snmp_alarm(int ival, void (*handler) (void));
18
19/* service for filedescriptors: */
20
21extern void fd_add(int fd, void (*func) (int fd));
22extern void fd_service(void);
23
24/* ---------------------------------------------------------------------- */
25
26/*
27 * SNMP Agent extension for Spacer-Controler Management
28 *
29 * Copyright (c) 1997 FT/CNET/DES/GRL Olivier Montanuy
30 */
31
32/* Function to safely copy a string, and ensure the last
33 * character is always '\0'. */
34void strcpy_safe(char *str, int str_len, char *val);
35
36/* Function to get IP address of this agent
37 * WARNING: this scans all interfaces (slow) */
39
40/* Function to get the current time in seconds */
41long Util_time_now(void);
42
43/* Function to determine how long the agent has been running
44 * (WARNING: this seems rather slow) */
46
47/* Read data from file */
48int Util_file_read(char *file, int offset, char *data, int dataSz);
49
50/* Write data into file */
51int Util_file_write(char *file, int offset, char *data, int dataSz);
52
53/* ---------------------------------------------------------------------- */
54
55#ifdef __cplusplus
56}
57#endif
58#endif /* SQUID_SNMP_UTIL_H */
59
static void handler(int signo)
Definition: purge.cc:858
void snmp_alarm(int ival, void(*handler)(void))
long Util_time_now(void)
void fd_add(int fd, void(*func)(int fd))
void fd_service(void)
void strcpy_safe(char *str, int str_len, char *val)
int Util_file_write(char *file, int offset, char *data, int dataSz)
int Util_file_read(char *file, int offset, char *data, int dataSz)
u_long Util_local_ip_address(void)
long Util_time_running()

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors