xref: /onnv-gate/usr/src/cmd/agents/snmp/snmplib/snmp_msg.h (revision 0:68f95e015346)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*
23*0Sstevel@tonic-gate  * Copyright 1996-2003 Sun Microsystems, Inc.  All rights reserved.
24*0Sstevel@tonic-gate  * Use is subject to license terms.
25*0Sstevel@tonic-gate  */
26*0Sstevel@tonic-gate 
27*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
28*0Sstevel@tonic-gate 
29*0Sstevel@tonic-gate 
30*0Sstevel@tonic-gate #ifndef _SNMP_MSG_H_
31*0Sstevel@tonic-gate #define _SNMP_MSG_H_
32*0Sstevel@tonic-gate 
33*0Sstevel@tonic-gate 
34*0Sstevel@tonic-gate 
35*0Sstevel@tonic-gate #define ERR_MSG_ALLOC			"cannot allocate memory"
36*0Sstevel@tonic-gate 
37*0Sstevel@tonic-gate 
38*0Sstevel@tonic-gate #define ERR_MSG_HOSTENT_BAD_IP_LENGTH		"length of IP address in the hostent structure is not 4: %d"
39*0Sstevel@tonic-gate #define ERR_MSG_HOSTENT_MISSING_IP_ADDRESS	"no IP address in the hostent structure"
40*0Sstevel@tonic-gate 
41*0Sstevel@tonic-gate #define ERR_MSG_BAD_IP_ADDRESS		"%s is not a valid IP address"
42*0Sstevel@tonic-gate #define ERR_MSG_BAD_HOSTNAME		"%s is not a valid hostname"
43*0Sstevel@tonic-gate 
44*0Sstevel@tonic-gate #define ERR_MSG_BAD_TRACE_LEVEL		"Bad trace level %d. Must be in (0..%d)"
45*0Sstevel@tonic-gate 
46*0Sstevel@tonic-gate #define ERR_MSG_TRAP_DEST_DUP		"the trap destinator %s already exists"
47*0Sstevel@tonic-gate 
48*0Sstevel@tonic-gate #define ERR_MSG_TIMEOUT			"timeout expired"
49*0Sstevel@tonic-gate #define ERR_MSG_BAD_RESPONSE		"bad response"
50*0Sstevel@tonic-gate #define ERR_MSG_BAD_VALUE		"bad value"
51*0Sstevel@tonic-gate 
52*0Sstevel@tonic-gate 
53*0Sstevel@tonic-gate /***** SYSTEM ERROR MESSAGES *****/
54*0Sstevel@tonic-gate 
55*0Sstevel@tonic-gate #define	ERR_MSG_FILE_CREATION	"cannot create file %s %s"
56*0Sstevel@tonic-gate #define	ERR_MSG_FILE_OPEN		"cannot open file %s %s"
57*0Sstevel@tonic-gate #define	ERR_MSG_UNAME			"uname() failed %s"
58*0Sstevel@tonic-gate #define	ERR_MSG_SOCKET			"socket() failed %s"
59*0Sstevel@tonic-gate #define	ERR_MSG_BIND			"bind() failed %s"
60*0Sstevel@tonic-gate #define	ERR_MSG_RECVFROM		"recvfrom() failed %s"
61*0Sstevel@tonic-gate #define	ERR_MSG_SENDTO			"sendto() failed %s"
62*0Sstevel@tonic-gate #define	ERR_MSG_SELECT			"select() failed %s"
63*0Sstevel@tonic-gate #define	ERR_MSG_SIGACT			"sigaction() failed for %d %s with %s"
64*0Sstevel@tonic-gate 
65*0Sstevel@tonic-gate 
66*0Sstevel@tonic-gate /***** HOST ERROR MESSAGE *****/
67*0Sstevel@tonic-gate 
68*0Sstevel@tonic-gate #define ERR_MSG_GETHOSTBYNAME		"gethostbyname(%s) failed %s"
69*0Sstevel@tonic-gate 
70*0Sstevel@tonic-gate 
71*0Sstevel@tonic-gate /***** CODING/DECODING ERROR MESSAGES *****/
72*0Sstevel@tonic-gate 
73*0Sstevel@tonic-gate /* asn1.c */
74*0Sstevel@tonic-gate 
75*0Sstevel@tonic-gate #define ERR_MSG_NOT_LONG		"not long"
76*0Sstevel@tonic-gate #define ERR_MSG_BAD_LENGTH		"bad length"
77*0Sstevel@tonic-gate #define ERR_MSG_OVERFLOW		"overflow of message"
78*0Sstevel@tonic-gate #define ERR_MSG_DONT_SUPPORT_LARGE_INT	"integers that large are not supported"
79*0Sstevel@tonic-gate #define ERR_MSG_BUILD_LENGTH		"build_length"
80*0Sstevel@tonic-gate #define ERR_MSG_SUBIDENTIFIER_TOO_LONG	"subidentifier too long"
81*0Sstevel@tonic-gate #define ERR_MSG_DONT_SUPPORT_LARGE_STR	"strings that long are not supported"
82*0Sstevel@tonic-gate #define ERR_MSG_DONT_SUPPORT_INDEF_LEN	"indefinite lengths are not supported"
83*0Sstevel@tonic-gate #define ERR_MSG_DONT_SUPPORT_SUCH_LEN	"data lengths that long are not supported"
84*0Sstevel@tonic-gate #define ERR_MSG_MALFORMED_NULL		"malformed NULL"
85*0Sstevel@tonic-gate #define ERR_MSG_ASN_LEN_TOO_LONG	"asn length too long"
86*0Sstevel@tonic-gate #define ERR_MSG_CANT_PROCESS_LONG_ID	"can't process ID >= 30"
87*0Sstevel@tonic-gate 
88*0Sstevel@tonic-gate 
89*0Sstevel@tonic-gate /* pdu.c */
90*0Sstevel@tonic-gate 
91*0Sstevel@tonic-gate 
92*0Sstevel@tonic-gate /***** SNMP API *****/
93*0Sstevel@tonic-gate 
94*0Sstevel@tonic-gate #define ERR_MSG_CAN_NOT_ABORT_SESSION	"Couldn't abort session: %s %s. Exiting\n"
95*0Sstevel@tonic-gate #define ERR_MSG_RECEIVED_MANGLED_PACKET	"Received mangled SNMP packet: %s\n"
96*0Sstevel@tonic-gate 
97*0Sstevel@tonic-gate 
98*0Sstevel@tonic-gate /***** MADMAN API *****/
99*0Sstevel@tonic-gate 
100*0Sstevel@tonic-gate #define ERR_MSG_ERROR_STATUS		"%s on the %dth variable"
101*0Sstevel@tonic-gate #define ERR_MSG_MISSING_VARIABLES	"missing some variables"
102*0Sstevel@tonic-gate #define ERR_MSG_BAD_VARIABLE_TYPE	"bad type (0x%x) for %s"
103*0Sstevel@tonic-gate 
104*0Sstevel@tonic-gate 
105*0Sstevel@tonic-gate /***** LOG *****/
106*0Sstevel@tonic-gate 
107*0Sstevel@tonic-gate #define MSG_STARTED			"started\n"
108*0Sstevel@tonic-gate #define LOG_MSG_STARTED			"*** started ***"
109*0Sstevel@tonic-gate 
110*0Sstevel@tonic-gate #define MSG_EXITING			"exiting\n"
111*0Sstevel@tonic-gate #define LOG_MSG_EXITING			"*** exiting ***"
112*0Sstevel@tonic-gate 
113*0Sstevel@tonic-gate 
114*0Sstevel@tonic-gate #endif
115