[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference lassie::ucx

Title:DEC TCP/IP Services for OpenVMS
Notice:Note 2-SSB Kits, 3-FT Kits, 4-Patch Info, 7-QAR System
Moderator:ucxaxp.ucx.lkg.dec.com::TIBBERT
Created:Thu Nov 17 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:5568
Total number of notes:21492

5232.0. "help on eSNMP subagent development" by FRUST::LUKAS (Unix starts with an `L') Mon Feb 17 1997 05:10

[cross-posted in the Digital_UNIX notes conference]

Hello,

I've previously developed an eSNMP subagent for a customer based on his
Private-MIB under Digital UNIX V3.2C.

Now I have to do the same job under OpenVMS V7.1 and UCX V4.1. for an other
customer.
So I took the documentation about "eSNMP Programming and Reference" and
I start reading
... and from this point I'm lost in space (though I've done VMS application
development some years ago):

1. Nothing is told about the eSNMP environment under OpenVMS/UCX.
   What are the names of the master- and subagent VMS processes? Where
   are the images located ? Where and when they get started ? What about
   eSNMP configuration under OpenVMS ? Where is the "smbd.conf" file
   located, ... I'll stop here with the last concluding question.
   "WHERE IS THE ESNMP CONFIGURATION CHAPTER OR DOCUMENT ?"
    
2. I know from Digital UNIX that there was an eSNMP example called Chess-MIB. 
   Now I've  tried to find the corresponding files under OpenVMS.
   ... and I found them in SYS$COMMON:[SYSHLP.EXAMPLES.UCX.SNMP].
   (and again no documentation about that)
   
3. So I've got the files and then I've tried to build the chess example MIB, as
   it was described in Chapter 1.3 and 4 of the documentation.
   First of all MIB compiling of the CHESS_MIB.MY didn't work. It has aborted
   with an error message:
   ERROR: Referenced object "enterprises" not found for child "dec".

4. O.K. I said to myself, the MIB compiler generated files CHESS_TBL.C;1 and
   CHESS_TBL.H;1 are already there (however they have been generated)
   so try to compile CHESS_METHOD.C;1 first.
   Now I've got the C Compiler error message that the "esnmp.h" header file
   was not found. So I've tried to find where this header file is located
   under OpenVMS and tata tata I've found it at SYS$COMMON:[UCX$LIB.SNMP].
   (again no documentation about that)
   Now I've told the C compiler where to find this header file (/INCLUDE_DIR)
   and he starts compiling with many,many errors:
   %CC-E-DECLARATION, Invalid declaration.
   at line number xxx in file SYS$COMMON:[UCX$LIB.SNMP]ESNMP.H;1
   
5. At this point I stop continuing with one big question.
   What is wrong with this example chess MIB or esnmp.h ?
   

Is there anybody out there with experience in eSNMP subagent development
under OpenVMS/UCX.

Last but not least somebody from UCX (eSNMP) engineering or Digital UNIX
eSNMP engineering could help me with these problems.


regards,

Dieter Lukas
Technology Consultant
Digital Frankfurt/Germany

PS: I hope that at this stage of UCX/eSNMP there are no customers who have 
    already installed UCX V4.1 and also want to develop there own eSNMP 
    subagent.
    Please supply a more complete documentation about eSNMP. Perhaps in 
    three parts.
    Part1: [e]SNMP Concepts, Configuration and Programming Guide (with an
           step by step procedure in building the chess MIB example subagent)
    Part2: eSNMP Troubleshooting Guide or FAQ (I have missed this very much 
    	   during eSNMP subagent development under Digital UNIX, I've got
	   it working with the very good support of Mike Daniele, thanks Mike!)
    Part3: MIB II and HR MIB References and eSNMP API Reference with examples

    This eSNMP documentation issue also belongs to the current eSNMP
    implementation under Digital UNIX.

T.RTitleUserPersonal
Name
DateLines
5232.1MIBcompiling problem fixed by myselfFRUST::LUKASUnix starts with an `L'Tue Feb 18 1997 08:08187
Hello,

I have fixed one of the problems by myself and so I do answer to myself.

MIBcompiling of the Chess-MIB example
=====================================

1. The UCX/eSNMP chess example files in SYS$COMMON:[SYSHLP.EXAMPLES.UCX.SNMP]
   are incomplete !!!
   There is one file missing named RFC1442.MY;1
   I have got it from the chess-MIB example files under Digital UNIX 4.0 and
   copied it to SYS$COMMON:[SYSHLP.EXAMPLES.UCX.SNMP]
   The file RFC1442.MY;1 contains the OID-definitions which are required
   by CHESS_MIB.MY;1.
   
2. Next I have done the following command:

   mibcomp RFC1442.MY;1,CHESS_MIB.MY;1 chess
   
   ... and as a result 11 objects written to chess_tbl.c and chess_tbl.h
   
PS: The eSNMP/Digital UNIX command sequence "mosy, snmpi" is equivalent to
    the eSNMP/UCX "MIBCOMP" command.

... and now I am hardly trying to fix the other problem to get the chess-MIB
subagent built.

For those of you who do not have access to Digital UNIX I have included the
RFC1442.MY in this reply.

--------------------- cut here ---------------------------------------------

          SNMPv2-SMI DEFINITIONS ::= BEGIN     -- from RFC1442


          -- the path to the root

          internet       OBJECT IDENTIFIER ::= { iso 3 6 1 }

          directory      OBJECT IDENTIFIER ::= { internet 1 }

          mgmt           OBJECT IDENTIFIER ::= { internet 2 }

          experimental   OBJECT IDENTIFIER ::= { internet 3 }

          private        OBJECT IDENTIFIER ::= { internet 4 }
          enterprises    OBJECT IDENTIFIER ::= { private 1 }

          security       OBJECT IDENTIFIER ::= { internet 5 }

          snmpV2         OBJECT IDENTIFIER ::= { internet 6 }

          -- transport domains
          snmpDomains    OBJECT IDENTIFIER ::= { snmpV2 1 }

          -- transport proxies
          snmpProxys     OBJECT IDENTIFIER ::= { snmpV2 2 }

          -- module identities
          snmpModules    OBJECT IDENTIFIER ::= { snmpV2 3 }

--NOTE, The macros have been deleted...

          -- names of objects

          ObjectName ::=
              OBJECT IDENTIFIER


          -- syntax of objects

          ObjectSyntax ::=
              CHOICE {
                  simple
                      SimpleSyntax,

                    -- note that SEQUENCEs for conceptual tables and
                    -- rows are not mentioned here...

                  application-wide
                      ApplicationSyntax
              }


          -- built-in ASN.1 types

          SimpleSyntax ::=
              CHOICE {
                  -- INTEGERs with a more restrictive range
                  -- may also be used
                  integer-value
                      INTEGER (-2147483648..2147483647),

                  string-value
                      OCTET STRING,

                  objectID-value
                      OBJECT IDENTIFIER,

                  -- only the enumerated form is allowed
                  bit-value
                      BIT STRING
              }



          -- application-wide types

          ApplicationSyntax ::=
              CHOICE {
                  ipAddress-value
                      IpAddress,

                  counter-value
                      Counter32,

                  gauge-value
                      Gauge32,

                  timeticks-value
                      TimeTicks,

                  arbitrary-value
                      Opaque,

                  nsapAddress-value
                      NsapAddress,

                  big-counter-value
                      Counter64,

                  unsigned-integer-value
                      UInteger32
              }

          -- in network-byte order
          -- (this is a tagged type for historical reasons)
          IpAddress ::=
              [APPLICATION 0]
                  IMPLICIT OCTET STRING (SIZE (4))


          -- this wraps
          Counter32 ::=
              [APPLICATION 1]
                  IMPLICIT INTEGER (0..4294967295)

          -- this doesn't wrap
          Gauge32 ::=
              [APPLICATION 2]
                  IMPLICIT INTEGER (0..4294967295)

          -- hundredths of seconds since an epoch
          TimeTicks ::=
              [APPLICATION 3]
                  IMPLICIT INTEGER (0..4294967295)

          -- for backward-compatibility only
          Opaque ::=
              [APPLICATION 4]
                  IMPLICIT OCTET STRING

          -- for OSI NSAP addresses
          -- (this is a tagged type for historical reasons)
          NsapAddress ::=
              [APPLICATION 5]
                  IMPLICIT OCTET STRING (SIZE (1 | 4..21))

          -- for counters that wrap in less than one hour with only 32 bits
          Counter64 ::=
              [APPLICATION 6]
                  IMPLICIT INTEGER (0..18446744073709551615)

          -- an unsigned 32-bit quantity
          UInteger32 ::=
              [APPLICATION 7]
                  IMPLICIT INTEGER (0..4294967295)

          -- indistinguishable from INTEGER, but never needs more than
          -- 32-bits for a two's complement representation
          Integer32 ::=
              [UNIVERSAL 2]
                  IMPLICIT INTEGER (-2147483648..2147483647)

END

---------------------- cut here ---------------------------------------------
5232.2one problem still remainingFRUST::LUKASUnix starts with an `L'Wed Feb 19 1997 08:2932
Hello,

... and now I have solved nearly all problems around building the chess-MIB
example subagent except one.

To compile CHESS_METHOD.C;1, CHESS_MIB.C;1 and CHESS_TBL.C;3 you have to use
the DEC C compiler switch /DEFINE=OPENVMS.
With the first two files I've got 'macro redefinition' warnings and 
'implicitly declared function' messages, but they get compiled in two .OBJ
files.
I don't know why I get these 'implicitly declared function' messages ? 
Even if I put in a '#include <strings.h>' at the beginning of the source files,
I get the message that the identifier 'strlen' is implicitly declared as a 
function.

So finally I have got the three object files from the chess example and
now I have tried to link these with the supplied options file
'CHESS_SUBAGENT.OPT'.

The Linker prints out the messages that there are 2 undefined symbols:
SELECT and SLEEP.
So the one remaining problem is: What is the additional object library or 
sharable image I have to add to the linker options ?

I am still looking for help.


regards,

Dieter


5232.3all problems fixed nowFRUST::LUKASUnix starts with an `L'Thu Feb 20 1997 05:2731
Hello again,

for those who are interested in building the eSNMP chess-MIB example
subagent all problems are finally fixed now.
To solve the last one (undefined symbols: select, sleep) I had to
use the compiler switch '/PREFIX=ALL' to define DECC$SELECT() and DECC$SLEEP()
instead of select() and sleep().

To summarize all the fixed problems in building the chess-MIB example
subagent I have written a DCL command procedure BUILD.COM which should play the
role of the missing UNIX makefile.

By invoking BUILD.COM everything is done for you and you should get the
final CHESS_SUBAGENT.EXE image file which runs without any problem.


regards,

Dieter Lukas

------------ cut here --------------------------------------------------------
$!
$! BUILD.COM
$!
$ MIBCOMP RFC1442.MY,CHESS_MIB.MY CHESS /PRINT
$ CC/INCLUDE=UCX$SNMP/PREFIX=ALL/DEFINE=OPENVMS CHESS_METHOD.C
$ CC/INCLUDE=UCX$SNMP/PREFIX=ALL/DEFINE=OPENVMS CHESS_MIB.C
$ CC/INCLUDE=UCX$SNMP/PREFIX=ALL/DEFINE=OPENVMS CHESS_TBL.C
$ LINK CHESS_SUBAGENT.OPT/OPTIONS

------------ cut here --------------------------------------------------------
5232.4UCXAXP::GEMIGNANIThu Feb 20 1997 20:224
    
    Thanks for posting your summary here.
    
    -John
5232.5Could you QAR these?THEBAY::WIEGLEBVoracious schools of lottery girlsMon Mar 03 1997 23:476
    Could you possibly QAR the issues involving missing/erroneous files so
    that it can get fixed in the product?
    
    Thanks,
    
    - Dave
5232.6Please QAR by yourselfFRUST::LUKASUnix starts with an `L'Wed Mar 05 1997 07:5231
RE .5: 

I have lost a lot time during the simple tasks of building the example
chess-mib subagent and configuring eSNMP to get this subagent working
properly due to the fact of missing eSNMP configuration/programming/trouble-
shooting documentation and Release Notes. The provided documentation
"eSNMP Programming and Reference" mainly describes MIB-II objects and the
eSNMP API. Nothing about eSNMP configuration and eSNMP troubleshooting and
NO description about building the example chess-mib subagent.
To use eSNMP/UCX as a SNMP (sub)agent developers toolkit, it is essential to
provide a well documented and well functioning example eSNMP subagent, because
it is the base of developing own private MIB subagents.

As in the current state of eSNMP/UCX V4.1 (missing documentation and missing
distribution files) I would NOT recommend to sell UCX/eSNMP as a
SNMP (sub)agent development toolkit to our customers.
In my opinion the eSNMP part of UCX is in a pre-IFT state.

So, please take a look at topics 5232.*, 5241.*, 5290.* of this notes conference
and topic 2094.* of the DECC notes conference.
Here you will find all the issues concerning problems during
my eSNMP evaluation and the workarounds I have found out by myself.

Please use this as an input for your QAR-System and do the QAR by yourself.


regards,

Dieter Lukas
Technology Consultant
Digital Frankfurt/Germany