// Home | Go Back //
package agent.mib2;
import java.io.*;
import java.util.*;
import com.ireasoning.util.*;
import com.ireasoning.protocol.snmp.*;
import javax.management.*;
public class TcpConnEntry extends SnmpTableEntry
{
protected int _tcpConnState = 0;
protected SnmpIpAddress _tcpConnLocalAddress = new SnmpIpAddress();
protected int _tcpConnLocalPort = 0;
protected SnmpIpAddress _tcpConnRemAddress = new SnmpIpAddress();
protected int _tcpConnRemPort = 0;
public TcpConnEntry(SnmpTable table)
{
super(table);
}
public TcpConnEntry( SnmpTable table, int tcpConnState, SnmpIpAddress tcpConnLocalAddress, int tcpConnLocalPort, SnmpIpAddress tcpConnRemAddress, int tcpConnRemPort)
{
super(table);
this._tcpConnState = tcpConnState;
this._tcpConnLocalAddress = tcpConnLocalAddress;
this._tcpConnLocalPort = tcpConnLocalPort;
this._tcpConnRemAddress = tcpConnRemAddress;
this._tcpConnRemPort = tcpConnRemPort;
}
public String getIndexSuffix()
{
if(_suffix.length() == 0)
{
_suffix = "." + SnmpTableEntry.getIndexString("" + _tcpConnLocalAddress, false) + "." + SnmpTableEntry.getIndexString("" + _tcpConnLocalPort, false) + "." + SnmpTableEntry.getIndexString("" + _tcpConnRemAddress, false) + "." + SnmpTableEntry.getIndexString("" + _tcpConnRemPort, false);
}
return _suffix;
}
public void set(int index, SnmpDataType value)
{
switch(index)
{
case 0 :
_tcpConnState = ((SnmpInt) value).getValue();
break;
case 1 :
_tcpConnLocalAddress = (SnmpIpAddress) value;
break;
case 2 :
_tcpConnLocalPort = ((SnmpInt) value).getValue();
break;
case 3 :
_tcpConnRemAddress = (SnmpIpAddress) value;
break;
case 4 :
_tcpConnRemPort = ((SnmpInt) value).getValue();
break;
}
}
}