]>
Commit | Line | Data |
---|---|---|
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 | /*********************************************************** |
f53969cc | 13 | Copyright 1988, 1989 by Carnegie Mellon University |
8bde32ea | 14 | |
15 | All Rights Reserved | |
16 | ||
c5dd4956 AJ |
17 | Permission to use, copy, modify, and distribute this software and its |
18 | documentation for any purpose and without fee is hereby granted, | |
8bde32ea | 19 | provided that the above copyright notice appear in all copies and that |
c5dd4956 | 20 | both that copyright notice and this permission notice appear in |
8bde32ea | 21 | supporting documentation, and that the name of CMU not be |
22 | used in advertising or publicity pertaining to distribution of the | |
c5dd4956 | 23 | software without specific, written prior permission. |
8bde32ea | 24 | |
25 | CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING | |
26 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL | |
27 | CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR | |
28 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | |
29 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | |
30 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | |
31 | SOFTWARE. | |
32 | ******************************************************************/ | |
8bde32ea | 33 | struct 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 | 45 | extern "C" { |
54f642bf | 46 | #endif |
47 | ||
f53969cc | 48 | extern struct synch_state snmp_synch_state; |
8bde32ea | 49 | |
f53969cc SM |
50 | /* Synchronize Input with Agent */ |
51 | int snmp_synch_input(int, struct snmp_session *, int, | |
52 | struct snmp_pdu *, void *); | |
54f642bf | 53 | |
f53969cc SM |
54 | /* Synchronize Response with Agent */ |
55 | int snmp_synch_response(struct snmp_session *, struct snmp_pdu *, | |
56 | struct snmp_pdu **); | |
8bde32ea | 57 | |
f53969cc SM |
58 | /* Synchronize Setup */ |
59 | void 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 |