source: squid-ssl/trunk/fuentes/include/snmp_util.h @ 5495

Last change on this file since 5495 was 5495, checked in by Juanma, 2 years ago

Initial release

File size: 1.6 KB
Line 
1/*
2 * Copyright (C) 1996-2015 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) */
38u_long Util_local_ip_address(void);
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) */
45long Util_time_running();
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
Note: See TracBrowser for help on using the repository browser.