cleo has asked for the wisdom of the Perl Monks concerning the following question:

gud day! i have compiled a custom mib. i can set requests to scalar type variables but i cant do it on Table type variables... in both cases, i have an error in getting requests.. is there something i'm missing out? can i set/get requests to table type oids individually or do i need to do an snmpwalk or whatever? heres the mib...
unicRecordingStatus OBJECT-TYPE SYNTAX SEQUENCE OFUnicRecordingStatusEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "A" INDEX {unicSelectedCameraNumber } ::= { unic 2 } unicRecordingStatusEntry OBJECT-TYPE SYNTAX UnicRecordingStatusEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "-" INDEX { unicSelectedCameraNumber } ::= { unicRecordingStatus 1 } UnicRecordingStatusEntry ::= SEQUENCE { unicSelectedCameraNumber INTEGER, unicCameraStatus INTEGER } unicSelectedCameraNumber OBJECT-TYPE SYNTAX INTEGER{ camera1 (1), camera2 (2), camera3 (3) } MAX-ACCESS read-write STATUS current DESCRIPTION "Selected Camera Number" ::= { unicRecordingStatusEntry 1 } unicCameraStatus OBJECT-TYPE SYNTAX INTEGER { recording (1), completed (2), failed (3), canceled (4), pre-recording (5), stand-by (6) } MAX-ACCESS read-write STATUS current DESCRIPTION "Status of Camera" ::= { unicRecordingStatusEntry 2 }
i'd appreciate any help.. tia..

Replies are listed 'Best First'.
Re: set/get requests to Table
by castaway (Parson) on Aug 27, 2004 at 06:46 UTC
    The MIB alone won't get us very far. What actual code are you using? What modules? etc etc.. Please, show us what you've tried, don't just tell.

    C.

      I'm using the net::snmp module. here's the code i used to try the custom mib generated oid's
      use Net::SNMP; use strict; my $inputOID = '1.3.6.1.4.1.30000.1.2.1.1'; my $ASN_type = INTEGER; my $newVal = '2'; my ($session, $error ) = Net::SNMP->session( Hostname => '192.36.253.30', Community => 'private' ) || die "Can't open a session"; print $session->set_request($inputOID, $ASN_type, $newVal) || die "Can't set"; print my $answer = SEC_SNMP->getRequest($inputOID) || die "Cant' get";
      it would generate an error like noSuchInstance on object 1.3.6.1.4.1.300001.2.1 tnx...im new to both perl and snmp and i really feel lost i hope you could help...
Re: set/get requests to Table
by talexb (Chancellor) on Aug 27, 2004 at 14:30 UTC

    A gentle reminder that this site is all about Perl, and your original post had nothing to do with Perl but rather (as it turned out) something to do with SNMP and (I suppose) its configuration or access, as controled by MIBs (whatever they are) as generated by Perl (that was a long walk).

    It's sort of like Jeopardy .. you have to frame your post as a Perl question. That will help you faster, and also prevent your posted from getting deleted as a non-Perl question.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

      sorry... i just deseperately need help...

        No worries .. we're glad to help, and the first social blunder is a freebie. It's the ones after that that are going to cost you. ;)

        Alex / talexb / Toronto

        "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds