📄 ipmib.java
字号:
server.unregister(this.icmpInTimestamps, context);
server.unregister(this.icmpInTimestampReps, context);
server.unregister(this.icmpInAddrMasks, context);
server.unregister(this.icmpInAddrMaskReps, context);
server.unregister(this.icmpOutMsgs, context);
server.unregister(this.icmpOutErrors, context);
server.unregister(this.icmpOutDestUnreachs, context);
server.unregister(this.icmpOutTimeExcds, context);
server.unregister(this.icmpOutParmProbs, context);
server.unregister(this.icmpOutSrcQuenchs, context);
server.unregister(this.icmpOutRedirects, context);
server.unregister(this.icmpOutEchos, context);
server.unregister(this.icmpOutEchoReps, context);
server.unregister(this.icmpOutTimestamps, context);
server.unregister(this.icmpOutTimestampReps, context);
server.unregister(this.icmpOutAddrMasks, context);
server.unregister(this.icmpOutAddrMaskReps, context);
server.unregister(this.ipAddrEntry, context);
server.unregister(this.ipNetToMediaEntry, context);
//--AgentGen BEGIN=_unregisterMOs
//--AgentGen END
}
// Notifications
// Scalars
public class IpForwarding extends EnumeratedScalar {
IpForwarding(OID oid, MOAccess access) {
super(oid, access, new Integer32(),
new int[] { IpForwardingEnum.forwarding,
IpForwardingEnum.notForwarding });
//--AgentGen BEGIN=ipForwarding
//--AgentGen END
}
public int isValueOK(SubRequest request) {
Variable newValue =
request.getVariableBinding().getVariable();
int valueOK = super.isValueOK(request);
if (valueOK != SnmpConstants.SNMP_ERROR_SUCCESS) {
return valueOK;
}
//--AgentGen BEGIN=ipForwarding::isValueOK
//--AgentGen END
return valueOK;
}
public Variable getValue() {
//--AgentGen BEGIN=ipForwarding::getValue
//--AgentGen END
return super.getValue();
}
public int setValue(Variable newValue) {
//--AgentGen BEGIN=ipForwarding::setValue
//--AgentGen END
return super.setValue(newValue);
}
//--AgentGen BEGIN=ipForwarding::_METHODS
//--AgentGen END
}
public class IpDefaultTTL extends MOScalar {
IpDefaultTTL(OID oid, MOAccess access) {
super(oid, access, new Integer32());
//--AgentGen BEGIN=ipDefaultTTL
//--AgentGen END
}
public int isValueOK(SubRequest request) {
Variable newValue =
request.getVariableBinding().getVariable();
int valueOK = super.isValueOK(request);
if (valueOK != SnmpConstants.SNMP_ERROR_SUCCESS) {
return valueOK;
}
long v = ((Integer32)newValue).getValue();
if (!(((v >= 1L) && (v <= 255L)))) {
valueOK = SnmpConstants.SNMP_ERROR_WRONG_VALUE;
}
//--AgentGen BEGIN=ipDefaultTTL::isValueOK
//--AgentGen END
return valueOK;
}
public Variable getValue() {
//--AgentGen BEGIN=ipDefaultTTL::getValue
//--AgentGen END
return super.getValue();
}
public int setValue(Variable newValue) {
//--AgentGen BEGIN=ipDefaultTTL::setValue
//--AgentGen END
return super.setValue(newValue);
}
//--AgentGen BEGIN=ipDefaultTTL::_METHODS
//--AgentGen END
}
// Value Validators
/**
* The <code>IpForwardingValidator</code> implements the value
* validation for <code>IpForwarding</code>.
*/
static class IpForwardingValidator implements MOValueValidationListener {
public void validate(MOValueValidationEvent validationEvent) {
Variable newValue = validationEvent.getNewValue();
//--AgentGen BEGIN=ipForwarding::validate
//--AgentGen END
}
}
/**
* The <code>IpDefaultTTLValidator</code> implements the value
* validation for <code>IpDefaultTTL</code>.
*/
static class IpDefaultTTLValidator implements MOValueValidationListener {
public void validate(MOValueValidationEvent validationEvent) {
Variable newValue = validationEvent.getNewValue();
long v = ((Integer32)newValue).getValue();
if (!(((v >= 1L) && (v <= 255L)))) {
validationEvent.setValidationStatus(SnmpConstants.SNMP_ERROR_WRONG_VALUE);
return;
}
//--AgentGen BEGIN=ipDefaultTTL::validate
//--AgentGen END
}
}
/**
* The <code>IpNetToMediaIfIndexValidator</code> implements the value
* validation for <code>IpNetToMediaIfIndex</code>.
*/
static class IpNetToMediaIfIndexValidator implements MOValueValidationListener {
public void validate(MOValueValidationEvent validationEvent) {
Variable newValue = validationEvent.getNewValue();
long v = ((Integer32)newValue).getValue();
if (!(((v >= 1L) && (v <= 2147483647L)))) {
validationEvent.setValidationStatus(SnmpConstants.SNMP_ERROR_WRONG_VALUE);
return;
}
//--AgentGen BEGIN=ipNetToMediaIfIndex::validate
//--AgentGen END
}
}
/**
* The <code>IpNetToMediaPhysAddressValidator</code> implements the value
* validation for <code>IpNetToMediaPhysAddress</code>.
*/
static class IpNetToMediaPhysAddressValidator implements MOValueValidationListener {
public void validate(MOValueValidationEvent validationEvent) {
Variable newValue = validationEvent.getNewValue();
//--AgentGen BEGIN=ipNetToMediaPhysAddress::validate
//--AgentGen END
}
}
/**
* The <code>IpNetToMediaNetAddressValidator</code> implements the value
* validation for <code>IpNetToMediaNetAddress</code>.
*/
static class IpNetToMediaNetAddressValidator implements MOValueValidationListener {
public void validate(MOValueValidationEvent validationEvent) {
Variable newValue = validationEvent.getNewValue();
//--AgentGen BEGIN=ipNetToMediaNetAddress::validate
//--AgentGen END
}
}
/**
* The <code>IpNetToMediaTypeValidator</code> implements the value
* validation for <code>IpNetToMediaType</code>.
*/
static class IpNetToMediaTypeValidator implements MOValueValidationListener {
public void validate(MOValueValidationEvent validationEvent) {
Variable newValue = validationEvent.getNewValue();
//--AgentGen BEGIN=ipNetToMediaType::validate
//--AgentGen END
}
}
// Rows and Factories
public class IpAddrEntryRow extends DefaultMOMutableRow2PC {
public IpAddrEntryRow(OID index, Variable[] values) {
super(index, values);
}
public IpAddress getIpAdEntAddr() {
return (IpAddress) getValue(idxIpAdEntAddr);
}
public void setIpAdEntAddr(IpAddress newValue) {
setValue(idxIpAdEntAddr, newValue);
}
public Integer32 getIpAdEntIfIndex() {
return (Integer32) getValue(idxIpAdEntIfIndex);
}
public void setIpAdEntIfIndex(Integer32 newValue) {
setValue(idxIpAdEntIfIndex, newValue);
}
public IpAddress getIpAdEntNetMask() {
return (IpAddress) getValue(idxIpAdEntNetMask);
}
public void setIpAdEntNetMask(IpAddress newValue) {
setValue(idxIpAdEntNetMask, newValue);
}
public Integer32 getIpAdEntBcastAddr() {
return (Integer32) getValue(idxIpAdEntBcastAddr);
}
public void setIpAdEntBcastAddr(Integer32 newValue) {
setValue(idxIpAdEntBcastAddr, newValue);
}
public Integer32 getIpAdEntReasmMaxSize() {
return (Integer32) getValue(idxIpAdEntReasmMaxSize);
}
public void setIpAdEntReasmMaxSize(Integer32 newValue) {
setValue(idxIpAdEntReasmMaxSize, newValue);
}
//--AgentGen BEGIN=ipAddrEntry::Row
//--AgentGen END
}
class IpAddrEntryRowFactory
extends DefaultMOMutableRow2PCFactory
{
public synchronized MOTableRow createRow(OID index, Variable[] values)
throws UnsupportedOperationException
{
IpAddrEntryRow row = new IpAddrEntryRow(index, values);
//--AgentGen BEGIN=ipAddrEntry::createRow
//--AgentGen END
return row;
}
public synchronized void freeRow(MOTableRow row) {
//--AgentGen BEGIN=ipAddrEntry::freeRow
//--AgentGen END
}
//--AgentGen BEGIN=ipAddrEntry::RowFactory
//--AgentGen END
}
public class IpNetToMediaEntryRow extends DefaultMOMutableRow2PC {
public IpNetToMediaEntryRow(OID index, Variable[] values) {
super(index, values);
}
public Integer32 getIpNetToMediaIfIndex() {
return (Integer32) getValue(idxIpNetToMediaIfIndex);
}
public void setIpNetToMediaIfIndex(Integer32 newValue) {
setValue(idxIpNetToMediaIfIndex, newValue);
}
public OctetString getIpNetToMediaPhysAddress() {
return (OctetString) getValue(idxIpNetToMediaPhysAddress);
}
public void setIpNetToMediaPhysAddress(OctetString newValue) {
setValue(idxIpNetToMediaPhysAddress, newValue);
}
public IpAddress getIpNetToMediaNetAddress() {
return (IpAddress) getValue(idxIpNetToMediaNetAddress);
}
public void setIpNetToMediaNetAddress(IpAddress newValue) {
setValue(idxIpNetToMediaNetAddress, newValue);
}
public Integer32 getIpNetToMediaType() {
return (Integer32) getValue(idxIpNetToMediaType);
}
public void setIpNetToMediaType(Integer32 newValue) {
setValue(idxIpNetToMediaType, newValue);
}
//--AgentGen BEGIN=ipNetToMediaEntry::Row
//--AgentGen END
}
class IpNetToMediaEntryRowFactory
extends DefaultMOMutableRow2PCFactory
{
public synchronized MOTableRow createRow(OID index, Variable[] values)
throws UnsupportedOperationException
{
IpNetToMediaEntryRow row = new IpNetToMediaEntryRow(index, values);
//--AgentGen BEGIN=ipNetToMediaEntry::createRow
//--AgentGen END
return row;
}
public synchronized void freeRow(MOTableRow row) {
//--AgentGen BEGIN=ipNetToMediaEntry::freeRow
//--AgentGen END
}
//--AgentGen BEGIN=ipNetToMediaEntry::RowFactory
//--AgentGen END
}
//--AgentGen BEGIN=_METHODS
//--AgentGen END
//--AgentGen BEGIN=_CLASSES
//--AgentGen END
//--AgentGen BEGIN=_END
//--AgentGen END
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -