title: How to receive Unsigned int value for a net-snmp variable
body: <p>I have a AgentX sub-agent working with net-snmp master agent. I want to convert an unsigned int value to the snmp type and print it using the snmpget command. I have used the following function:</p>
  
  <pre><code>snmp_set_var_typed_value(var,
                           ASN_UNSIGNED,
                           (u_char *)&amp;runnableEntry_tbl[major-1].runnableObjectCounters.counters[counter_index-1].value,
                           sizeof(unsigned int));
  </code></pre>
  
  <p>(where <code>runnableEntry_tbl[major-1].runnableObjectCounters.counters[counter_index-1].value</code> is an unsigned value).</p>
  
  <p>The problem is the value is getting transmitted as a Gauge32 (as per wireshark), also the display of the value with snmpget is something like:</p>
  
  <pre><code>runnableObjectCounters.1.1 = Gauge32: 4294967294
  </code></pre>
  
  <p>Can the Gauge32 be removed somehow? Or is there some other type for Unsigned32 as per ASN, please help me.</p>
  
  <p>I am working on Linux.</p>