All, I have been digging into the agent code for socket listening and a mechanism to request traps from outside the agent (not using agentx). I found some public variables that FD operations touch in the receive() function.
They are external_readfd external_writefd external_exceptfd It appears that one can setup any number of sockets to be listened on within this main loop (up to 32) by 1. creating the socket and binding it 2. call register_readfd(socket, func, NULL); 3. Implement func to do something. (like send a trap) Now the questions 1. There are no references to register_readfd() anywhere in the code - so is this the intended usage? 2. I assume the socket is my own, and there need not be any SNMP PDU. I plan on sending messages into snmpd to request a trap send. I have version 5.2.3 Any advise is appreciated, Adam -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adam Bell Sent: Thursday, March 08, 2007 10:48 AM To: net-snmp-users@lists.sourceforge.net Subject: Writing/building my trap send code All, I have read through the trap send related FAQs but I have a question on programmatic trap sending. I see that the 'trapsend' program takes command line arguments and sends a trap. I have an Event system and I plan on sending traps from that rather than the command line. I used mib2c to generate the PDU build code for my traps. The question is, am I on my own to code/compile my the generated code with the trapssend code and compile it into my app? I ask because the snmpd agent can take my MIB code and compile it into the agent quite easily. I was wondering if there is something similar for traps. Thanks, Adam The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders