pike.git / lib / modules / Protocols.pmod / SNMP.pmod / protocol.pike

version» Context lines:

pike.git/lib/modules/Protocols.pmod/SNMP.pmod/protocol.pike:10:   //! 1155-7 : v1   //!   //! 1901-4 : v2/community (Bulk ops aren't implemented!)   //!   //! planned:   //! 2742 : agentX   //!   //! 2570 : v3 description   //!    - // $Id: protocol.pike,v 1.9 2002/12/03 09:48:05 hop Exp $ + // $Id: protocol.pike,v 1.10 2002/12/04 19:14:00 bill Exp $         #include "snmp_globals.h"   #include "snmp_errors.h"      #if 1   // --- ASN.1 hack   class asn1_application_octet_string   {    inherit Standards.ASN1.Types.asn1_octet_string;
pike.git/lib/modules/Protocols.pmod/SNMP.pmod/protocol.pike:420:       case "opaque": // OPAQUE    rv = asn1_application_octet_string(4,val);    break;       case "count64": // COUNTER64 - v2 object    rv = asn1_application_integer(6,val);    break;       default: // bad type! +  error("Unknown SNMP data type " + type + ".");    return 0;    }       return rv;   }      //!   //! GetResponse-PDU call   //!   //! @param varlist
pike.git/lib/modules/Protocols.pmod/SNMP.pmod/protocol.pike:568:   //! @param rem_addr   //! @param rem_port   //! remote address an UDP port to send request to (optional)   //! @returns   //! request ID   //!   //! @example   //! // set the value of 1.3.6.1.4.1.1882.2.1 to "blah".   //! object s=Protocols.SNMP.protocol();   //! s->snmp_community="mysetcommunity"; - //! mapping req=(["1.3.6.1.4.1.1882.2.1": ({"string", "blah"})]); + //! mapping req=(["1.3.6.1.4.1.1882.2.1": ({"str", "blah"})]);   //! int id=s->set_request(req, "172.21.124.32");   //!   int set_request(mapping varlist, string|void rem_addr,    int|void rem_port) {    //: SetRequest-PDU low call    object pdu;    int id = get_req_id(), flg;    array vararr = ({});       foreach(indices(varlist), string varname)