// Home | Go Back //

/*
 * Copyright (c) 2002-2003 iReasoning Inc. All Rights Reserved.
 * 
 * This SOURCE CODE FILE, which has been provided by iReasoning Inc. as part
 * of an iReasoning Software product for use ONLY by licensed users of the product,
 * includes CONFIDENTIAL and PROPRIETARY information of iReasoning Inc.  
 *
 * USE OF THIS SOFTWARE IS GOVERNED BY THE TERMS AND CONDITIONS 
 * OF THE LICENSE STATEMENT AND LIMITED WARRANTY FURNISHED WITH
 * THE PRODUCT.
 *
 * IN PARTICULAR, YOU WILL INDEMNIFY AND HOLD IREASONING SOFTWARE, ITS
 * RELATED COMPANIES AND ITS SUPPLIERS, HARMLESS FROM AND AGAINST ANY
 * CLAIMS OR LIABILITIES ARISING OUT OF THE USE, REPRODUCTION, OR
 * DISTRIBUTION OF YOUR PROGRAMS, INCLUDING ANY CLAIMS OR LIABILITIES
 * ARISING OUT OF OR RESULTING FROM THE USE, MODIFICATION, OR
 * DISTRIBUTION OF PROGRAMS OR FILES CREATED FROM, BASED ON, AND/OR
 * DERIVED FROM THIS SOURCE CODE FILE.
 */

package agent.mib2jni;
import java.io.*;
import java.util.*;
import com.ireasoning.util.*;
import com.ireasoning.protocol.snmp.*;
import javax.management.*;
import com.ireasoning.jni.*;

/**
 * Class represents ip mib object in RFC1213_MIB
 */
public class IpGroup extends SnmpBaseGroup implements IpGroupMBean
{
    // SnmpOID: .1.3.6.1.2.1.4.1.0
    protected int _ipForwarding = Integer.MIN_VALUE;
    // SnmpOID: .1.3.6.1.2.1.4.2.0
    protected int _ipDefaultTTL = Integer.MIN_VALUE;
    // SnmpOID: .1.3.6.1.2.1.4.3.0
    protected SnmpCounter32 _ipInReceives = null;
    // SnmpOID: .1.3.6.1.2.1.4.4.0
    protected SnmpCounter32 _ipInHdrErrors = null;
    // SnmpOID: .1.3.6.1.2.1.4.5.0
    protected SnmpCounter32 _ipInAddrErrors = null;
    // SnmpOID: .1.3.6.1.2.1.4.6.0
    protected SnmpCounter32 _ipForwDatagrams = null;
    // SnmpOID: .1.3.6.1.2.1.4.7.0
    protected SnmpCounter32 _ipInUnknownProtos = null;
    // SnmpOID: .1.3.6.1.2.1.4.8.0
    protected SnmpCounter32 _ipInDiscards = null;
    // SnmpOID: .1.3.6.1.2.1.4.9.0
    protected SnmpCounter32 _ipInDelivers = null;
    // SnmpOID: .1.3.6.1.2.1.4.10.0
    protected SnmpCounter32 _ipOutRequests = null;
    // SnmpOID: .1.3.6.1.2.1.4.11.0
    protected SnmpCounter32 _ipOutDiscards = null;
    // SnmpOID: .1.3.6.1.2.1.4.12.0
    protected SnmpCounter32 _ipOutNoRoutes = null;
    // SnmpOID: .1.3.6.1.2.1.4.13.0
    protected int _ipReasmTimeout = Integer.MIN_VALUE;
    // SnmpOID: .1.3.6.1.2.1.4.14.0
    protected SnmpCounter32 _ipReasmReqds = null;
    // SnmpOID: .1.3.6.1.2.1.4.15.0
    protected SnmpCounter32 _ipReasmOKs = null;
    // SnmpOID: .1.3.6.1.2.1.4.16.0
    protected SnmpCounter32 _ipReasmFails = null;
    // SnmpOID: .1.3.6.1.2.1.4.17.0
    protected SnmpCounter32 _ipFragOKs = null;
    // SnmpOID: .1.3.6.1.2.1.4.18.0
    protected SnmpCounter32 _ipFragFails = null;
    // SnmpOID: .1.3.6.1.2.1.4.19.0
    protected SnmpCounter32 _ipFragCreates = null;
    // SnmpOID: .1.3.6.1.2.1.4.23.0
    protected SnmpCounter32 _ipRoutingDiscards = null;
    
    /**
     * Constructor
     * @param root SnmpOID tree root
     * @param oid the SnmpOID of this group
     * @param args the objects passed from caller for Initialization purpose
     */
    public IpGroup(OIDTreeNode root, String oid, Object [] args)
    {
        super(root, oid);
    }
    
    /**
     * Gets new ipForwarding value
     */
    public synchronized int getIpForwarding()
    {
        if(this._ipForwarding != Integer.MIN_VALUE) return this._ipForwarding;
        else return Integer.parseInt(JNIFunction.getScalar("ipForwarding"));
    }
    
    /**
     * Sets new ipForwarding value
     * @param value the new value
     */
    public synchronized void setIpForwarding(int newValue)
    {
        this._ipForwarding = newValue;
    }
    
    /**
     * Gets new ipDefaultTTL value
     */
    public synchronized int getIpDefaultTTL()
    {
        if(this._ipDefaultTTL != Integer.MIN_VALUE) return this._ipDefaultTTL;
        else return Integer.parseInt(JNIFunction.getScalar("ipDefaultTTL"));
    }
    
    /**
     * Sets new ipDefaultTTL value
     * @param value the new value
     */
    public synchronized void setIpDefaultTTL(int newValue)
    {
        this._ipDefaultTTL = newValue;
    }
    
    /**
     * Gets new ipInReceives value
     */
    public synchronized SnmpCounter32 getIpInReceives()
    {
        if(this._ipInReceives != null) return this._ipInReceives;
        else
        {
            String s = JNIFunction.getScalar("ipInReceives");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipInReceives value
     * @param value the new value
     */
    public synchronized void setIpInReceives(SnmpCounter32 newValue)
    {
        this._ipInReceives = newValue;
    }
    
    /**
     * Gets new ipInHdrErrors value
     */
    public synchronized SnmpCounter32 getIpInHdrErrors()
    {
        if(this._ipInHdrErrors != null) return this._ipInHdrErrors;
        else
        {
            String s = JNIFunction.getScalar("ipInHdrErrors");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipInHdrErrors value
     * @param value the new value
     */
    public synchronized void setIpInHdrErrors(SnmpCounter32 newValue)
    {
        this._ipInHdrErrors = newValue;
    }
    
    /**
     * Gets new ipInAddrErrors value
     */
    public synchronized SnmpCounter32 getIpInAddrErrors()
    {
        if(this._ipInAddrErrors != null) return this._ipInAddrErrors;
        else
        {
            String s = JNIFunction.getScalar("ipInAddrErrors");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipInAddrErrors value
     * @param value the new value
     */
    public synchronized void setIpInAddrErrors(SnmpCounter32 newValue)
    {
        this._ipInAddrErrors = newValue;
    }
    
    /**
     * Gets new ipForwDatagrams value
     */
    public synchronized SnmpCounter32 getIpForwDatagrams()
    {
        if(this._ipForwDatagrams != null) return this._ipForwDatagrams;
        else
        {
            String s = JNIFunction.getScalar("ipForwDatagrams");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipForwDatagrams value
     * @param value the new value
     */
    public synchronized void setIpForwDatagrams(SnmpCounter32 newValue)
    {
        this._ipForwDatagrams = newValue;
    }
    
    /**
     * Gets new ipInUnknownProtos value
     */
    public synchronized SnmpCounter32 getIpInUnknownProtos()
    {
        if(this._ipInUnknownProtos != null) return this._ipInUnknownProtos;
        else
        {
            String s = JNIFunction.getScalar("ipInUnknownProtos");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipInUnknownProtos value
     * @param value the new value
     */
    public synchronized void setIpInUnknownProtos(SnmpCounter32 newValue)
    {
        this._ipInUnknownProtos = newValue;
    }
    
    /**
     * Gets new ipInDiscards value
     */
    public synchronized SnmpCounter32 getIpInDiscards()
    {
        if(this._ipInDiscards != null) return this._ipInDiscards;
        else
        {
            String s = JNIFunction.getScalar("ipInDiscards");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipInDiscards value
     * @param value the new value
     */
    public synchronized void setIpInDiscards(SnmpCounter32 newValue)
    {
        this._ipInDiscards = newValue;
    }
    
    /**
     * Gets new ipInDelivers value
     */
    public synchronized SnmpCounter32 getIpInDelivers()
    {
        if(this._ipInDelivers != null) return this._ipInDelivers;
        else
        {
            String s = JNIFunction.getScalar("ipInDelivers");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipInDelivers value
     * @param value the new value
     */
    public synchronized void setIpInDelivers(SnmpCounter32 newValue)
    {
        this._ipInDelivers = newValue;
    }
    
    /**
     * Gets new ipOutRequests value
     */
    public synchronized SnmpCounter32 getIpOutRequests()
    {
        if(this._ipOutRequests != null) return this._ipOutRequests;
        else
        {
            String s = JNIFunction.getScalar("ipOutRequests");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipOutRequests value
     * @param value the new value
     */
    public synchronized void setIpOutRequests(SnmpCounter32 newValue)
    {
        this._ipOutRequests = newValue;
    }
    
    /**
     * Gets new ipOutDiscards value
     */
    public synchronized SnmpCounter32 getIpOutDiscards()
    {
        if(this._ipOutDiscards != null) return this._ipOutDiscards;
        else
        {
            String s = JNIFunction.getScalar("ipOutDiscards");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipOutDiscards value
     * @param value the new value
     */
    public synchronized void setIpOutDiscards(SnmpCounter32 newValue)
    {
        this._ipOutDiscards = newValue;
    }
    
    /**
     * Gets new ipOutNoRoutes value
     */
    public synchronized SnmpCounter32 getIpOutNoRoutes()
    {
        if(this._ipOutNoRoutes != null) return this._ipOutNoRoutes;
        else
        {
            String s = JNIFunction.getScalar("ipOutNoRoutes");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipOutNoRoutes value
     * @param value the new value
     */
    public synchronized void setIpOutNoRoutes(SnmpCounter32 newValue)
    {
        this._ipOutNoRoutes = newValue;
    }
    
    /**
     * Gets new ipReasmTimeout value
     */
    public synchronized int getIpReasmTimeout()
    {
        if(this._ipReasmTimeout != Integer.MIN_VALUE) return this._ipReasmTimeout;
        else
        {
            return Integer.parseInt(JNIFunction.getScalar("ipOutNoRoutes"));
        }
    }
    
    /**
     * Sets new ipReasmTimeout value
     * @param value the new value
     */
    public synchronized void setIpReasmTimeout(int newValue)
    {
        this._ipReasmTimeout = newValue;
    }
    
    /**
     * Gets new ipReasmReqds value
     */
    public synchronized SnmpCounter32 getIpReasmReqds()
    {
        if(this._ipReasmReqds != null) return this._ipReasmReqds;
        else
        {
            String s = JNIFunction.getScalar("ipReasmReqds");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipReasmReqds value
     * @param value the new value
     */
    public synchronized void setIpReasmReqds(SnmpCounter32 newValue)
    {
        this._ipReasmReqds = newValue;
    }
    
    /**
     * Gets new ipReasmOKs value
     */
    public synchronized SnmpCounter32 getIpReasmOKs()
    {
        if(this._ipReasmOKs != null) return this._ipReasmOKs;
        else
        {
            String s = JNIFunction.getScalar("ipReasmOKs");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipReasmOKs value
     * @param value the new value
     */
    public synchronized void setIpReasmOKs(SnmpCounter32 newValue)
    {
        this._ipReasmOKs = newValue;
    }
    
    /**
     * Gets new ipReasmFails value
     */
    public synchronized SnmpCounter32 getIpReasmFails()
    {
        if(this._ipReasmFails != null) return this._ipReasmFails;
        else
        {
            String s = JNIFunction.getScalar("ipReasmFails");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipReasmFails value
     * @param value the new value
     */
    public synchronized void setIpReasmFails(SnmpCounter32 newValue)
    {
        this._ipReasmFails = newValue;
    }
    
    /**
     * Gets new ipFragOKs value
     */
    public synchronized SnmpCounter32 getIpFragOKs()
    {
        if(this._ipFragOKs != null) return this._ipFragOKs;
        else
        {
            String s = JNIFunction.getScalar("ipFragOKs");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipFragOKs value
     * @param value the new value
     */
    public synchronized void setIpFragOKs(SnmpCounter32 newValue)
    {
        this._ipFragOKs = newValue;
    }
    
    /**
     * Gets new ipFragFails value
     */
    public synchronized SnmpCounter32 getIpFragFails()
    {
        if(this._ipFragFails != null) return this._ipFragFails;
        else
        {
            String s = JNIFunction.getScalar("ipFragFails");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipFragFails value
     * @param value the new value
     */
    public synchronized void setIpFragFails(SnmpCounter32 newValue)
    {
        this._ipFragFails = newValue;
    }
    
    /**
     * Gets new ipFragCreates value
     */
    public synchronized SnmpCounter32 getIpFragCreates()
    {
        if(this._ipFragCreates != null) return this._ipFragCreates;
        else
        {
            String s = JNIFunction.getScalar("ipFragCreates");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipFragCreates value
     * @param value the new value
     */
    public synchronized void setIpFragCreates(SnmpCounter32 newValue)
    {
        this._ipFragCreates = newValue;
    }
    
    /**
     * Gets new ipRoutingDiscards value
     */
    public synchronized SnmpCounter32 getIpRoutingDiscards()
    {
        if(this._ipRoutingDiscards != null) return this._ipRoutingDiscards;
        else
        {
            String s = JNIFunction.getScalar("ipRoutingDiscards");
            return new SnmpCounter32(s);
        }
    }
    
    /**
     * Sets new ipRoutingDiscards value
     * @param value the new value
     */
    public synchronized void setIpRoutingDiscards(SnmpCounter32 newValue)
    {
        this._ipRoutingDiscards = newValue;
    }
    
}