KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > snmp4j > agent > test > IfMib


1 /*_############################################################################
2   _##
3   _## SNMP4J-Agent - IfMib.java
4   _##
5   _## Copyright (C) 2005-2007 Frank Fock (SNMP4J.org)
6   _##
7   _## Licensed under the Apache License, Version 2.0 (the "License");
8   _## you may not use this file except in compliance with the License.
9   _## You may obtain a copy of the License at
10   _##
11   _## http://www.apache.org/licenses/LICENSE-2.0
12   _##
13   _## Unless required by applicable law or agreed to in writing, software
14   _## distributed under the License is distributed on an "AS IS" BASIS,
15   _## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   _## See the License for the specific language governing permissions and
17   _## limitations under the License.
18   _##
19   _##########################################################################*/

20
21 package org.snmp4j.agent.test;
22
23 //--AgentGen BEGIN=_BEGIN
24
//--AgentGen END
25

26 import org.snmp4j.smi.*;
27 import org.snmp4j.mp.SnmpConstants;
28 import org.snmp4j.agent.*;
29 import org.snmp4j.agent.mo.*;
30 import org.snmp4j.agent.mo.ext.SimMOFactory;
31 import org.snmp4j.agent.mo.snmp.*;
32 import org.snmp4j.agent.mo.snmp.smi.*;
33 import org.snmp4j.agent.request.*;
34 import org.snmp4j.log.LogFactory;
35 import org.snmp4j.log.LogAdapter;
36
37 //--AgentGen BEGIN=_IMPORT
38
//--AgentGen END
39

40 public class IfMib
41 //--AgentGen BEGIN=_EXTENDS
42
//--AgentGen END
43
implements MOGroup
44 //--AgentGen BEGIN=_IMPLEMENTS
45
//--AgentGen END
46
{
47
48   private static final LogAdapter LOGGER =
49       LogFactory.getLogger(IfMib.class);
50
51 //--AgentGen BEGIN=_STATIC
52
//--AgentGen END
53

54   // Factory
55
private static MOFactory moFactory = SimMOFactory.getInstance();
56
57   // Constants
58
public static final OID oidIfNumber =
59     new OID(new int[] { 1,3,6,1,2,1,2,1,0 });
60   public static final OID oidIfTableLastChange =
61     new OID(new int[] { 1,3,6,1,2,1,31,1,5,0 });
62   public static final OID oidIfStackLastChange =
63     new OID(new int[] { 1,3,6,1,2,1,31,1,6,0 });
64   public static final OID oidLinkDown =
65     new OID(new int[] { 1,3,6,1,6,3,1,1,5,3 });
66   public static final OID oidTrapVarIfIndex =
67     new OID(new int[] { 1,3,6,1,2,1,2,2,1,1 });
68   public static final OID oidTrapVarIfAdminStatus =
69     new OID(new int[] { 1,3,6,1,2,1,2,2,1,7 });
70   public static final OID oidTrapVarIfOperStatus =
71     new OID(new int[] { 1,3,6,1,2,1,2,2,1,8 });
72
73   public static final OID oidLinkUp =
74     new OID(new int[] { 1,3,6,1,6,3,1,1,5,4 });
75
76
77   // Enumerations
78

79   public static final class IfAdminStatusEnum {
80     /* -- ready to pass packets */
81     public static final int up = 1;
82     public static final int down = 2;
83     /* -- in some test mode */
84     public static final int testing = 3;
85   }
86   public static final class IfLinkUpDownTrapEnableEnum {
87     public static final int enabled = 1;
88     public static final int disabled = 2;
89   }
90   public static final class IfPromiscuousModeEnum {
91     public static final int _true = 1;
92     public static final int _false = 2;
93   }
94   public static final class IfStackStatusEnum {
95     public static final int active = 1;
96     /* -- the following value is a state:
97 -- this value may be read, but not written */

98     public static final int notInService = 2;
99     /* -- the following three values are
100 -- actions: these values may be written,
101 -- but are never read */

102     public static final int notReady = 3;
103     public static final int createAndGo = 4;
104     public static final int createAndWait = 5;
105     public static final int destroy = 6;
106   }
107   public static final class IfTestStatusEnum {
108     public static final int notInUse = 1;
109     public static final int inUse = 2;
110   }
111   public static final class IfRcvAddressStatusEnum {
112     public static final int active = 1;
113     /* -- the following value is a state:
114 -- this value may be read, but not written */

115     public static final int notInService = 2;
116     /* -- the following three values are
117 -- actions: these values may be written,
118 -- but are never read */

119     public static final int notReady = 3;
120     public static final int createAndGo = 4;
121     public static final int createAndWait = 5;
122     public static final int destroy = 6;
123   }
124   public static final class IfRcvAddressTypeEnum {
125     public static final int other = 1;
126     public static final int _volatile = 2;
127     public static final int nonVolatile = 3;
128   }
129
130   // TextualConventions
131

132   // Scalars
133
private MOScalar ifNumber;
134   private MOScalar ifTableLastChange;
135   private MOScalar ifStackLastChange;
136
137   // Tables
138
public static final OID oidIfEntry =
139     new OID(new int[] { 1,3,6,1,2,1,2,2,1 });
140
141   // Column sub-identifer defintions for ifEntry:
142
public static final int colIfIndex = 1;
143   public static final int colIfDescr = 2;
144   public static final int colIfType = 3;
145   public static final int colIfMtu = 4;
146   public static final int colIfSpeed = 5;
147   public static final int colIfPhysAddress = 6;
148   public static final int colIfAdminStatus = 7;
149   public static final int colIfOperStatus = 8;
150   public static final int colIfLastChange = 9;
151   public static final int colIfInOctets = 10;
152   public static final int colIfInUcastPkts = 11;
153   public static final int colIfInNUcastPkts = 12;
154   public static final int colIfInDiscards = 13;
155   public static final int colIfInErrors = 14;
156   public static final int colIfInUnknownProtos = 15;
157   public static final int colIfOutOctets = 16;
158   public static final int colIfOutUcastPkts = 17;
159   public static final int colIfOutNUcastPkts = 18;
160   public static final int colIfOutDiscards = 19;
161   public static final int colIfOutErrors = 20;
162   public static final int colIfOutQLen = 21;
163   public static final int colIfSpecific = 22;
164
165   // Column index defintions for ifEntry:
166
public static final int idxIfIndex = 0;
167   public static final int idxIfDescr = 1;
168   public static final int idxIfType = 2;
169   public static final int idxIfMtu = 3;
170   public static final int idxIfSpeed = 4;
171   public static final int idxIfPhysAddress = 5;
172   public static final int idxIfAdminStatus = 6;
173   public static final int idxIfOperStatus = 7;
174   public static final int idxIfLastChange = 8;
175   public static final int idxIfInOctets = 9;
176   public static final int idxIfInUcastPkts = 10;
177   public static final int idxIfInNUcastPkts = 11;
178   public static final int idxIfInDiscards = 12;
179   public static final int idxIfInErrors = 13;
180   public static final int idxIfInUnknownProtos = 14;
181   public static final int idxIfOutOctets = 15;
182   public static final int idxIfOutUcastPkts = 16;
183   public static final int idxIfOutNUcastPkts = 17;
184   public static final int idxIfOutDiscards = 18;
185   public static final int idxIfOutErrors = 19;
186   public static final int idxIfOutQLen = 20;
187   public static final int idxIfSpecific = 21;
188
189   private static final MOTableSubIndex[] ifEntryIndexes =
190     new MOTableSubIndex[] {
191         moFactory.createSubIndex(SMIConstants.SYNTAX_INTEGER, 1, 1) };
192
193   private static final MOTableIndex ifEntryIndex =
194       moFactory.createIndex(ifEntryIndexes,
195                             false);
196
197
198   private MOTable ifEntry;
199   private MOMutableTableModel ifEntryModel;
200   public static final OID oidIfXEntry =
201     new OID(new int[] { 1,3,6,1,2,1,31,1,1,1 });
202
203   // Column sub-identifer defintions for ifXEntry:
204
public static final int colIfName = 1;
205   public static final int colIfInMulticastPkts = 2;
206   public static final int colIfInBroadcastPkts = 3;
207   public static final int colIfOutMulticastPkts = 4;
208   public static final int colIfOutBroadcastPkts = 5;
209   public static final int colIfHCInOctets = 6;
210   public static final int colIfHCInUcastPkts = 7;
211   public static final int colIfHCInMulticastPkts = 8;
212   public static final int colIfHCInBroadcastPkts = 9;
213   public static final int colIfHCOutOctets = 10;
214   public static final int colIfHCOutUcastPkts = 11;
215   public static final int colIfHCOutMulticastPkts = 12;
216   public static final int colIfHCOutBroadcastPkts = 13;
217   public static final int colIfLinkUpDownTrapEnable = 14;
218   public static final int colIfHighSpeed = 15;
219   public static final int colIfPromiscuousMode = 16;
220   public static final int colIfConnectorPresent = 17;
221   public static final int colIfAlias = 18;
222   public static final int colIfCounterDiscontinuityTime = 19;
223
224   // Column index defintions for ifXEntry:
225
public static final int idxIfName = 0;
226   public static final int idxIfInMulticastPkts = 1;
227   public static final int idxIfInBroadcastPkts = 2;
228   public static final int idxIfOutMulticastPkts = 3;
229   public static final int idxIfOutBroadcastPkts = 4;
230   public static final int idxIfHCInOctets = 5;
231   public static final int idxIfHCInUcastPkts = 6;
232   public static final int idxIfHCInMulticastPkts = 7;
233   public static final int idxIfHCInBroadcastPkts = 8;
234   public static final int idxIfHCOutOctets = 9;
235   public static final int idxIfHCOutUcastPkts = 10;
236   public static final int idxIfHCOutMulticastPkts = 11;
237   public static final int idxIfHCOutBroadcastPkts = 12;
238   public static final int idxIfLinkUpDownTrapEnable = 13;
239   public static final int idxIfHighSpeed = 14;
240   public static final int idxIfPromiscuousMode = 15;
241   public static final int idxIfConnectorPresent = 16;
242   public static final int idxIfAlias = 17;
243   public static final int idxIfCounterDiscontinuityTime = 18;
244
245   private static final MOTableSubIndex[] ifXEntryIndexes =
246     new MOTableSubIndex[] {
247         moFactory.createSubIndex(SMIConstants.SYNTAX_INTEGER, 1, 1) };
248
249   private static final MOTableIndex ifXEntryIndex =
250       moFactory.createIndex(ifXEntryIndexes,
251                             false);
252
253
254   private MOTable ifXEntry;
255   private MOMutableTableModel ifXEntryModel;
256   public static final OID oidIfStackEntry =
257     new OID(new int[] { 1,3,6,1,2,1,31,1,2,1 });
258
259   // Column sub-identifer defintions for ifStackEntry:
260
public static final int colIfStackStatus = 3;
261
262   // Column index defintions for ifStackEntry:
263
public static final int idxIfStackStatus = 0;
264
265   private static final MOTableSubIndex[] ifStackEntryIndexes =
266     new MOTableSubIndex[] {
267         moFactory.createSubIndex(SMIConstants.SYNTAX_INTEGER, 1, 1),
268         moFactory.createSubIndex(SMIConstants.SYNTAX_INTEGER, 1, 1) };
269
270   private static final MOTableIndex ifStackEntryIndex =
271       moFactory.createIndex(ifStackEntryIndexes,
272                             false);
273
274
275   private MOTable ifStackEntry;
276   private MOMutableTableModel ifStackEntryModel;
277   public static final OID oidIfTestEntry =
278     new OID(new int[] { 1,3,6,1,2,1,31,1,3,1 });
279
280   // Column sub-identifer defintions for ifTestEntry:
281
public static final int colIfTestId = 1;
282   public static final int colIfTestStatus = 2;
283   public static final int colIfTestType = 3;
284   public static final int colIfTestResult = 4;
285   public static final int colIfTestCode = 5;
286   public static final int colIfTestOwner = 6;
287
288   // Column index defintions for ifTestEntry:
289
public static final int idxIfTestId = 0;
290   public static final int idxIfTestStatus = 1;
291   public static final int idxIfTestType = 2;
292   public static final int idxIfTestResult = 3;
293   public static final int idxIfTestCode = 4;
294   public static final int idxIfTestOwner = 5;
295
296   private static final MOTableSubIndex[] ifTestEntryIndexes =
297     new MOTableSubIndex[] {
298         moFactory.createSubIndex(SMIConstants.SYNTAX_INTEGER, 1, 1) };
299
300   private static final MOTableIndex ifTestEntryIndex =
301       moFactory.createIndex(ifTestEntryIndexes,
302                             false);
303
304
305   private MOTable ifTestEntry;
306   private MOMutableTableModel ifTestEntryModel;
307   public static final OID oidIfRcvAddressEntry =
308     new OID(new int[] { 1,3,6,1,2,1,31,1,4,1 });
309
310   // Column sub-identifer defintions for ifRcvAddressEntry:
311
public static final int colIfRcvAddressStatus = 2;
312   public static final int colIfRcvAddressType = 3;
313
314   // Column index defintions for ifRcvAddressEntry:
315
public static final int idxIfRcvAddressStatus = 0;
316   public static final int idxIfRcvAddressType = 1;
317
318   private static final MOTableSubIndex[] ifRcvAddressEntryIndexes =
319     new MOTableSubIndex[] {
320         moFactory.createSubIndex(SMIConstants.SYNTAX_INTEGER, 1, 1),
321         moFactory.createSubIndex(SMIConstants.SYNTAX_OCTET_STRING, 0, 128) };
322
323   private static final MOTableIndex ifRcvAddressEntryIndex =
324       moFactory.createIndex(ifRcvAddressEntryIndexes,
325                             false);
326
327
328   private MOTable ifRcvAddressEntry;
329   private MOMutableTableModel ifRcvAddressEntryModel;
330
331
332 //--AgentGen BEGIN=_MEMBERS
333
//--AgentGen END
334

335   public IfMib() {
336     ifNumber =
337       moFactory.createScalar(oidIfNumber,
338                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY),
339                              new Integer32());
340     ifTableLastChange =
341       moFactory.createScalar(oidIfTableLastChange,
342                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY),
343                              new TimeTicks());
344     ifStackLastChange =
345       moFactory.createScalar(oidIfStackLastChange,
346                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY),
347                              new TimeTicks());
348     createIfEntry();
349     createIfXEntry();
350     createIfStackEntry();
351     createIfTestEntry();
352     createIfRcvAddressEntry();
353 //--AgentGen BEGIN=_DEFAULTCONSTRUCTOR
354
//--AgentGen END
355
}
356
357 //--AgentGen BEGIN=_CONSTRUCTORS
358
//--AgentGen END
359

360
361   public MOTable getIfEntry() {
362     return ifEntry;
363   }
364
365
366   private void createIfEntry() {
367     MOColumn[] ifEntryColumns = new MOColumn[22];
368     ifEntryColumns[idxIfIndex] =
369       moFactory.createColumn(colIfIndex,
370                              SMIConstants.SYNTAX_INTEGER32,
371                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
372     ifEntryColumns[idxIfDescr] =
373       moFactory.createColumn(colIfDescr,
374                              SMIConstants.SYNTAX_OCTET_STRING,
375                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
376     ifEntryColumns[idxIfType] =
377       moFactory.createColumn(colIfType,
378                              SMIConstants.SYNTAX_INTEGER,
379                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
380     ifEntryColumns[idxIfMtu] =
381       moFactory.createColumn(colIfMtu,
382                              SMIConstants.SYNTAX_INTEGER32,
383                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
384     ifEntryColumns[idxIfSpeed] =
385       moFactory.createColumn(colIfSpeed,
386                              SMIConstants.SYNTAX_GAUGE32,
387                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
388     ifEntryColumns[idxIfPhysAddress] =
389       moFactory.createColumn(colIfPhysAddress,
390                              SMIConstants.SYNTAX_OCTET_STRING,
391                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
392     ifEntryColumns[idxIfAdminStatus] =
393       new Enumerated(colIfAdminStatus,
394                      moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
395                      null);
396     ValueConstraint ifAdminStatusVC = new EnumerationConstraint(
397       new int[] { IfAdminStatusEnum.up,
398                   IfAdminStatusEnum.down,
399                   IfAdminStatusEnum.testing });
400     ((MOMutableColumn)ifEntryColumns[idxIfAdminStatus]).
401       addMOValueValidationListener(new ValueConstraintValidator(ifAdminStatusVC));
402     ifEntryColumns[idxIfOperStatus] =
403       moFactory.createColumn(colIfOperStatus,
404                              SMIConstants.SYNTAX_INTEGER,
405                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
406     ifEntryColumns[idxIfLastChange] =
407       moFactory.createColumn(colIfLastChange,
408                              SMIConstants.SYNTAX_TIMETICKS,
409                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
410     ifEntryColumns[idxIfInOctets] =
411       moFactory.createColumn(colIfInOctets,
412                              SMIConstants.SYNTAX_COUNTER32,
413                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
414     ifEntryColumns[idxIfInUcastPkts] =
415       moFactory.createColumn(colIfInUcastPkts,
416                              SMIConstants.SYNTAX_COUNTER32,
417                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
418     ifEntryColumns[idxIfInNUcastPkts] =
419       moFactory.createColumn(colIfInNUcastPkts,
420                              SMIConstants.SYNTAX_COUNTER32,
421                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
422     ifEntryColumns[idxIfInDiscards] =
423       moFactory.createColumn(colIfInDiscards,
424                              SMIConstants.SYNTAX_COUNTER32,
425                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
426     ifEntryColumns[idxIfInErrors] =
427       moFactory.createColumn(colIfInErrors,
428                              SMIConstants.SYNTAX_COUNTER32,
429                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
430     ifEntryColumns[idxIfInUnknownProtos] =
431       moFactory.createColumn(colIfInUnknownProtos,
432                              SMIConstants.SYNTAX_COUNTER32,
433                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
434     ifEntryColumns[idxIfOutOctets] =
435       moFactory.createColumn(colIfOutOctets,
436                              SMIConstants.SYNTAX_COUNTER32,
437                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
438     ifEntryColumns[idxIfOutUcastPkts] =
439       moFactory.createColumn(colIfOutUcastPkts,
440                              SMIConstants.SYNTAX_COUNTER32,
441                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
442     ifEntryColumns[idxIfOutNUcastPkts] =
443       moFactory.createColumn(colIfOutNUcastPkts,
444                              SMIConstants.SYNTAX_COUNTER32,
445                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
446     ifEntryColumns[idxIfOutDiscards] =
447       moFactory.createColumn(colIfOutDiscards,
448                              SMIConstants.SYNTAX_COUNTER32,
449                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
450     ifEntryColumns[idxIfOutErrors] =
451       moFactory.createColumn(colIfOutErrors,
452                              SMIConstants.SYNTAX_COUNTER32,
453                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
454     ifEntryColumns[idxIfOutQLen] =
455       moFactory.createColumn(colIfOutQLen,
456                              SMIConstants.SYNTAX_GAUGE32,
457                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
458     ifEntryColumns[idxIfSpecific] =
459       moFactory.createColumn(colIfSpecific,
460                              SMIConstants.SYNTAX_OBJECT_IDENTIFIER,
461                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
462
463     ifEntryModel = new DefaultMOMutableTableModel();
464     ifEntryModel.setRowFactory(new IfEntryRowFactory());
465     ifEntry =
466       moFactory.createTable(oidIfEntry,
467                             ifEntryIndex,
468                             ifEntryColumns,
469                             ifEntryModel);
470   }
471
472   public MOTable getIfXEntry() {
473     return ifXEntry;
474   }
475
476
477   private void createIfXEntry() {
478     MOColumn[] ifXEntryColumns = new MOColumn[19];
479     ifXEntryColumns[idxIfName] =
480       moFactory.createColumn(colIfName,
481                              SMIConstants.SYNTAX_OCTET_STRING,
482                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
483     ifXEntryColumns[idxIfInMulticastPkts] =
484       moFactory.createColumn(colIfInMulticastPkts,
485                              SMIConstants.SYNTAX_COUNTER32,
486                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
487     ifXEntryColumns[idxIfInBroadcastPkts] =
488       moFactory.createColumn(colIfInBroadcastPkts,
489                              SMIConstants.SYNTAX_COUNTER32,
490                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
491     ifXEntryColumns[idxIfOutMulticastPkts] =
492       moFactory.createColumn(colIfOutMulticastPkts,
493                              SMIConstants.SYNTAX_COUNTER32,
494                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
495     ifXEntryColumns[idxIfOutBroadcastPkts] =
496       moFactory.createColumn(colIfOutBroadcastPkts,
497                              SMIConstants.SYNTAX_COUNTER32,
498                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
499     ifXEntryColumns[idxIfHCInOctets] =
500       moFactory.createColumn(colIfHCInOctets,
501                              SMIConstants.SYNTAX_COUNTER64,
502                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
503     ifXEntryColumns[idxIfHCInUcastPkts] =
504       moFactory.createColumn(colIfHCInUcastPkts,
505                              SMIConstants.SYNTAX_COUNTER64,
506                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
507     ifXEntryColumns[idxIfHCInMulticastPkts] =
508       moFactory.createColumn(colIfHCInMulticastPkts,
509                              SMIConstants.SYNTAX_COUNTER64,
510                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
511     ifXEntryColumns[idxIfHCInBroadcastPkts] =
512       moFactory.createColumn(colIfHCInBroadcastPkts,
513                              SMIConstants.SYNTAX_COUNTER64,
514                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
515     ifXEntryColumns[idxIfHCOutOctets] =
516       moFactory.createColumn(colIfHCOutOctets,
517                              SMIConstants.SYNTAX_COUNTER64,
518                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
519     ifXEntryColumns[idxIfHCOutUcastPkts] =
520       moFactory.createColumn(colIfHCOutUcastPkts,
521                              SMIConstants.SYNTAX_COUNTER64,
522                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
523     ifXEntryColumns[idxIfHCOutMulticastPkts] =
524       moFactory.createColumn(colIfHCOutMulticastPkts,
525                              SMIConstants.SYNTAX_COUNTER64,
526                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
527     ifXEntryColumns[idxIfHCOutBroadcastPkts] =
528       moFactory.createColumn(colIfHCOutBroadcastPkts,
529                              SMIConstants.SYNTAX_COUNTER64,
530                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
531     ifXEntryColumns[idxIfLinkUpDownTrapEnable] =
532       new Enumerated(colIfLinkUpDownTrapEnable,
533                      moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
534                      null);
535     ValueConstraint ifLinkUpDownTrapEnableVC = new EnumerationConstraint(
536       new int[] { IfLinkUpDownTrapEnableEnum.enabled,
537                   IfLinkUpDownTrapEnableEnum.disabled });
538     ((MOMutableColumn)ifXEntryColumns[idxIfLinkUpDownTrapEnable]).
539       addMOValueValidationListener(new ValueConstraintValidator(ifLinkUpDownTrapEnableVC));
540     ifXEntryColumns[idxIfHighSpeed] =
541       moFactory.createColumn(colIfHighSpeed,
542                              SMIConstants.SYNTAX_GAUGE32,
543                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
544     ifXEntryColumns[idxIfPromiscuousMode] =
545       new MOMutableColumn(colIfPromiscuousMode,
546                           SMIConstants.SYNTAX_INTEGER,
547                           moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
548                           null);
549     ValueConstraint ifPromiscuousModeVC = new EnumerationConstraint(
550       new int[] { IfPromiscuousModeEnum._true,
551                   IfPromiscuousModeEnum._false });
552     ((MOMutableColumn)ifXEntryColumns[idxIfPromiscuousMode]).
553       addMOValueValidationListener(new ValueConstraintValidator(ifPromiscuousModeVC));
554     ifXEntryColumns[idxIfConnectorPresent] =
555       moFactory.createColumn(colIfConnectorPresent,
556                              SMIConstants.SYNTAX_INTEGER,
557                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
558     ifXEntryColumns[idxIfAlias] =
559       new DisplayString(colIfAlias,
560                         moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
561                         null);
562     ValueConstraint ifAliasVC = new ConstraintsImpl();
563     ((ConstraintsImpl)ifAliasVC).add(new Constraint(0, 64));
564     ((MOMutableColumn)ifXEntryColumns[idxIfAlias]).
565       addMOValueValidationListener(new ValueConstraintValidator(ifAliasVC));
566     ifXEntryColumns[idxIfCounterDiscontinuityTime] =
567       moFactory.createColumn(colIfCounterDiscontinuityTime,
568                              SMIConstants.SYNTAX_TIMETICKS,
569                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
570
571     ifXEntryModel = new DefaultMOMutableTableModel();
572     ifXEntryModel.setRowFactory(new IfXEntryRowFactory());
573     ifXEntry =
574       moFactory.createTable(oidIfXEntry,
575                             ifXEntryIndex,
576                             ifXEntryColumns,
577                             ifXEntryModel);
578   }
579
580   public MOTable getIfStackEntry() {
581     return ifStackEntry;
582   }
583
584
585   private void createIfStackEntry() {
586     MOColumn[] ifStackEntryColumns = new MOColumn[1];
587     ifStackEntryColumns[idxIfStackStatus] =
588       new RowStatus(colIfStackStatus);
589     ValueConstraint ifStackStatusVC = new EnumerationConstraint(
590       new int[] { IfStackStatusEnum.active,
591                   IfStackStatusEnum.notInService,
592                   IfStackStatusEnum.notReady,
593                   IfStackStatusEnum.createAndGo,
594                   IfStackStatusEnum.createAndWait,
595                   IfStackStatusEnum.destroy });
596     ((MOMutableColumn)ifStackEntryColumns[idxIfStackStatus]).
597       addMOValueValidationListener(new ValueConstraintValidator(ifStackStatusVC));
598
599     ifStackEntryModel = new DefaultMOMutableTableModel();
600     ifStackEntryModel.setRowFactory(new IfStackEntryRowFactory());
601     ifStackEntry =
602       moFactory.createTable(oidIfStackEntry,
603                             ifStackEntryIndex,
604                             ifStackEntryColumns,
605                             ifStackEntryModel);
606   }
607
608   public MOTable getIfTestEntry() {
609     return ifTestEntry;
610   }
611
612
613   private void createIfTestEntry() {
614     MOColumn[] ifTestEntryColumns = new MOColumn[6];
615     ifTestEntryColumns[idxIfTestId] =
616       new MOMutableColumn(colIfTestId,
617                           SMIConstants.SYNTAX_INTEGER,
618                           moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
619                           null);
620     ValueConstraint ifTestIdVC = new ConstraintsImpl();
621     ((ConstraintsImpl)ifTestIdVC).add(new Constraint(0, 2147483647));
622     ((MOMutableColumn)ifTestEntryColumns[idxIfTestId]).
623       addMOValueValidationListener(new ValueConstraintValidator(ifTestIdVC));
624     ifTestEntryColumns[idxIfTestStatus] =
625       new Enumerated(colIfTestStatus,
626                      moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
627                      null);
628     ValueConstraint ifTestStatusVC = new EnumerationConstraint(
629       new int[] { IfTestStatusEnum.notInUse,
630                   IfTestStatusEnum.inUse });
631     ((MOMutableColumn)ifTestEntryColumns[idxIfTestStatus]).
632       addMOValueValidationListener(new ValueConstraintValidator(ifTestStatusVC));
633     ifTestEntryColumns[idxIfTestType] =
634       new MOMutableColumn(colIfTestType,
635                           SMIConstants.SYNTAX_OBJECT_IDENTIFIER,
636                           moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
637                           null);
638     ifTestEntryColumns[idxIfTestResult] =
639       moFactory.createColumn(colIfTestResult,
640                              SMIConstants.SYNTAX_INTEGER,
641                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
642     ifTestEntryColumns[idxIfTestCode] =
643       moFactory.createColumn(colIfTestCode,
644                              SMIConstants.SYNTAX_OBJECT_IDENTIFIER,
645                              moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_ONLY));
646     ifTestEntryColumns[idxIfTestOwner] =
647       new MOMutableColumn(colIfTestOwner,
648                           SMIConstants.SYNTAX_OCTET_STRING,
649                           moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
650                           null);
651     ValueConstraint ifTestOwnerVC = new ConstraintsImpl();
652     ((ConstraintsImpl)ifTestOwnerVC).add(new Constraint(0, 255));
653     ((MOMutableColumn)ifTestEntryColumns[idxIfTestOwner]).
654       addMOValueValidationListener(new ValueConstraintValidator(ifTestOwnerVC));
655
656     ifTestEntryModel = new DefaultMOMutableTableModel();
657     ifTestEntryModel.setRowFactory(new IfTestEntryRowFactory());
658     ifTestEntry =
659       moFactory.createTable(oidIfTestEntry,
660                             ifTestEntryIndex,
661                             ifTestEntryColumns,
662                             ifTestEntryModel);
663   }
664
665   public MOTable getIfRcvAddressEntry() {
666     return ifRcvAddressEntry;
667   }
668
669
670   private void createIfRcvAddressEntry() {
671     MOColumn[] ifRcvAddressEntryColumns = new MOColumn[2];
672     ifRcvAddressEntryColumns[idxIfRcvAddressStatus] =
673       new RowStatus(colIfRcvAddressStatus);
674     ValueConstraint ifRcvAddressStatusVC = new EnumerationConstraint(
675       new int[] { IfRcvAddressStatusEnum.active,
676                   IfRcvAddressStatusEnum.notInService,
677                   IfRcvAddressStatusEnum.notReady,
678                   IfRcvAddressStatusEnum.createAndGo,
679                   IfRcvAddressStatusEnum.createAndWait,
680                   IfRcvAddressStatusEnum.destroy });
681     ((MOMutableColumn)ifRcvAddressEntryColumns[idxIfRcvAddressStatus]).
682       addMOValueValidationListener(new ValueConstraintValidator(ifRcvAddressStatusVC));
683     ifRcvAddressEntryColumns[idxIfRcvAddressType] =
684       new Enumerated(colIfRcvAddressType,
685                      moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_CREATE),
686                      new Integer32(2));
687     ValueConstraint ifRcvAddressTypeVC = new EnumerationConstraint(
688       new int[] { IfRcvAddressTypeEnum.other,
689                   IfRcvAddressTypeEnum._volatile,
690                   IfRcvAddressTypeEnum.nonVolatile });
691     ((MOMutableColumn)ifRcvAddressEntryColumns[idxIfRcvAddressType]).
692       addMOValueValidationListener(new ValueConstraintValidator(ifRcvAddressTypeVC));
693
694     ifRcvAddressEntryModel = new DefaultMOMutableTableModel();
695     ifRcvAddressEntryModel.setRowFactory(new IfRcvAddressEntryRowFactory());
696     ifRcvAddressEntry =
697       moFactory.createTable(oidIfRcvAddressEntry,
698                             ifRcvAddressEntryIndex,
699                             ifRcvAddressEntryColumns,
700                             ifRcvAddressEntryModel);
701   }
702
703
704
705   public void registerMOs(MOServer server, OctetString context)
706     throws DuplicateRegistrationException
707   {
708     // Scalar Objects
709
server.register(this.ifNumber, context);
710     server.register(this.ifTableLastChange, context);
711     server.register(this.ifStackLastChange, context);
712     server.register(this.ifEntry, context);
713     server.register(this.ifXEntry, context);
714     server.register(this.ifStackEntry, context);
715     server.register(this.ifTestEntry, context);
716     server.register(this.ifRcvAddressEntry, context);
717 //--AgentGen BEGIN=_registerMOs
718
//--AgentGen END
719
}
720
721   public void unregisterMOs(MOServer server, OctetString context) {
722     // Scalar Objects
723
server.unregister(this.ifNumber, context);
724     server.unregister(this.ifTableLastChange, context);
725     server.unregister(this.ifStackLastChange, context);
726     server.unregister(this.ifEntry, context);
727     server.unregister(this.ifXEntry, context);
728     server.unregister(this.ifStackEntry, context);
729     server.unregister(this.ifTestEntry, context);
730     server.unregister(this.ifRcvAddressEntry, context);
731 //--AgentGen BEGIN=_unregisterMOs
732
//--AgentGen END
733
}
734
735   // Notifications
736
public void linkDown(NotificationOriginator notificationOriginator,
737                          OctetString context, VariableBinding[] vbs) {
738     if (vbs.length < 3) {
739       throw new IllegalArgumentException JavaDoc("Too few notification objects: "+
740                                          vbs.length+"<3");
741     }
742     if (!(vbs[0].getOid().startsWith(oidTrapVarIfIndex))) {
743       throw new IllegalArgumentException JavaDoc("Variable 0 has wrong OID: "+vbs[0].getOid()+
744                                          " does not start with "+oidTrapVarIfIndex);
745     }
746     if (!ifEntryIndex.isValidIndex(ifEntry.getIndexPart(vbs[0].getOid()))) {
747       throw new IllegalArgumentException JavaDoc("Illegal index for variable 0 specified: "+
748                                          ifEntry.getIndexPart(vbs[0].getOid()));
749     }
750     if (!(vbs[1].getOid().startsWith(oidTrapVarIfAdminStatus))) {
751       throw new IllegalArgumentException JavaDoc("Variable 1 has wrong OID: "+vbs[1].getOid()+
752                                          " does not start with "+oidTrapVarIfAdminStatus);
753     }
754     if (!ifEntryIndex.isValidIndex(ifEntry.getIndexPart(vbs[1].getOid()))) {
755       throw new IllegalArgumentException JavaDoc("Illegal index for variable 1 specified: "+
756                                          ifEntry.getIndexPart(vbs[1].getOid()));
757     }
758     if (!(vbs[2].getOid().startsWith(oidTrapVarIfOperStatus))) {
759       throw new IllegalArgumentException JavaDoc("Variable 2 has wrong OID: "+vbs[2].getOid()+
760                                          " does not start with "+oidTrapVarIfOperStatus);
761     }
762     if (!ifEntryIndex.isValidIndex(ifEntry.getIndexPart(vbs[2].getOid()))) {
763       throw new IllegalArgumentException JavaDoc("Illegal index for variable 2 specified: "+
764                                          ifEntry.getIndexPart(vbs[2].getOid()));
765     }
766     notificationOriginator.notify(context, oidLinkDown, vbs);
767   }
768
769   public void linkUp(NotificationOriginator notificationOriginator,
770                          OctetString context, VariableBinding[] vbs) {
771     if (vbs.length < 3) {
772       throw new IllegalArgumentException JavaDoc("Too few notification objects: "+
773                                          vbs.length+"<3");
774     }
775     if (!(vbs[0].getOid().startsWith(oidTrapVarIfIndex))) {
776       throw new IllegalArgumentException JavaDoc("Variable 0 has wrong OID: "+vbs[0].getOid()+
777                                          " does not start with "+oidTrapVarIfIndex);
778     }
779     if (!ifEntryIndex.isValidIndex(ifEntry.getIndexPart(vbs[0].getOid()))) {
780       throw new IllegalArgumentException JavaDoc("Illegal index for variable 0 specified: "+
781                                          ifEntry.getIndexPart(vbs[0].getOid()));
782     }
783     if (!(vbs[1].getOid().startsWith(oidTrapVarIfAdminStatus))) {
784       throw new IllegalArgumentException JavaDoc("Variable 1 has wrong OID: "+vbs[1].getOid()+
785                                          " does not start with "+oidTrapVarIfAdminStatus);
786     }
787     if (!ifEntryIndex.isValidIndex(ifEntry.getIndexPart(vbs[1].getOid()))) {
788       throw new IllegalArgumentException JavaDoc("Illegal index for variable 1 specified: "+
789                                          ifEntry.getIndexPart(vbs[1].getOid()));
790     }
791     if (!(vbs[2].getOid().startsWith(oidTrapVarIfOperStatus))) {
792       throw new IllegalArgumentException JavaDoc("Variable 2 has wrong OID: "+vbs[2].getOid()+
793                                          " does not start with "+oidTrapVarIfOperStatus);
794     }
795     if (!ifEntryIndex.isValidIndex(ifEntry.getIndexPart(vbs[2].getOid()))) {
796       throw new IllegalArgumentException JavaDoc("Illegal index for variable 2 specified: "+
797                                          ifEntry.getIndexPart(vbs[2].getOid()));
798     }
799     notificationOriginator.notify(context, oidLinkUp, vbs);
800   }
801
802
803   // Scalars
804

805   // Value Validators
806

807
808   // Rows and Factories
809
class IfEntryRowFactory
810         extends DefaultMOMutableRow2PCFactory
811   {
812     public synchronized MOTableRow createRow(OID index, Variable[] values)
813         throws UnsupportedOperationException JavaDoc
814     {
815       IfEntryRow row = new IfEntryRow(index, values);
816      //--AgentGen BEGIN=ifEntry::createRow
817
//--AgentGen END
818
return row;
819     }
820
821     public synchronized void freeRow(MOTableRow row) {
822      //--AgentGen BEGIN=ifEntry::freeRow
823
//--AgentGen END
824
}
825   }
826
827   class IfEntryRow extends DefaultMOMutableRow2PC {
828     public IfEntryRow(OID index, Variable[] values) {
829       super(index, values);
830     }
831
832     public Integer32 getIfIndex() {
833       return (Integer32) getValue(idxIfIndex);
834     }
835
836     public void setIfIndex(Integer32 newValue) {
837       setValue(idxIfIndex, newValue);
838     }
839
840     public OctetString getIfDescr() {
841       return (OctetString) getValue(idxIfDescr);
842     }
843
844     public void setIfDescr(OctetString newValue) {
845       setValue(idxIfDescr, newValue);
846     }
847
848     public Integer32 getIfType() {
849       return (Integer32) getValue(idxIfType);
850     }
851
852     public void setIfType(Integer32 newValue) {
853       setValue(idxIfType, newValue);
854     }
855
856     public Integer32 getIfMtu() {
857       return (Integer32) getValue(idxIfMtu);
858     }
859
860     public void setIfMtu(Integer32 newValue) {
861       setValue(idxIfMtu, newValue);
862     }
863
864     public Gauge32 getIfSpeed() {
865       return (Gauge32) getValue(idxIfSpeed);
866     }
867
868     public void setIfSpeed(Gauge32 newValue) {
869       setValue(idxIfSpeed, newValue);
870     }
871
872     public OctetString getIfPhysAddress() {
873       return (OctetString) getValue(idxIfPhysAddress);
874     }
875
876     public void setIfPhysAddress(OctetString newValue) {
877       setValue(idxIfPhysAddress, newValue);
878     }
879
880     public Integer32 getIfAdminStatus() {
881       return (Integer32) getValue(idxIfAdminStatus);
882     }
883
884     public void setIfAdminStatus(Integer32 newValue) {
885       setValue(idxIfAdminStatus, newValue);
886     }
887
888     public Integer32 getIfOperStatus() {
889       return (Integer32) getValue(idxIfOperStatus);
890     }
891
892     public void setIfOperStatus(Integer32 newValue) {
893       setValue(idxIfOperStatus, newValue);
894     }
895
896     public TimeTicks getIfLastChange() {
897       return (TimeTicks) getValue(idxIfLastChange);
898     }
899
900     public void setIfLastChange(TimeTicks newValue) {
901       setValue(idxIfLastChange, newValue);
902     }
903
904     public Counter32 getIfInOctets() {
905       return (Counter32) getValue(idxIfInOctets);
906     }
907
908     public void setIfInOctets(Counter32 newValue) {
909       setValue(idxIfInOctets, newValue);
910     }
911
912     public Counter32 getIfInUcastPkts() {
913       return (Counter32) getValue(idxIfInUcastPkts);
914     }
915
916     public void setIfInUcastPkts(Counter32 newValue) {
917       setValue(idxIfInUcastPkts, newValue);
918     }
919
920     public Counter32 getIfInNUcastPkts() {
921       return (Counter32) getValue(idxIfInNUcastPkts);
922     }
923
924     public void setIfInNUcastPkts(Counter32 newValue) {
925       setValue(idxIfInNUcastPkts, newValue);
926     }
927
928     public Counter32 getIfInDiscards() {
929       return (Counter32) getValue(idxIfInDiscards);
930     }
931
932     public void setIfInDiscards(Counter32 newValue) {
933       setValue(idxIfInDiscards, newValue);
934     }
935
936     public Counter32 getIfInErrors() {
937       return (Counter32) getValue(idxIfInErrors);
938     }
939
940     public void setIfInErrors(Counter32 newValue) {
941       setValue(idxIfInErrors, newValue);
942     }
943
944     public Counter32 getIfInUnknownProtos() {
945       return (Counter32) getValue(idxIfInUnknownProtos);
946     }
947
948     public void setIfInUnknownProtos(Counter32 newValue) {
949       setValue(idxIfInUnknownProtos, newValue);
950     }
951
952     public Counter32 getIfOutOctets() {
953       return (Counter32) getValue(idxIfOutOctets);
954     }
955
956     public void setIfOutOctets(Counter32 newValue) {
957       setValue(idxIfOutOctets, newValue);
958     }
959
960     public Counter32 getIfOutUcastPkts() {
961       return (Counter32) getValue(idxIfOutUcastPkts);
962     }
963
964     public void setIfOutUcastPkts(Counter32 newValue) {
965       setValue(idxIfOutUcastPkts, newValue);
966     }
967
968     public Counter32 getIfOutNUcastPkts() {
969       return (Counter32) getValue(idxIfOutNUcastPkts);
970     }
971
972     public void setIfOutNUcastPkts(Counter32 newValue) {
973       setValue(idxIfOutNUcastPkts, newValue);
974     }
975
976     public Counter32 getIfOutDiscards() {
977       return (Counter32) getValue(idxIfOutDiscards);
978     }
979
980     public void setIfOutDiscards(Counter32 newValue) {
981       setValue(idxIfOutDiscards, newValue);
982     }
983
984     public Counter32 getIfOutErrors() {
985       return (Counter32) getValue(idxIfOutErrors);
986     }
987
988     public void setIfOutErrors(Counter32 newValue) {
989       setValue(idxIfOutErrors, newValue);
990     }
991
992     public Gauge32 getIfOutQLen() {
993       return (Gauge32) getValue(idxIfOutQLen);
994     }
995
996     public void setIfOutQLen(Gauge32 newValue) {
997       setValue(idxIfOutQLen, newValue);
998     }
999
1000    public OID getIfSpecific() {
1001      return (OID) getValue(idxIfSpecific);
1002    }
1003
1004    public void setIfSpecific(OID newValue) {
1005      setValue(idxIfSpecific, newValue);
1006    }
1007
1008
1009     //--AgentGen BEGIN=ifEntry::RowFactory
1010
//--AgentGen END
1011
}
1012
1013  class IfXEntryRowFactory
1014        extends DefaultMOMutableRow2PCFactory
1015  {
1016    public synchronized MOTableRow createRow(OID index, Variable[] values)
1017        throws UnsupportedOperationException JavaDoc
1018    {
1019      IfXEntryRow row = new IfXEntryRow(index, values);
1020     //--AgentGen BEGIN=ifXEntry::createRow
1021
//--AgentGen END
1022
return row;
1023    }
1024
1025    public synchronized void freeRow(MOTableRow row) {
1026     //--AgentGen BEGIN=ifXEntry::freeRow
1027
//--AgentGen END
1028
}
1029  }
1030
1031  class IfXEntryRow extends DefaultMOMutableRow2PC {
1032    public IfXEntryRow(OID index, Variable[] values) {
1033      super(index, values);
1034    }
1035
1036    public OctetString getIfName() {
1037      return (OctetString) getValue(idxIfName);
1038    }
1039
1040    public void setIfName(OctetString newValue) {
1041      setValue(idxIfName, newValue);
1042    }
1043
1044    public Counter32 getIfInMulticastPkts() {
1045      return (Counter32) getValue(idxIfInMulticastPkts);
1046    }
1047
1048    public void setIfInMulticastPkts(Counter32 newValue) {
1049      setValue(idxIfInMulticastPkts, newValue);
1050    }
1051
1052    public Counter32 getIfInBroadcastPkts() {
1053      return (Counter32) getValue(idxIfInBroadcastPkts);
1054    }
1055
1056    public void setIfInBroadcastPkts(Counter32 newValue) {
1057      setValue(idxIfInBroadcastPkts, newValue);
1058    }
1059
1060    public Counter32 getIfOutMulticastPkts() {
1061      return (Counter32) getValue(idxIfOutMulticastPkts);
1062    }
1063
1064    public void setIfOutMulticastPkts(Counter32 newValue) {
1065      setValue(idxIfOutMulticastPkts, newValue);
1066    }
1067
1068    public Counter32 getIfOutBroadcastPkts() {
1069      return (Counter32) getValue(idxIfOutBroadcastPkts);
1070    }
1071
1072    public void setIfOutBroadcastPkts(Counter32 newValue) {
1073      setValue(idxIfOutBroadcastPkts, newValue);
1074    }
1075
1076    public Counter64 getIfHCInOctets() {
1077      return (Counter64) getValue(idxIfHCInOctets);
1078    }
1079
1080    public void setIfHCInOctets(Counter64 newValue) {
1081      setValue(idxIfHCInOctets, newValue);
1082    }
1083
1084    public Counter64 getIfHCInUcastPkts() {
1085      return (Counter64) getValue(idxIfHCInUcastPkts);
1086    }
1087
1088    public void setIfHCInUcastPkts(Counter64 newValue) {
1089      setValue(idxIfHCInUcastPkts, newValue);
1090    }
1091
1092    public Counter64 getIfHCInMulticastPkts() {
1093      return (Counter64) getValue(idxIfHCInMulticastPkts);
1094    }
1095
1096    public void setIfHCInMulticastPkts(Counter64 newValue) {
1097      setValue(idxIfHCInMulticastPkts, newValue);
1098    }
1099
1100    public Counter64 getIfHCInBroadcastPkts() {
1101      return (Counter64) getValue(idxIfHCInBroadcastPkts);
1102    }
1103
1104    public void setIfHCInBroadcastPkts(Counter64 newValue) {
1105      setValue(idxIfHCInBroadcastPkts, newValue);
1106    }
1107
1108    public Counter64 getIfHCOutOctets() {
1109      return (Counter64) getValue(idxIfHCOutOctets);
1110    }
1111
1112    public void setIfHCOutOctets(Counter64 newValue) {
1113      setValue(idxIfHCOutOctets, newValue);
1114    }
1115
1116    public Counter64 getIfHCOutUcastPkts() {
1117      return (Counter64) getValue(idxIfHCOutUcastPkts);
1118    }
1119
1120    public void setIfHCOutUcastPkts(Counter64 newValue) {
1121      setValue(idxIfHCOutUcastPkts, newValue);
1122    }
1123
1124    public Counter64 getIfHCOutMulticastPkts() {
1125      return (Counter64) getValue(idxIfHCOutMulticastPkts);
1126    }
1127
1128    public void setIfHCOutMulticastPkts(Counter64 newValue) {
1129      setValue(idxIfHCOutMulticastPkts, newValue);
1130    }
1131
1132    public Counter64 getIfHCOutBroadcastPkts() {
1133      return (Counter64) getValue(idxIfHCOutBroadcastPkts);
1134    }
1135
1136    public void setIfHCOutBroadcastPkts(Counter64 newValue) {
1137      setValue(idxIfHCOutBroadcastPkts, newValue);
1138    }
1139
1140    public Integer32 getIfLinkUpDownTrapEnable() {
1141      return (Integer32) getValue(idxIfLinkUpDownTrapEnable);
1142    }
1143
1144    public void setIfLinkUpDownTrapEnable(Integer32 newValue) {
1145      setValue(idxIfLinkUpDownTrapEnable, newValue);
1146    }
1147
1148    public Gauge32 getIfHighSpeed() {
1149      return (Gauge32) getValue(idxIfHighSpeed);
1150    }
1151
1152    public void setIfHighSpeed(Gauge32 newValue) {
1153      setValue(idxIfHighSpeed, newValue);
1154    }
1155
1156    public Integer32 getIfPromiscuousMode() {
1157      return (Integer32) getValue(idxIfPromiscuousMode);
1158    }
1159
1160    public void setIfPromiscuousMode(Integer32 newValue) {
1161      setValue(idxIfPromiscuousMode, newValue);
1162    }
1163
1164    public Integer32 getIfConnectorPresent() {
1165      return (Integer32) getValue(idxIfConnectorPresent);
1166    }
1167
1168    public void setIfConnectorPresent(Integer32 newValue) {
1169      setValue(idxIfConnectorPresent, newValue);
1170    }
1171
1172    public OctetString getIfAlias() {
1173      return (OctetString) getValue(idxIfAlias);
1174    }
1175
1176    public void setIfAlias(OctetString newValue) {
1177      setValue(idxIfAlias, newValue);
1178    }
1179
1180    public TimeTicks getIfCounterDiscontinuityTime() {
1181      return (TimeTicks) getValue(idxIfCounterDiscontinuityTime);
1182    }
1183
1184    public void setIfCounterDiscontinuityTime(TimeTicks newValue) {
1185      setValue(idxIfCounterDiscontinuityTime, newValue);
1186    }
1187
1188
1189     //--AgentGen BEGIN=ifXEntry::RowFactory
1190
//--AgentGen END
1191
}
1192
1193  class IfStackEntryRowFactory
1194        extends DefaultMOMutableRow2PCFactory
1195  {
1196    public synchronized MOTableRow createRow(OID index, Variable[] values)
1197        throws UnsupportedOperationException JavaDoc
1198    {
1199      IfStackEntryRow row = new IfStackEntryRow(index, values);
1200     //--AgentGen BEGIN=ifStackEntry::createRow
1201
//--AgentGen END
1202
return row;
1203    }
1204
1205    public synchronized void freeRow(MOTableRow row) {
1206     //--AgentGen BEGIN=ifStackEntry::freeRow
1207
//--AgentGen END
1208
}
1209  }
1210
1211  class IfStackEntryRow extends DefaultMOMutableRow2PC {
1212    public IfStackEntryRow(OID index, Variable[] values) {
1213      super(index, values);
1214    }
1215
1216    public Integer32 getIfStackStatus() {
1217      return (Integer32) getValue(idxIfStackStatus);
1218    }
1219
1220    public void setIfStackStatus(Integer32 newValue) {
1221      setValue(idxIfStackStatus, newValue);
1222    }
1223
1224
1225     //--AgentGen BEGIN=ifStackEntry::RowFactory
1226
//--AgentGen END
1227
}
1228
1229  class IfTestEntryRowFactory
1230        extends DefaultMOMutableRow2PCFactory
1231  {
1232    public synchronized MOTableRow createRow(OID index, Variable[] values)
1233        throws UnsupportedOperationException JavaDoc
1234    {
1235      IfTestEntryRow row = new IfTestEntryRow(index, values);
1236     //--AgentGen BEGIN=ifTestEntry::createRow
1237
//--AgentGen END
1238
return row;
1239    }
1240
1241    public synchronized void freeRow(MOTableRow row) {
1242     //--AgentGen BEGIN=ifTestEntry::freeRow
1243
//--AgentGen END
1244
}
1245  }
1246
1247  class IfTestEntryRow extends DefaultMOMutableRow2PC {
1248    public IfTestEntryRow(OID index, Variable[] values) {
1249      super(index, values);
1250    }
1251
1252    public Integer32 getIfTestId() {
1253      return (Integer32) getValue(idxIfTestId);
1254    }
1255
1256    public void setIfTestId(Integer32 newValue) {
1257      setValue(idxIfTestId, newValue);
1258    }
1259
1260    public Integer32 getIfTestStatus() {
1261      return (Integer32) getValue(idxIfTestStatus);
1262    }
1263
1264    public void setIfTestStatus(Integer32 newValue) {
1265      setValue(idxIfTestStatus, newValue);
1266    }
1267
1268    public OID getIfTestType() {
1269      return (OID) getValue(idxIfTestType);
1270    }
1271
1272    public void setIfTestType(OID newValue) {
1273      setValue(idxIfTestType, newValue);
1274    }
1275
1276    public Integer32 getIfTestResult() {
1277      return (Integer32) getValue(idxIfTestResult);
1278    }
1279
1280    public void setIfTestResult(Integer32 newValue) {
1281      setValue(idxIfTestResult, newValue);
1282    }
1283
1284    public OID getIfTestCode() {
1285      return (OID) getValue(idxIfTestCode);
1286    }
1287
1288    public void setIfTestCode(OID newValue) {
1289      setValue(idxIfTestCode, newValue);
1290    }
1291
1292    public OctetString getIfTestOwner() {
1293      return (OctetString) getValue(idxIfTestOwner);
1294    }
1295
1296    public void setIfTestOwner(OctetString newValue) {
1297      setValue(idxIfTestOwner, newValue);
1298    }
1299
1300
1301     //--AgentGen BEGIN=ifTestEntry::RowFactory
1302
//--AgentGen END
1303
}
1304
1305  class IfRcvAddressEntryRowFactory
1306        extends DefaultMOMutableRow2PCFactory
1307  {
1308    public synchronized MOTableRow createRow(OID index, Variable[] values)
1309        throws UnsupportedOperationException JavaDoc
1310    {
1311      IfRcvAddressEntryRow row = new IfRcvAddressEntryRow(index, values);
1312     //--AgentGen BEGIN=ifRcvAddressEntry::createRow
1313
//--AgentGen END
1314
return row;
1315    }
1316
1317    public synchronized void freeRow(MOTableRow row) {
1318     //--AgentGen BEGIN=ifRcvAddressEntry::freeRow
1319
//--AgentGen END
1320
}
1321  }
1322
1323  class IfRcvAddressEntryRow extends DefaultMOMutableRow2PC {
1324    public IfRcvAddressEntryRow(OID index, Variable[] values) {
1325      super(index, values);
1326    }
1327
1328    public Integer32 getIfRcvAddressStatus() {
1329      return (Integer32) getValue(idxIfRcvAddressStatus);
1330    }
1331
1332    public void setIfRcvAddressStatus(Integer32 newValue) {
1333      setValue(idxIfRcvAddressStatus, newValue);
1334    }
1335
1336    public Integer32 getIfRcvAddressType() {
1337      return (Integer32) getValue(idxIfRcvAddressType);
1338    }
1339
1340    public void setIfRcvAddressType(Integer32 newValue) {
1341      setValue(idxIfRcvAddressType, newValue);
1342    }
1343
1344
1345     //--AgentGen BEGIN=ifRcvAddressEntry::RowFactory
1346
//--AgentGen END
1347
}
1348
1349
1350
1351//--AgentGen BEGIN=_METHODS
1352
//--AgentGen END
1353

1354//--AgentGen BEGIN=_CLASSES
1355
//--AgentGen END
1356

1357//--AgentGen BEGIN=_END
1358
//--AgentGen END
1359
}
1360
1361
1362
Popular Tags