Method: Net::SNMP::PDU#agent_addr

Defined in:
lib/net/snmp/pdu.rb

#agent_addrObject

The address of the agent that sent this PDU (Valid for SNMPv1 traps only)



83
84
85
86
87
88
# File 'lib/net/snmp/pdu.rb', line 83

def agent_addr
  # @struct.agent_addr is a binary array of 4 characters,

  # to_a converts this to a ruby array of Integers, then join get's us

  # back to the string form

  @struct.agent_addr.to_a.join('.')
end