xref: /onnv-gate/usr/src/cmd/agents/snmp/snmprelayd/dispatcher.h (revision 0:68f95e015346)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  *
22  * Copyright 1996 Sun Microsystems, Inc.  All Rights Reserved.
23  * Use is subject to license terms.
24  */
25 
26 /*
27  * HISTORY
28  * 5-14-96	Jerry Yeung	add relay agent name
29  * 6-18-96	Jerry Yeung	add pid file
30  * 7-3-96	Jerry Yeung	add poll_interval & max_time_out
31  */
32 
33 #ifndef _DISPATCHER_H_
34 #define _DISPATCHER_H_
35 
36 #pragma ident	"%Z%%M%	%I%	%E% SMI"
37 
38 /***** GLOBAL CONTANTS *****/
39 
40 /*
41  *	the two modes of the SNMP Relay
42  */
43 
44 #define MODE_GROUP	1
45 #define MODE_SPLIT	2
46 
47 
48 /***** GLOBAL VARIABLES *****/
49 
50 /*
51  *	my IP address
52  */
53 
54 extern IPAddress my_ip_address;
55 
56 extern char* relay_agent_name; /* (5-14-96) */
57 
58 /*
59  *	the socket descriptor on which we receive/send
60  *	SNMP requests from/to the SNMP applications
61  */
62 
63 extern int clients_sd;
64 
65 
66 /*
67  *	the socket descriptor on which we receive/send
68  *	SNMP requests from/to the SNMP agents
69  */
70 
71 extern int agents_sd;
72 
73 extern int trap_sd;
74 extern int relay_agent_trap_port;
75 
76 /*
77  * max_agent_time_out
78  * poll_internval
79  */
80 extern int relay_agent_max_agent_time_out;
81 extern int relay_agent_poll_interval;
82 
83 
84 /*
85  *
86  *	the name of the configuration directory
87  */
88 
89 extern char *config_dir;
90 extern char *pid_file;
91 extern char *resource_file;
92 
93 /*
94  *	the mode of the SNMP relay
95  */
96 
97 extern int mode;
98 extern int recovery_on;
99 
100 
101 #endif
102