]> git.ipfire.org Git - thirdparty/squid.git/blame - include/snmp_client.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / include / snmp_client.h
CommitLineData
5c193dec 1/*
f70aedc4 2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
5c193dec
AJ
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
b5638623 9#ifndef SQUID_SNMP_CLIENT_H
10#define SQUID_SNMP_CLIENT_H
54f642bf 11
8bde32ea 12/***********************************************************
f53969cc 13 Copyright 1988, 1989 by Carnegie Mellon University
8bde32ea 14
15 All Rights Reserved
16
c5dd4956
AJ
17Permission to use, copy, modify, and distribute this software and its
18documentation for any purpose and without fee is hereby granted,
8bde32ea 19provided that the above copyright notice appear in all copies and that
c5dd4956 20both that copyright notice and this permission notice appear in
8bde32ea 21supporting documentation, and that the name of CMU not be
22used in advertising or publicity pertaining to distribution of the
c5dd4956 23software without specific, written prior permission.
8bde32ea 24
25CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
26ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
27CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
28ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
29WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
30ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
31SOFTWARE.
32******************************************************************/
8bde32ea 33struct synch_state {
468ae12b 34 int waiting;
8bde32ea 35 int status;
c5dd4956 36 /* status codes */
f53969cc
SM
37#define STAT_SUCCESS 0
38#define STAT_ERROR 1
8bde32ea 39#define STAT_TIMEOUT 2
40 int reqid;
41 struct snmp_pdu *pdu;
42};
43
54f642bf 44#ifdef __cplusplus
e1381638 45extern "C" {
54f642bf 46#endif
47
f53969cc 48extern struct synch_state snmp_synch_state;
8bde32ea 49
f53969cc
SM
50/* Synchronize Input with Agent */
51int snmp_synch_input(int, struct snmp_session *, int,
52 struct snmp_pdu *, void *);
54f642bf 53
f53969cc
SM
54/* Synchronize Response with Agent */
55int snmp_synch_response(struct snmp_session *, struct snmp_pdu *,
56 struct snmp_pdu **);
8bde32ea 57
f53969cc
SM
58/* Synchronize Setup */
59void snmp_synch_setup(struct snmp_session *);
8bde32ea 60
54f642bf 61#ifdef __cplusplus
62}
468ae12b 63#endif
b5638623 64
f53969cc
SM
65#endif /* SQUID_SNMP_CLIENT_H */
66