title: how to set the port of snmp agentX subagent?
body: <p>I am working on extending net-snmp to write a subagent with agentX.
  Now I use the example codes from net-snmp, and compiled to a subagent.
  Below is the codes I get from:
  <a href="http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_MIB_Module" rel="nofollow">http://www.net-snmp.org/wiki/index.php/TUT:Writing_a_MIB_Module</a></p>
  
  <p>And I succeed to perform snmpget and snmpset to my subagent using agentX. </p>
  
  <p>My questions:</p>
  
  <ol>
  <li><p>I think the subagent and master agent are listening on a port, how can I find which port they are listening? I have been told the default port is <strong>705</strong>, but when I use "netstat", I can't find any process listening on port 705.</p></li>
  <li><p>How to change the listening port of subagent? Do I need to change in the example code to set the port?</p></li>
  </ol>