× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Aschenbrenner, Poul wrote:
...
D SETSNMP PR 10I 0 EXTPROC('snmpSet')
D PDU_PTR * VALUE
D HOST_PTR * VALUE OPTIONS(*STRING)
D TIMEOUT 10I 0 VALUE
D COMM_PTR * VALUE OPTIONS(*STRING)
D COMM_LEN 10I 0 VALUE
...
HOST = 'as4he3t.xxx.dk'; // 14 Char long CMTY = 'public'; // 6 Char long RC = SETSNMP(%ADDR(SNMPPDU):%ADDR(HOST):14:%ADDR(CMTY):6); ...

Poul, I'm not familiar with this API either, but I think you have problems with both the HOST_PTR and TIMEOUT parameters.

The third parameter is documented as a "timeout"; it looks like you are trying to use it to pass the length of the HOST parameter.

I think your second parameter supposed to be a null-terminated string. If you code OPTIONS(*STRING) for that parameter (as you already have), the RPG compiler can handle that for you when you pass a character value rather than a pointer.

RC = SETSNMP(%ADDR(SNMPPDU):%TRIM(HOST): ??? :%ADDR(CMTY):6);


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.