Version 1.2 9/17/98
Software Requirements Specification of Protocol Stack Attachable Network Simulator (PSANS)
The topology file is a text file, which maps out the network architecture. This file should list all the nodes on the network. It should also list all of the lines connecting the nodes and their capacity. It also should tell what kind of connection the line is. The file also will contain the loss and reorder probabilities for the network. Appendix 1 shows a sample topology file.
NCILIB is a library of method calls, which allows the developers protocol stack to communicate with the NCARD module. This library will consist of 3 main calls. These calls are send, receive, sense, and attach.
The attach method will take care of connecting the developers protocol stack to the NCARD module. It will open a TCP socket connection to allow for packets to be exchanged between the two modules. The use of this method allows the system to handle the network connection, so the developer does not hat to worry about setting up these connections. This also allows the system to "hide" the connection, which gives a more realistic feel to the developer. The attach method will also setup the receive and command buffers to store the incoming messages. The final thing the method does is to start the receive thread.
The sense method will be used by protocol stacks which are connected to a bus. This method will allow the stack to check the line to see if there is a message on the line or not. It will return a Boolean value which reflect the status of the line.
The other two methods are the send and receive methods. These are the methods that are used by the developer to place packets on, and to get packets off of the network.
The NCARD module is the heart of the PSANS tool. This module represents the network card and the actual fibers, which carry data in an actual network environment.
The PSANS tool will allow for both Bus and Point-To-Point architectures. The module reads the topology file. It will make a decision as to what mode it is acting in. If all the connections, listed in the topology file, are Bus connections, then NCARD will be in the BUS mode. If all connections are Point-To-Point, then it will be in the PTP mode. In the case where the topology file contains a combination of both types of connections, the NCARD module will be in the BOTH mode.
NCARD will now create a series of buffers based on the information read from the topology file, and the mode it is in. If the module is in the BUS mode, there will be a receive class for each bus. This class will house information which shows the current status of the line. If there is a message waiting to be sent, it will show who sent that message. It will also show if a collision has occurred on the line. If the module is in the PTP mode, it will create 1 receive buffer for each node. In all modes, a final buffer is created to store commands which are sent by the protocol stack.
When the attach method is executed by the developers protocol stack, it sends a request to a central socket which the NCARD module is listening to. The module then binds this request to a unique socket for the node. This new socket creates a channel between the protocol stack and the module. This channel is what is used to exchange packets between the two modules.
The protocol stack is the developers part of the PSANS tool. The developer builds the stack in whatever manner they choose. The only requirements is that they use the NCILIB methods to connect to the NCARD module, as well as to exchange data.
#This is a sample topology.dat
file for PSANS
#end of section marker
#Total number of nodes
# Node entries
# Format: node send_buffer_size receive_buffer_size
A 10 25
B 10 25
C 10 25
D 10 25
#Total Number of Buses
#Format: Bus_Number Bus_Length
#Total links for node
#Format: Number Type_of_Connection
#Format: Start_Node End_Node Line_number Capacity
A B 0 10
A C 1 15
#Format: Node Line_Number Bus_Number
A 2 1
B A 2 25
B C 1 30
B D 0 20
B 3 1
C B 1 5
C A 0 8
C D 2 12
D 3 1
D B 1 33
D C 0 16