cmd: remove sparc-only virtinfo
[unleashed.git] / usr / src / cmd / picl / plugins / sun4v / lib / snmp / snmplib.h
blobcd2a1aa568a0b16bc360d0b346d6ae8e20e77a73
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SNMPLIB_H
28 #define _SNMPLIB_H
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #ifdef USE_SOCKETS
35 #include <sys/types.h>
36 #include <sys/socket.h>
37 #include <netinet/in.h>
38 #include <arpa/inet.h>
39 #endif
42 * Groups of OIDs are registered with the picl snmp library to provide
43 * the library with a hint as to the set of OIDs to do GETBULK requests
45 typedef struct oidgroup {
46 struct oidgroup *next;
47 char *oidstrs;
48 int n_oids;
49 int is_volatile;
50 } oidgroup_t;
53 * Private (opaque to clients) handle to manage per-client snmp data
55 struct picl_snmphdl {
56 oidgroup_t *group;
57 #ifdef USE_SOCKETS
58 struct sockaddr_in agent_addr;
59 #endif
60 int fd;
63 #define MIBCACHE_BLK_SZ 256
64 #define MIBCACHE_BLK_SHIFT 8
65 #define REFRESHQ_BLK_SZ 256
66 #define REFRESHQ_BLK_SHIFT 8
68 #define HRTIME_SCALE 10LL /* internal time in 10s of seconds */
69 #define MAX_INCACHE_TIME (300 / HRTIME_SCALE)
70 #define MAX_INT_LEN 16 /* #chars to print */
72 #define DS_SNMP_DRIVER "/devices/pseudo/ds_snmp@0:ds_snmp"
74 #ifdef __cplusplus
76 #endif
78 #endif /* _SNMPLIB_H */