|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--SSF.OS.ProtocolSession
|
+--SSF.OS.IP
|
+--SSF.OS.OSPFv2.test.UnreliableIP
|
+--SSF.OS.OSPFv2.test.IPwithErrorInjection
|
+--SSF.OS.OSPFv2.test.PacketGenerator
This is a replacement for the SSF.OS.IP class, which is able to manipulate
packets flowing from and to an OSPF session. The way, the packets are manipulated
are specified by some predefined test behaviors -- each used in certain test cases
of the OSPF test suite.
The session can be configured as follows:
ProtocolSession [ name ip use SSF.OS.OSPF.test.PacketGenerator
debug <no|log|error|all>
test [
interface <id>
behavior <behavior-id>
]
]
Each interface of the router may have one behavior associated with it in a
separate test attribute. The behavior-id can be one of the following:
| Inner Class Summary | |
(package private) class |
PacketGenerator.BehaviorTimer
This is a generalized timer class, which can be used to execute delayed actions for a specific test behavior. |
(package private) class |
PacketGenerator.NeighborState
these attributes contain information about the actual state of the adjacency, which triggers certain special behaviors |
| Inner classes inherited from class SSF.OS.OSPFv2.test.IPwithErrorInjection |
IPwithErrorInjection.OSPFError |
| Inner classes inherited from class SSF.OS.OSPFv2.test.UnreliableIP |
UnreliableIP.Fail |
| Inner classes inherited from class SSF.OS.IP |
SSF.OS.IP.demux_cache |
| Field Summary | |
private java.util.Hashtable |
addresses
All the IP-addresses, we know of all neighbors |
private java.util.Vector |
behavior
this vector stores for each interface, which behavior it should show |
private java.lang.String[] |
behaviorLabel
the labels for the behaviors in the DML configuration |
private static int |
DD_RETRANSMIT1
numeric id for dd_retransmit1 |
private static int |
DD_RETRANSMIT2
numeric id for dd_retransmit2 |
private static int |
DD_RETRANSMIT3
numeric id for dd_retransmit3 |
private static int |
DD_RETRANSMIT4
numeric id for dd_retransmit4 |
private static int |
DEFAULT
numeric id for default behavior |
private static int |
EVENT_BAD_LS_REQ1
numeric id for event_bad_ls_req1 |
private static int |
EVENT_BAD_LS_REQ2
numeric id for event_bad_ls_req2 |
private static int |
EVENT_SEQ_NUMBER_MISMATCH1
numeric id for event_seq_numer_mismatch1 |
private static int |
EVENT_SEQ_NUMBER_MISMATCH2
numeric id for event_seq_numer_mismatch2 |
private static int |
EVENT_SEQ_NUMBER_MISMATCH3
numeric id for event_seq_numer_mismatch3 |
private static int |
EVENT_SEQ_NUMBER_MISMATCH4
numeric id for event_seq_numer_mismatch4 |
private static int |
EVENT_SEQ_NUMBER_MISMATCH5
numeric id for event_seq_numer_mismatch5 |
private static int |
EVENT_SEQ_NUMBER_MISMATCH6
numeric id for event_seq_numer_mismatch6 |
private static int |
EVENT_SEQ_NUMBER_MISMATCH7
numeric id for event_seq_numer_mismatch7 |
private static int |
EVENT_SEQ_NUMBER_MISMATCH8
numeric id for event_seq_numer_mismatch8 |
private Logger |
log
the log utility |
private static int |
LS_SEQUENCE_NUMBER_WRAP
numeric id for ls_sequence_number_wrap |
private static int |
LSA_REQUEST_RETRANSMIT1
numeric id for lsa_request_retransmit1 |
private static int |
LSA_REQUEST_RETRANSMIT2
numeric id for lsa_request_retransmit2 |
private java.util.Vector |
lsas
vector with a set of LSAs sufficient for 5 dd packets |
private static int |
NBR_STATE_TOO_LOW
numeric id for nbr_state_too_low |
private java.util.Hashtable |
neighbors
this hashtable contains all neighbors being watched |
private static int |
OLD_LSA_RCPT
numeric id for old_lsa_rcpt |
private boolean[] |
options
the optional capabilities of this router |
private SSF.OS.OSPFv2.OSPF |
ospfSession
pointer to the OSPF session rnning on this router |
private int |
ownRouterID
the own router ID |
private SSF.OS.OSPFv2.LSA |
ownRouterLSA
the own router lsa |
private static int |
REMOVE_LSA_FROM_RETRANSMISSION_LIST
numeric id for remove_lsa_from_retransmission_list |
| Fields inherited from class SSF.OS.OSPFv2.test.IPwithErrorInjection |
errors |
| Fields inherited from class SSF.OS.OSPFv2.test.UnreliableIP |
failures |
| Fields inherited from class SSF.OS.IP |
DEBUG, INTERFACE_COUNT, INTERFACE_SET, INTERFACE_SET_STARTING_SIZE, INTERFACES, monitor, monitorON, ROUTING_TABLE, session_cache, tieBreakerClass |
| Fields inherited from class SSF.OS.ProtocolSession |
inGraph, name, use |
| Constructor Summary | |
PacketGenerator()
Creates the packet generator and initializes internal data structures. |
|
| Method Summary | |
private boolean |
actionDdRetransmit1(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for DD_RETRANSMIT1 behavior |
private boolean |
actionDdRetransmit2(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for DD_RETRANSMIT2 behavior |
private boolean |
actionDdRetransmit3(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for DD_RETRANSMIT3 behavior |
private boolean |
actionDdRetransmit4(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for DD_RETRANSMIT4 behavior |
private boolean |
actionEventBadLsReq1(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for EVENT_BAD_LS_REQUEST1 behavior |
private boolean |
actionEventBadLsReq2(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for EVENT_BAD_LS_REQUEST2 behavior |
private boolean |
actionEventSeqNumberMismatch1(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for EVENT_SEQ_NUMBER_MISMATCH1 behavior |
private boolean |
actionEventSeqNumberMismatch2(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for EVENT_SEQ_NUMBER_MISMATCH2 behavior |
private boolean |
actionEventSeqNumberMismatch3(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for EVENT_SEQ_NUMBER_MISMATCH3 behavior |
private boolean |
actionEventSeqNumberMismatch4(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for EVENT_SEQ_NUMBER_MISMATCH4 behavior |
private boolean |
actionEventSeqNumberMismatch5(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for EVENT_SEQ_NUMBER_MISMATCH5 behavior |
private boolean |
actionEventSeqNumberMismatch6(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for EVENT_SEQ_NUMBER_MISMATCH6 behavior |
private boolean |
actionEventSeqNumberMismatch7(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for EVENT_SEQ_NUMBER_MISMATCH7 behavior |
private boolean |
actionEventSeqNumberMismatch8(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for EVENT_SEQ_NUMBER_MISMATCH8 behavior |
private boolean |
actionLsaRequestRetransmit1(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for LSA_REQUEST_RETRANSMIT1 behavior |
private boolean |
actionLsaRequestRetransmit2(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for LSA_REQUEST_RETRANSMIT2 behavior |
private boolean |
actionLsSequenceNumberWrap(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for LS_SEQUENCE_NUMBER_WRAP behavior |
private boolean |
actionNbrStateTooLow(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for NBR_STATE_TOO_LOW behavior |
private boolean |
actionOldLsaRcpt(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for OLD_LSA_RCPT behavior |
private boolean |
actionRemoveLsaFromRetransmissionList(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Action for REMOVE_LSA_FROM_RERANSMISSION_LIST behavior |
private int |
associatedInterface(SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Find the associated interface for a ProtocolMessage |
private int |
behaviorFromString(java.lang.String b)
Gets the behavior id from a behavior string. |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configure the packet generator according to the behavior descriptions from the DML configuration. |
private void |
eventDdRetransmit1(java.lang.Object data)
Timer callback for DD_RETRANSMIT1 |
private void |
eventDdRetransmit2(java.lang.Object data)
Timer callback for DD_RETRANSMIT1 |
private void |
eventDdRetransmit3(java.lang.Object data)
Timer callback for DD_RETRANSMIT1 |
private void |
eventDdRetransmit4(java.lang.Object data)
Timer callback for DD_RETRANSMIT1 |
private void |
eventEventBadLsReq1(java.lang.Object data)
Timer callback for EVENT_BAD_LS_REQ1 |
private void |
eventEventBadLsReq2(java.lang.Object data)
|
private void |
eventEventSeqNumberMismatch1(java.lang.Object data)
Timer callback for EVENT_SEQ_NUMBER_MISMATCH1 |
private void |
eventEventSeqNumberMismatch2(java.lang.Object data)
Timer callback for EVENT_SEQ_NUMBER_MISMATCH2 |
private void |
eventEventSeqNumberMismatch3(java.lang.Object data)
Timer callback for EVENT_SEQ_NUMBER_MISMATCH3 |
private void |
eventEventSeqNumberMismatch4(java.lang.Object data)
Timer callback for EVENT_SEQ_NUMBER_MISMATCH4 |
private void |
eventEventSeqNumberMismatch5(java.lang.Object data)
Timer callback for EVENT_SEQ_NUMBER_MISMATCH5 |
private void |
eventEventSeqNumberMismatch6(java.lang.Object data)
Timer callback for EVENT_SEQ_NUMBER_MISMATCH6 |
private void |
eventEventSeqNumberMismatch7(java.lang.Object data)
Timer callback for EVENT_SEQ_NUMBER_MISMATCH7 |
private void |
eventEventSeqNumberMismatch8(java.lang.Object data)
Timer callback for EVENT_SEQ_NUMBER_MISMATCH8 |
private void |
eventLsaRequestRetransmit1(java.lang.Object data)
Timer callback for LSA_REQUEST_RETRANSMIT1 |
private void |
eventLsaRequestRetransmit2(java.lang.Object data)
Timer callback for LSA_REQUEST_RETRANSMIT2 |
private void |
eventLsSequenceNumberWrap(java.lang.Object data)
Timer callback for LS_SEQUENCE_NUMBER_WRAP |
private void |
eventNbrStateTooLow(java.lang.Object data)
Timer callback for NBR_STATE_TOO_LOW |
private void |
eventOldLsaRcpt(java.lang.Object data)
Timer callback for OLD_LSA_RCPT |
private void |
eventRemoveLsaFromRetransmissionList(java.lang.Object data)
Timer callback for REOVE_LSA_FROM_RETRANSMISSION_LIST |
private int |
getBehavior(int i)
Returns the special behavior specified for an interface |
private PacketGenerator.NeighborState |
getNeighbor(SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
Lookup the neighbor associated with a specific packet |
private double |
getSimTime()
Return the actual simulation time in seconds. |
private boolean |
handle(SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
This method handles individual packets. |
private boolean |
isDDExchangeProcessOver(PacketGenerator.NeighborState nbr)
Determines if the DD process is over |
boolean |
push(SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
This method handles incoming packets. |
private void |
reStartOSPF()
(Re-)Starts the associated OSPF session. |
private void |
shutDownOSPF()
Shuts the associated OSPF session down. |
private void |
timerEvent(int behavior,
java.lang.Object data)
Dispatch the timer events and call the correc handler |
private void |
track(SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
This method keeps track of the neighbor's states dependent of the packets which are received. |
| Methods inherited from class SSF.OS.IP |
createMonitor, drop, getMonitorEnable, getRoutingTable, init, opened, setGraph, setMonitorEnable |
| Methods inherited from class SSF.OS.ProtocolSession |
close, closed, debugIdentifier, inGraph, open, pushAfterDelay, pushAfterDelayFailed, version |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private java.util.Hashtable neighbors
private SSF.OS.OSPFv2.LSA ownRouterLSA
private int ownRouterID
private boolean[] options
private SSF.OS.OSPFv2.OSPF ospfSession
private java.util.Vector lsas
private java.util.Vector behavior
private java.util.Hashtable addresses
private static final int DEFAULT
private static final int OLD_LSA_RCPT
private static final int NBR_STATE_TOO_LOW
private static final int DD_RETRANSMIT1
private static final int EVENT_SEQ_NUMBER_MISMATCH1
private static final int LSA_REQUEST_RETRANSMIT1
private static final int EVENT_BAD_LS_REQ1
private static final int LS_SEQUENCE_NUMBER_WRAP
private static final int EVENT_BAD_LS_REQ2
private static final int DD_RETRANSMIT2
private static final int DD_RETRANSMIT3
private static final int DD_RETRANSMIT4
private static final int EVENT_SEQ_NUMBER_MISMATCH2
private static final int EVENT_SEQ_NUMBER_MISMATCH3
private static final int EVENT_SEQ_NUMBER_MISMATCH4
private static final int EVENT_SEQ_NUMBER_MISMATCH5
private static final int EVENT_SEQ_NUMBER_MISMATCH6
private static final int EVENT_SEQ_NUMBER_MISMATCH7
private static final int EVENT_SEQ_NUMBER_MISMATCH8
private static final int LSA_REQUEST_RETRANSMIT2
private static final int REMOVE_LSA_FROM_RETRANSMISSION_LIST
private java.lang.String[] behaviorLabel
private Logger log
| Constructor Detail |
public PacketGenerator()
| Method Detail |
public void config(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
config in class IPwithErrorInjection
public boolean push(SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
push in class IPwithErrorInjection
private void track(SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
private boolean handle(SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionOldLsaRcpt(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionNbrStateTooLow(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionDdRetransmit1(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionEventSeqNumberMismatch1(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionLsaRequestRetransmit1(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionLsaRequestRetransmit2(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionEventBadLsReq1(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionLsSequenceNumberWrap(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionEventBadLsReq2(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionDdRetransmit2(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionDdRetransmit3(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionDdRetransmit4(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionEventSeqNumberMismatch2(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionEventSeqNumberMismatch3(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionEventSeqNumberMismatch4(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionEventSeqNumberMismatch5(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionEventSeqNumberMismatch6(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionEventSeqNumberMismatch7(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionEventSeqNumberMismatch8(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private boolean actionRemoveLsaFromRetransmissionList(int intf,
SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
throws SSF.OS.ProtocolException
private int associatedInterface(SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
private PacketGenerator.NeighborState getNeighbor(SSF.OS.ProtocolMessage message,
SSF.OS.ProtocolSession fromSession)
private int getBehavior(int i)
private int behaviorFromString(java.lang.String b)
private void timerEvent(int behavior,
java.lang.Object data)
private void eventOldLsaRcpt(java.lang.Object data)
private void eventNbrStateTooLow(java.lang.Object data)
private void eventDdRetransmit1(java.lang.Object data)
private void eventEventSeqNumberMismatch1(java.lang.Object data)
private void eventLsaRequestRetransmit1(java.lang.Object data)
private void eventLsaRequestRetransmit2(java.lang.Object data)
private void eventEventBadLsReq1(java.lang.Object data)
private void eventLsSequenceNumberWrap(java.lang.Object data)
private void eventEventBadLsReq2(java.lang.Object data)
private void eventDdRetransmit2(java.lang.Object data)
private void eventDdRetransmit3(java.lang.Object data)
private void eventDdRetransmit4(java.lang.Object data)
private void eventEventSeqNumberMismatch2(java.lang.Object data)
private void eventEventSeqNumberMismatch3(java.lang.Object data)
private void eventEventSeqNumberMismatch4(java.lang.Object data)
private void eventEventSeqNumberMismatch5(java.lang.Object data)
private void eventEventSeqNumberMismatch6(java.lang.Object data)
private void eventEventSeqNumberMismatch7(java.lang.Object data)
private void eventEventSeqNumberMismatch8(java.lang.Object data)
private void eventRemoveLsaFromRetransmissionList(java.lang.Object data)
private void shutDownOSPF()
private void reStartOSPF()
throws SSF.OS.ProtocolException
private boolean isDDExchangeProcessOver(PacketGenerator.NeighborState nbr)
private double getSimTime()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||