public class Agent
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
AGENT_HALTED
agent's state : halted
|
static int |
AGENT_NOT_CONFIG
agent's state : not configured
|
static int |
AGENT_PAUSED
agent's state : paused
|
static int |
AGENT_RUNNING
agent's state : running
|
static int |
AGENT_STOPPED
agent's state : stopped
|
static int |
AGENT_STOPPING
agent's state : stopping (or starting)
|
| Constructor and Description |
|---|
Agent(int agent_no,
Session session)
Creates an agent object for a given session
|
| Modifier and Type | Method and Description |
|---|---|
void |
add_ipalias(java.lang.String address,
int port,
java.lang.String mask,
java.lang.String iface)
Add a new ipalias
(See mimic agent ipalias add)
|
void |
add_timer_script(java.lang.String script,
int interval,
java.lang.String args)
Add (and start) timerscript with given interval and arguments
(See mimic timer script add)
|
void |
agent_store_append(java.lang.String var,
java.lang.String val,
int persist)
Append (and start) storage with a given variable and value
(See mimic agent store append)
|
void |
agent_store_copy(int other)
Copy variable store from other agent
(See mimic agent store copy)
|
int |
agent_store_exists(java.lang.String var)
Examine existance of a store variable
(See mimic agent store exists)
|
java.lang.String |
agent_store_get(java.lang.String var)
Return variable value
(See mimic agent store get)
|
java.util.LinkedList |
agent_store_list()
List variables
(See mimic agent store list)
|
void |
agent_store_lreplace(java.lang.String var,
int index,
java.lang.String val)
Treat variable as a list and modify entry for given index
with given value
(See mimic agent store lreplace)
|
java.util.LinkedList |
agent_store_mget(java.util.LinkedList vars)
Get multiple variable values
(See mimic agent store mget)
|
void |
agent_store_mlreplace(java.util.LinkedList varlist,
java.util.LinkedList indexlist,
java.util.LinkedList vallist)
Treat each variable as a list and modify entry for given index
with given value
(See mimic agent store mlreplace)
|
int |
agent_store_persists(java.lang.String var)
Examine persistance of a store variable
(See mimic agent store persists)
|
void |
agent_store_set(java.lang.String var,
java.lang.String val,
int persist)
Set (and start) storage with a given variable and value
(See mimic agent store set)
|
void |
agent_store_unset(java.lang.String var)
Unset a variable-value pair
(See mimic agent store unset)
|
void |
configure(java.lang.String address,
java.util.LinkedList mibs)
Configure agent
|
void |
del_ipalias(java.lang.String address,
int port)
Delete a configured ipalias
(See mimic agent ipalias delete)
|
void |
del_timer_script(java.lang.String script)
Delete a running script with specified name
(See mimic timer script delete)
|
void |
from_add(java.lang.String host,
int port)
Add a new 'from' entry
(See mimic agent from add)
|
void |
from_del(java.lang.String host,
int port)
Delete a configured 'from' entry
(See mimic agent from delete)
|
java.util.LinkedList |
from_list()
List the 'from' entry list for the agent
(See mimic agent from list)
|
int |
get_agent_no()
Get agent's number
|
int |
get_changed()
Get the changed flag
(See mimic agent get)
|
int |
get_config_changed()
Get the config changed flag
(See mimic agent get)
|
int |
get_delay()
Get the delay
(See mimic agent get)
|
int |
get_drops()
Get the drop rate
(See mimic agent get)
|
java.lang.String |
get_host()
Get the primary ip address
(See mimic agent get)
|
int |
get_inform_retries()
Get the inform retries
(See mimic agent get)
|
int |
get_inform_timeout()
Get the inform timeout
(See mimic agent get)
|
java.lang.String |
get_interface()
Get the interface for the primary ipalias
(See mimic agent get)
|
java.lang.String |
get_mask()
Get the primary subnet mask
(See mimic agent get)
|
java.util.LinkedList |
get_mibs()
Get the MIB triplets
(See mimic agent get)
|
java.lang.String |
get_oiddir()
Get the OidDir filename
(See mimic agent get)
|
java.lang.String |
get_owner()
Get the owner
(See mimic agent get)
|
int |
get_pdusize()
Get the maximum PDU size
(See mimic agent get)
|
int |
get_port()
Get the port number
(See mimic agent get)
|
java.lang.String |
get_privdir()
Get the private directory
(See mimic agent get)
|
java.util.LinkedList |
get_protocols()
Get the list of protocols
(See mimic agent get)
|
java.lang.String |
get_read_community()
Get the read community
(See mimic agent get)
|
java.lang.String |
get_scen()
Get the simulation scen
(See mimic agent get)
|
Session |
get_session()
Get agent's session
|
java.lang.String |
get_sim()
Get the sim name
(See mimic agent get)
|
int |
get_starttime()
Get the start time
(See mimic agent get)
|
int |
get_state_changed()
Get the state changed flag
(See mimic agent get)
|
static java.lang.String |
get_state_descr(int state)
Get the description of the specified agent state
(See mimic agent get)
|
int |
get_state()
Get the agent state
(See mimic agent get)
|
java.util.LinkedList |
get_statistics_Long()
Get the list of statistics (Long)
(See mimic agent get)
|
java.util.LinkedList |
get_statistics_String()
Get the list of statistics (String)
(See mimic agent get)
|
java.util.LinkedList |
get_statistics()
Get the list of statistics
(See mimic agent get)
|
int |
get_trace()
Get the trace flag
(See mimic agent get)
|
int |
get_validate()
Get the validate flag
(See mimic agent get)
|
Valuespace |
get_valuespace()
Get the valuespace object for this agent.
|
java.lang.String |
get_write_community()
Get the write community
(See mimic agent get)
|
void |
halt()
Halt agent (from running)
(See mimic agent halt)
|
java.util.LinkedList |
list_ipaliases()
List the ipaliases for the agent
(See mimic agent ipalias list)
|
java.util.LinkedList |
list_timer_scripts()
List the currently running timer scripts
(See
mimicsh_timer_script_list)
|
void |
pause_at(int time)
Pause agent at given time (from running)
(See mimic agent pause)
|
void |
pause_now()
Pause agent now (from running)
(See mimic agent pause)
|
java.lang.String |
protocol_msg(java.lang.String protocol,
java.lang.String msg)
Pass agent's message string to the protocol
|
void |
remove()
Delete a configured agent
(See mimic agent remove)
|
void |
resume()
Resume agent (from paused/halted)
(See mimic agent resume)
|
void |
save()
Save the agent's valuespace changes
(See mimic agent save)
|
void |
set_delay(int delay)
Set the delay
(See mimic agent set)
|
void |
set_drops(int drops)
Set the drop rate
(See mimic agent set)
|
void |
set_host(java.lang.String host)
Set the primary ip address
(See mimic agent set)
|
void |
set_inform_retries(int retries)
Set the inform retries
(See mimic agent set)
|
void |
set_inform_timeout(int timeout)
Set the inform timeout
(See mimic agent set)
|
void |
set_interface(java.lang.String iface)
Set the interface for primary ipalias
(See mimic agent set)
|
void |
set_mask(java.lang.String mask)
Set the primary subnet mask
(See mimic agent set)
|
void |
set_mibs(java.util.LinkedList mibs)
Set the MIB triplets
(See mimic agent set)
|
void |
set_oiddir(java.lang.String oiddir)
Set the OidDir filename
(See mimic agent set)
|
void |
set_pdusize(int pdusize)
Set the maximum PDU size
(See mimic agent set)
|
void |
set_port(int port)
Set the port number
(See mimic agent set)
|
void |
set_protocols(java.util.LinkedList protocols)
Set the list of protocols supported
(See mimic agent set)
|
void |
set_read_community(java.lang.String readcomm)
Set the read community
(See mimic agent set)
|
void |
set_starttime(int starttime)
Set the starttime
(See mimic agent set)
|
void |
set_trace(int flag)
Set the trace flag
(See mimic agent set)
|
void |
set_validate(int flag)
Set the validate flag
(See mimic agent set)
|
void |
set_write_community(java.lang.String writecomm)
Set the write community
(See mimic agent set)
|
void |
start_ipalias(java.lang.String address,
int port)
Start the configured ipalias
(See mimic agent ipalias start)
|
void |
start()
Start agent (from stopped)
(See mimic agent start)
|
int |
status_ipalias(java.lang.String address,
int port)
Status of the configured ipalias for the agent
(See mimic agent ipalias status)
|
void |
stop_ipalias(java.lang.String address,
int port)
Stop the configured ipalias
(See mimic agent ipalias stop)
|
void |
stop()
Stop agent (from running, paused, halted)
(See mimic agent stop)
|
void |
trap_config_add(java.lang.String address,
int port)
Set the trap destination
(See mimic agent trap config add)
|
void |
trap_config_del(java.lang.String address,
int port)
Remove the trap destination from list
(See mimic agent trap config delete)
|
java.util.LinkedList |
trap_config_list()
Get the trap destination list
(See mimic agent trap config list)
|
java.util.LinkedList |
trap_list()
Get the trap list
|
public static final int AGENT_RUNNING
public static final int AGENT_STOPPED
public static final int AGENT_HALTED
public static final int AGENT_PAUSED
public static final int AGENT_NOT_CONFIG
public static final int AGENT_STOPPING
public Agent(int agent_no,
Session session)
agent_no - (IN) agent numbersession - (IN) session objectpublic int get_agent_no()
public Session get_session()
public void start()
throws ErrorInfo
ErrorInfo - on errorpublic void stop()
throws ErrorInfo
ErrorInfo - on errorpublic void pause_now()
throws ErrorInfo
ErrorInfo - on errorpublic void pause_at(int time)
throws ErrorInfo
time - intErrorInfo - on errorpublic void halt()
throws ErrorInfo
ErrorInfo - on errorpublic void resume()
throws ErrorInfo
ErrorInfo - on errorpublic void configure(java.lang.String address,
java.util.LinkedList mibs)
throws ErrorInfo
address - (IN) ip-addressmibs - (IN) MIB tripletsErrorInfo - on errorpublic void remove()
throws ErrorInfo
ErrorInfo - on errorpublic java.lang.String get_interface()
throws ErrorInfo
ErrorInfo - on errorpublic java.lang.String get_host()
throws ErrorInfo
ErrorInfo - on errorpublic java.lang.String get_mask()
throws ErrorInfo
ErrorInfo - on errorpublic int get_port()
throws ErrorInfo
ErrorInfo - on errorpublic java.lang.String get_read_community()
throws ErrorInfo
ErrorInfo - on errorpublic java.lang.String get_write_community()
throws ErrorInfo
ErrorInfo - on errorpublic java.util.LinkedList get_mibs()
throws ErrorInfo
ErrorInfo - on errorpublic java.lang.String get_sim()
throws ErrorInfo
ErrorInfo - on errorpublic java.lang.String get_scen()
throws ErrorInfo
ErrorInfo - on errorpublic int get_pdusize()
throws ErrorInfo
ErrorInfo - on errorpublic java.util.LinkedList get_protocols()
throws ErrorInfo
ErrorInfo - on errorpublic int get_delay()
throws ErrorInfo
ErrorInfo - on errorpublic int get_starttime()
throws ErrorInfo
ErrorInfo - on errorpublic int get_state()
throws ErrorInfo
ErrorInfo - on errorpublic java.util.LinkedList get_statistics()
throws ErrorInfo
ErrorInfo - on errorpublic java.util.LinkedList get_statistics_Long()
throws ErrorInfo
ErrorInfo - on errorpublic java.util.LinkedList get_statistics_String()
throws ErrorInfo
ErrorInfo - on errorpublic int get_drops()
throws ErrorInfo
ErrorInfo - on errorpublic int get_changed()
throws ErrorInfo
ErrorInfo - on errorpublic int get_config_changed()
throws ErrorInfo
ErrorInfo - on errorpublic int get_state_changed()
throws ErrorInfo
ErrorInfo - on errorpublic int get_trace()
throws ErrorInfo
ErrorInfo - on errorpublic int get_validate()
throws ErrorInfo
ErrorInfo - on errorpublic java.lang.String get_owner()
throws ErrorInfo
ErrorInfo - on errorpublic java.lang.String get_privdir()
throws ErrorInfo
ErrorInfo - on errorpublic java.lang.String get_oiddir()
throws ErrorInfo
ErrorInfo - on errorpublic int get_inform_timeout()
throws ErrorInfo
ErrorInfo - on errorpublic int get_inform_retries()
throws ErrorInfo
ErrorInfo - on errorpublic java.util.LinkedList trap_list()
throws ErrorInfo
ErrorInfo - on errorpublic java.util.LinkedList trap_config_list()
throws ErrorInfo
ErrorInfo - on errorpublic void trap_config_add(java.lang.String address,
int port)
throws ErrorInfo
address - target ip addressport - target portErrorInfo - on errorpublic void trap_config_del(java.lang.String address,
int port)
throws ErrorInfo
address - target ip addressport - target portErrorInfo - on errorpublic void set_interface(java.lang.String iface)
throws ErrorInfo
iface - (IN) interfaceErrorInfo - on errorpublic void set_host(java.lang.String host)
throws ErrorInfo
host - (IN) ip-addressErrorInfo - on errorpublic void set_mask(java.lang.String mask)
throws ErrorInfo
mask - (IN) subnet maskErrorInfo - on errorpublic void set_port(int port)
throws ErrorInfo
port - (IN) port numberErrorInfo - on errorpublic void set_read_community(java.lang.String readcomm)
throws ErrorInfo
readcomm - (IN) read communityErrorInfo - on errorpublic void set_write_community(java.lang.String writecomm)
throws ErrorInfo
writecomm - (IN) write communityErrorInfo - on errorpublic void set_protocols(java.util.LinkedList protocols)
throws ErrorInfo
protocols - (IN) list of protocol stringsErrorInfo - on errorpublic void set_delay(int delay)
throws ErrorInfo
delay - (IN) delayErrorInfo - on errorpublic void set_starttime(int starttime)
throws ErrorInfo
starttime - (IN) start timeErrorInfo - on errorpublic void set_mibs(java.util.LinkedList mibs)
throws ErrorInfo
mibs - (IN) list of MIB triplet stringsErrorInfo - on errorpublic void set_trace(int flag)
throws ErrorInfo
flag - (IN) trace flagErrorInfo - on errorpublic void set_pdusize(int pdusize)
throws ErrorInfo
pdusize - (IN) PDU sizeErrorInfo - on errorpublic void set_drops(int drops)
throws ErrorInfo
drops - (IN) drop rateErrorInfo - on errorpublic void set_validate(int flag)
throws ErrorInfo
flag - (IN) validate flagErrorInfo - on errorpublic void set_oiddir(java.lang.String oiddir)
throws ErrorInfo
oiddir - (IN) OidDir filenameErrorInfo - on errorpublic void set_inform_timeout(int timeout)
throws ErrorInfo
timeout - (IN) timeout secsErrorInfo - on errorpublic void set_inform_retries(int retries)
throws ErrorInfo
retries - (IN) no of retriesErrorInfo - on errorpublic void save()
throws ErrorInfo
ErrorInfo - on errorpublic void add_ipalias(java.lang.String address,
int port,
java.lang.String mask,
java.lang.String iface)
throws ErrorInfo
address - (IN) ip-addressport - (IN) port numbermask - (IN) subnet maskiface - (IN) interfaceErrorInfo - on errorpublic void del_ipalias(java.lang.String address,
int port)
throws ErrorInfo
address - (IN) ip-addressport - (IN) port numberErrorInfo - on errorpublic void start_ipalias(java.lang.String address,
int port)
throws ErrorInfo
address - (IN) ip-addressport - (IN) port numberErrorInfo - on errorpublic void stop_ipalias(java.lang.String address,
int port)
throws ErrorInfo
address - (IN) ip-addressport - (IN) port numberErrorInfo - on errorpublic int status_ipalias(java.lang.String address,
int port)
throws ErrorInfo
address - (IN) ip addressport - (IN)ErrorInfo - on errorpublic java.util.LinkedList list_ipaliases()
throws ErrorInfo
ErrorInfo - on errorpublic void add_timer_script(java.lang.String script,
int interval,
java.lang.String args)
throws ErrorInfo
script - (IN) script to addinterval - (IN) interval in milli-secondsargs - (IN) arguments passed to the scriptErrorInfo - on errorpublic void del_timer_script(java.lang.String script)
throws ErrorInfo
script - (IN) script to deleteErrorInfo - on errorpublic java.util.LinkedList list_timer_scripts()
throws ErrorInfo
ErrorInfo - on errorpublic java.lang.String protocol_msg(java.lang.String protocol,
java.lang.String msg)
throws ErrorInfo
protocol - (IN) protocol to send message tomsg - (IN) message string to be sentErrorInfo - on errorpublic Valuespace get_valuespace()
public static java.lang.String get_state_descr(int state)
state - (IN)public void agent_store_set(java.lang.String var,
java.lang.String val,
int persist)
throws ErrorInfo
var - (IN) variable to setval - (IN) value to setpersist - (IN) persistenceErrorInfo - on errorpublic void agent_store_append(java.lang.String var,
java.lang.String val,
int persist)
throws ErrorInfo
var - (IN) variable to setval - (IN) value to setpersist - (IN) persistenceErrorInfo - on errorpublic void agent_store_lreplace(java.lang.String var,
int index,
java.lang.String val)
throws ErrorInfo
var - (IN) variable to setindex - (IN) variable to setval - (IN) value to setErrorInfo - on errorpublic void agent_store_mlreplace(java.util.LinkedList varlist,
java.util.LinkedList indexlist,
java.util.LinkedList vallist)
throws ErrorInfo
varlist - (IN) variable to setindexlist - (IN) variable to setvallist - (IN) value to setErrorInfo - on errorpublic void agent_store_unset(java.lang.String var)
throws ErrorInfo
var - (IN) variable to unsetErrorInfo - on errorpublic java.util.LinkedList agent_store_list()
throws ErrorInfo
ErrorInfo - on errorpublic int agent_store_exists(java.lang.String var)
throws ErrorInfo
var - (IN)ErrorInfo - on errorpublic int agent_store_persists(java.lang.String var)
throws ErrorInfo
var - (IN)ErrorInfo - on errorpublic java.lang.String agent_store_get(java.lang.String var)
throws ErrorInfo
var - (IN)ErrorInfo - on errorpublic java.util.LinkedList agent_store_mget(java.util.LinkedList vars)
throws ErrorInfo
vars - (IN) LinkedListErrorInfo - on errorpublic void agent_store_copy(int other)
throws ErrorInfo
other - (IN)ErrorInfo - on errorpublic java.util.LinkedList from_list()
throws ErrorInfo
ErrorInfo - on errorpublic void from_add(java.lang.String host,
int port)
throws ErrorInfo
host - (IN) ip-addressport - (IN) portErrorInfo - on errorpublic void from_del(java.lang.String host,
int port)
throws ErrorInfo
host - (IN) ip-addressport - (IN) portErrorInfo - on error