return *reinterpret_cast<long long int*>(val.integer);
}
-time_t
+unsigned int
Snmp::Var::asTimeTicks() const
{
Must(type == SMI_TIMETICKS);
- Must(val.integer != NULL && val_len == sizeof(time_t));
- return *reinterpret_cast<time_t*>(val.integer);
+ Must(val.integer != NULL && val_len == sizeof(unsigned int));
+ return *reinterpret_cast<unsigned int*>(val.integer);
}
Range<const oid*>
}
void
-Snmp::Var::setTimeTicks(time_t ticks)
+Snmp::Var::setTimeTicks(unsigned int ticks)
{
setValue(&ticks, sizeof(ticks), SMI_TIMETICKS);
}
unsigned int asGauge() const; ///< returns variable value as unsigned int
int asCounter() const; ///< returns variable value as Counter32
long long int asCounter64() const; ///< returns variable value as Counter64
- time_t asTimeTicks() const; ///< returns variable value as time ticks
+ unsigned int asTimeTicks() const; ///< returns variable value as time ticks
Range<const oid*> asObject() const; ///< returns variable value as object oid
Range<const u_char*> asString() const; ///< returns variable value as chars string
ipaddr asIpAddress() const; ///< returns variable value as ip address
void setGauge(unsigned int value); ///< assign unsigned int value to variable
void setString(const Range<const u_char*>& string); ///< assign string to variable
void setObject(const Range<const oid*>& object); ///< assign object oid to variable
- void setTimeTicks(time_t ticks); ///<assign time_t value to variable
+ void setTimeTicks(unsigned int ticks); ///<assign unsigned int (time) value to variable
void setIpAddress(ipaddr addr); ///< assign sockaddr_in to variable
void setCounter64(long long int counter); ///< assign Counter64 value to variable