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

version» Context lines:

pike.git/lib/modules/Protocols.pmod/SNMP.pmod/protocol.pike:207:   //!   void create(int|void rem_port, string|void rem_addr, int|void loc_port,    string|void loc_addr) {       int lport = loc_port;       local_host = (!loc_addr || !sizeof(loc_addr)) ? SNMP_DEFAULT_LOCHOST : loc_addr;    if(stringp(rem_addr) && sizeof(rem_addr)) remote_host = rem_addr;    if(rem_port) remote_port = rem_port;    -  if (!snmp::bind(lport, local_host)) { +  if (!snmp::bind(lport, local_host, 1)) {    //# error ...    DWRITE("protocol.create: can't bind to the socket.\n");    ok = 0;    if(con_fail)    con_fail(this, @extra_args);    }       if(snmp_errno)    ERROR("Failed to bind to SNMP port.\n");    DWRITE("protocol.bind: success!\n");
pike.git/lib/modules/Protocols.pmod/SNMP.pmod/protocol.pike:363:   int get_request(array(string) varlist, string|void rem_addr,    int|void rem_port) {    object pdu;    int id = get_req_id(), flg;    array vararr = ({});       foreach(varlist, string varname)    vararr += ({Standards.ASN1.Types.asn1_sequence(    ({Standards.ASN1.Types.asn1_identifier(    @(array(int))(varname/".")), -  Standards.ASN1.Types.asn1_integer(1)}) //doesn't sense but req +  Standards.ASN1.Types.Null()})    )});       pdu = Protocols.LDAP.ldap_privates.asn1_context_sequence(0,    ({Standards.ASN1.Types.asn1_integer(id), // request-id    Standards.ASN1.Types.asn1_integer(0), // error-status    Standards.ASN1.Types.asn1_integer(0), // error-index    Standards.ASN1.Types.asn1_sequence(vararr)})    );       // now we have PDU ...
pike.git/lib/modules/Protocols.pmod/SNMP.pmod/protocol.pike:517:    int|void rem_port) {    //: GetNextRequest-PDU low call    object pdu;    int id = get_req_id(), flg;    array vararr = ({});       foreach(varlist, string varname)    vararr += ({Standards.ASN1.Types.asn1_sequence(    ({Standards.ASN1.Types.asn1_identifier(    @(array(int))(varname/".")), -  Standards.ASN1.Types.asn1_integer(1)}) //doesn't sense but req +  Standards.ASN1.Types.Null()})    )});       pdu = Protocols.LDAP.ldap_privates.asn1_context_sequence(1,    ({Standards.ASN1.Types.asn1_integer(id), // request-id    Standards.ASN1.Types.asn1_integer(0), // error-status    Standards.ASN1.Types.asn1_integer(0), // error-index    Standards.ASN1.Types.asn1_sequence(vararr)})    );       // now we have PDU ...