This file is indexed.

/usr/include/snmpkit_except is in libsnmpkit-dev 0.9-16.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/* -*- C++ -*- */
/*
 * snmpkit_execpt: declaration of all the snmpkit exception classes
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later 
 * version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 *
 * See the AUTHORS file for a list of people who have hacked on 
 * this code. 
 * See the ChangeLog file for a list of changes.
 *
 */

#ifndef __SNMPKIT_EXCEPTIONS_H__
#define __SNMPKIT_EXCEPTIONS_H__

#include <string>

// All the base classes
class ProgrammerException{}; /* errors most likely caused by bad 
				programming. Programmer exceptions 
				should be caught before other types of 
				exceptions so that bad programming can 
				be caught quickly. */
class DecodeException{};
class BerException{};
class OidSeqException{};
class SNMPException{};
class SocketException{};
class FillerException{};
class UserException{};
class SessionException{};

class BerDecodeException:public DecodeException,public BerException{};

/* Although this is fundementally a decodding error is is first 
   and formost a programming error because we are calling a 
   constructor on a bad piece of data. */
class BerTagIncorrectException:public ProgrammerException,
			       public BerDecodeException{};
class BerNullTagException:public BerTagIncorrectException{};
class BerIntTagException:public BerTagIncorrectException{};
class BerCounterTagException:public BerTagIncorrectException{};
class BerTimeTickTagException:public BerTagIncorrectException{};
class BerStringTagException:public BerTagIncorrectException{};
class BerIPAddrTagException:public BerTagIncorrectException{};
class BerOidTagException:public BerTagIncorrectException{};
class BerSequenceTagException:public BerTagIncorrectException{};
class BerUnexpectedTagException:public BerTagIncorrectException{};

// The length of any ber type will not fit into a unsigned long
class BerLengthException:public BerDecodeException{};
class BerNullLengthExecption:public BerLengthException{};
class BerIntLengthExecption:public BerLengthException{};
class BerCounterLengthExecption:public BerLengthException{};
class BerTimeTickLengthExecption:public BerLengthException{};
class BerIPAddrLengthExecption:public BerLengthException{};

// Can't convert oid string
class BerBadOidException:public ProgrammerException,public BerException{};
// An OID cannot be converted to into a number
class BerOidBadSubOidException:public BerBadOidException{};
// No OIDs specified
class BerNoOidsException:public BerBadOidException{};

class OidSeqProgrammerException:
  public OidSeqException,public ProgrammerException{};
// tried to delete something that wasn't there
class OidSeqRemoveNotFoundException:public OidSeqProgrammerException{};
class OidSeqTagException:public OidSeqProgrammerException{};
// the ber sequence didn't follow the layout of an oidsequence
class OidSeqBadLayoutException:
  public DecodeException,public OidSeqException{};

class SNMPDecodeException:public SNMPException,public BerDecodeException{};
class SNMPNotResponseTagException:public SNMPDecodeException{};
class SNMPSeqnoNotIntException:public SNMPDecodeException{};
class SNMPStateNotIntException:public SNMPDecodeException{};
class SNMPFaultOidNotIntException:public SNMPDecodeException{};
class SNMPPacketNotSequenceException:public SNMPDecodeException{};
class SNMPRespNotSequenceException:public SNMPDecodeException{};
class SNMPBadOidException:public SNMPException{
  std::string oidstr;
public:
  inline SNMPBadOidException(std::string &strn):oidstr(strn){}
  inline int operator==(const std::string &otherstr){
    return otherstr==oidstr;}
  inline std::string &str(){return oidstr;}
};
class SNMPTransportException:public SNMPException{};
class SNMPNoResponseException:public SNMPTransportException{};
class SNMPSockError:public SocketException,public SNMPTransportException{};

class SyscallException{
  int errnum;
public:
  inline SyscallException(int err):errnum(err){}
  inline int error(){return errnum;}
};

class DebugFileException:public SyscallException{ 
public:
  inline DebugFileException(int err):SyscallException(err){}};

/* stat returned something weird when looking for a filename to 
   name the debug log */
class DebugFileStatException:public DebugFileException{
public: 
  inline DebugFileStatException(int err):DebugFileException(err){}};
// open returned something weird when opening the debug log
class DebugFileOpenException:public DebugFileException{
public: 
  inline DebugFileOpenException(int err):DebugFileException(err){}};

class ReceiverException:public SyscallException,public SocketException{
public:
  inline ReceiverException(int err):SyscallException(err){}};
/* select returned something weird when waiting for a packet or 
   a timeout */
class ReceiverSelectException:public ReceiverException{
public:
  inline ReceiverSelectException(int err):ReceiverException(err){}};
/* read error when reading a packet */
class ReceiverReadException:public ReceiverException{
public:
  inline ReceiverReadException(int err):ReceiverException(err){}};

class ReceiverCreateException:public ReceiverException{
public:
  inline ReceiverCreateException(int err):ReceiverException(err){}};

class SocketNoUDPException:public SocketException{};
class SocketCreateFailException:public SyscallException,
				public SocketException{
public:
  inline SocketCreateFailException(int err):SyscallException(err){}};
class SocketSendShortExecption:public SocketException{};

class FillerProgrammerException:
  public ProgrammerException,public FillerException{};
// tried to remove from an empty struct filler
class FillerRemoveEmptyException:public FillerProgrammerException{};
// tried to remove an item not in the container
class FillerRemoveNotFoundException:public FillerProgrammerException{};
// successfully removed table entry but oidseq is NULL
class FillerCorruptException:public FillerProgrammerException{};

class FillerDecodeException:
  public FillerException,public DecodeException{};
class FillerTypeMismatchException:public FillerDecodeException{};

class SessionHostspecException:public SessionException,
			       public UserException{};
class SessionCommunityException:public SessionHostspecException{};
class SessionBadRangeException:public SessionHostspecException{};
class SessionOctetOverflowException:public SessionHostspecException{};
class SessionBadSubnetException:public SessionHostspecException{};
class SessionNetbitsOverflowException:public SessionHostspecException{};
class SessionBadNetmaskException:public SessionHostspecException{};
class SessionHostNotFoundException:public SessionException{
  int errnum;
public:
  SessionHostNotFoundException(int er):errnum(er){}
  int error(){return errnum;}
};
class SessionThreadCreateException:public SyscallException,
			    public SessionException{
public:
  inline SessionThreadCreateException(int err):SyscallException(err){}
};  

class JoinerCreateException:public SessionThreadCreateException{
public:
  inline JoinerCreateException(int err):
    SessionThreadCreateException(err){}
};

class SessionWorkerCreateException:public SessionThreadCreateException{
public:
  inline SessionWorkerCreateException(int err):
    SessionThreadCreateException(err){}
};

#endif