title: How to use the mib2c command?
body: <p>Actually I'm trying to generate .h &amp; .c files by given sysSwYear as MIBNODE and I'm using following command:</p>
  
  <pre><code>mib2c -c mib2c.scalar.conf sysSwYear
  </code></pre>
  
  <p>but it produces the following error:</p>
  
  <blockquote>
    <p>You didn't give mib2c a valid OID to start with.  IE, I could not find
    any information about the mib node "sysSwYear.0".  This could be caused
    because you supplied an incorrectly node, or by the MIB that you're
    trying to generate code from isn't loaded.  To make sure your mib is
    loaded, run mib2c using this as an example:</p>
  
  <pre><code>   env MIBS="+MY-PERSONAL-MIB" mib2c -c mib2c.scalar.conf sysSwYear.0
  </code></pre>
    
    <p>You might wish to start by reading the MIB loading tutorial at:</p>
    
    <p><a href="http://www.net-snmp.org/tutorial-5/commands/mib-options.html" rel="nofollow">http://www.net-snmp.org/tutorial-5/commands/mib-options.html</a></p>
    
    <p>And making sure you can get snmptranslate to display information about
    your MIB node.  Once snmptranslate works, then come back and try mib2c
    again.</p>
  </blockquote>
  
  <p>I have already done everything needed like setting environment variable for MIB and defining a private MIB file in /usr/share/snmp/mibs ...but still no success. What to do?</p>