rasn_mib/
lib.rs

1#![doc = include_str!("../README.md")]
2#![no_std]
3
4extern crate alloc;
5use alloc::string::ToString;
6pub mod address_family_numbers;
7
8use alloc::{vec, vec::Vec};
9
10use rasn::types::*;
11use smi::{object_type, v2::*};
12
13/// Used to model textual information taken from the NVT ASCII character set. By
14/// convention, objects with this syntax are declared as having `SIZE (0...255)`
15pub type DisplayString = OctetString;
16/// This data type is used to model media addresses.  For many types of media,
17/// this will be in a binary representation. For example, an ethernet address
18/// would be represented as a string of 6 octets.
19pub type PhysAddress = OctetString;
20
21pub const MIB: &Oid = Oid::ISO_IDENTIFIED_ORGANISATION_DOD_INTERNET_MGMT_MIB;
22pub const SYSTEM: &Oid = Oid::ISO_IDENTIFIED_ORGANISATION_DOD_INTERNET_MGMT_MIB_SYSTEM;
23pub const INTERFACES: &Oid = Oid::ISO_IDENTIFIED_ORGANISATION_DOD_INTERNET_MGMT_MIB_INTERFACES;
24pub const AT: &Oid = Oid::ISO_IDENTIFIED_ORGANISATION_DOD_INTERNET_MGMT_MIB_AT;
25pub const IP: &Oid = Oid::ISO_IDENTIFIED_ORGANISATION_DOD_INTERNET_MGMT_MIB_IP;
26pub const ICMP: &Oid = Oid::ISO_IDENTIFIED_ORGANISATION_DOD_INTERNET_MGMT_MIB_ICMP;
27pub const TCP: &Oid = Oid::ISO_IDENTIFIED_ORGANISATION_DOD_INTERNET_MGMT_MIB_TCP;
28pub const UDP: &Oid = Oid::ISO_IDENTIFIED_ORGANISATION_DOD_INTERNET_MGMT_MIB_UDP;
29pub const EGP: &Oid = Oid::ISO_IDENTIFIED_ORGANISATION_DOD_INTERNET_MGMT_MIB_EGP;
30pub const TRANSMISSION: &Oid = Oid::ISO_IDENTIFIED_ORGANISATION_DOD_INTERNET_MGMT_MIB_TRANSMISSION;
31pub const SNMP: &Oid = Oid::ISO_IDENTIFIED_ORGANISATION_DOD_INTERNET_MGMT_MIB_SNMP;
32
33/// The System Group
34///
35/// Implementation of the System group is mandatory for all systems. If an agent
36/// is not configured to have a value for any of these variables, a string of
37/// length 0 is returned.
38pub mod system {
39    use super::*;
40
41    object_type! {
42        /// A textual description of the entity.  This value should include the
43        /// full name and version identification of the system's hardware type,
44        /// software operating-system, and networking software.
45        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
46        pub struct Descr(pub OctetString);
47        access: ReadOnly,
48        status: Current,
49        value = [1, 3, 6, 1, 2, 1, 1, 1];
50
51        /// The vendor's authoritative identification of the network management
52        /// subsystem contained in the entity. This value is allocated within
53        /// the SMI enterprises subtree (1.3.6.1.4.1) and provides an easy and
54        /// unambiguous means for determining `what kind of box' is being
55        /// managed. For example, if vendor "Flintstones, Inc." was assigned the
56        /// subtree `1.3.6.1.4.1.4242`, it could assign the identifier
57        /// `1.3.6.1.4.1.4242.1.1` to its `Fred Router'.
58        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
59        pub struct ObjectId(pub ObjectName);
60        access: ReadOnly,
61        status: Current,
62        value = [1, 3, 6, 1, 2, 1, 1, 2];
63
64        /// The time (in hundredths of a second) since the network management
65        /// portion of the system was last re-initialized.
66        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
67        pub struct UpTime(pub TimeTicks);
68        access: ReadOnly,
69        status: Current,
70        value = [1, 3, 6, 1, 2, 1, 1, 3];
71
72        /// The textual identification of the contact person for this managed
73        /// node, together with information on how to contact this person. If no
74        /// contact information is known, the value is the zero-length string.
75        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
76        pub struct Contact(pub DisplayString);
77        access: ReadWrite,
78        status: Current,
79        value = [1, 3, 6, 1, 2, 1, 1, 4];
80
81        /// An administratively-assigned name for this managed node. By
82        /// convention, this is the node's fully-qualified domain name.
83        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
84        pub struct Name(pub DisplayString);
85        access: ReadWrite,
86        status: Current,
87        value = [1, 3, 6, 1, 2, 1, 1, 5];
88
89        /// The physical location of this node (e.g., "telephone closet,
90        /// 3rd floor").
91        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
92        pub struct Location(pub DisplayString);
93        access: ReadWrite,
94        status: Current,
95        value = [1, 3, 6, 1, 2, 1, 1, 6];
96
97        /// A value which indicates the set of services that this entity
98        /// primarily offers.
99        ///
100        /// The value is a sum.  This sum initially takes the value zero, Then,
101        /// for each layer, **L**, in the range 1 through 7, that this node
102        /// performs transactions for, 2 raised to (**L** - 1) is added to the
103        /// sum.  For example, a node which performs primarily routing functions
104        /// would have a value of 4 `2^(3-1)`. In contrast, a node which is a
105        /// host offering application services would have a value of 72
106        /// `2^(4-1) + 2^(7-1)`. Note that in the context of the Internet suite
107        /// of protocols, values should be calculated accordingly:
108        ///
109        /// | layer | functionality                       |
110        /// | ----- | ----------------------------------- |
111        /// | 1     | physical (e.g., repeaters)          |
112        /// | 2     | datalink/subnetwork (e.g., bridges) |
113        /// | 3     | internet (e.g., IP gateways)        |
114        /// | 4     | end-to-end  (e.g., IP hosts)        |
115        /// | 7     | applications (e.g., mail relays)    |
116        ///
117        /// For systems including OSI protocols, layers 5 and 6 may also
118        /// be counted.
119        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
120        pub struct Services(pub u8);
121        access: ReadOnly,
122        status: Current,
123        value = [1, 3, 6, 1, 2, 1, 1, 7];
124
125        /// The value of [`system::UpTime`] at the time of the most recent
126        /// change in state or value of any instance of sysORID.
127        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
128        pub struct OrLastChange(pub TimeTicks);
129        access: ReadOnly,
130        status: Current,
131        value = [1, 3, 6, 1, 2, 1, 1, 8];
132
133        /// The (conceptual) table listing the capabilities of the local SNMP
134        /// application acting as a command responder with respect to various
135        /// MIB modules. SNMP entities having dynamically-configurable support
136        /// of MIB modules will have a dynamically-varying number of
137        /// conceptual rows.
138        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
139        pub opaque struct OrTable(pub Vec<OrEntry>);
140        access: ReadOnly,
141        status: Current,
142        value = [1, 3, 6, 1, 2, 1, 1, 9];
143
144        /// An entry in the [`OrTable`].
145        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
146        pub struct OrEntry {
147            index: OrIndex,
148            id: OrId,
149            descr: OrDescr,
150            up_time: OrUpTime,
151        }
152        access: NotAccessible,
153        status: Current,
154        value = [1, 3, 6, 1, 2, 1, 1, 9, 1];
155
156        /// The auxiliary variable used for identifying instances of the
157        /// columnar objects in the [`OrTable`].
158        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
159        pub struct OrIndex(pub u32);
160        access: NotAccessible,
161        status: Current,
162        value = [1, 3, 6, 1, 2, 1, 1, 9, 1];
163
164        /// The auxiliary variable used for identifying instances of the
165        /// columnar objects in the [`OrTable`].
166        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
167        pub struct OrId(pub ObjectIdentifier);
168        access: ReadOnly,
169        status: Current,
170        value = [1, 3, 6, 1, 2, 1, 1, 9, 2];
171
172        /// A textual description of the capabilities identified by the
173        /// corresponding instance of [`OrId`].
174        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
175        pub struct OrDescr(pub DisplayString);
176        access: ReadOnly,
177        status: Current,
178        value = [1, 3, 6, 1, 2, 1, 1, 9, 3];
179
180        /// The value of [`system::UpTime`] at the time this conceptual row was
181        /// last instantiated.
182        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
183        pub struct OrUpTime(pub TimeTicks);
184        access: ReadOnly,
185        status: Current,
186        value = [1, 3, 6, 1, 2, 1, 1, 9, 4];
187    }
188}
189
190/// The Interfaces Group
191///
192/// Implementation of the Interfaces group is mandatory for all systems.
193pub mod interfaces {
194    use super::*;
195
196    /// An interface entry containing objects at the subnetwork layer and
197    /// below for a particular interface.
198    #[derive(Clone, Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
199    pub struct Entry {
200        pub index: Index,
201        pub descr: Descr,
202        pub r#type: Type,
203        pub mtu: Mtu,
204        pub speed: Speed,
205        pub phys_address: PhysAddress,
206        pub admin_status: AdminStatus,
207        pub oper_status: OperStatus,
208        pub last_change: LastChange,
209        pub in_octets: InOctets,
210        pub in_ucast_pkts: InUcastPkts,
211        pub in_n_ucast_pkts: InNUcastPkts,
212        pub in_discards: InDiscards,
213        pub in_errors: InErrors,
214        pub in_unknown_protos: InUnknownProtos,
215        pub out_octets: OutOctets,
216        pub out_ucast_pkts: OutUcastPkts,
217        pub out_n_ucast_pkts: OutNUcastPkts,
218        pub out_discards: OutDiscards,
219        pub out_errors: OutErrors,
220        pub out_q_len: OutQLen,
221        pub specific: Specific,
222    }
223
224    smi::common_impls!(
225        Entry,
226        Opaque,
227        ReadWrite,
228        Current,
229        [1, 3, 6, 1, 2, 1, 2, 2, 1]
230    );
231
232    impl core::convert::TryFrom<Opaque> for Entry {
233        type Error = rasn::error::DecodeError;
234
235        fn try_from(value: Opaque) -> Result<Self, Self::Error> {
236            rasn::ber::decode(value.as_ref())
237        }
238    }
239
240    impl core::convert::TryFrom<Entry> for Opaque {
241        type Error = rasn::error::EncodeError;
242
243        fn try_from(value: Entry) -> Result<Self, Self::Error> {
244            value.to_opaque()
245        }
246    }
247
248    impl rasn::Decode for Entry {
249        fn decode_with_tag_and_constraints<D: rasn::Decoder>(
250            decoder: &mut D,
251            tag: Tag,
252            constraints: Constraints,
253        ) -> Result<Self, D::Error> {
254            Opaque::decode_with_tag_and_constraints(decoder, tag, constraints).and_then(|opaque| {
255                let decoder = &mut rasn::ber::de::Decoder::new(
256                    opaque.as_ref(),
257                    rasn::ber::de::DecoderOptions::ber(),
258                );
259
260                Ok(Self {
261                    index: <_>::decode(decoder)?,
262                    descr: <_>::decode(decoder)?,
263                    r#type: <_>::decode(decoder)?,
264                    mtu: <_>::decode(decoder)?,
265                    speed: <_>::decode(decoder)?,
266                    phys_address: <_>::decode(decoder)?,
267                    admin_status: <_>::decode(decoder)?,
268                    oper_status: <_>::decode(decoder)?,
269                    last_change: <_>::decode(decoder)?,
270                    in_octets: <_>::decode(decoder)?,
271                    in_ucast_pkts: <_>::decode(decoder)?,
272                    in_n_ucast_pkts: <_>::decode(decoder)?,
273                    in_discards: <_>::decode(decoder)?,
274                    in_errors: <_>::decode(decoder)?,
275                    in_unknown_protos: <_>::decode(decoder)?,
276                    out_octets: <_>::decode(decoder)?,
277                    out_ucast_pkts: <_>::decode(decoder)?,
278                    out_n_ucast_pkts: <_>::decode(decoder)?,
279                    out_discards: <_>::decode(decoder)?,
280                    out_errors: <_>::decode(decoder)?,
281                    out_q_len: <_>::decode(decoder)?,
282                    specific: <_>::decode(decoder).unwrap_or_default(),
283                })
284            })
285        }
286    }
287
288    impl rasn::Encode for Entry {
289        fn encode_with_tag_and_constraints<'encoder, EN: rasn::Encoder<'encoder>>(
290            &self,
291            encoder: &mut EN,
292            tag: Tag,
293            constraints: Constraints,
294            identifier: Identifier,
295        ) -> Result<(), EN::Error> {
296            self.to_opaque()
297                .map_err(|e| {
298                    rasn::error::EncodeError::opaque_conversion_failed(
299                        e.to_string(),
300                        encoder.codec(),
301                    )
302                })?
303                .encode_with_tag_and_constraints(encoder, tag, constraints, identifier)
304        }
305    }
306
307    object_type! {
308        /// The number of network interfaces (regardless of their current state)
309        /// present on this system.
310        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
311        pub struct Number(pub Integer);
312        access: ReadOnly,
313        status: Current,
314        value = [1, 3, 6, 1, 2, 1, 2, 1];
315
316        /// A list of interface entries.  The number of entries is given by the
317        /// value of [`Number`].
318        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
319        pub opaque struct Table(pub Vec<Entry>);
320        access: ReadWrite,
321        status: Current,
322        value = [1, 3, 6, 1, 2, 1, 2, 2];
323
324        /// A unique value for each interface. Its value ranges between 1 and
325        /// the value of [`Number`]. The value for each interface must remain
326        /// constant at least from one re-initialization of the entity's network
327        /// management system to the next re-initialization.
328        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
329        pub struct Index(pub Integer);
330        access: ReadOnly,
331        status: Current,
332        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 1];
333
334        /// A textual string containing information about the interface. This
335        /// string should include the name of the manufacturer, the product name
336        /// and the version of the hardware interface.
337        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
338        pub struct Descr(pub DisplayString);
339        access: ReadOnly,
340        status: Current,
341        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 2];
342
343        /// The type of interface, distinguished according to the physical/link
344        /// protocol(s) immediately "below" the network layer in the
345        /// protocol stack.
346        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
347        pub struct Type(pub Integer);
348        access: ReadOnly,
349        status: Current,
350        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 3];
351
352        impl Type {
353            pub const OTHER: u64 = 1;
354            pub const REGULAR1822: u64 = 2;
355            pub const HDH1822: u64 = 3;
356            pub const DDN_X25: u64 = 4;
357            pub const RFC887_X25: u64 = 5;
358            pub const ETHERNET_CSMACD: u64 = 6;
359            pub const ISO88023_CSMACD: u64 = 7;
360            pub const ISO88024_TOKEN_BUS: u64 = 8;
361            pub const ISO88025_TOKEN_RING: u64 = 9;
362            pub const ISO88026_MAN: u64 = 10;
363            pub const STAR_LAN: u64 = 11;
364            pub const PROTEON_10MBIT: u64 = 12;
365            pub const PROTEON_80MBIT: u64 = 13;
366            pub const HYPERCHANNEL: u64 = 14;
367            pub const FDDI: u64 = 15;
368            pub const LAPB: u64 = 16;
369            pub const SDLC: u64 = 17;
370            pub const T1_CARRIER: u64 = 18;
371            pub const CEPT: u64 = 19;
372            pub const BASIC_ISDN: u64 = 20;
373            pub const PRIMARY_ISDN: u64 = 21;
374            pub const PROP_POINT_TO_POINT_SERIAL: u64 = 22;
375            pub const PPP: u64 = 23;
376            pub const SOFTWARE_LOOPBACK: u64 = 24;
377            pub const EON: u64 = 25;
378            pub const ETHERNET_3MBIT: u64 = 26;
379            pub const NSIP: u64 = 27;
380            pub const SLIP: u64 = 28;
381            pub const ULTRA: u64 = 29;
382            pub const DS3: u64 = 30;
383            pub const SIP: u64 = 31;
384            pub const FRAME_RELAY: u64 = 32;
385        }
386
387        /// The size of the largest datagram which can be sent/received on the
388        /// interface, specified in octets. For interfaces that are used for
389        /// transmitting network datagrams, this is the size of the largest
390        /// network datagram that can be sent on the interface.
391        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
392        pub struct Mtu(pub Integer);
393        access: ReadOnly,
394        status: Current,
395        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 4];
396
397        /// An estimate of the interface's current bandwidth in bits per second.
398        /// For interfaces which do not vary in bandwidth or for those where no
399        /// accurate estimation can be made, this object should contain the
400        /// nominal bandwidth.
401        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
402        pub struct Speed(pub Gauge32);
403        access: ReadOnly,
404        status: Current,
405        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 5];
406
407        /// The interface's address at the protocol layer immediately "below"
408        /// the network layer in the protocol stack.  For interfaces which do
409        /// not have such an address (e.g., a serial line), this object should
410        /// contain an octet string of zero length.
411        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
412        pub struct PhysAddress(pub super::PhysAddress);
413        access: ReadOnly,
414        status: Current,
415        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 6];
416
417        /// The desired state of the interface. The [`Self::TESTING`] state
418        /// indicates that no operational packets can be passed.
419        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
420        pub struct AdminStatus(pub Integer);
421        access: ReadWrite,
422        status: Current,
423        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 7];
424
425        impl AdminStatus {
426            pub const UP: u64 = 1;
427            pub const DOWN: u64 = 2;
428            pub const TESTING: u64 = 3;
429        }
430
431        /// The current operational state of the interface. The
432        /// [`Self::TESTING`] state indicates that no operational packets can
433        /// be passed.
434        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
435        pub struct OperStatus(pub Integer);
436        access: ReadOnly,
437        status: Current,
438        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 8];
439
440        impl OperStatus {
441            pub const UP: u64 = 1;
442            pub const DOWN: u64 = 2;
443            pub const TESTING: u64 = 3;
444        }
445
446        /// The value of [`system::UpTime`] at the time the interface entered
447        /// its current operational state.  If the current state was entered
448        /// prior to the last re-initialization of the local network management
449        /// subsystem, then this object contains a zero value.
450        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
451        pub struct LastChange(pub TimeTicks);
452        access: ReadOnly,
453        status: Current,
454        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 9];
455
456        /// The total number of octets received on the interface, including
457        /// framing characters.
458        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
459        pub struct InOctets(pub Counter32);
460        access: ReadOnly,
461        status: Current,
462        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 10];
463
464        /// The number of subnetwork-unicast packets delivered to a
465        /// higher-layer protocol.
466        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
467        pub struct InUcastPkts(pub Counter32);
468        access: ReadOnly,
469        status: Current,
470        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 11];
471
472        /// The number of non-unicast (i.e., subnetwork-broadcast or
473        /// subnetwork-multicast) packets delivered to a higher-layer protocol.
474        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
475        pub struct InNUcastPkts(pub Counter32);
476        access: ReadOnly,
477        status: Current,
478        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 12];
479
480        /// The number of inbound packets which were chosen to be discarded even
481        /// though no errors had been detected to prevent their being
482        /// deliverable to a higher-layer protocol. One possible reason for
483        /// discarding such a packet could be to free up buffer space.
484        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
485        pub struct InDiscards(pub Counter32);
486        access: ReadOnly,
487        status: Current,
488        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 13];
489
490        /// The number of inbound packets that contained errors preventing them
491        /// from being deliverable to a higher-layer protocol.
492        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
493        pub struct InErrors(pub Counter32);
494        access: ReadOnly,
495        status: Current,
496        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 14];
497
498        /// The number of packets received via the interface which were
499        /// discarded because of an unknown or unsupported protocol.
500        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
501        pub struct InUnknownProtos(pub Counter32);
502        access: ReadOnly,
503        status: Current,
504        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 15];
505
506        /// The total number of octets transmitted out of the interface,
507        /// including framing characters.
508        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
509        pub struct OutOctets(pub Counter32);
510        access: ReadOnly,
511        status: Current,
512        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 16];
513
514        /// The total number of packets that higher-level protocols requested be
515        /// transmitted to a subnetwork-unicast address, including those that
516        /// were discarded or not sent.
517        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
518        pub struct OutUcastPkts(pub Counter32);
519        access: ReadOnly,
520        status: Current,
521        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 17];
522
523        /// The total number of packets that higher-level protocols requested be
524        /// transmitted to a non-unicast (i.e., a subnetwork-broadcast or
525        /// subnetwork-multicast) address, including those that were discarded
526        /// or not sent.
527        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
528        pub struct OutNUcastPkts(pub Counter32);
529        access: ReadOnly,
530        status: Current,
531        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 18];
532
533        /// The number of outbound packets which were chosen to be discarded
534        /// even though no errors had been detected to prevent their being
535        /// transmitted. One possible reason for discarding such a packet could
536        /// be to free up buffer space.
537        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
538        pub struct OutDiscards(pub Counter32);
539        access: ReadOnly,
540        status: Current,
541        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 19];
542
543        /// The number of outbound packets that could not be transmitted because
544        /// of errors.
545        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
546        pub struct OutErrors(pub Counter32);
547        access: ReadOnly,
548        status: Current,
549        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 20];
550
551        /// The length of the output packet queue (in packets).
552        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
553        pub struct OutQLen(pub Gauge32);
554        access: ReadOnly,
555        status: Current,
556        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 21];
557
558        /// A reference to MIB definitions specific to the particular media
559        /// being used to realize the interface.  For example, if the interface
560        /// is realized by an ethernet, then the value of this object refers to
561        /// a document defining objects specific to ethernet.  If this
562        /// information is not present, its value should be set to the
563        /// `OBJECT IDENTIFIER { 0 0 }`, which is a syntactically valid object
564        /// identifier, and any conformant implementation of ASN.1 and BER must
565        /// be able to generate and recognize this value.
566        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
567        pub struct Specific(pub ObjectIdentifier);
568        access: ReadOnly,
569        status: Current,
570        value = [1, 3, 6, 1, 2, 1, 2, 2, 1, 22];
571
572        impl Default for Specific {
573            fn default() -> Self {
574                Self(ObjectIdentifier::new_unchecked(vec![0, 0].into()))
575            }
576        }
577    }
578}
579
580/// The Address Translation Group
581///
582/// Implementation of the Address Translation group is mandatory for all
583/// systems. Note however that this group is deprecated by MIB-II. That is, it
584/// is being included solely for compatibility with MIB-I nodes, and will most
585/// likely be excluded from MIB-III nodes.  From MIB-II and onwards, each
586/// network protocol group contains its own address translation tables.
587///
588/// The Address Translation group contains one table which is the union across
589/// all interfaces of the translation tables for converting a NetworkAddress
590/// (e.g., an IP address) into a subnetwork-specific address.  For lack of a
591/// better term, this document refers to such a subnetwork-specific address as a
592/// "physical" address.
593///
594/// Examples of such translation tables are: for broadcast media where ARP is in
595/// use, the translation table is equivalent to the ARP cache; or, on an X.25
596/// network where non-algorithmic translation to X.121 addresses is required,
597/// the translation table contains the NetworkAddress to X.121
598/// address equivalences.
599pub mod address {
600    use super::*;
601
602    object_type! {
603        /// The Address Translation tables contain the NetworkAddress to
604        /// "physical" address equivalences. Some interfaces do not use
605        /// translation tables for determining address equivalences (e.g.,
606        /// DDN-X.25 has an algorithmic method); if all interfaces are of this
607        /// type, then the Address Translation table is empty, i.e., has
608        /// zero entries.
609        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
610        pub opaque struct Table(pub Vec<Entry>);
611        access: NotAccessible,
612        status: Deprecated,
613        value = [1, 3, 6, 1, 2, 1, 3, 1];
614
615        /// Each entry contains one [`NetAddress`] to [`PhysAddress`] equivalence.
616        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
617        pub struct Entry {
618            pub index: Index,
619            pub phys_address: PhysAddress,
620            pub net_address: NetAddress,
621        }
622        access: NotAccessible,
623        status: Deprecated,
624        value = [1, 3, 6, 1, 2, 1, 3, 1, 1];
625
626
627        /// The interface on which this entry's equivalence is effective. The
628        /// interface identified by a particular value of this index is the same
629        /// interface as identified by the same value of [`interfaces::Index`].
630        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
631        pub struct Index(pub Integer);
632        access: ReadWrite,
633        status: Current,
634        value = [1, 3, 6, 1, 2, 1, 3, 1, 1, 1];
635
636        /// The media-dependent `physical' address.
637        ///
638        /// Setting this object to a null string (one of zero length) has the
639        /// effect of invaliding the corresponding entry in the [`Table`]
640        /// object. That is, it effectively disassociates the interface
641        /// identified with said entry from the mapping identified with said
642        /// entry. It is an implementation-specific matter as to whether the
643        /// agent removes an invalidated entry from the table. Accordingly,
644        /// management stations must be prepared to receive tabular information
645        /// from agents that corresponds to entries not currently in use. Proper
646        /// interpretation of such entries requires examination of the relevant
647        /// [`PhysAddress`] object.
648        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
649        pub struct PhysAddress(pub super::PhysAddress);
650        access: ReadWrite,
651        status: Current,
652        value = [1, 3, 6, 1, 2, 1, 3, 1, 1, 2];
653
654        /// The NetworkAddress (e.g., the IP address) corresponding to the
655        /// media-dependent [`PhysAddress`].
656        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
657        pub struct NetAddress(pub IpAddress);
658        access: ReadWrite,
659        status: Current,
660        value = [1, 3, 6, 1, 2, 1, 3, 1, 1, 3];
661    }
662}
663
664/// The Internet Protocol (IP) Group
665///
666/// Implementation of the IP group is mandatory for all systems.
667pub mod ip {
668    use super::*;
669
670    object_type! {
671        /// The indication of whether this entity is acting as an IP gateway in
672        /// respect to the forwarding of datagrams received by, but not
673        /// addressed to, this entity.  IP gateways forward datagrams. IP hosts
674        /// do not (except those source-routed via the host).
675        ///
676        /// Note that for some managed nodes, this object may take on only a
677        /// subset of the values possible. Accordingly, it is appropriate for an
678        /// agent to return a `badValue` response if a management station
679        /// attempts to change this object to an inappropriate value.
680        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
681        pub struct Forwarding(pub Integer);
682        access: ReadOnly,
683        status: Current,
684        value = [1, 3, 6, 1, 2, 1, 4, 1];
685
686        impl Forwarding {
687            pub const GATEWAY: u64 = 1;
688            pub const HOST: u64 = 2;
689        }
690
691        /// The default value inserted into the "Time-To-Live" field of the IP
692        /// header of datagrams originated at this entity, whenever a TTL value
693        /// is not supplied by the transport layer protocol.
694        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
695        pub struct DefaultTtl(pub Integer);
696        access: ReadWrite,
697        status: Current,
698        value = [1, 3, 6, 1, 2, 1, 4, 2];
699
700        /// The total number of input datagrams received from interfaces,
701        /// including those received in error.
702        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
703        pub struct InReceives(pub Counter32);
704        access: ReadOnly,
705        status: Current,
706        value = [1, 3, 6, 1, 2, 1, 4, 3];
707
708        /// The number of input datagrams discarded due to errors in their IP
709        /// headers, including bad checksums, version number mismatch, other
710        /// format errors, time-to-live exceeded, errors discovered in
711        /// processing their IP options, etc.
712        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
713        pub struct InHdrErrors(pub Counter32);
714        access: ReadOnly,
715        status: Current,
716        value = [1, 3, 6, 1, 2, 1, 4, 4];
717
718        /// The number of input datagrams discarded because the IP address in
719        /// their IP header's destination field was not a valid address to be
720        /// received at this entity. This count includes invalid addresses
721        /// (e.g., 0.0.0.0) and addresses of unsupported Classes
722        /// (e.g., Class E). For entities which are not IP Gateways and
723        /// therefore do not forward datagrams, this counter includes datagrams
724        /// discarded because the destination address was not a local address.
725        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
726        pub struct InAddrErrors(pub Counter32);
727        access: ReadOnly,
728        status: Current,
729        value = [1, 3, 6, 1, 2, 1, 4, 5];
730
731        /// The number of input datagrams for which this entity was not their
732        /// final IP destination, as a result of which an attempt was made to
733        /// find a route to forward them to that final destination. In entities
734        /// which do not act as IP Gateways, this counter will include only
735        /// those packets which were "Source-Routed" via this entity, and the
736        /// Source-Route option processing was successful.
737        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
738        pub struct ForwDatagrams(pub Counter32);
739        access: ReadOnly,
740        status: Current,
741        value = [1, 3, 6, 1, 2, 1, 4, 6];
742
743        /// The number of locally-addressed datagrams received successfully but
744        /// discarded because of an unknown or unsupported protocol.
745        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
746        pub struct InUnknownProtos(pub Counter32);
747        access: ReadOnly,
748        status: Current,
749        value = [1, 3, 6, 1, 2, 1, 4, 7];
750
751        /// The number of input IP datagrams for which no problems were
752        /// encountered to prevent their continued processing, but which were
753        /// discarded (e.g., for lack of buffer space).  Note that this counter
754        /// does not include any datagrams discarded while awaiting re-assembly.
755        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
756        pub struct InDiscards(pub Counter32);
757        access: ReadOnly,
758        status: Current,
759        value = [1, 3, 6, 1, 2, 1, 4, 8];
760
761        /// The total number of input datagrams successfully delivered to IP
762        /// user-protocols (including ICMP).
763        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
764        pub struct InDelivers(pub Counter32);
765        access: ReadOnly,
766        status: Current,
767        value = [1, 3, 6, 1, 2, 1, 4, 9];
768
769        /// The total number of IP datagrams which local IP user-protocols
770        /// (including ICMP) supplied to IP in requests for transmission. Note
771        /// that this counter does not include any datagrams counted
772        /// in [`ForwDatagrams`].
773        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
774        pub struct OutRequests(pub Counter32);
775        access: ReadOnly,
776        status: Current,
777        value = [1, 3, 6, 1, 2, 1, 4, 10];
778
779        /// The number of output IP datagrams for which no problem was
780        /// encountered to prevent their transmission to their destination, but
781        /// which were discarded (e.g., for lack of buffer space).  Note that
782        /// this counter would include datagrams counted in [`ForwDatagrams`] if
783        /// any such packets met this (discretionary) discard criterion.
784        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
785        pub struct OutDiscards(pub Counter32);
786        access: ReadOnly,
787        status: Current,
788        value = [1, 3, 6, 1, 2, 1, 4, 11];
789
790        /// The number of IP datagrams discarded because no route could be found
791        /// to transmit them to their destination. Note that this counter
792        /// includes any packets counted in [`ForwDatagrams`] which meet this
793        /// `no-route' criterion.  Note that this includes any datagrams which a
794        /// host cannot route because all of its default gateways are down.
795        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
796        pub struct OutNoRoutes(pub Counter32);
797        access: ReadOnly,
798        status: Current,
799        value = [1, 3, 6, 1, 2, 1, 4, 12];
800
801        /// The maximum number of seconds which received fragments are held
802        /// while they are awaiting reassembly at this entity.
803        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
804        pub struct ReasmTimeout(pub Integer);
805        access: ReadOnly,
806        status: Current,
807        value = [1, 3, 6, 1, 2, 1, 4, 13];
808
809        /// The number of IP fragments received which needed to be reassembled
810        /// at this entity.
811        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
812        pub struct ReasmReqds(pub Counter32);
813        access: ReadOnly,
814        status: Current,
815        value = [1, 3, 6, 1, 2, 1, 4, 14];
816
817        /// The number of IP datagrams successfully re-assembled.
818        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
819        pub struct ReasmOks(pub Counter32);
820        access: ReadOnly,
821        status: Current,
822        value = [1, 3, 6, 1, 2, 1, 4, 15];
823
824        /// The number of failures detected by the IP re-assembly algorithm
825        /// (for whatever reason: timed out, errors, etc). Note that this is
826        /// not necessarily a count of discarded IP fragments since some
827        /// algorithms (notably the algorithm in RFC 815) can lose track of the
828        /// number of fragments by combining them as they are received.
829        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
830        pub struct ReasmFails(pub Counter32);
831        access: ReadOnly,
832        status: Current,
833        value = [1, 3, 6, 1, 2, 1, 4, 16];
834
835        /// The number of IP datagrams that have been successfully fragmented at
836        /// this entity.
837        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
838        pub struct FragOks(pub Counter32);
839        access: ReadOnly,
840        status: Current,
841        value = [1, 3, 6, 1, 2, 1, 4, 17];
842
843        /// The number of IP datagrams that have been discarded because they
844        /// needed to be fragmented at this entity but could not be, e.g.,
845        /// because their "Don't Fragment" flag was set.
846        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
847        pub struct FragFails(pub Counter32);
848        access: ReadOnly,
849        status: Current,
850        value = [1, 3, 6, 1, 2, 1, 4, 18];
851
852        /// The number of IP datagram fragments that have been generated as a
853        /// result of fragmentation at this entity.
854        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
855        pub struct FragCreates(pub Counter32);
856        access: ReadOnly,
857        status: Current,
858        value = [1, 3, 6, 1, 2, 1, 4, 19];
859
860        /// The table of addressing information relevant to this entity's
861        /// IP addresses.
862        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
863        pub opaque struct AddrTable(pub Vec<AddrEntry>);
864        access: ReadOnly,
865        status: Current,
866        value = [1, 3, 6, 1, 2, 1, 4, 20];
867
868        /// The addressing information for one of this entity's IP addresses.
869        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
870        pub struct AddrEntry {
871            pub ad_ent_addr: AdEntAddr,
872            pub ad_ent_if_index: AdEntIfIndex,
873            pub ad_ent_net_mask: AdEntNetMask,
874            pub ad_ent_bcast_addr: AdEntBcastAddr,
875        }
876        access: ReadWrite,
877        status: Current,
878        value = [1, 3, 6, 1, 2, 1, 4, 20, 1];
879
880        /// The IP address to which this entry's addressing
881        /// information pertains.
882        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
883        pub struct AdEntAddr(pub IpAddress);
884        access: ReadOnly,
885        status: Current,
886        value = [1, 3, 6, 1, 2, 1, 4, 20, 1, 1];
887
888        /// The index value which uniquely identifies the interface to which
889        /// this entry is applicable. The interface identified by a particular
890        /// value of this index is the same interface as identified by the same
891        /// value of [`interfaces::Index`].
892        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
893        pub struct AdEntIfIndex(pub Integer);
894        access: ReadOnly,
895        status: Current,
896        value = [1, 3, 6, 1, 2, 1, 4, 20, 1, 2];
897
898        /// The subnet mask associated with the IP address of this entry. The
899        /// value of the mask is an IP address with all the network bits set to
900        /// 1 and all the hosts bits set to 0.
901        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
902        pub struct AdEntNetMask(pub IpAddress);
903        access: ReadOnly,
904        status: Current,
905        value = [1, 3, 6, 1, 2, 1, 4, 20, 1, 3];
906
907        /// The value of the least-significant bit in the IP broadcast address
908        /// used for sending datagrams on the (logical) interface associated
909        /// with the IP address of this entry.
910        ///
911        /// For example, when the Internet standard all-ones broadcast address
912        /// is used, the value will be 1.  This value applies to both the subnet
913        /// and network broadcasts addresses used by the entity on this
914        /// (logical) interface.
915        ///
916        /// The value of the least-significant bit in the
917        /// IP broadcast address used for sending datagrams on the (logical)
918        /// interface associated with the IP address of this entry.
919        ///
920        /// For example, when the Internet standard all-ones broadcast address
921        /// is used, the value will be 1. This value applies to both the subnet
922        /// and network broadcasts addresses used by the entity on this
923        /// (logical) interface.
924        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
925        pub struct AdEntBcastAddr(pub Integer);
926        access: ReadOnly,
927        status: Current,
928        value = [1, 3, 6, 1, 2, 1, 4, 20, 1, 4];
929
930        /// The size of the largest IP datagram which this entity can
931        /// re-assemble from incoming IP fragmented datagrams received on
932        /// this interface.
933        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
934        pub struct AdEntReasmMaxSize(pub u16);
935        access: ReadOnly,
936        status: Current,
937        value = [1, 3, 6, 1, 2, 1, 4, 20, 1, 5];
938
939        /// This entity's IP Routing table.
940        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
941        pub opaque struct RoutingTable(pub Vec<RouteEntry>);
942        access: ReadOnly,
943        status: Current,
944        value = [1, 3, 6, 1, 2, 1, 4, 21];
945
946        /// A router to a particular destination.
947        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
948        pub struct RouteEntry {
949            pub route_dest: RouteDest,
950            pub route_if_index: RouteIfIndex,
951            pub route_metric_1: RouteMetric1,
952            pub route_metric_2: RouteMetric2,
953            pub route_metric_3: RouteMetric3,
954            pub route_metric_4: RouteMetric4,
955            pub route_next_hop: RouteNextHop,
956            pub route_type: RouteType,
957            pub route_proto: RouteProto,
958            pub route_age: RouteAge,
959            pub route_mask: RouteMask,
960            pub route_metric_5: RouteMetric5,
961            pub route_info: RouteInfo,
962        }
963        access: ReadWrite,
964        status: Current,
965        value = [1, 3, 6, 1, 2, 1, 4, 21, 1];
966
967        /// The destination IP address of this route. An entry with a value of
968        /// 0.0.0.0 is considered a default route. Multiple routes to a single
969        /// destination can appear in the table, but access to such multiple
970        /// entries is dependent on the table-access mechanisms defined by the
971        /// network management protocol in use.
972        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
973        pub struct RouteDest(pub IpAddress);
974        access: ReadWrite,
975        status: Current,
976        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 1];
977
978        /// The index value which uniquely identifies the local interface
979        /// through which the next hop of this route should be reached. The
980        /// interface identified by a particular value of this index is the same
981        /// interface as identified by the same value of [`interfaces::Index`].
982        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
983        pub struct RouteIfIndex(pub Integer);
984        access: ReadWrite,
985        status: Current,
986        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 2];
987
988        /// The primary routing metric for this route. The semantics of this
989        /// metric are determined by the routing-protocol specified in the
990        /// route's ipRouteProto value. If this metric is not used, its value
991        /// should be set to -1.
992        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
993        pub struct RouteMetric1(pub Integer);
994        access: ReadWrite,
995        status: Current,
996        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 3];
997
998        /// An alternate routing metric for this route. The semantics of this
999        /// metric are determined by the routing-protocol specified in the
1000        /// route's [`RouteProto`] value.  If this metric is not used, its value
1001        /// should be set to -1.
1002        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1003        pub struct RouteMetric2(pub Integer);
1004        access: ReadWrite,
1005        status: Current,
1006        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 4];
1007
1008        /// An alternate routing metric for this route. The semantics of this
1009        /// metric are determined by the routing-protocol specified in the
1010        /// route's [`RouteProto`] value.  If this metric is not used, its value
1011        /// should be set to -1.
1012        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1013        pub struct RouteMetric3(pub Integer);
1014        access: ReadWrite,
1015        status: Current,
1016        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 5];
1017
1018        /// An alternate routing metric for this route. The semantics of this
1019        /// metric are determined by the routing-protocol specified in the
1020        /// route's [`RouteProto`] value.  If this metric is not used, its value
1021        /// should be set to -1.
1022        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1023        pub struct RouteMetric4(pub Integer);
1024        access: ReadWrite,
1025        status: Current,
1026        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 6];
1027
1028        /// The IP address of the next hop of this route.  (In the case of a
1029        /// route bound to an interface which is realized via a broadcast media,
1030        /// the value of this field is the agent's IP address on
1031        /// that interface.)
1032        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1033        pub struct RouteNextHop(pub IpAddress);
1034        access: ReadWrite,
1035        status: Current,
1036        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 7];
1037
1038        /// The type of route.  Note that the values [`Self::DIRECT`] and
1039        /// [`Self::INDIRECT`] refer to the notion of direct and indirect
1040        /// routing in the IP architecture.
1041        ///
1042        /// Setting this object to the value [`Self::INVALID`] has the effect of
1043        /// invalidating the corresponding entry in the [`RouteTable`] object.
1044        /// That is, it effectively disassociates the destination identified
1045        /// with said entry from the route identified with said entry.  It is an
1046        /// implementation-specific matter as to whether the agent removes an
1047        /// invalidated entry from the table.  Accordingly, management stations
1048        /// must be prepared to receive tabular information from agents that
1049        /// corresponds to entries not currently in use.  Proper interpretation
1050        /// of such entries requires examination of the relevant
1051        /// [`RouteType`] object.
1052        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1053        pub struct RouteType(pub Integer);
1054        access: ReadWrite,
1055        status: Current,
1056        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 8];
1057
1058        impl RouteType {
1059            /// None of the other constants.
1060            pub const OTHER: u64 = 1;
1061            /// An invalidated route.
1062            pub const INVALID: u64 = 2;
1063            /// Route to directly connected (sub-)network
1064            pub const DIRECT: u64 = 3;
1065            /// Route to a non-local host/(sub-)network
1066            pub const REMOTE: u64 = 4;
1067        }
1068
1069        /// The routing mechanism via which this route was learned. Inclusion of
1070        /// values for gateway routing protocols is not intended to imply that
1071        /// hosts should support those protocols.
1072        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1073        pub struct RouteProto(pub Integer);
1074        access: ReadOnly,
1075        status: Current,
1076        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 9];
1077
1078        impl RouteProto {
1079            pub const OTHER: u64 = 1;
1080            pub const LOCAL: u64 = 2;
1081            pub const NETMGMT: u64 = 3;
1082            pub const ICMP: u64 = 4;
1083            pub const EGP: u64 = 5;
1084            pub const GGP: u64 = 6;
1085            pub const HELLO: u64 = 7;
1086            pub const RIP: u64 = 8;
1087            pub const IS_IS: u64 = 9;
1088            pub const ES_IS: u64 = 10;
1089            pub const CISCO_IGRP: u64 = 11;
1090            pub const BBN_SPF_IGP: u64 = 12;
1091            pub const OIGP: u64 = 13;
1092        }
1093
1094        /// The number of seconds since this route was last updated or otherwise
1095        /// determined to be correct. Note that no semantics of "too old" can be
1096        /// implied except through knowledge of the routing protocol by which
1097        /// the route was learned.
1098        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1099        pub struct RouteAge(pub Integer);
1100        access: ReadWrite,
1101        status: Current,
1102        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 10];
1103
1104        /// Indicate the mask to be logical-ANDed with the destination address
1105        /// before being compared to the value in the [`RouteDest`] field. For
1106        /// those systems that do not support arbitrary subnet masks, an agent
1107        /// constructs the value of the [`RouteMask`] by determining whether the
1108        /// value of the correspondent [`RouteDest`] field belong to a class-A,
1109        /// B, or C network, and then using one of:
1110        ///
1111        /// | mask          | network |
1112        /// | ------------- | ------- |
1113        /// | 255.0.0.0     | class-A |
1114        /// | 255.255.0.0   | class-B |
1115        /// | 255.255.255.0 | class-C |
1116        ///
1117        /// If the value of the ipRouteDest is 0.0.0.0 (a default route), then
1118        /// the mask value is also 0.0.0.0.  It should be noted that all IP
1119        /// routing subsystems implicitly use this mechanism.
1120        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1121        pub struct RouteMask(pub IpAddress);
1122        access: ReadWrite,
1123        status: Current,
1124        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 11];
1125
1126        /// An alternate routing metric for this route. The semantics of this
1127        /// metric are determined by the routing-protocol specified in the
1128        /// route's [`RouteProto`] value.  If this metric is not used, its value
1129        /// should be set to -1.
1130        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1131        pub struct RouteMetric5(pub Integer);
1132        access: ReadWrite,
1133        status: Current,
1134        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 12];
1135
1136        /// A reference to MIB definitions specific to the particular routing
1137        /// protocol which is responsible for this route, as determined by the
1138        /// value specified in the route's [`RouteProto`] value.  If this
1139        /// information is not present, its value should be set to the
1140        /// `OBJECT IDENTIFIER { 0 0 }`, which is a syntactically valid object
1141        /// identifier, and any conformant implementation of ASN.1 and BER must
1142        /// be able to generate and recognize this value.
1143        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1144        pub struct RouteInfo(pub ObjectIdentifier);
1145        access: ReadOnly,
1146        status: Current,
1147        value = [1, 3, 6, 1, 2, 1, 4, 21, 1, 13];
1148
1149        /// A reference to MIB definitions specific to the particular routing
1150        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1151        pub opaque struct NetToMediaTable(pub Vec<NetToMediaEntry>);
1152        access: NotAccessible,
1153        status: Current,
1154        value = [1, 3, 6, 1, 2, 1, 4, 22];
1155
1156        /// A reference to MIB definitions specific to the particular routing
1157        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1158        pub struct NetToMediaEntry {
1159            index: NetToMediaIndex,
1160            phys_address: NetToMediaPhysAddress,
1161            net_address: NetToMediaNetAddress,
1162            r#type: NetToMediaType,
1163        }
1164        access: NotAccessible,
1165        status: Current,
1166        value = [1, 3, 6, 1, 2, 1, 4, 22, 1];
1167
1168        /// The interface on which this entry's equivalence is effective. The
1169        /// interface identified by a particular value of this index is the same
1170        /// interface as identified by the same value of [`interfaces::Index`].
1171        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1172        pub struct NetToMediaIndex(pub Integer);
1173        access: ReadWrite,
1174        status: Current,
1175        value = [1, 3, 6, 1, 2, 1, 4, 22, 1, 1];
1176
1177        /// The media-dependent "physical" address.
1178        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1179        pub struct NetToMediaPhysAddress(pub PhysAddress);
1180        access: ReadWrite,
1181        status: Current,
1182        value = [1, 3, 6, 1, 2, 1, 4, 22, 1, 2];
1183
1184        /// The [`IpAddress`] corresponding to the media-dependent [`NetToMediaPhysAddress`].
1185        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1186        pub struct NetToMediaNetAddress(pub IpAddress);
1187        access: ReadWrite,
1188        status: Current,
1189        value = [1, 3, 6, 1, 2, 1, 4, 22, 1, 3];
1190
1191        /// The type of mapping.
1192        ///
1193        /// Setting this object to the value [`Self::INVALID`] has the effect of
1194        /// invalidating the corresponding entry in the ipNetToMediaTable. That
1195        /// is, it effectively disassociates the interface identified with said
1196        /// entry from the mapping identified with said entry. It is an
1197        /// implementation-specific matter as to whether the agent removes an
1198        /// invalidated entry from the table. Accordingly, management stations
1199        /// must be prepared to receive tabular information from agents that
1200        /// corresponds to entries not currently in use.  Proper interpretation
1201        /// of such entries requires examination of the relevant
1202        /// [`NetToMediaType`] object.
1203        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1204        pub struct NetToMediaType(pub Integer);
1205        access: ReadWrite,
1206        status: Current,
1207        value = [1, 3, 6, 1, 2, 1, 4, 22, 1, 4];
1208
1209        /// The number of routing entries which were chosen to be discarded even
1210        /// though they are valid. One possible reason for discarding such an
1211        /// entry could be to free-up buffer space for other routing entries.
1212        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1213        pub struct RoutingDiscards(pub Counter32);
1214        access: ReadWrite,
1215        status: Current,
1216        value = [1, 3, 6, 1, 2, 1, 4, 23];
1217    }
1218}
1219
1220/// The ICMP Group
1221///
1222/// Implementation of the ICMP group is mandatory for all systems.
1223pub mod icmp {
1224    use super::*;
1225
1226    object_type! {
1227        /// The total number of ICMP messages which the entity received. Note
1228        /// that this counter includes all those counted by [`InErrors`].
1229        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1230        pub struct InMsgs(pub Counter32);
1231        access: ReadOnly,
1232        status: Current,
1233        value = [1, 3, 6, 1, 2, 1, 5, 1];
1234
1235        /// The number of ICMP messages which the entity received but determined
1236        /// as having ICMP-specific errors (bad ICMP checksums,
1237        /// bad length, etc.).
1238        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1239        pub struct InErrors(pub Counter32);
1240        access: ReadOnly,
1241        status: Current,
1242        value = [1, 3, 6, 1, 2, 1, 5, 2];
1243
1244        /// The number of ICMP "Destination Unreachable" messages received.
1245        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1246        pub struct InDestUnreachs(pub Counter32);
1247        access: ReadOnly,
1248        status: Current,
1249        value = [1, 3, 6, 1, 2, 1, 5, 3];
1250
1251        /// The number of ICMP "Time Exceeded" messages received.
1252        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1253        pub struct InTimeExcds(pub Counter32);
1254        access: ReadOnly,
1255        status: Current,
1256        value = [1, 3, 6, 1, 2, 1, 5, 4];
1257
1258        /// The number of ICMP "Parameter Problem" messages received.
1259        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1260        pub struct InParmProbs(pub Counter32);
1261        access: ReadOnly,
1262        status: Current,
1263        value = [1, 3, 6, 1, 2, 1, 5, 5];
1264
1265        /// The number of ICMP "Source Quench" messages received.
1266        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1267        pub struct InSrcQuenchs(pub Counter32);
1268        access: ReadOnly,
1269        status: Current,
1270        value = [1, 3, 6, 1, 2, 1, 5, 6];
1271
1272        /// The number of ICMP "Redirect" messages received.
1273        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1274        pub struct InRedirects(pub Counter32);
1275        access: ReadOnly,
1276        status: Current,
1277        value = [1, 3, 6, 1, 2, 1, 5, 7];
1278
1279        /// The number of ICMP "Echo (request)" messages received.
1280        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1281        pub struct InEchos(pub Counter32);
1282        access: ReadOnly,
1283        status: Current,
1284        value = [1, 3, 6, 1, 2, 1, 5, 8];
1285
1286        /// The number of ICMP "Echo Reply" messages received.
1287        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1288        pub struct InEchosReps(pub Counter32);
1289        access: ReadOnly,
1290        status: Current,
1291        value = [1, 3, 6, 1, 2, 1, 5, 9];
1292
1293        /// The number of ICMP "Timestamp (request)" messages received.
1294        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1295        pub struct InTimestamps(pub Counter32);
1296        access: ReadOnly,
1297        status: Current,
1298        value = [1, 3, 6, 1, 2, 1, 5, 10];
1299
1300        /// The number of ICMP "Timestamp Reply" messages received.
1301        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1302        pub struct InTimestampsReps(pub Counter32);
1303        access: ReadOnly,
1304        status: Current,
1305        value = [1, 3, 6, 1, 2, 1, 5, 11];
1306
1307        /// The number of ICMP "Address Mask (request)" messages received.
1308        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1309        pub struct InAddrMasks(pub Counter32);
1310        access: ReadOnly,
1311        status: Current,
1312        value = [1, 3, 6, 1, 2, 1, 5, 12];
1313
1314        /// The number of ICMP "Address Mask Reply" messages received.
1315        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1316        pub struct InAddrMasksReps(pub Counter32);
1317        access: ReadOnly,
1318        status: Current,
1319        value = [1, 3, 6, 1, 2, 1, 5, 13];
1320
1321        /// The total number of ICMP messages which this entity attempted to
1322        /// send. Note that this counter includes all those counted
1323        /// by [`OutErrors`].
1324        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1325        pub struct OutMsgs(pub Counter32);
1326        access: ReadOnly,
1327        status: Current,
1328        value = [1, 3, 6, 1, 2, 1, 5, 14];
1329
1330        /// The number of ICMP messages which this entity did not send due to
1331        /// problems discovered within ICMP such as a lack of buffers. This
1332        /// value should not include errors discovered outside the ICMP layer
1333        /// such as the inability of IP to route the resultant datagram. In some
1334        /// implementations there may be no types of error which contribute to
1335        /// this counter's value.
1336        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1337        pub struct OutErrors(pub Counter32);
1338        access: ReadOnly,
1339        status: Current,
1340        value = [1, 3, 6, 1, 2, 1, 5, 15];
1341
1342        /// The number of ICMP "Destination Unreachable" messages sent.
1343        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1344        pub struct OutDestUnreachs(pub Counter32);
1345        access: ReadOnly,
1346        status: Current,
1347        value = [1, 3, 6, 1, 2, 1, 5, 16];
1348
1349        /// The number of ICMP "Time Exceeded" messages sent.
1350        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1351        pub struct OutTimeExcds(pub Counter32);
1352        access: ReadOnly,
1353        status: Current,
1354        value = [1, 3, 6, 1, 2, 1, 5, 17];
1355
1356        /// The number of ICMP "Parameter Problem" messages sent.
1357        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1358        pub struct OutParmProbs(pub Counter32);
1359        access: ReadOnly,
1360        status: Current,
1361        value = [1, 3, 6, 1, 2, 1, 5, 18];
1362
1363        /// The number of ICMP "Source Quench" messages sent.
1364        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1365        pub struct OutSrcQuenchs(pub Counter32);
1366        access: ReadOnly,
1367        status: Current,
1368        value = [1, 3, 6, 1, 2, 1, 5, 19];
1369
1370        /// The number of ICMP Redirect messages sent. For a host, this object
1371        /// will always be zero, since hosts do not send redirects.
1372        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1373        pub struct OutRedirects(pub Counter32);
1374        access: ReadOnly,
1375        status: Current,
1376        value = [1, 3, 6, 1, 2, 1, 5, 20];
1377
1378        /// The number of ICMP "Echo (request)" messages sent.
1379        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1380        pub struct OutEchos(pub Counter32);
1381        access: ReadOnly,
1382        status: Current,
1383        value = [1, 3, 6, 1, 2, 1, 5, 21];
1384
1385        /// The number of ICMP "Echo Reply" messages sent.
1386        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1387        pub struct OutEchosReps(pub Counter32);
1388        access: ReadOnly,
1389        status: Current,
1390        value = [1, 3, 6, 1, 2, 1, 5, 22];
1391
1392        /// The number of ICMP "Timestamp (request)" messages sent.
1393        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1394        pub struct OutTimestamps(pub Counter32);
1395        access: ReadOnly,
1396        status: Current,
1397        value = [1, 3, 6, 1, 2, 1, 5, 23];
1398
1399        /// The number of ICMP "Timestamp Reply" messages sent.
1400        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1401        pub struct OutTimestampsReps(pub Counter32);
1402        access: ReadOnly,
1403        status: Current,
1404        value = [1, 3, 6, 1, 2, 1, 5, 24];
1405
1406        /// The number of ICMP "Address Mask (request)" messages sent.
1407        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1408        pub struct OutAddrMasks(pub Counter32);
1409        access: ReadOnly,
1410        status: Current,
1411        value = [1, 3, 6, 1, 2, 1, 5, 25];
1412
1413        /// The number of ICMP "Address Mask Reply" messages sent.
1414        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1415        pub struct OutAddrMasksReps(pub Counter32);
1416        access: ReadOnly,
1417        status: Current,
1418        value = [1, 3, 6, 1, 2, 1, 5, 26];
1419    }
1420}
1421
1422/// The Transmission Control Protocol (TCP) Group
1423///
1424/// Implementation of the TCP group is mandatory for all systems that implement
1425/// the TCP.
1426///
1427/// Note that instances of object types that represent information about a
1428/// particular TCP connection are transient; they persist only as long as the
1429/// connection in question.
1430pub mod tcp {
1431    use super::*;
1432
1433    object_type! {
1434        /// The algorithm used to determine the timeout value used for
1435        /// retransmitting unacknowledged octets.
1436        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1437        pub struct RtoAlgorithm(pub Integer);
1438        access: ReadOnly,
1439        status: Current,
1440        value = [1, 3, 6, 1, 2, 1, 6, 1];
1441
1442        impl RtoAlgorithm {
1443            /// Unknown
1444            pub const OTHER: u64 = 1;
1445            /// A constant RTO
1446            pub const CONSTANT: u64 = 2;
1447            /// MIL-STD-1778
1448            pub const RSRE: u64 = 3;
1449            /// Van Jacobson's algorithm
1450            pub const VANJ: u64 = 4;
1451        }
1452
1453        /// The minimum value permitted by a TCP implementation for the
1454        /// retransmission timeout, measured in milliseconds.  More refined
1455        /// semantics for objects of this type depend upon the algorithm used to
1456        /// determine the retransmission timeout.  In particular, when the
1457        /// timeout algorithm is [`RtoAlgorithm::RSRE`], an object of this type
1458        /// has the semantics of the `LBOUND` quantity described in RFC 793.
1459        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1460        pub struct RtoMin(pub Integer);
1461        access: ReadOnly,
1462        status: Current,
1463        value = [1, 3, 6, 1, 2, 1, 6, 2];
1464
1465        /// The maximum value permitted by a TCP implementation for the
1466        /// retransmission timeout, measured in milliseconds.  More refined
1467        /// semantics for objects of this type depend upon the algorithm used to
1468        /// determine the retransmission timeout. In particular, when the
1469        /// timeout algorithm is [`RtoAlgorithm::RSRE`], an object of this type
1470        /// has the semantics of the `UBOUND` quantity described in RFC 793.
1471        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1472        pub struct RtoMax(pub Integer);
1473        access: ReadOnly,
1474        status: Current,
1475        value = [1, 3, 6, 1, 2, 1, 6, 3];
1476
1477        /// The limit on the total number of TCP connections the entity can
1478        /// support. In entities where the maximum number of connections is
1479        /// dynamic, this object should contain the value `-1`.
1480        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1481        pub struct MaxConn(pub Integer);
1482        access: ReadOnly,
1483        status: Current,
1484        value = [1, 3, 6, 1, 2, 1, 6, 4];
1485
1486        /// The number of times TCP connections have made a direct transition to
1487        /// the `SYN-SENT` state from the `CLOSED` state.
1488        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1489        pub struct ActiveOpens(pub Counter32);
1490        access: ReadOnly,
1491        status: Current,
1492        value = [1, 3, 6, 1, 2, 1, 6, 5];
1493
1494        /// The number of times TCP connections have made a direct transition to
1495        /// the `SYN-RCVD` state from the `LISTEN` state.
1496        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1497        pub struct PassiveOpens(pub Counter32);
1498        access: ReadOnly,
1499        status: Current,
1500        value = [1, 3, 6, 1, 2, 1, 6, 6];
1501
1502        /// The number of times TCP connections have made a direct transition to
1503        /// the `CLOSED` state from either the `SYN-SENT` state or the
1504        /// `SYN-RCVD` state, plus the number of times TCP connections have made
1505        /// a direct transition to the `LISTEN` state from the `SYN-RCVD` state.
1506        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1507        pub struct AttemptsFails(pub Counter32);
1508        access: ReadOnly,
1509        status: Current,
1510        value = [1, 3, 6, 1, 2, 1, 6, 7];
1511
1512        /// The number of times TCP connections have made a direct transition to
1513        /// the `CLOSED` state from either the `ESTABLISHED` state or the
1514        /// `CLOSE-WAIT` state.
1515        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1516        pub struct EstabResets(pub Counter32);
1517        access: ReadOnly,
1518        status: Current,
1519        value = [1, 3, 6, 1, 2, 1, 6, 8];
1520
1521        /// The number of TCP connections for which the current state is either
1522        /// `ESTABLISHED` or `CLOSE-WAIT`.
1523        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1524        pub struct CurrEstab(pub Gauge32);
1525        access: ReadOnly,
1526        status: Current,
1527        value = [1, 3, 6, 1, 2, 1, 6, 9];
1528
1529        /// The total number of segments received, including those received in
1530        /// error. This count includes segments received on currently
1531        /// established connections.
1532        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1533        pub struct InSegs(pub Counter32);
1534        access: ReadOnly,
1535        status: Current,
1536        value = [1, 3, 6, 1, 2, 1, 6, 10];
1537
1538        /// The total number of segments sent, including those on current
1539        /// connections but excluding those containing only
1540        /// retransmitted octets.
1541        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1542        pub struct OutSegs(pub Counter32);
1543        access: ReadOnly,
1544        status: Current,
1545        value = [1, 3, 6, 1, 2, 1, 6, 11];
1546
1547        /// The total number of segments retransmitted - that is, the number of
1548        /// TCP segments transmitted containing one or more previously
1549        /// transmitted octets.
1550        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1551        pub struct RetransSegs(pub Counter32);
1552        access: ReadOnly,
1553        status: Current,
1554        value = [1, 3, 6, 1, 2, 1, 6, 12];
1555
1556        /// A table containing TCP connection-specific information.
1557        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1558        pub opaque struct ConnTable(pub Vec<ConnEntry>);
1559        access: NotAccessible,
1560        status: Current,
1561        value = [1, 3, 6, 1, 2, 1, 6, 13];
1562
1563        /// Information about a particular current TCP connection.  An object of
1564        /// this type is transient, in that it ceases to exist when (or soon
1565        /// after) the connection makes the transition to the `CLOSED` state.
1566        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1567        pub struct ConnEntry {
1568            state: ConnState,
1569            local_address: ConnLocalAddress,
1570            local_port: ConnLocalPort,
1571            rem_address: ConnRemAddress,
1572            rem_port: ConnRemPort,
1573
1574        }
1575        access: NotAccessible,
1576        status: Current,
1577        value = [1, 3, 6, 1, 2, 1, 6, 13, 1];
1578
1579        /// The state of this TCP connection.
1580        ///
1581        /// The only value which may be set by a management station is
1582        /// [`Self::DELETE_TCB`]. Accordingly, it is appropriate for an agent to
1583        /// return a `badValue` response if a management station attempts to set
1584        /// this object to any other value.
1585        ///
1586        /// If a management station sets this object to the value
1587        /// [`Self::DELETE_TCB`], then this has the effect of deleting the TCB
1588        /// (as defined in RFC 793) of the corresponding connection on the
1589        /// managed node, resulting in immediate termination of the connection.
1590        ///
1591        /// As an implementation-specific option, a RST segment may be sent from
1592        /// the managed node to the other TCP endpoint (note however that RST
1593        /// segments are not sent reliably).
1594        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1595        pub struct ConnState(pub Integer);
1596        access: ReadOnly,
1597        status: Current,
1598        value = [1, 3, 6, 1, 2, 1, 6, 13, 1, 1];
1599
1600        impl ConnState {
1601            pub const CLOSED: u64 = 1;
1602            pub const LISTEN: u64 = 2;
1603            pub const SYN_SENT: u64 = 3;
1604            pub const SYN_RECEIVED: u64 = 4;
1605            pub const ESTABLISHED: u64 = 5;
1606            pub const FIN_WAIT1: u64 = 6;
1607            pub const FIN_WAIT2: u64 = 7;
1608            pub const CLOSE_WAIT: u64 = 8;
1609            pub const LAST_ACK: u64 = 9;
1610            pub const CLOSING: u64 = 10;
1611            pub const TIME_WAIT: u64 = 11;
1612            pub const DELETE_TCB: u64 = 12;
1613        }
1614
1615        /// The local IP address for this TCP connection.  In the case of a
1616        /// connection in the `LISTEN` state which is willing to accept
1617        /// connections for any IP interface associated with the node, the value
1618        /// 0.0.0.0 is used.
1619        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1620        pub struct ConnLocalAddress(pub IpAddress);
1621        access: ReadOnly,
1622        status: Current,
1623        value = [1, 3, 6, 1, 2, 1, 6, 13, 1, 2];
1624
1625        /// The local port number for this TCP connection.
1626        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1627        pub struct ConnLocalPort(pub u16);
1628        access: ReadOnly,
1629        status: Current,
1630        value = [1, 3, 6, 1, 2, 1, 6, 13, 1, 3];
1631
1632        /// The remote IP address for this TCP connection.
1633        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1634        pub struct ConnRemAddress(pub IpAddress);
1635        access: ReadOnly,
1636        status: Current,
1637        value = [1, 3, 6, 1, 2, 1, 6, 13, 1, 4];
1638
1639        /// The remote port number for this TCP connection.
1640        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1641        pub struct ConnRemPort(pub u16);
1642        access: ReadOnly,
1643        status: Current,
1644        value = [1, 3, 6, 1, 2, 1, 6, 13, 1, 5];
1645
1646        /// The total number of segments received in error
1647        /// (e.g., bad TCP checksums).
1648        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1649        pub struct InErrs(pub Counter32);
1650        access: ReadOnly,
1651        status: Current,
1652        value = [1, 3, 6, 1, 2, 1, 6, 14];
1653
1654        /// The number of TCP segments sent containing the `RST` flag
1655        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1656        pub struct OutRsts(pub Counter32);
1657        access: ReadOnly,
1658        status: Current,
1659        value = [1, 3, 6, 1, 2, 1, 6, 15];
1660    }
1661}
1662
1663/// The User Datagram Protocol (UDP) Group
1664///
1665/// Implementation of the UDP group is mandatory for all systems which implement
1666/// the UDP.
1667pub mod udp {
1668    use super::*;
1669
1670    object_type! {
1671        /// The total number of UDP datagrams delivered to UDP users.
1672        /// Discontinuities in the value of this counter can occur at
1673        /// re-initialization of the management system, and at other times as
1674        /// indicated by discontinuities in the value of `sysUpTime`.
1675        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1676        pub struct InDatagrams(pub Counter32);
1677        access: ReadOnly,
1678        status: Current,
1679        value = [1, 3, 6, 1, 2, 1, 7, 1];
1680
1681        /// The total number of received UDP datagrams for which there was no
1682        /// application at the destination port.
1683        ///
1684        /// Discontinuities in the value of this counter can occur at
1685        /// re-initialization of the management system, and at other times as
1686        /// indicated by discontinuities in the value of `sysUpTime`.
1687        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1688        pub struct NoPorts(pub Counter32);
1689        access: ReadOnly,
1690        status: Current,
1691        value = [1, 3, 6, 1, 2, 1, 7, 2];
1692
1693        /// The number of received UDP datagrams that could not be delivered for
1694        /// reasons other than the lack of an application at the
1695        /// destination port.
1696        ///
1697        /// Discontinuities in the value of this counter can occur at
1698        /// re-initialization of the management system, and at other times as
1699        /// indicated by discontinuities in the value of sysUpTime.
1700        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1701        pub struct InErrors(pub Counter32);
1702        access: ReadOnly,
1703        status: Current,
1704        value = [1, 3, 6, 1, 2, 1, 7, 3];
1705
1706        /// The total number of UDP datagrams sent from this entity.
1707        ///
1708        /// Discontinuities in the value of this counter can occur at
1709        /// re-initialization of the management system, and at other times as
1710        /// indicated by discontinuities in the value of sysUpTime.
1711        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1712        pub struct OutDatagrams(pub Counter32);
1713        access: ReadOnly,
1714        status: Current,
1715        value = [1, 3, 6, 1, 2, 1, 7, 4];
1716
1717        /// The total number of UDP datagrams delivered to UDP users, for
1718        /// devices that can receive more than 1 million UDP datagrams
1719        /// per second.
1720        ///
1721        /// Discontinuities in the value of this counter can occur at
1722        /// re-initialization of the management system, and at other times as
1723        /// indicated by discontinuities in the value of sysUpTime.
1724        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1725        pub struct HcInDatagrams(pub Counter64);
1726        access: ReadOnly,
1727        status: Current,
1728        value = [1, 3, 6, 1, 2, 1, 7, 8];
1729
1730        /// The total number of UDP datagrams sent from this entity, for devices
1731        /// that can transmit more than 1 million UDP datagrams per second.
1732        ///
1733        /// Discontinuities in the value of this counter can occur at
1734        /// re-initialization of the management system, and at other times as
1735        /// indicated by discontinuities in the value of sysUpTime.
1736        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1737        pub struct HcOutDatagrams(pub Counter64);
1738        access: ReadOnly,
1739        status: Current,
1740        value = [1, 3, 6, 1, 2, 1, 7, 9];
1741
1742    }
1743}
1744
1745/// the EGP (Exterior Gateway Protocol) group
1746///
1747/// Implementation of the EGP group is mandatory for all
1748/// systems which implement the EGP.
1749pub mod egp {
1750    use super::*;
1751
1752    object_type! {
1753        /// The number of EGP messages received without error.
1754        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1755        pub struct InMsgs(pub Counter32);
1756        access: ReadOnly,
1757        status: Obsolete,
1758        value = [1, 3, 6, 1, 2, 1, 8, 1];
1759
1760        /// The number of EGP messages received that proved to be in error.
1761        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1762        pub struct InErrors(pub Counter32);
1763        access: ReadOnly,
1764        status: Obsolete,
1765        value = [1, 3, 6, 1, 2, 1, 8, 2];
1766
1767        /// The total number of locally generated EGP messages.
1768        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1769        pub struct OutMsgs(pub Counter32);
1770        access: ReadOnly,
1771        status: Obsolete,
1772        value = [1, 3, 6, 1, 2, 1, 8, 3];
1773
1774        /// The number of locally generated EGP messages not sent due to
1775        /// resource limitations within an EGP entity.
1776        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1777        pub struct OutErrors(pub Counter32);
1778        access: ReadOnly,
1779        status: Obsolete,
1780        value = [1, 3, 6, 1, 2, 1, 8, 4];
1781
1782        /// The EGP neighbor table contains information about this entity's
1783        /// EGP neighbors.
1784        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1785        pub opaque struct NeighTable(pub Vec<NeighEntry>);
1786        access: ReadOnly,
1787        status: Obsolete,
1788        value = [1, 3, 6, 1, 2, 1, 8, 5];
1789
1790        /// Information about this entity's relationship with a particular
1791        /// EGP neighbor.
1792        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1793        pub struct NeighEntry {
1794            state: NeighState,
1795            addr: NeighAddr,
1796            r#as: NeighAs,
1797            in_msgs: NeighInMsgs,
1798            in_errs: NeighInErrs,
1799            out_msgs: NeighOutMsgs,
1800            out_errs: NeighOutErrs,
1801            in_err_msgs: NeighInErrMsgs,
1802            out_err_msgs: NeighOutErrMsgs,
1803            state_ups: NeighStateUps,
1804            state_downs: NeighStateDowns,
1805            interval_hello: NeighIntervalHello,
1806            interval_poll: NeighIntervalPoll,
1807            mode: NeighMode,
1808            event_trigger: NeighEventTrigger,
1809        }
1810        access: ReadOnly,
1811        status: Obsolete,
1812        value = [1, 3, 6, 1, 2, 1, 8, 5, 1];
1813
1814        /// The EGP state of the local system with respect to this entry's EGP
1815        /// neighbor. Each EGP state is represented by a value that is one
1816        /// greater than the numerical value associated with said state in
1817        /// RFC 904.
1818        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1819        pub struct NeighState(pub Integer);
1820        access: ReadOnly,
1821        status: Obsolete,
1822        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 1];
1823
1824        impl NeighState {
1825            pub const IDLE: u64 = 1;
1826            pub const ACQUISITION: u64 = 2;
1827            pub const DOWN: u64 = 3;
1828            pub const UP: u64 = 4;
1829            pub const CEASE: u64 = 5;
1830        }
1831
1832        /// The IP address of this entry's EGP neighbor.
1833        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1834        pub struct NeighAddr(pub IpAddress);
1835        access: ReadOnly,
1836        status: Obsolete,
1837        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 2];
1838
1839        /// The autonomous system of this EGP peer. Zero should be specified if
1840        /// the autonomous system number of the neighbor is not yet known.
1841        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1842        pub struct NeighAs(pub Integer);
1843        access: ReadOnly,
1844        status: Obsolete,
1845        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 3];
1846
1847        /// The number of EGP messages received without error from this
1848        /// EGP peer.
1849        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1850        pub struct NeighInMsgs(pub Counter32);
1851        access: ReadOnly,
1852        status: Obsolete,
1853        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 4];
1854
1855        /// The number of EGP messages received from this EGP peer that proved
1856        /// to be in error (e.g., bad EGP checksum).
1857        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1858        pub struct NeighInErrs(pub Counter32);
1859        access: ReadOnly,
1860        status: Obsolete,
1861        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 5];
1862
1863        /// The number of locally generated EGP messages to this EGP peer.
1864        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1865        pub struct NeighOutMsgs(pub Counter32);
1866        access: ReadOnly,
1867        status: Obsolete,
1868        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 6];
1869
1870        /// The number of locally generated EGP messages not sent to this EGP
1871        /// peer due to resource limitations within an EGP entity.
1872        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1873        pub struct NeighOutErrs(pub Counter32);
1874        access: ReadOnly,
1875        status: Obsolete,
1876        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 7];
1877
1878        /// The number of EGP-defined error messages received from this
1879        /// EGP peer.
1880        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1881        pub struct NeighInErrMsgs(pub Counter32);
1882        access: ReadOnly,
1883        status: Obsolete,
1884        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 8];
1885
1886        /// The number of EGP-defined error messages sent to this
1887        /// EGP peer.
1888        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1889        pub struct NeighOutErrMsgs(pub Counter32);
1890        access: ReadOnly,
1891        status: Obsolete,
1892        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 9];
1893
1894        /// The number of EGP state transitions to the UP state with this
1895        /// EGP peer.
1896        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1897        pub struct NeighStateUps(pub Counter32);
1898        access: ReadOnly,
1899        status: Obsolete,
1900        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 10];
1901
1902        /// The number of EGP state transitions from the UP state to any other
1903        /// state with this EGP peer.
1904        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1905        pub struct NeighStateDowns(pub Counter32);
1906        access: ReadOnly,
1907        status: Obsolete,
1908        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 11];
1909
1910        /// The interval between EGP Hello command retransmissions (in
1911        /// hundredths of a second).  This represents the t1 timer as defined in
1912        /// RFC 904.
1913        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1914        pub struct NeighIntervalHello(pub Counter32);
1915        access: ReadOnly,
1916        status: Obsolete,
1917        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 12];
1918
1919        /// The interval between EGP poll command retransmissions (in
1920        /// hundredths of a second). This represents the t3 timer as defined in
1921        /// RFC 904.
1922        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1923        pub struct NeighIntervalPoll(pub Counter32);
1924        access: ReadOnly,
1925        status: Obsolete,
1926        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 13];
1927
1928        /// The interval between EGP poll command retransmissions (in
1929        /// hundredths of a second). This represents the t3 timer as defined in
1930        /// RFC 904.
1931        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1932        pub struct NeighMode(pub Integer);
1933        access: ReadOnly,
1934        status: Obsolete,
1935        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 14];
1936
1937        impl NeighMode {
1938            pub const ACTIVE: u64 = 1;
1939            pub const STOP: u64 = 2;
1940        }
1941
1942        /// A control variable used to trigger operator-initiated "Start" and
1943        /// "Stop" events.  When read, this variable always returns the most
1944        /// recent value that egpNeighEventTrigger was set to. If it has not
1945        /// been set since the last initialization of the network management
1946        /// subsystem on the node, it returns a value of `stop'.
1947        ///
1948        /// When set, this variable causes a Start or Stop event on the
1949        /// specified neighbor, as specified on pages 8-10 of RFC 904.  Briefly,
1950        /// a Start event causes an Idle peer to begin neighbor acquisition and
1951        /// a non-Idle peer to reinitiate neighbor acquisition.  A stop event
1952        /// causes a non-Idle peer to return to the Idle state until a Start
1953        /// event occurs, either via egpNeighEventTrigger or otherwise.
1954        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1955        pub struct NeighEventTrigger(pub Integer);
1956        access: ReadOnly,
1957        status: Obsolete,
1958        value = [1, 3, 6, 1, 2, 1, 8, 5, 1, 15];
1959
1960        impl NeighEventTrigger {
1961            pub const START: u64 = 1;
1962            pub const STOP: u64 = 2;
1963        }
1964
1965        /// The autonomous system number of this EGP entity.
1966        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1967        pub struct As(pub Integer);
1968        access: ReadOnly,
1969        status: Obsolete,
1970        value = [1, 3, 6, 1, 2, 1, 8, 6];
1971    }
1972}
1973
1974/// The Simple Network Management Protocol (SNMP) Group
1975///
1976/// Implementation of the SNMP group is mandatory for all systems which support
1977/// an SNMP protocol entity.  Some of the objects defined below will be
1978/// zero-valued in those SNMP implementations that are optimized to support only
1979/// those functions specific to either a management agent or a management
1980/// station. In particular, it should be observed that the objects below refer
1981/// to an SNMP entity, and there may be several SNMP entities residing on a
1982/// managed node (e.g., if the node is hosting acting as a management station).
1983pub mod snmp {
1984    use super::*;
1985
1986    smi::object_type! {
1987        /// The total number of Messages delivered to the SNMP entity from the
1988        /// transport service.
1989        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1990        pub struct InPkts(pub Counter32);
1991        access: ReadOnly,
1992        status: Current,
1993        value = [1, 3, 6, 1, 2, 1, 11, 1];
1994
1995        /// The total number of SNMP Messages which were passed from the SNMP
1996        /// protocol entity to the transport service.
1997        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
1998        pub struct OutPkts(pub Counter32);
1999        access: ReadOnly,
2000        status: Obsolete,
2001        value = [1, 3, 6, 1, 2, 1, 11, 2];
2002
2003        /// The total number of SNMP Messages which were delivered to the SNMP
2004        /// protocol entity and were for an unsupported SNMP version.
2005        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2006        pub struct InBadVersions(pub Counter32);
2007        access: ReadOnly,
2008        status: Current,
2009        value = [1, 3, 6, 1, 2, 1, 11, 3];
2010
2011        /// The total number of community-based SNMP messages (for example,
2012        /// SNMPv1) delivered to the SNMP entity which used an SNMP community
2013        /// name not known to said entity.  Also, implementations which
2014        /// authenticate community-based SNMP messages using check(s) in
2015        /// addition to matching the community name (for example, by also
2016        /// checking whether the message originated from a transport address
2017        /// allowed to use a specified community name) MAY include in this value
2018        /// the number of messages which failed the additional check(s). It is
2019        /// strongly recommended that the documentation for any security model
2020        /// which is used to authenticate community-based SNMP messages specify
2021        /// the precise conditions that contribute to this value.
2022        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2023        pub struct InBadCommunityNames(pub Counter32);
2024        access: ReadOnly,
2025        status: Current,
2026        value = [1, 3, 6, 1, 2, 1, 11, 4];
2027
2028        /// The total number of community-based SNMP messages (for example,
2029        /// SNMPv1) delivered to the SNMP entity which represented an SNMP
2030        /// operation that was not allowed for the SNMP community named in the
2031        /// message. The precise conditions under which this counter is
2032        /// incremented (if at all) depend on how the SNMP entity implements its
2033        /// access control mechanism and how its applications interact with that
2034        /// access control mechanism. It is strongly recommended that the
2035        /// documentation for any access control mechanism which is used to
2036        /// control access to and visibility of MIB instrumentation specify the
2037        /// precise conditions that contribute to this value.
2038        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2039        pub struct InBadCommunityUses(pub Counter32);
2040        access: ReadOnly,
2041        status: Current,
2042        value = [1, 3, 6, 1, 2, 1, 11, 5];
2043
2044        /// The total number of ASN.1 or BER errors encountered by the SNMP
2045        /// entity when decoding received SNMP messages.
2046        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2047        pub struct InAsnParseErrs(pub Counter32);
2048        access: ReadOnly,
2049        status: Current,
2050        value = [1, 3, 6, 1, 2, 1, 11, 6];
2051
2052        /// The total number of SNMP PDUs which were delivered to the SNMP
2053        /// protocol entity and for which the value of the error-status field
2054        /// is `tooBig`.
2055        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2056        pub struct InTooBigs(pub Counter32);
2057        access: ReadOnly,
2058        status: Current,
2059        value = [1, 3, 6, 1, 2, 1, 11, 8];
2060
2061        /// The total number of SNMP PDUs which were delivered to the SNMP
2062        /// protocol entity and for which the value of the error-status field
2063        /// is `noSuchName`.
2064        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2065        pub struct InNoSuchNames(pub Counter32);
2066        access: ReadOnly,
2067        status: Current,
2068        value = [1, 3, 6, 1, 2, 1, 11, 9];
2069
2070        /// The total number of SNMP PDUs which were delivered to the SNMP
2071        /// protocol entity and for which the value of the error-status field
2072        /// is `badValue`.
2073        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2074        pub struct InBadValues(pub Counter32);
2075        access: ReadOnly,
2076        status: Current,
2077        value = [1, 3, 6, 1, 2, 1, 11, 10];
2078
2079        /// The total number valid SNMP PDUs which were delivered to the SNMP
2080        /// protocol entity and for which the value of the error-status field is
2081        /// `readOnly`.  It should be noted that it is a protocol error to
2082        /// generate an SNMP PDU which contains the value `readOnly` in the
2083        /// error-status field, as such this object is provided as a means of
2084        /// detecting incorrect implementations of the SNMP.
2085        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2086        pub struct InReadOnlys(pub Counter32);
2087        access: ReadOnly,
2088        status: Current,
2089        value = [1, 3, 6, 1, 2, 1, 11, 11];
2090
2091        /// The total number of SNMP PDUs which were delivered to the SNMP
2092        /// protocol entity and for which the value of the error-status field
2093        /// is `genErr`.
2094        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2095        pub struct InGenErrs(pub Counter32);
2096        access: ReadOnly,
2097        status: Current,
2098        value = [1, 3, 6, 1, 2, 1, 11, 12];
2099
2100        /// The total number of MIB objects which have been retrieved
2101        /// successfully by the SNMP protocol entity as the result of receiving
2102        /// valid SNMP Get-Request and Get-Next PDUs.
2103        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2104        pub struct InTotalReqVars(pub Counter32);
2105        access: ReadOnly,
2106        status: Current,
2107        value = [1, 3, 6, 1, 2, 1, 11, 13];
2108
2109        /// The total number of MIB objects which have been altered
2110        /// successfully by the SNMP protocol entity as the result of receiving
2111        /// valid SNMP Set-Request PDUs.
2112        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2113        pub struct InTotalSetVars(pub Counter32);
2114        access: ReadOnly,
2115        status: Current,
2116        value = [1, 3, 6, 1, 2, 1, 11, 14];
2117
2118        /// The total number of SNMP Get-Request PDUs which have been accepted
2119        /// and processed by the SNMP protocol entity.
2120        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2121        pub struct InGetRequests(pub Counter32);
2122        access: ReadOnly,
2123        status: Current,
2124        value = [1, 3, 6, 1, 2, 1, 11, 15];
2125
2126        /// The total number of SNMP Get-Next PDUs which have been accepted and
2127        /// processed by the SNMP protocol entity.
2128        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2129        pub struct InGetNexts(pub Counter32);
2130        access: ReadOnly,
2131        status: Current,
2132        value = [1, 3, 6, 1, 2, 1, 11, 16];
2133
2134        /// The total number of SNMP Set-Request PDUs which have been accepted
2135        /// and processed by the SNMP protocol entity.
2136        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2137        pub struct InSetRequests(pub Counter32);
2138        access: ReadOnly,
2139        status: Current,
2140        value = [1, 3, 6, 1, 2, 1, 11, 17];
2141
2142        /// The total number of SNMP Get-Response PDUs which have been accepted
2143        /// and processed by the SNMP protocol entity.
2144        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2145        pub struct InGetResponses(pub Counter32);
2146        access: ReadOnly,
2147        status: Current,
2148        value = [1, 3, 6, 1, 2, 1, 11, 18];
2149
2150        /// The total number of SNMP Trap PDUs which have been accepted and
2151        /// processed by the SNMP protocol entity.
2152        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2153        pub struct InTraps(pub Counter32);
2154        access: ReadOnly,
2155        status: Current,
2156        value = [1, 3, 6, 1, 2, 1, 11, 19];
2157
2158        /// The total number of SNMP PDUs which were generated by the SNMP
2159        /// protocol entity and for which the value of the error-status field
2160        /// is `tooBig`.
2161        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2162        pub struct OutTooBigs(pub Counter32);
2163        access: ReadOnly,
2164        status: Current,
2165        value = [1, 3, 6, 1, 2, 1, 11, 20];
2166
2167        /// The total number of SNMP PDUs which were generated by the SNMP
2168        /// protocol entity and for which the value of the error-status field
2169        /// is `noSuchName`.
2170        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2171        pub struct OutNoSuchNames(pub Counter32);
2172        access: ReadOnly,
2173        status: Current,
2174        value = [1, 3, 6, 1, 2, 1, 11, 21];
2175
2176        /// The total number of SNMP PDUs which were generated by the SNMP
2177        /// protocol entity and for which the value of the error-status field
2178        /// is `badValue`.
2179        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2180        pub struct OutBadValues(pub Counter32);
2181        access: ReadOnly,
2182        status: Current,
2183        value = [1, 3, 6, 1, 2, 1, 11, 22];
2184
2185        /// The total number of SNMP PDUs which were generated by the SNMP
2186        /// protocol entity and for which the value of the error-status field
2187        /// is `genErr`.
2188        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2189        pub struct OutGenErrs(pub Counter32);
2190        access: ReadOnly,
2191        status: Current,
2192        value = [1, 3, 6, 1, 2, 1, 11, 24];
2193
2194        /// The total number of SNMP Get-Request PDUs which have been generated
2195        /// by the SNMP protocol entity.
2196        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2197        pub struct OutGetRequests(pub Counter32);
2198        access: ReadOnly,
2199        status: Current,
2200        value = [1, 3, 6, 1, 2, 1, 11, 25];
2201
2202        /// The total number of SNMP Get-Next PDUs which have been generated by
2203        /// the SNMP protocol entity.
2204        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2205        pub struct OutGetNexts(pub Counter32);
2206        access: ReadOnly,
2207        status: Current,
2208        value = [1, 3, 6, 1, 2, 1, 11, 26];
2209
2210        /// The total number of SNMP Set-Request PDUs which have been generated
2211        /// by the SNMP protocol entity.
2212        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2213        pub struct OutSetRequests(pub Counter32);
2214        access: ReadOnly,
2215        status: Current,
2216        value = [1, 3, 6, 1, 2, 1, 11, 27];
2217
2218        /// The total number of SNMP Get-Response PDUs which have been generated
2219        /// by the SNMP protocol entity.
2220        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2221        pub struct OutGetResponses(pub Counter32);
2222        access: ReadOnly,
2223        status: Current,
2224        value = [1, 3, 6, 1, 2, 1, 11, 28];
2225
2226        /// The total number of SNMP Trap PDUs which have been generated by the
2227        /// SNMP protocol entity.
2228        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2229        pub struct OutTraps(pub Counter32);
2230        access: ReadOnly,
2231        status: Current,
2232        value = [1, 3, 6, 1, 2, 1, 11, 29];
2233
2234        /// Indicates whether the SNMP agent process is permitted to generate
2235        /// authentication-failure traps.  The value of this object overrides
2236        /// any configuration information; as such, it provides a means whereby
2237        /// all authentication-failure traps may be disabled.
2238        ///
2239        /// Note that it is strongly recommended that this object be stored in
2240        /// non-volatile memory so that it remains constant between
2241        /// re-initializations of the network management system.
2242        #[derive(Debug, PartialEq, PartialOrd, Ord, Eq, Hash)]
2243        pub struct EnableAuthenTraps(pub Integer);
2244        access: ReadWrite,
2245        status: Current,
2246        value = [1, 3, 6, 1, 2, 1, 11, 30];
2247    }
2248}