Title: Re: snmpd -f (some issue)
Thomas:
 
The modified file is usmDHParameters.c (net-snmp-5.2.1/agent/mibgroup/snmp-usm-dh-objects/usmDHParameters)
 
Flat file (dh_prime) contains 180 bytes of Hexadecimal numbers. Right now, I don't have actual source file of usmDHParameter.c which i modified. I am writing below the lines code which I used.
 
The following are the lines of C code added in usmDHParameters.c in init_usmDHParameters() method.
 
char dh_prime[200];
int bytes_read=0, fd=-1;
 
fd = open ("dh_prime",O_RDONLY,0);
bytes_read = read(fd, dh_prime,180);
 
dh_prime (buffer) is copied in to dh->pointer() (I don't remember exact name) in BN_Hx2Bn() method. I commented default PRIME number used by net-snmp (which we get when querying usmDHParameters scalar OID) and copied with my prime value which is fetched from my flat file.

Thanks,
Mahesh
 


From: [EMAIL PROTECTED] on behalf of Thomas Anders
Sent: Thu 4/20/2006 11:52 PM
To: [email protected]
Subject: Re: snmpd -f (some issue)

[EMAIL PROTECTED] wrote:
> I added few lines of  C code in net-snmp source files. My code includes
> open (), read () operations on a normal file (flat/text) and handling
> some string arrays.
>
> I could read file contents and set my strings correctly and code is
> executing correctly when I run *snmpd *with* -f* option (-f: do not fork
> from the shell). But file operations are failing completely when *–f
> option* is not used along with snmpd.

We cannot help here as long as you don't show your code.


+Thomas

--
Thomas Anders (thomas.anders at blue-cable.de)


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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