SNMP 2.0.0
Loading...
Searching...
No Matches
SNMP::PDU::Generic Struct Reference

Helper struct to handle generic PDU. More...

Collaboration diagram for SNMP::PDU::Generic:
[legend]

Classes

struct  Bulk
 Helper struct to handle GetBulkRequest PDU. More...
 

Public Member Functions

 Generic ()
 Initializes to default values.
 

Public Attributes

uint32_t _requestID
 
union { 
 
   Error   _error 
 
   Bulk   _bulk 
 
};  
 Structures used by generic PDUs.
 

Detailed Description

Helper struct to handle generic PDU.

Defines all needed to create a generic PDU.

All PDUs are generic except Trap PDU.

Definition at line 27 of file SNMPMessage.h.

Constructor & Destructor Documentation

◆ Generic()

SNMP::PDU::Generic::Generic ( )
inline

Initializes to default values.

  • Initializes Error struct.
  • Request identifier is set to random value.

Definition at line 45 of file SNMPMessage.h.

References _requestID.

Member Data Documentation

◆ [union]

union { ... } SNMP::PDU::Generic

Structures used by generic PDUs.

All generic PDUs have an Error struct except GetBulkRequest PDU which have a Bulk struct instead.

The union helps to save memory.

◆ _bulk

◆ _error

Error SNMP::PDU::Generic::_error

◆ _requestID

uint32_t SNMP::PDU::Generic::_requestID

Request identifier of a message. Response, if exists, must have the same request identifier.

Definition at line 54 of file SNMPMessage.h.

Referenced by SNMP::Message::build(), Generic(), SNMP::Message::getRequestID(), SNMP::Message::parse(), and SNMP::Message::setRequestID().


The documentation for this struct was generated from the following file: