here server is the computer name from which mib information is to be retreived.

Code:
snmp = new JSnmp(server.getText(), community.getText(), SnmpCfg.SLEEP);
	Req req = new Req(SnmpCfg.GETNEXT, 1);
                     req.vb[0] = new Vb(crtId);
                     snmp.request(req);
this code is woking well if server name is local computer name. it displays all the mib information of local computer. but if any other computer name is passed to this textfield, which is connected to this local computer it does not perform any function.
i need to extract the mib information of another computer.
request is the function of class Snmp from which JSnmp is extended.

Code:
public class Snmp{
  protected void finalize() throws Throwable{
    tlClose();
  }
  public boolean tlOpen() throws IOException{
    return false;
  }
  public boolean tlClose() throws IOException{
    return false;
  }
  public boolean tlSend(byte[] buff) throws IOException{
	return false;
  }
  public byte[] tlRecv() throws IOException{
	return null;
  }
  public boolean tlReady() throws IOException{
    return false;
  }
  public boolean tlWait(int tout) throws IOException{
	return false;
  }
  public int sendReq(Req req, ByteArrayOutputStream baos) throws IOException{
    int i, pdu_l, msg_l, vb_l, rez;
    Value v = new Value();
    vb_l = 0;
    for(i = 0; i < req.vb.length; i ++)
      vb_l += req.vb[i].tlvSize();
    if(vb_l < 128)
      pdu_l = vb_l + 11;
    else
      pdu_l = vb_l + SnmpNumber.lengthInt(vb_l) + 11;
    if(pdu_l < 128)
      msg_l = pdu_l +comm.tlvSize() + 5;
    else
      msg_l = pdu_l + SnmpNumber.lengthInt(pdu_l) + comm.tlvSize() + 5;
    v.type = SnmpCfg.SEQUENCE;
    v.length = msg_l;
    rez = v.tlvSize();
    if(! v.out(baos)) return 0;
    v = null;
    v = new Value(SnmpCfg.SNMP_VER);
    if(! v.out(baos)) return 0;
    if(! comm.out(baos)) return 0;
    v.type = req.type;
    v.length = pdu_l;
    if(! v.out(baos)) return 0;
    v = new Value(0);
    if(! v.out(baos)) return 0;
    if(! v.out(baos)) return 0;
    if(! v.out(baos)) return 0;
    v.type = SnmpCfg.SEQUENCE;
    v.length = vb_l;
    if(! v.out(baos)) return 0;
    for(i = 0; i < req.vb.length; i ++)
      req.vb[i].out(baos);
    return rez;
  }
  public int recvReq(Req req, ByteArrayInputStream bais) throws IOException{
    Value v = new Value();
    int rez, dim;
    if((dim = v.in(bais)) == 0) return 0;
    if(v.type != SnmpCfg.SEQUENCE) return 0;
    rez = dim + v.vSize();
    if((dim = v.in(bais)) == 0) return 0;
    if(v.type != SnmpCfg.INTEGER) return 0;
    if(v.getInt() != SnmpCfg.SNMP_VER) return 0;
   if((dim = v.in(bais)) == 0) return 0;
    if(v.in(bais) == 0) return 0;
    req.type = v.type;
    if(v.in(bais) == 0) return 0;
    if(v.type != SnmpCfg.INTEGER) return 0;
    if(v.in(bais) == 0) return 0;
    if(v.type != SnmpCfg.INTEGER) return 0;
    req.status = v.getInt();
    if(v.in(bais) == 0) return 0;
    if(v.type != SnmpCfg.INTEGER) return 0;
    req.index = v.getInt();
    if(req.status != 0) return 0;
   if(v.in(bais) == 0) return 0;
    if(v.type != SnmpCfg.SEQUENCE) return 0;
    int l = v.length;
    Vector vec = new Vector();
    while(l > 0){
      Vb vb = new Vb();
      if((dim = vb.in(bais)) == 0) return 0;
      vec.addElement(vb);
      l -= dim;
    }
    req.vb = new Vb[vec.size()];
    for(int i = 0; i < req.vb.length; i ++)
      req.vb[i] = (Vb) vec.elementAt(i);
    return rez;
  }
  public boolean request(Req req) throws IOException{
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    if(sendReq(req, baos) == 0) return false;
    byte[] ba = baos.toByteArray();
    if(tlOpen() == false) return false;
    if(tlSend(ba) == false) return false;
    ba = null;
    if((ba = tlRecv()) == null) return false;
    tlClose();
    ByteArrayInputStream bais = new ByteArrayInputStream(ba);
    if(recvReq(req, bais) == 0) return false;
    return true;
  }
}