On Thu, 16 Nov 2006 15:26:35 -0500 Robert P wrote:
RRP> What I need to do is have a MIB client set the FTP server
RRP> address, source file, dest file, username and password through SETS of
RRP> MIB objects then get or put a file triggered by the SET of another MIB object?
RRP>
RRP> How do I call the ftp command from my qedTransferAction handler
RRP> function ? I am using Linux....if anyone has implemented this using SFTP
RRP> that would be a GREAT help!

You don't want to call FTP from your handler... it would block the agent until
the transfer finished! I think what you need to do is to fork() a child
process to start the FTP when the transfer is started.

RRP> qedTransferAction OBJECT-TYPE
RRP> SYNTAX INTEGER {
RRP> put(1)
RRP> get(2)
RRP> }
RRP> DESCRIPTION
RRP> "Set to go(1) to start a transfer."
RRP> ::= { qedFileTransferMgt 1 }

This description mentions "go(1)", but there is no go value listed (1=put).

RRP> qedTansferStatus OBJECT-TYPE
RRP> SYNTAX INTEGER {
RRP> inactive(1),
RRP> getting-file(2),
RRP> putting-file(3),
RRP> file-not-found(4),
RRP> server-does-not-respond(5),
RRP> invalid-username-password(6),
RRP> unknown-error(7),
RRP> success(8)
RRP> }

This implies that you need to monitor the status an result of the transfer.
So, either you need a library which implements the FTP protocol and has an API
for this information, or you have to run ftp/sftp and parse the output.

-------------------------------------------------------------------------
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?p...rge&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/...net-snmp-users