]> git.ipfire.org Git - thirdparty/squid.git/blame - include/snmp_client.h
Maintenance: bump astyle to 2.04 and quieten report
[thirdparty/squid.git] / include / snmp_client.h
CommitLineData
5c193dec
AJ
1/*
2 * Copyright (C) 1996-2014 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
b5638623 9#ifndef SQUID_SNMP_CLIENT_H
10#define SQUID_SNMP_CLIENT_H
54f642bf 11
8bde32ea 12/***********************************************************
13 Copyright 1988, 1989 by Carnegie Mellon University
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 */
8bde32ea 37#define STAT_SUCCESS 0
38#define STAT_ERROR 1
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
468ae12b 48 extern struct synch_state snmp_synch_state;
8bde32ea 49
c5dd4956 50 /* Synchronize Input with Agent */
468ae12b 51 int snmp_synch_input(int, struct snmp_session *, int,
c5dd4956 52 struct snmp_pdu *, void *);
54f642bf 53
c5dd4956 54 /* Synchronize Response with Agent */
468ae12b 55 int snmp_synch_response(struct snmp_session *, struct snmp_pdu *,
c5dd4956 56 struct snmp_pdu **);
8bde32ea 57
c5dd4956 58 /* Synchronize Setup */
468ae12b 59 void snmp_synch_setup(struct snmp_session *);
8bde32ea 60
54f642bf 61#ifdef __cplusplus
62}
468ae12b 63#endif
b5638623 64
65#endif /* SQUID_SNMP_CLIENT_H */