Hello,

i have a littel trouble with passthough support in net-snmp 5.2.rc3 on Suse
Linux 9.0 system 2.4.21-99. My config :

snmpd.conf:
pass .1.3.6.1.4.1.4329.4.6.1 /tmp/dimo_client

dimo_client:

#!/bin/sh -f

PATH=$path:/bin:/usr/bin:/usr/ucb

# echo $@ >> /tmp/passtest.log

if [ "$1" = "-s" ]; then
  echo $* >> /tmp/passtest.log
  /tmp/client -s $2 $3 $4
  exit 0
fi

if [ "$1" = "-g" ]; then
  echo $* >> /tmp/passtest.log
  /tmp/client -g $2
fi


This work 100% for snmpget and 95% for snmpset. client is a c-bin i coded
myself and it work all the time from shell. ( for instance ./client -g
.1.3.6.1.4.1.4329.4.6.1.4.4.4.0 or ./client -s
.1.3.6.1.4.1.4329.4.6.1.4.4.4.0 integer 2 ). If i direct call my c-bin from
snmpd.conf all snmpset cmd failed and the c-bin get called severall times:

snmp.conf:

pass .1.3.6.1.4.1.4329.4.6.1 /tmp/dimo_client

#!/bin/sh -f

echo $@ >> /tmp/passtest.log

/tmp/client $1 $2 $3 $4

./snmpget localhost .1.3.6.1.4.1.4329.4.6.1.4.4.4.0 give:

-g .1.3.6.1.4.1.4329.4.6.1.4.4.4.0

./snmpset localhost .1.3.6.1.4.1.4329.4.6.1.4.4.4.0 integer 2 give:

-g .1.3.6.1.4.1.4329.4.6.1.4.4.4.0
-s .1.3.6.1.4.1.4329.4.6.1.4.4.4.0 integer 10
-g .1.3.6.1.4.1.4329.4.6.1.4.4.4.0
-s .1.3.6.1.4.1.4329.4.6.1.4.4.4.0 integer 10
-g .1.3.6.1.4.1.4329.4.6.1.4.4.4.0
-s .1.3.6.1.4.1.4329.4.6.1.4.4.4.0 integer 10
-g .1.3.6.1.4.1.4329.4.6.1.4.4.4.0
-s .1.3.6.1.4.1.4329.4.6.1.4.4.4.0 integer 10
-g .1.3.6.1.4.1.4329.4.6.1.4.4.4.0
-s .1.3.6.1.4.1.4329.4.6.1.4.4.4.0 integer 10
-g .1.3.6.1.4.1.4329.4.6.1.4.4.4.0
-s .1.3.6.1.4.1.4329.4.6.1.4.4.4.0 integer 10

[EMAIL PROTECTED] : ./client -s .1.3.6.1.4.1.4329.4.6.1.4.4.4.0 integer 10
[EMAIL PROTECTED] : 

[EMAIL PROTECTED] : ./client -g .1.3.6.1.4.1.4329.4.6.1.4.4.4.0
.1.3.6.1.4.1.4329.4.6.1.4.4.4.0
integer
2
[EMAIL PROTECTED] : 

so eachtime i perform a snmpset first i get a snmpget and then the snmpset
cmd, and that confuse my c-bin .As far as i can say now its seem the return
value made the trouble. Can some developer say something about that ?
Manpage say for snmpset: return nothing if all went well.

How difficult would it be to integrate the C-Code into the agent ? I read
alot about mib2c and so, can i simple copy my code other there.

-Baumgart







-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
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