Thanks for such detailed answer. You are better than Emanate tech support.
Now I have some more questions:

1) Is there any document for the syntax in snmpd.conf
2) In Emanate,  we can get the sender's IP address by


/** Get Manager IP Address **/
SR_UINT32 GetMgrIPAddr(ContextInfo *contextInfo)
{
   ObjectSyntax *srcIp;
   srcIp=SearchContextInfo(contextInfo,NCI_SENDER_TRANSPORT);
   if (srcIp!=NULL) {
      return(OctetStringToIP(srcIp->os_value));
   }
   return(-1);
}

In Net-Snmp, I did:

void SecLog_GetOperatorId(netsnmp_agent_session  *asp, SecurityLogData_t
*logData)
{
   netsnmp_transport *transport = NULL;
   char *addr_string = NULL;

   transport = snmp_sess_transport(snmp_sess_pointer(asp->session));
   if (transport != NULL && transport->f_fmtaddr != NULL) {
        addr_string = transport->f_fmtaddr(transport,
                                                 asp->pdu->transport_data,

asp->pdu->transport_data_length);
   }
   if ( addr_string != NULL)
   {
       strcpy(logData->OperatorId, addr_string);
       srxTrace (TRC_NEM_CHAN_BASE,
        RTP_TRC_INT_CALL,"CommonAdmSNMP.c:SecLog_GetOperatorId -
OperatorId=%s\n", logData->OperatorId);
       return;
   }
   else
   {
      strcpy(logData->OperatorId, "LocalHost");
        srxTrace (TRC_NEM_CHAN_BASE,
               RTP_TRC_INT_CALL,"CommonAdmSNMP.c:SecLog_GetOperatorId -
Error retrieving OperatorId. Localhost assumed");
    }
}


I got:

callback: 1 on fd 7

Can you help on this?

Regards,

May




On Wed, Jun 10, 2009 at 3:48 AM, Dave Shield <[email protected]>wrote:

> 2009/6/9 May The Dog <[email protected]>:
> > That is very good.   Therefore the following exact systax  will work?
> >
> > /usr/sbin/snmpd .... -Le -f                            <------ port 161
>
> Yes
>
> > /usr/sbin/snmpd .... -Le -f  :8159
>
> You don't need the ':'
> Just
>   /usr/sbin/snmpd ... -Le -f 8159
> would listen on that port
>
>
> > /usr/sbin/snmpd .... -Le -f  10.77.168:10:8159 10.77.168.11:8159
> 10.77.168.30:8159
> > /usr/sbin/snmpd .... -Le -f  10.77.168:10:8159 10.77.168.11:8159
> 10.77.168.30:161
>
> Yes
>
> One other thing:
>
> > /usr/sbin/snmpd ...... -D -d -DTOKEN -Le
>
> The option '-D' turns on *all* debugging output.
> If you're doing this, there's no point in having -DTOKEN as well.
>
> You'd be better off omitting '-D' and just turning on the specific
> debugging that you are actually interested in.   The full debug
> output is *VERY* verbose, and almost impossible to find anything
> useful.
>   It also slows down the agent quite noticeably.
> You really don't want to do this!
>
> Dave
>
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to