xref: /onnv-gate/usr/src/cmd/agents/snmp/snmplib/snmp_msg.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 /*
23  * Copyright 1996-2003 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 
30 #ifndef _SNMP_MSG_H_
31 #define _SNMP_MSG_H_
32 
33 
34 
35 #define ERR_MSG_ALLOC			"cannot allocate memory"
36 
37 
38 #define ERR_MSG_HOSTENT_BAD_IP_LENGTH		"length of IP address in the hostent structure is not 4: %d"
39 #define ERR_MSG_HOSTENT_MISSING_IP_ADDRESS	"no IP address in the hostent structure"
40 
41 #define ERR_MSG_BAD_IP_ADDRESS		"%s is not a valid IP address"
42 #define ERR_MSG_BAD_HOSTNAME		"%s is not a valid hostname"
43 
44 #define ERR_MSG_BAD_TRACE_LEVEL		"Bad trace level %d. Must be in (0..%d)"
45 
46 #define ERR_MSG_TRAP_DEST_DUP		"the trap destinator %s already exists"
47 
48 #define ERR_MSG_TIMEOUT			"timeout expired"
49 #define ERR_MSG_BAD_RESPONSE		"bad response"
50 #define ERR_MSG_BAD_VALUE		"bad value"
51 
52 
53 /***** SYSTEM ERROR MESSAGES *****/
54 
55 #define	ERR_MSG_FILE_CREATION	"cannot create file %s %s"
56 #define	ERR_MSG_FILE_OPEN		"cannot open file %s %s"
57 #define	ERR_MSG_UNAME			"uname() failed %s"
58 #define	ERR_MSG_SOCKET			"socket() failed %s"
59 #define	ERR_MSG_BIND			"bind() failed %s"
60 #define	ERR_MSG_RECVFROM		"recvfrom() failed %s"
61 #define	ERR_MSG_SENDTO			"sendto() failed %s"
62 #define	ERR_MSG_SELECT			"select() failed %s"
63 #define	ERR_MSG_SIGACT			"sigaction() failed for %d %s with %s"
64 
65 
66 /***** HOST ERROR MESSAGE *****/
67 
68 #define ERR_MSG_GETHOSTBYNAME		"gethostbyname(%s) failed %s"
69 
70 
71 /***** CODING/DECODING ERROR MESSAGES *****/
72 
73 /* asn1.c */
74 
75 #define ERR_MSG_NOT_LONG		"not long"
76 #define ERR_MSG_BAD_LENGTH		"bad length"
77 #define ERR_MSG_OVERFLOW		"overflow of message"
78 #define ERR_MSG_DONT_SUPPORT_LARGE_INT	"integers that large are not supported"
79 #define ERR_MSG_BUILD_LENGTH		"build_length"
80 #define ERR_MSG_SUBIDENTIFIER_TOO_LONG	"subidentifier too long"
81 #define ERR_MSG_DONT_SUPPORT_LARGE_STR	"strings that long are not supported"
82 #define ERR_MSG_DONT_SUPPORT_INDEF_LEN	"indefinite lengths are not supported"
83 #define ERR_MSG_DONT_SUPPORT_SUCH_LEN	"data lengths that long are not supported"
84 #define ERR_MSG_MALFORMED_NULL		"malformed NULL"
85 #define ERR_MSG_ASN_LEN_TOO_LONG	"asn length too long"
86 #define ERR_MSG_CANT_PROCESS_LONG_ID	"can't process ID >= 30"
87 
88 
89 /* pdu.c */
90 
91 
92 /***** SNMP API *****/
93 
94 #define ERR_MSG_CAN_NOT_ABORT_SESSION	"Couldn't abort session: %s %s. Exiting\n"
95 #define ERR_MSG_RECEIVED_MANGLED_PACKET	"Received mangled SNMP packet: %s\n"
96 
97 
98 /***** MADMAN API *****/
99 
100 #define ERR_MSG_ERROR_STATUS		"%s on the %dth variable"
101 #define ERR_MSG_MISSING_VARIABLES	"missing some variables"
102 #define ERR_MSG_BAD_VARIABLE_TYPE	"bad type (0x%x) for %s"
103 
104 
105 /***** LOG *****/
106 
107 #define MSG_STARTED			"started\n"
108 #define LOG_MSG_STARTED			"*** started ***"
109 
110 #define MSG_EXITING			"exiting\n"
111 #define LOG_MSG_EXITING			"*** exiting ***"
112 
113 
114 #endif
115