Blob Blame History Raw
/*
 * This Java file has been generated by smidump 0.4.5. Do not edit!
 * It is intended to be used within a Java AgentX sub-agent environment.
 *
 * $Id: NetConfigEntry.java 4432 2006-05-29 16:21:11Z strauss $
 */

/**
    This class represents a Java AgentX (JAX) implementation of
    the table row netConfigEntry defined in RMON2-MIB.

    @version 1
    @author  smidump 0.4.5
    @see     AgentXTable, AgentXEntry
 */

import jax.AgentXOID;
import jax.AgentXSetPhase;
import jax.AgentXResponsePDU;
import jax.AgentXEntry;

public class NetConfigEntry extends AgentXEntry
{

    protected byte[] netConfigIPAddress = new byte[4];
    protected byte[] undo_netConfigIPAddress = new byte[4];
    protected byte[] netConfigSubnetMask = new byte[4];
    protected byte[] undo_netConfigSubnetMask = new byte[4];
    protected int netConfigStatus = 0;
    protected int undo_netConfigStatus = 0;
    // foreign indices
    protected int ifIndex;

    public NetConfigEntry(int ifIndex)
    {
        this.ifIndex = ifIndex;

        instance.append(ifIndex);
    }

    public int get_ifIndex()
    {
        return ifIndex;
    }

    public byte[] get_netConfigIPAddress()
    {
        return netConfigIPAddress;
    }

    public int set_netConfigIPAddress(AgentXSetPhase phase, byte[] value)
    {
        switch (phase.getPhase()) {
        case AgentXSetPhase.TEST_SET:
            break;
        case AgentXSetPhase.COMMIT:
            undo_netConfigIPAddress = netConfigIPAddress;
            netConfigIPAddress = new byte[value.length];
            for(int i = 0; i < value.length; i++)
                netConfigIPAddress[i] = value[i];
            break;
        case AgentXSetPhase.UNDO:
            netConfigIPAddress = undo_netConfigIPAddress;
            break;
        case AgentXSetPhase.CLEANUP:
            undo_netConfigIPAddress = null;
            break;
        default:
            return AgentXResponsePDU.PROCESSING_ERROR;
        }
        return AgentXResponsePDU.NO_ERROR;
    }
    public byte[] get_netConfigSubnetMask()
    {
        return netConfigSubnetMask;
    }

    public int set_netConfigSubnetMask(AgentXSetPhase phase, byte[] value)
    {
        switch (phase.getPhase()) {
        case AgentXSetPhase.TEST_SET:
            break;
        case AgentXSetPhase.COMMIT:
            undo_netConfigSubnetMask = netConfigSubnetMask;
            netConfigSubnetMask = new byte[value.length];
            for(int i = 0; i < value.length; i++)
                netConfigSubnetMask[i] = value[i];
            break;
        case AgentXSetPhase.UNDO:
            netConfigSubnetMask = undo_netConfigSubnetMask;
            break;
        case AgentXSetPhase.CLEANUP:
            undo_netConfigSubnetMask = null;
            break;
        default:
            return AgentXResponsePDU.PROCESSING_ERROR;
        }
        return AgentXResponsePDU.NO_ERROR;
    }
    public int get_netConfigStatus()
    {
        return netConfigStatus;
    }

    public int set_netConfigStatus(AgentXSetPhase phase, int value)
    {
        switch (phase.getPhase()) {
        case AgentXSetPhase.TEST_SET:
            break;
        case AgentXSetPhase.COMMIT:
            undo_netConfigStatus = netConfigStatus;
            netConfigStatus = value;
            break;
        case AgentXSetPhase.UNDO:
            netConfigStatus = undo_netConfigStatus;
            break;
        case AgentXSetPhase.CLEANUP:
            break;
        default:
            return AgentXResponsePDU.PROCESSING_ERROR;
        }
        return AgentXResponsePDU.NO_ERROR;
    }
}