EXata 2.2 APIReferenceGuide
EXata 2.2 APIReferenceGuide
May 2011
Copyright Information 2011 Scalable Network Technologies, Inc. All rights reserved. QualNet and EXata are registered trademarks of Scalable Network Technologies, Inc. All other trademarks and trade names used are property of their respective companies. Scalable Network Technologies, Inc. 6100 Center Drive, Suite 1250 Los Angeles, CA 90045 Phone: 310-338-3318 Fax: 310-338-7213 http://www.scalable-networks.com
ii
This file describes data structures and functions used to model 3D weather patterns in conjunction with the Weather package.
ANTENNA
This file describes data structures and functions used by antenna models.
ANTENNA_GLOBAL
This file describes additional data structures and functions used by antenna models.
API
This file enumerates the basic message/events exchanged during the simulation process and the various layer functions (initialize, finalize, and event handling functions) and other miscellaneous routines and data structure definitions.
APP_UTIL
This file describes data structures and functions used by the Application Layer.
BUFFER
This file describes data structures and functions used for circular buffer implementation.
CLOCK
This file describes data structures and functions used for time-related operations.
COORDINATES
This file describes data structures and functions used for coordinates-related operations.
ERROR
This file describes utilities for managing socket connections to external programs.
EXTERNAL_UTILITIES
This file describes data strucutres and functions used for reading from input files and printing to output files.
GUI
This file describes data structures and functions for interfacing with the QualNet GUI and the other graphical tools.
IP
This file contains data structures and prototypes of functions used by IP.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/index.html[5/24/2011 12:30:32 PM]
IPv6
Data structures and parameters used in network layer are defined here.
LIST
This file describes the data structures and functions used in the implementation of lists.
MAC LAYER
This file describes data structures and functions used by the MAC Layer.
MAIN
This file describes data structures and functions for mapping between node pointers, node identifiers, and node addresses.
MEMORY
This file describes the memory management data structures and functions.
MESSAGE
This file describes the message structure used to implement events and functions for message operations.
MOBILITY
This file describes data structures and functions used by mobility models.
MUTEX
This file describes objects for use in creating critical regions (synchronized access) for global variables or data structures that have to be shared between threads.
NETWORK LAYER
This file describes the data structures and functions used by the Network Layer.
NODE
This file defines the Node data structure and some generic operations on nodes.
PARALLEL
This file describes data structures and functions used for parallel programming.
PARTITION
This file describes data structures and functions used by the Physical Layer. Most of this functionality is enabled/used in the Wireless library.
PROPAGATION
This file describes data structures and functions used by propagation models.
QUEUES
This file describes the member functions of the queue base class.
RANDOM NUMBERS
This file describes the member functions of the scheduler base class.
SLIDING-WINDOW
This file describes data structures and functions to implement a sliding window.
TRACE
This file describes data structures and functions used for packet tracing.
TRANSPORT LAYER
This file describes data structures and functions used by the Tansport Layer.
USER
This file describes data structures and functions used by the User Layer.
WALLCLOCK
This file describes methods of the WallClock class whose primary use is to keep track of the amount of real time that has passed during the simulation.
3D_MATH
3D_MATH
This file describes data structures and functions used to model 3D weather patterns in conjunction with the Weather package. Constant / Data Structure Summary Type
STRUCT
Name
Vector3
This is used to hold 3D points and vectors. This will eventually be added upon to create a robust class with operator overloading. For now we just need an x, y, z.
STRUCT Triangle3
Summary
MATH_CrossProduct(Vector3 vector1, Vector3 vector2)
Returns a perpendicular vector from 2 given vectors by taking the cross product.
Vector3 MATH_Vector(Vector3 point1, Vector3 point2)
3D_MATH
Vector3
MATH_Normal(Vector3[] triangle)
Returns the distance the plane is from the origin (0, 0, 0). It takes the normal to the plane, along with ANY point that lies on the plane (any corner)
BOOL MATH_IntersectedPlane(Vector3[] polygon, Vector3[] line, Vector3& normal, double& originDistance)
Takes a triangle (plane) and line and returns true if they intersected
double MATH_DotProduct(Vector3 vector1, Vector3 vector2)
Returns an intersection point of a polygon and a line (assuming intersects the plane)
BOOL MATH_InsidePolygon(Vector3 intersection, Vector3[] polygon, int verticeCount)
3D_MATH
BOOL
Structure
Vector3
Structure
This is used to hold 3D points and vectors. This will eventually be added upon to create a robust class with operator overloading. For now we just need an x, y, z. Triangle3
Function / Macro Detail Function / Macro MATH_CrossProduct Format Vector3 MATH_CrossProduct (Vector3 vector1, Vector3 vector2) Parameters: Returns a perpendicular vector from 2 given vectors by taking the cross product.
vector1 vector2
Returns:
Vector3
MATH_Vector
point1 point2
3D_MATH
Returns:
Vector3
MATH_Magnitude
vector
- a vector
Returns:
double
MATH_Normalize
vector
- a vector
Returns:
Vector3
- a normalized vector
MATH_Normal
triangle
Returns:
Vector3
MATH_PlaneDistance
Returns the distance the plane is from the origin (0, 0, 0). It takes the normal to the plane, along with ANY point that lies on the plane (any corner)
vector point
- a vector
- a point
Returns:
double
MATH_IntersectedPlane
BOOL MATH_IntersectedPlane (Vector3[] polygon, Vector3[] line, Vector3& normal, double& originDistance) Parameters:
Takes a triangle (plane) and line and returns true if they intersected
polygon line
- a polygon
normal
3D_MATH
originDistance
- the distance
Returns:
BOOL
MATH_DotProduct
vector1 vector2
Returns:
double
MATH_AngleBetweenVectors
vector1 vector2
Returns:
double
- None
MATH_IntersectionPoint
Returns an intersection point of a polygon and a line (assuming intersects the plane)
normal line
- a polygon
distance
Returns:
Vector3
- None
MATH_InsidePolygon
intersection polygon
- an intersection point
verticeCount
3D_MATH
Returns:
BOOL
MATH_IntersectedPolygon
polygon line
- a polygon
verticeCount
Returns:
BOOL
MATH_Distance
point1 point2
Returns:
double
MATH_LineIntersects
line1 line2
Returns:
BOOL
MATH_ReturnLineToLineIntersectionPoint
line1 line2
Returns:
Vector3
MATH_IsPointOnLine
3D_MATH
Parameters: Returns the whether the given point lies on Line or not.
point line
Returns:
BOOL
MATH_ConvertXYToLatLong
void MATH_ConvertXYToLatLong (double x1, double y1, double latitude, double longitude) Parameters:
x1 y1
- Specifies X value on X-Axis - Specifies Y value on Y-Axis - Will store the converted latitude value - Will store the converted longitude value
latitude
longitude
Returns:
void
- NULL
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
ANTENNA
ANTENNA
This file describes data structures and functions used by antenna models. Constant / Data Structure Summary Type
CONSTANT
Name
ANTENNA_DEFAULT_HEIGHT
ANTENNA
Default Pattern
CONSTANT ANTENNA_OMNIDIRECTIONAL_PATTERN
OMNIDIRECTIONAL PATTERN
CONSTANT ANTENNA_PATTERN_NOT_SET
Const for the memory allocation of azimuth and elevation gain array.
CONSTANT NSMA_PATTERN_START_LINE_NUMBER
Const represents the Revised pattern max line number where the revised NSMA pattern can start.
Summary
ANTENNA_Init(Node* node, int phyIndex, const NodeInput* nodeInput)
Initialize antennas.
void ANTENNA_ReadPatterns(Node* node, int phyIndex, const NodeInput* antennaInput, int* numPatterns, int* steerablePatternSetRepeatSectorAngle, float*** pattern_dB, BOOL azimuthPlane)
ANTENNA
ANTENNA
Return gain for this direction for the specified pattern in dB.
float ANTENNA_GainForThisSignal(Node* node, int phyIndex, PropRxInfo* propRxInfo)
Unlock antenna.
BOOL ANTENNA_DirectionIsLocked(Node* node, int phyIndex)
ANTENNA
Constant
ANTENNA_DEFAULT_HEIGHT 1.5
Constant
Constant
ANTENNA
Constant
ANTENNA_DEFAULT_MISMATCH_LOSS_dB 0.3
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
ANTENNA
Constant
Const for the memory allocation of azimuth and elevation gain array. NSMA_PATTERN_START_LINE_NUMBER 10
Constant
Const represents the basic pattern starting point in NSMA file NSMA_MAX_STARTLINE 41
Const represents the Revised pattern max line number where the revised NSMA pattern can start.
Function / Macro Detail Function / Macro ANTENNA_Init Format void ANTENNA_Init (Node* node, int phyIndex, const NodeInput* nodeInput) Parameters: Initialize antennas.
node
- node being initialized. - interface for which physical to be - structure containing contents of input
phyIndex
nodeInput
Returns:
void
- NULL
ANTENNA_ReadPatterns
void ANTENNA_ReadPatterns (Node* node, int phyIndex, const NodeInput* antennaInput, int* numPatterns, int* steerablePatternSetRepeatSectorAngle, float*** pattern_dB, BOOL azimuthPlane) Parameters:
- node being used. - interface for which physical to be - structure containing contents of
phyIndex
antennaInput numPatterns
steerablePatternSetRepeatSectorAngle pattern_dB
- array used to store the gain values - shows whether the file is azimuth
azimuthPlane
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/ANTENNA.html[5/24/2011 12:32:00 PM]
ANTENNA
void
- NULL
ANTENNA_ReadNsmaPatterns
node
phyIndex
Returns:
void
- NULL
ANTENNA_ReadRevisedNsmaPatterns
node
phyIndex
Returns:
void
- NULL
ANTENNA_Read3DAsciiPatterns
node
phyIndex
Returns:
void
- NULL
ANTENNA_Read2DAsciiPatterns
node
phyIndex
Returns:
void
- NULL
ANTENNA_OmniDirectionalInit
void ANTENNA_OmniDirectionalInit (Node* node, const NodeInput* nodeInput, int phyIndex, const AntennaModelGlobal* antennaModel) Parameters:
ANTENNA
node
nodeInput phyIndex
antennaModel
Returns:
void
- NULL
ANTENNA_OmniDirectionalInitFromConfigFile
void ANTENNA_OmniDirectionalInitFromConfigFile (Node* node, int phyIndex, const NodeInput* nodeInput) Parameters:
node
- node being initialized. - interface for which physical to be - structure containing contents of input
phyIndex
nodeInput
Returns:
void
- NULL
ANTENNA_InitFromConfigFile
void ANTENNA_InitFromConfigFile (Node* node, int phyIndex, const NodeInput* nodeInput) Parameters:
node
- node being initialized. - interface for which physical to be - structure containing contents of input
phyIndex
nodeInput
Returns:
void
- NULL
ANTENNA_IsInOmnidirectionalMode
node
phyIndex
Returns:
BOOL
ANTENNA_ReturnPatternIndex
ANTENNA
phyIndex
Returns:
int
ANTENNA_ReturnHeight
node
phyIndex
Returns:
float
- height in meters
ANTENNA_ReturnSystemLossIndB
node
phyIndex
Returns:
double
- loss in dB
ANTENNA_GainForThisDirection
node
phyIndex DOA
- direction of antenna
Returns:
float
- gain in dB
ANTENNA_GainForThisDirectionWithPatternIndex
float ANTENNA_GainForThisDirectionWithPatternIndex (Node* node, int phyIndex, int patternIndex, Orientation DOA) Parameters:
Return gain for this direction for the specified pattern in dB.
node
ANTENNA
phyIndex
patternIndex DOA
- direction of antenna
Returns:
float
- gain in dB
ANTENNA_GainForThisSignal
node
- node being used - interface for which physical to be used - receiver propagation info
phyIndex
propRxInfo
Returns:
float
- gain in dB
ANTENNA_DefaultGainForThisSignal
node
- node being used - interface for which physical to be used - receiver propagation info
phyIndex
propRxInfo
Returns:
float
- gain in dB
ANTENNA_LockAntennaDirection
node
phyIndex
Returns:
void
- NULL
ANTENNA_UnlockAntennaDirection
Unlock antenna.
node
ANTENNA
phyIndex
Returns:
void
- NULL
ANTENNA_DirectionIsLocked
node
phyIndex
Returns:
BOOL
ANTENNA_IsLocked
node
phyIndex
Returns:
BOOL
ANTENNA_SetToDefaultMode
node
phyIndex
Returns:
void
- NULL
ANTENNA_SetToBestGainConfigurationForThisSignal
- node being used - interface for which physical to be used - receiver propagation info
phyIndex
propRxInfo
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/ANTENNA.html[5/24/2011 12:32:00 PM]
ANTENNA
void
- NULL
ANTENNA_SetBestConfigurationForAzimuth
node
phyIndex azimuth
- the azimuth
Returns:
void
- NULL
ANTENNA_GetSteeringAngle
node
phyIndex angle
Returns:
void
- NULL
ANTENNA_SetSteeringAngle
node
phyIndex angle
- Steering angle to be
Returns:
void
- NULL
ANTENNA_ReturnAsciiPatternFile
void ANTENNA_ReturnAsciiPatternFile (Node* node, int phyIndex, const NodeInput* antennaModelInput) Parameters:
node
phyIndex
antennaModelInput
ANTENNA
Returns:
void
- NULL
ANTENNA_ReturnNsmaPatternFile
void ANTENNA_ReturnNsmaPatternFile (Node* node, int phyIndex, const NodeInput* antennaModelInput, AntennaPatterns* antennaPatterns) Parameters:
phyIndex
antennaModelInput antennaPatterns
- Pointer to
Returns:
void
- NULL
ANTENNA_ReturnTraditionalPatternFile
void ANTENNA_ReturnTraditionalPatternFile (Node* node, int phyIndex, const NodeInput* antennaModelInput) Parameters:
node
phyIndex
antennaModelInput
Returns:
void
- NULL
ANTENNA_MakeAntennaModelInput
node buf
Returns:
NodeInput *
ANTENNA
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
ANTENNA_GLOBAL
ANTENNA_GLOBAL
This file describes additional data structures and functions used by antenna models. Constant / Data Structure Summary Type
CONSTANT
Name
MAX_ANTENNA_MODELS
ANTENNA_GLOBAL
Summary
ANTENNA_GlobalAntennaModelPreInitialize(PartitionData* partitionData)
Reads the antenna configuration parameters into the global antenna model structure.
Void ANTENNA_GlobalAntennaPatternInitFromConfigFile(Node* node, int phyIndex, const char* antennaPatternName, BOOL steer)
Init the antenna pattern structure for pattern name for the Old antenna model.
Void ANTENNA_GlobalAntennaPatternInit(Node* node, int phyIndex, const NodeInput* antennaModelInput, const char* antennaPatternName)
ANTENNA_GLOBAL
Constant
MAX_ANTENNA_MODELS 50
Constant
Enumeration
Enumeration
Enumeration
Enumeration
Enumeration
ANTENNA_GLOBAL
Structure
Structure
Structure
Function / Macro Detail Function / Macro ANTENNA_GlobalAntennaModelPreInitialize Format void ANTENNA_GlobalAntennaModelPreInitialize (PartitionData* partitionData) Parameters: Preinitalize the global antenna structs.
partitionData
Returns:
void
- NULL
ANTENNA_GlobalAntennaPatternPreInitialize
partitionData
Returns:
void
- NULL
ANTENNA_GlobalModelAssignPattern
AntennaPattern* ANTENNA_GlobalModelAssignPattern (Node* node, int phyIndex, const NodeInput* antennaModelInput) Parameters:
phyIndex
ANTENNA_GLOBAL
antennaModelInput
- structure containing
Returns:
AntennaPattern*
ANTENNA_GlobalAntennaModelInit
void ANTENNA_GlobalAntennaModelInit (Node* node, int phyIndex, const NodeInput* antennaModelInput) Parameters:
Reads the antenna configuration parameters into the global antenna model structure.
node
phyIndex
antennaModelInput
Returns:
void
- NULL
ANTENNA_GlobalAntennaPatternInitFromConfigFile
Void ANTENNA_GlobalAntennaPatternInitFromConfigFile (Node* node, int phyIndex, const char* antennaPatternName, BOOL steer) Parameters:
Init the antenna pattern structure for pattern name for the Old antenna model.
node
- node being used. - interface for which physical to be - antenna pattern name to be
phyIndex
antennaPatternName steer
Returns:
Void
- NULL
ANTENNA_GlobalAntennaPatternInit
Void ANTENNA_GlobalAntennaPatternInit (Node* node, int phyIndex, const NodeInput* antennaModelInput, const char* antennaPatternName) Parameters:
- node being used. - interface for which physical to be - structure containing - antenna pattern name to be
phyIndex
antennaModelInput
antennaPatternName
Returns:
Void
- NULL
ANTENNA_GlobalAntennaModelAlloc
ANTENNA_GLOBAL
Returns:
AntennaModelGlobal*
ANTENNA_GlobalAntennaModelGet
antennaModelName
Returns:
AntennaModelGlobal*
ANTENNA_GlobalAntennaPatternGet
antennaPatternName
Returns:
AntennaPattern*
ANTENNA_GeneratePatterName
void ANTENNA_GeneratePatterName (Node* node, int phyIndex, const NodeInput* antennaModelInput, char* antennaPatternName) Parameters:
- node being used. - interface for which physical to be - structure containing - antenna pattern name to be
phyIndex
antennaModelInput
antennaPatternName
Returns:
void
- NULL
ANTENNA_GLOBAL
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
API
API
This file enumerates the basic message/events exchanged during the simulation process and the various layer functions (initialize, finalize, and event handling functions) and other miscellaneous routines and data structure definitions. Constant / Data Structure Summary Type
ENUMERATION
Name
MESSAGE/EVENT
Transport type to check reliable, unreliable or TADIL network for Link16 or Link11
ENUMERATION DestinationType
API
Additional information given to UDP from applications. This information is saved in the info field of a message.
STRUCT UdpToAppRecv
Additional information given to applications from UDP. This information is saved in the info field of a message.
STRUCT AppToRsvpSend
API
Application sets up connection at the local end Needed for NS TCP to fake connection setup
STRUCT AppQosToNetworkSend
Application uses this structure in its info field to perform the initialization of a new QoS connection with its QoS requirements.
STRUCT NetworkToAppQosConnectionStatus
Q-OSPF uses this structure to report status of a session requested by the application for Quality of Service.
Summary
CHANNEL_Initialize(Node* node, const NodeInput* nodeInput)
API
API
Processes the message/event of physical layer received by the node thus simulating the PHYSICAL layer behaviour
void PHY_ProcessEvent(Node* node, Message* msg)
Processes the message/event of physical layer received by the node thus simulating the PHYSICAL layer behaviour
void MAC_ProcessEvent(Node* node, Message* msg)
Processes the message/event of MAC layer received by the node thus simulating the MAC layer behaviour
void NETWORK_ProcessEvent(Node* node, Message* msg)
Processes the message/event received by the node thus simulating the NETWORK layer behaviour
void TRANSPORT_ProcessEvent(Node* node, Message* msg)
Processes the message/event received by the node thus simulating the TRANSPORT layer behaviour
void APP_ProcessEvent(Node* node, Message* msg)
Processes the message/event received by the node thus simulating the APPLICATION layer behaviour
void USER_ProcessEvent(Node* node, Message* msg)
Processes the message/event received by the node thus simulating the USER layer behaviour
void ATMLAYER2_ProcessEvent(Node* node, Message* msg)
API
Processes the message/event of ATM_LAYER2 layer received by the node thus simulating the ATM_LAYER2 layer behaviour
void ADAPTATION_ProcessEvent(Node* node, Message* msg)
Processes the message/event received by the node thus simulating the ADAPTATION layer behaviour
void MAC_RunTimeStat(Node* node)
Enumeration
MESSAGE/EVENT
Enumeration
Enumeration
Transport type to check reliable, unreliable or TADIL network for Link16 or Link11 DestinationType
Structure
Structure
Used by App layer and Phy layer to exchange battery power PacketNetworkToApp
API
Structure
Structure
Structure
Structure
Structure
Additional information given to UDP from applications. This information is saved in the info field of a message. UdpToAppRecv
Structure
Additional information given to applications from UDP. This information is saved in the info field of a message. AppToRsvpSend
Structure
Structure
Structure
Structure
API
Structure
Structure
Structure
Structure
Structure
Structure
Structure
Application sets up connection at the local end Needed for NS TCP to fake connection setup AppQosToNetworkSend
Structure
Application uses this structure in its info field to perform the initialization of a new QoS connection with its QoS requirements. NetworkToAppQosConnectionStatus
Q-OSPF uses this structure to report status of a session requested by the application for Quality of Service.
Function / Macro Detail Function / Macro CHANNEL_Initialize Format void CHANNEL_Initialize (Node* node, const NodeInput* nodeInput) Parameters: Initialization function for channel
node
API
nodeInput
Returns:
void
- None
PHY_Init
node
nodeInput
Returns:
void
- None
MAC_Initialize
node
nodeInput
Returns:
void
- None
NETWORK_PreInit
node
nodeInput
Returns:
void
- None
NETWORK_Initialize
node
nodeInput
Returns:
void
- None
API
TRANSPORT_Initialize
node
nodeInput
Returns:
void
- None
APP_Initialize
node
nodeInput
Returns:
void
- None
USER_Initialize
node
nodeInput
Returns:
void
- None
APP_InitializeApplications
firstNode nodeInput
Returns:
void
- None
ATMLAYER2_Initialize
node
nodeInput
API
Returns:
void
- None
ADAPTATION_Initialize
node
nodeInput
Returns:
void
- None
CHANNEL_Finalize
node
Returns:
void
- None
PHY_Finalize
node
Returns:
void
- None
MAC_Finalize
node
Returns:
void
- None
NETWORK_Finalize
node
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/API.html[5/24/2011 12:32:16 PM]
API
void
- None
TRANSPORT_Finalize
node
Returns:
void
- None
APP_Finalize
node
Returns:
void
- None
USER_Finalize
node
Returns:
void
- None
ATMLAYER2_Finalize
node
Returns:
void
- None
ADAPTATION_Finalize
node
Returns:
void
- None
CHANNEL_ProcessEvent
API
Parameters: Processes the message/event of physical layer received by the node thus simulating the PHYSICAL layer behaviour
node msg
Returns:
void
- None
PHY_ProcessEvent
Processes the message/event of physical layer received by the node thus simulating the PHYSICAL layer behaviour
node msg
Returns:
void
- None
MAC_ProcessEvent
Processes the message/event of MAC layer received by the node thus simulating the MAC layer behaviour
node msg
Returns:
void
- None
NETWORK_ProcessEvent
Processes the message/event received by the node thus simulating the NETWORK layer behaviour
node msg
Returns:
void
- None
TRANSPORT_ProcessEvent
Processes the message/event received by the node thus simulating the TRANSPORT layer behaviour
node msg
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/API.html[5/24/2011 12:32:16 PM]
API
void
- None
APP_ProcessEvent
Processes the message/event received by the node thus simulating the APPLICATION layer behaviour
node msg
Returns:
void
- None
USER_ProcessEvent
Processes the message/event received by the node thus simulating the USER layer behaviour
node msg
Returns:
void
- None
ATMLAYER2_ProcessEvent
Processes the message/event of ATM_LAYER2 layer received by the node thus simulating the ATM_LAYER2 layer behaviour
node msg
Returns:
void
- None
ADAPTATION_ProcessEvent
Processes the message/event received by the node thus simulating the ADAPTATION layer behaviour
node msg
Returns:
void
- None
MAC_RunTimeStat
API
node
Returns:
void
- None
NETWORK_RunTimeStat
node
Returns:
void
- None
TRANSPORT_RunTimeStat
node
Returns:
void
- None
APP_RunTimeStat
node
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
APP_UTIL
APP_UTIL
This file describes Application Layer utility functions. Function / Macro Summary Return Type
MACRO
Summary
APP_GetTimerType(x)
Set a new App Layer Timer and send to self after delay.
void APP_UdpSendNewData(Node * node, AppType appType, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, char * payload, int payloadSize, clocktype delay, TraceProtocolType traceProtocol)
Allocate data with specified priority and send to UDP (For IPv6).
void APP_UdpSendNewHeaderData(Node * node, AppType appType, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, char* header, int headerSize, char* payload, int payloadSize, clocktype delay, TraceProtocolType traceProtocol)
APP_UTIL
Allocate header and data with specified priority and send to UDP
void APP_UdpSendNewHeaderVirtualDataWithPriority(Node * node, AppType appType, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol, BOOL isMdpEnabled, Int32 mdpUniqueId)
Allocate header + virtual data with specified priority and send to UDP
void APP_UdpSendNewHeaderVirtualDataWithPriority(Node * node, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, short destinationPort, char* infoData, int infoSize, int infoType, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol, BOOL isMdpEnabled, Int32 mdpUniqueId)
Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
void APP_UdpSendNewHeaderVirtualDataWithPriority(Node * node, Address sourceAddr, short sourcePort, Address destAddr, short destinationPort, char* infoData, int infoSize, int infoType, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol, char* appname, BOOL isMdpEnabled, Int32 mdpUniqueId)
(Overloaded for IPv6) Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
void APP_UdpSendNewHeaderVirtualDataWithPriority(Node * node, Address sourceAddr, short sourcePort, Address destAddr, short destinationPort, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol, char* infoData, int infoSize, int infoType, BOOL isMdpEnabled, Int32 mdpUniqueId)
(Overloaded for IPv6) Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
void APP_UdpSendNewHeaderVirtualDataWithPriority(Node * node, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, short destinationPort, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol)
Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
void APP_UdpSendNewHeaderVirtualDataWithPriority(Node * node, AppType appType, Address sourceAddr, short sourcePort, Address destAddr, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, char* mdpInfo, TraceProtocolType traceProtocol, Message* theMsgPtr)
(Overloaded for MDP) Allocate actual + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
void APP_UdpSendNewHeaderVirtualDataWithPriority(Node * node, Address sourceAddr, short sourcePort, Address destAddr, short destinationPort, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol)
APP_UTIL
(Overloaded for IPv6) Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
void APP_UdpSendNewHeaderVirtualDataWithPriority(Node * node, Address sourceAddr, short sourcePort, Address destAddr, short destinationPort, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol)
(Overloaded for IPv6) Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
Message * APP_UdpCreateNewHeaderVirtualDataWithPriority.(Node * node, Address sourceAddr, short sourcePort, Address destAddr, short destinationPort, char* header, int headerSize, int payloadSize, TosType priority, TraceProtocolType traceProtocol)
(Overloaded for IPv6) Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
void APP_TcpServerListen.(Node * node, AppType appType, NodeAddress serverAddr, short serverPort)
Open a connection.
void APP_TcpOpenConnection.(Node * node, appType appType, Address localAddr, short localPort, Address remoteAddr, short remotePort, int uniqueId, clocktype waitTime)
APP_UTIL
Open a connection.
void APP_TcpOpenConnection.(Node * node, appType appType, Address localAddr, short localPort, Address remoteAddr, short remotePort, int uniqueId, clocktype waitTime, int outgoingInterface)
APP_UTIL
Application input parsing API. Parses the source and destination strings.At the same time validates those strings for multicast address.
void APP_ParsingSourceAndDestString(Node * node, const char * inputString, const char * sourceString, NodeAddress * sourceNodeId, NodeAddress * sourceAddr, const char * destString, NodeAddress * destNodeId, NodeAddress * destAddr, DestinationType * destType)
API to parse the input source and destination strings read from the *.app file.At the same time checks and fills the destination type parameter.
void APP_ParsingSourceAndDestString(Node * node, const char * inputString, const char * sourceString, NodeId * sourceNodeId, Address * sourceAddr, const char * destString, NodeId * destNodeId, Address * destAddr, DestinationType * destType)
API to parse the input source and destination strings read from the *.app file. At the same time checks and fills the destination type parameter.
AppInfo* APP_RegisterNewApp(Node* node, AppType appType, void * dataPtr, short myPort)
Also inserts the port number being used for this app in the port table.
BOOL APP_IsFreePort(Node* node, short portNumber)
there is an application running at the node that uses an AppType that has been assigned the same value as this port number. This is done since applications such as CBR use the value of AppType as destination port.
short APP_GetFreePort(Node* node)
void
short
BOOL
Application input parsing API. Parses the tos string and tos value strings.At the same time validates those strings for proper ranges.
Message* APP_UdpCreateNewHeaderVirtualDataWithPriority(Node * node, AppType appType, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, char* header, int headerSize, int payloadSize, TosType priority, TraceProtocolType traceProtocol)
Allocate header + virtual data with specified priority and send to UDP. Generally used with messenger app.
Message* APP_UdpCreateNewHeaderVirtualDataWithPriority(Node * node, AppType appType, Address sourceAddr, short sourcePort, Address destAddr, char* header, int headerSize, int payloadSize, TosType priority, TraceProtocolType traceProtocol)
Allocate header + virtual data with specified priority and send to UDP. Generally used with messenger app.
void APP_UnregisterApp(Node* node, void * dataPtr, bool freeData)
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/APP_UTIL.html[5/24/2011 12:32:23 PM]
APP_UTIL
Also Remove the port number being used for this app in the port table.
BOOL APP_IsFreePort(Node* node, short portNumber)
there is an application running at the node that uses an AppType that has been assigned the same value as this port number. This is done since applications such as CBR use the value of AppType as destination port.
void APP_RemoveFromPortTable(Node* node, short myPort)
void.
APP_MdpLayerInit(Node* node, Address clientAddr, Address serverAddr, Int32 sourcePort, AppType appType, BOOL isProfileNameSet, char* profileName, Int32 uniqueId, NodeInput* nodeInput, Int32 destPort, BOOL destIsUnicast)
void.
void.
SequenceNumber
APP_ReportStatsDbReceiveEvent(Node* node, Message* msg, SequenceNumber** seqCache, Int64 seqNo, clocktype delay, clocktype jitter, int size, int numRcvd, AppMsgStatus msgStatus)
Report receive event to StatsDB app event table This function will check duplicate and out of order msgs
Function / Macro Detail Function / Macro APP_GetTimerType(x) Format Get the timerType for a received App Layer Timer.
APP_RegisterNewApp
APP_UTIL
node
- node that is registering the application. - application type - pointer to the data space for this app
appType dataPtr
Returns:
AppInfo*
APP_SetTimer
void APP_SetTimer (Node* node, AppType appType, int connId, short sourcePort, int timerType, clocktype delay) Parameters:
Set a new App Layer Timer and send to self after delay.
node
appType connId
- if applicable, the TCP connectionId for this timer - the source port of the application setting
Returns:
void
- None
APP_UdpSendNewData
void APP_UdpSendNewData (Node * node, AppType appType, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, char * payload, int payloadSize, clocktype delay, TraceProtocolType traceProtocol) Parameters:
- node that is sending the data. - application type, to be used as destination port. - the source sending the data. - the application source port.
appType
payloadSize delay
- send the data after this delay. - specify the type of application used for
traceProtocol
Returns:
APP_UTIL
void
- None
APP_UdpSendNewDataWithPriority
void APP_UdpSendNewDataWithPriority (Node * node, AppType appType, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, int outgoingInterface, char* payload, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol, BOOL isMdpEnabled, Int32 uniqueId) Parameters:
node
- node that is sending the data. - application type, to be used as - the source sending the data. - the application source port.
appType
outgoingInterface payload
- priority of data.
- send the data after this delay. - specify the type of application
Returns:
void
- None
APP_UdpSendNewDataWithPriority
Message* APP_UdpSendNewDataWithPriority (Node * node, AppType appType, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, int outgoingInterface, char* payload, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol, BOOL isMdpEnabled, Int32 uniqueId) Parameters:
node
Allocate data with specified priority and send to UDP (For IPv6).
- node that is sending the data. - application type, to be used as - the source sending the data. - the application source port.
appType
outgoingInterface
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/APP_UTIL.html[5/24/2011 12:32:23 PM]
APP_UTIL
payload
- priority of data.
- send the data after this delay. - specify the type of application
Returns:
Message*
APP_UdpSendNewHeaderData
void APP_UdpSendNewHeaderData (Node * node, AppType appType, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, char* header, int headerSize, char* payload, int payloadSize, clocktype delay, TraceProtocolType traceProtocol) Parameters:
node
- node that is sending the data. - application type, to be used as - the source sending the data. - the application source port.
appType
headerSize payload
payloadSize delay
- send the data after this delay. - specify the type of application
traceProtocol
Returns:
void
- None
APP_UdpSendNewHeaderDataWithPriority
void APP_UdpSendNewHeaderDataWithPriority (Node * node, AppType appType, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, int outgoingInterface, char* header, int headerSize, char* payload, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol)
APP_UTIL
Parameters: to UDP
node
- node that is sending the data. - application type, to be used as - the source sending the data. - the application source port.
appType
outgoingInterface header
headerSize payload
- priority of data.
- send the data after this delay. - specify the type of application
traceProtocol
Returns:
void
- None
APP_UdpSendNewHeaderVirtualDataWithPriority
void APP_UdpSendNewHeaderVirtualDataWithPriority (Node * node, AppType appType, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol, BOOL isMdpEnabled, Int32 mdpUniqueId) Parameters:
node
Allocate header + virtual data with specified priority and send to UDP
- node that is sending the data. - application type, to be used as - the source sending the data. - the application source port.
appType
- header of the payload. - size of the header. - size of the data in bytes.
headerSize
payloadSize priority
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/APP_UTIL.html[5/24/2011 12:32:23 PM]
- priority of data.
APP_UTIL
delay
- send the data after this delay. - specify the type of application
Returns:
void
- None
APP_UdpSendNewHeaderVirtualDataWithPriority
void APP_UdpSendNewHeaderVirtualDataWithPriority (Node * node, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, short destinationPort, char* infoData, int infoSize, int infoType, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol, BOOL isMdpEnabled, Int32 mdpUniqueId) Parameters:
node
Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
- node that is sending the data. - the source sending the data. - the application source port.
- UDP header to be added in info. - size of the UDP header. - info type of the UDP header. - size of the data in bytes.
- priority of data.
- send the data after this delay. - specify the type of application
Returns:
void
- None
APP_UdpSendNewHeaderVirtualDataWithPriority
void APP_UdpSendNewHeaderVirtualDataWithPriority (Node * node, Address sourceAddr, short sourcePort, Address destAddr, short destinationPort, char* infoData, int infoSize, int infoType, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol, char* appname, BOOL isMdpEnabled, Int32 mdpUniqueId)
APP_UTIL
with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
Parameters:
node
- node that is sending the data. - the source sending the data. - the application source port.
- UDP header to be added. - size of the UDP header. - info type of the UDP header - size of the data in bytes.
- priority of data.
- send the data after this delay. - specify the type of application
traceProtocol appname
isMdpEnabled mdpUniqueId
Returns:
void
- None
APP_UdpSendNewHeaderVirtualDataWithPriority
(Overloaded for IPv6) Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
void APP_UdpSendNewHeaderVirtualDataWithPriority (Node * node, Address sourceAddr, short sourcePort, Address destAddr, short destinationPort, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol, char* infoData, int infoSize, int infoType, BOOL isMdpEnabled, Int32 mdpUniqueId) Parameters:
node
- node that is sending the data. - the source sending the data. - the application source port.
destinationPort header
APP_UTIL
headerSize
- priority of data.
- send the data after this delay. - specify the type of application
- UDP header to be added. - size of the UDP header. - info type of the UDP header - status of MDP layer.
isMdpEnabled mdpUniqueId
Returns:
void
- None
APP_UdpSendNewHeaderVirtualDataWithPriority
void APP_UdpSendNewHeaderVirtualDataWithPriority (Node * node, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, short destinationPort, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol) Parameters:
node
Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
- node that is sending the data. - the source sending the data. - the application source port.
destinationPort header
- header of the payload. - size of the header. - size of the data in bytes.
headerSize
- priority of data.
- send the data after this delay. - specify the type of application
traceProtocol
Returns:
void
- None
APP_UTIL
APP_UdpSendNewHeaderVirtualDataWithPriority
void APP_UdpSendNewHeaderVirtualDataWithPriority (Node * node, AppType appType, Address sourceAddr, short sourcePort, Address destAddr, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, char* mdpInfo, TraceProtocolType traceProtocol, Message* theMsgPtr) Parameters:
node
(Overloaded for MDP) Allocate actual + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
- node that is sending the data. - specify the application type. - the source sending the data. - the application source port.
appType
- pointer to the payload. - size of the payload. - size of the virtual data in bytes.
headerSize
- priority of data.
- send the data after this delay. - persistent info for Mdp. - specify the type of application
mdpInfo
traceProtocol theMsgPtr
Returns:
void
- None
APP_UdpSendNewHeaderVirtualDataWithPriority
void APP_UdpSendNewHeaderVirtualDataWithPriority (Node * node, Address sourceAddr, short sourcePort, Address destAddr, short destinationPort, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol) Parameters:
node
(Overloaded for IPv6) Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
- node that is sending the data. - the source sending the data. - the application source port.
destinationPort header
headerSize
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/APP_UTIL.html[5/24/2011 12:32:23 PM]
APP_UTIL
- priority of data.
- send the data after this delay. - specify the type of application
traceProtocol
Returns:
void
- None
APP_UdpSendNewHeaderVirtualDataWithPriority
void APP_UdpSendNewHeaderVirtualDataWithPriority (Node * node, Address sourceAddr, short sourcePort, Address destAddr, short destinationPort, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol) Parameters:
node
(Overloaded for IPv6) Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
- node that is sending the data. - the source sending the data. - the application source port.
destinationPort header
- header of the payload. - size of the header. - size of the data in bytes.
headerSize
- priority of data.
- send the data after this delay. - specify the type of application
traceProtocol
Returns:
void
- None
APP_UdpCreateNewHeaderVirtualDataWithPriority.
Message * APP_UdpCreateNewHeaderVirtualDataWithPriority. (Node * node, Address sourceAddr, short sourcePort, Address destAddr, short destinationPort, char* header, int headerSize, int payloadSize, TosType priority, TraceProtocolType traceProtocol) Parameters:
node
- node that is sending the data. - the source sending the data.
sourceAddr
APP_UTIL
sourcePort destAddr
destinationPort header
- header of the payload. - size of the header. - size of the data in bytes.
headerSize
payloadSize priority
traceProtocol
Returns:
Message *
APP_UdpSendNewHeaderVirtualDataWithPriority
void APP_UdpSendNewHeaderVirtualDataWithPriority (Node * node, Address sourceAddr, short sourcePort, Address destAddr, short destinationPort, char* header, int headerSize, int payloadSize, TosType priority, clocktype delay, TraceProtocolType traceProtocol, BOOL isMdpEnabled, Int32 mdpUniqueId) Parameters:
node
(Overloaded for IPv6) Allocate header + virtual data with specified priority and send to UDP. Data is sent to a non-default destination port (port number may not have same value as the AppType).
- node that is sending the data. - the source sending the data. - the application source port.
destinationPort header
- header of the payload. - size of the header. - size of the data in bytes.
headerSize
- priority of data.
- send the data after this delay. - specify the type of application
Returns:
void
- None
APP_UTIL
APP_TcpServerListen.
void APP_TcpServerListen. (Node * node, AppType appType, NodeAddress serverAddr, short serverPort) Parameters:
node
- Node pointer that the protocol is - which application initiates this request - server address - server port number
appType
serverAddr serverPort
Returns:
void
- None
APP_TcpServerListen.
void APP_TcpServerListen. (Node * node, AppType appType, Address serverAddr, short serverPort) Parameters:
node
- Node pointer that the protocol is - which application initiates this request - server address - server port number
appType
serverAddr serverPort
Returns:
void
- None
APP_TcpServerListenWithPriority.
void APP_TcpServerListenWithPriority. (Node * node, AppType appType, NodeAddress serverAddr, short serverPort, TosType priority) Parameters:
- Node pointer that the protocol is - which application initiates this request - server address - server port number
appType
Returns:
void
- None
APP_TcpServerListenWithPriority.
void APP_TcpServerListenWithPriority. (Node * node, AppType appType, Address serverAddr, short serverPort, TosType priority)
APP_UTIL
Parameters: Listen on a server port with specified priority. (Overloaded for IPv6)
node
- Node pointer that the protocol is - which application initiates this request - server address - server port number
appType
Returns:
void
- None
APP_TcpOpenConnection.
void APP_TcpOpenConnection. (Node * node, appType appType, NodeAddress localAddr, short localPort, NodeAddress remoteAddr, short remotePort, int uniqueId, clocktype waitTime) Parameters:
Open a connection.
node
- Node pointer that the protocol is - which application initiates this request - address of the source node. - port number on the source node. - address of the remote node. - port number on the remote node (server port).
appType
localAddr localPort
- used to determine which client is requesting - time until the session starts.
Returns:
void
- None
APP_TcpOpenConnection.
void APP_TcpOpenConnection. (Node * node, appType appType, Address localAddr, short localPort, Address remoteAddr, short remotePort, int uniqueId, clocktype waitTime) Parameters:
- Node pointer that the protocol is - which application initiates this request - address of the source node. - port number on the source node. - address of the remote node.
appType
localAddr localPort
remoteAddr
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/APP_UTIL.html[5/24/2011 12:32:23 PM]
APP_UTIL
- used to determine which client is requesting - time until the session starts.
Returns:
void
- None
APP_TcpOpenConnection.
void APP_TcpOpenConnection. (Node * node, appType appType, NodeAddress localAddr, short localPort, NodeAddress remoteAddr, short remotePort, int uniqueId, clocktype waitTime, int outgoingInterface) Parameters:
Open a connection.
node
- Node pointer that the protocol is - which application initiates this request - address of the source node. - port number on the source node. - address of the remote node. - port number on the remote node (server port).
appType
localAddr localPort
- used to determine which client is requesting - time until the session starts. - User specific outgoing Interface.
outgoingInterface
Returns:
void
- None
APP_TcpOpenConnection.
void APP_TcpOpenConnection. (Node * node, appType appType, Address localAddr, short localPort, Address remoteAddr, short remotePort, int uniqueId, clocktype waitTime, int outgoingInterface) Parameters:
- Node pointer that the protocol is - which application initiates this request - address of the source node. - port number on the source node. - address of the remote node. - port number on the remote node (server port).
appType
localAddr localPort
APP_UTIL
waitTime
outgoingInterface
Returns:
void
- None
APP_TcpOpenConnectionWithPriority.
void APP_TcpOpenConnectionWithPriority. (Node * node, appType appType, NodeAddress localAddr, short localPort, NodeAddress remoteAddr, short remotePort, int uniqueId, clocktype waitTime, TosType priority) Parameters:
- Node pointer that the protocol is - which application initiates this request - address of the source node. - port number on the source node. - address of the remote node. - port number on the remote node (server port).
appType
localAddr localPort
- used to determine which client is requesting - time until the session starts. - priority of the data.
Returns:
void
- None
APP_TcpOpenConnectionWithPriority..
void APP_TcpOpenConnectionWithPriority.. (Node * node, appType appType, Address localAddr, short localPort, Address remoteAddr, short remotePort, int uniqueId, clocktype waitTime, TosType priority) Parameters:
node
- Node pointer that the protocol is - which application initiates this request - address of the source node. - port number on the source node. - address of the remote node. - port number on the remote node (server port).
appType
localAddr localPort
APP_UTIL
waitTime priority
Returns:
void
- None
App_TcpCreateMessage.
Message * App_TcpCreateMessage. (Node * node, int connId, char * payload, int length, traceProtocolType traceProtocol) Parameters:
connId
payload length
traceProtocol
Returns:
Message *
APP_TcpSendData.
void APP_TcpSendData. (Node * node, int connId, char * payload, int length, raceProtocolType traceProtocol) Parameters:
node
connId
payload length
traceProtocol
Returns:
void
- None
APP_TcpSendNewHeaderVirtualData.
Message* APP_TcpSendNewHeaderVirtualData. (Node * node, int connId, char * header, int headerLength, int payloadSize, raceProtocolType traceProtocol) Parameters:
connId header
APP_UTIL
headerLength payloadSize
- size of data to send along with header. - specify the type of application
traceProtocol
Returns:
Message*
- Sent message
APP_TcpCloseConnection
node
connId
Returns:
void
- None
APP_InitMulticastGroupMembershipIfAny
node
nodeInput
Returns:
void
- None
APP_CheckMulticastByParsingSourceAndDestString
void APP_CheckMulticastByParsingSourceAndDestString (Node * node, const char * inputString, const char * sourceString, NodeAddress * sourceNodeId, NodeAddress * sourceAddr, const char * destString, NodeAddress * destNodeId, NodeAddress * destAddr, BOOL * isDestMulticast) Parameters:
node
Application input parsing API. Parses the source and destination strings.At the same time validates those strings for multicast address.
- A pointer to Node. - The input string. - The source string. - A pointer to NodeAddress.
inputString
APP_UTIL
destAddr
isDestMulticast
Returns:
void
- None
APP_ParsingSourceAndDestString
void APP_ParsingSourceAndDestString (Node * node, const char * inputString, const char * sourceString, NodeAddress * sourceNodeId, NodeAddress * sourceAddr, const char * destString, NodeAddress * destNodeId, NodeAddress * destAddr, DestinationType * destType) Parameters:
node
API to parse the input source and destination strings read from the *.app file.At the same time checks and fills the destination type parameter.
- A pointer to Node. - The input string. - The source string. - A pointer to NodeAddress.
inputString
Returns:
void
- None
APP_ParsingSourceAndDestString
void APP_ParsingSourceAndDestString (Node * node, const char * inputString, const char * sourceString, NodeId * sourceNodeId, Address * sourceAddr, const char * destString, NodeId * destNodeId, Address * destAddr, DestinationType * destType) Parameters:
node
API to parse the input source and destination strings read from the *.app file. At the same time checks and fills the destination type parameter.
- A pointer to Node. - The input string. - The source string. - A pointer to NodeAddress.
inputString
APP_UTIL
destAddr destType
Returns:
void
- None
APP_RegisterNewApp
AppInfo* APP_RegisterNewApp (Node* node, AppType appType, void * dataPtr, short myPort) Parameters:
Also inserts the port number being used for this app in the port table.
node
- node that is registering the application. - application type - pointer to the data space for this app
Returns:
AppInfo*
APP_IsFreePort
there is an application running at the node that uses an AppType that has been assigned the same value as this port number. This is done since applications such as CBR use the value of AppType as destination port.
node
portNumber
Returns:
BOOL
APP_GetFreePort
Returns:
short
APP_InserInPortTable
- node that needs to be insert in port table - application running at the port
appType
APP_UTIL
myPort
Returns:
void
- None
APP_GetProtocolType
Returns:
short
APP_AssignTos
BOOL APP_AssignTos (char array tosString, char array tosValString, unsigned * tosVal) Parameters:
Application input parsing API. Parses the tos string and tos value strings.At the same time validates those strings for proper ranges.
tosString
tosValString tosVal
Returns:
BOOL
- None
APP_UdpCreateNewHeaderVirtualDataWithPriority
Message* APP_UdpCreateNewHeaderVirtualDataWithPriority (Node * node, AppType appType, NodeAddress sourceAddr, short sourcePort, NodeAddress destAddr, char* header, int headerSize, int payloadSize, TosType priority, TraceProtocolType traceProtocol) Parameters:
node
Allocate header + virtual data with specified priority and send to UDP. Generally used with messenger app.
- node that is sending the data. - type of application data - the source sending the data. - the application source port.
appType
- header of the payload. - size of the header. - size of the data in bytes.
headerSize
payloadSize priority
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/APP_UTIL.html[5/24/2011 12:32:23 PM]
- priority of data.
APP_UTIL
traceProtocol
Returns:
Message*
APP_UdpCreateNewHeaderVirtualDataWithPriority
Message* APP_UdpCreateNewHeaderVirtualDataWithPriority (Node * node, AppType appType, Address sourceAddr, short sourcePort, Address destAddr, char* header, int headerSize, int payloadSize, TosType priority, TraceProtocolType traceProtocol) Parameters:
node
Allocate header + virtual data with specified priority and send to UDP. Generally used with messenger app.
- node that is sending the data. - type of application data - the source sending the data. - the application source port.
appType
- header of the payload. - size of the header. - size of the data in bytes.
headerSize
payloadSize priority
traceProtocol
Returns:
Message*
APP_UnregisterApp
node
- node that is unregistering the application. - pointer to the data space for this app. - if true, free (via MEM_free) the dataPtr
dataPtr
freeData
Returns:
void
- None
APP_UnregisterApp
void APP_UnregisterApp (Node* node, AppType appType, void * dataPtr, short myPort) Parameters:
APP_UTIL
Also Remove the port number being used for this app in the port table.
node
- node that is registering the application. - application type - pointer to the data space for this app
Returns:
void
- None
APP_IsFreePort
there is an application running at the node that uses an AppType that has been assigned the same value as this port number. This is done since applications such as CBR use the value of AppType as destination port.
node
portNumber
Returns:
BOOL
APP_RemoveFromPortTable
- node that needs to be remove from port table - port number to check
myPort
Returns:
void
- None
APP_MdpLayerInit
void. APP_MdpLayerInit (Node* node, Address clientAddr, Address serverAddr, Int32 sourcePort, AppType appType, BOOL isProfileNameSet, char* profileName, Int32 uniqueId, NodeInput* nodeInput, Int32 destPort, BOOL destIsUnicast) Parameters:
node
- specify node that received the message. - specify address of the sender node. - specify address of the receiver. - specify source port of the sender.
- specify application type for which MDP layer - specify whether MDP profile is defined.
isProfileNameSet profileName
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/APP_UTIL.html[5/24/2011 12:32:23 PM]
APP_UTIL
uniqueId
- specify unique id for MDP. Default value is -1. - specify nodeinput. Default value is NULL.
nodeInput destPort
- specify destination port of the receiver. - specify whether dest address is unicast address
destIsUnicast
Returns:
void.
- None
APP_MdpLayerInitForOtherPartitionNodes
void. APP_MdpLayerInitForOtherPartitionNodes (Node* node, NodeInput* nodeInput, Address* destAddr, BOOL isUnicast) Parameters:
nodeInput destAddr
- specify the multicast destination address. - specify whether application is unicast or multicast.
isUnicast
Returns:
void.
- None
APP_MdpQueueDataObject
void. APP_MdpQueueDataObject (Node* node, Address localAddr, Address remoteAddr, Int32 uniqueId, Int32 itemSize, char* payload, Int32 virtualSize, Message* theMsg, BOOL isFromAppForward) Parameters:
node
- specify node that received the message. - specify address of the sender node. - specify address of the receiver.
localAddr
- specify the payload for the item. - specify the virtual size of the item
virtualSize theMsg
- pointer to the received message. - will TRUE only when packet is queued from
isFromAppForward
Returns:
void.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/APP_UTIL.html[5/24/2011 12:32:23 PM]
APP_UTIL
- None APP_MdpNotifyLastDataObject void. APP_MdpNotifyLastDataObject (Node* node, Address localAddr, Address remoteAddr, Int32 uniqueId) Parameters:
node
- specify node that received the message. - specify address of the sender node. - specify address of the receiver.
localAddr
remoteAddr uniqueId
Returns:
void.
- None
APP_ReportStatsDbReceiveEvent
SequenceNumber APP_ReportStatsDbReceiveEvent (Node* node, Message* msg, SequenceNumber** seqCache, Int64 seqNo, clocktype delay, clocktype jitter, int size, int numRcvd, AppMsgStatus msgStatus) Parameters:
Report receive event to StatsDB app event table This function will check duplicate and out of order msgs
node msg
- Sequence number of the message or fragment - Delay of the message/fragment - Smoothed jitter of the received message
jitter size
- Size of msg/fragment to be report to db - # of msgs/frags received so far - This is for performance optimization. If
numRcvd
msgStatus
Returns:
SequenceNumber
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/APP_UTIL.html[5/24/2011 12:32:23 PM]
APP_UTIL
APPLICATION LAYER
APPLICATION LAYER
This file describes data structures and functions used by the Application Layer. Constant / Data Structure Summary Type
CONSTANT
Name
APP_DEFAULT_TOS
Maximum fragment size supported by LINK16 MAC protocol. For Link16, it seems the fragment size should be 8 * 9 bytes = 72 bytes
CONSTANT MAC_DEFAULT_INTERFACE
Default interface of MAC layer. ASSUMPTION :: Source and Destination node must have only one interface with TADIL network.
ENUMERATION AppType
APPLICATION LAYER
Summary
InitiateConnectionType(Node* node, void* voip)
Multimedia callback funtion to open request for a TCP connection from the initiating terminal
void TerminateConnectionType(Node* node, void* voip)
APPLICATION LAYER
Constant
APP_DEFAULT_TOS Ox00
Constant
Constant
Constant
Constant
Constant
Maximum fragment size supported by LINK16 MAC protocol. For Link16, it seems the fragment size should be 8 * 9 bytes = 72 bytes MAC_DEFAULT_INTERFACE 0
Enumeration
Default interface of MAC layer. ASSUMPTION :: Source and Destination node must have only one interface with TADIL network. AppType
Structure
Structure
Structure
APPLICATION LAYER
Structure
Structure
Structure
Function / Macro Detail Function / Macro InitiateConnectionType Format void InitiateConnectionType (Node* node, void* voip) Parameters: Multimedia callback funtion to open request for a TCP connection from the initiating terminal
node voip
Returns:
void
- NULL
TerminateConnectionType
node voip
Returns:
void
- NULL
IsHostCallingType
node
APPLICATION LAYER
Returns:
BOOL
IsHostCalledType
node
Returns:
BOOL
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
BUFFER
BUFFER
This file describes data structures and functions to implement buffers. Constant / Data Structure Summary Type
STRUCT
Name
DataBuffer
Summary
BUFFER_GetCurrentSize(x)
BUFFER
Initializing Data buffer. Keeping in mind that buffer will be initialized once and the guess for initial size is a good one. For all the other manipulation of the buffer will try to allocate in the initial if not asked to increase size and this size will remain until end of program for re-using unless the buffer is closed completely.
void BUFFER_AddSpaceToDataBuffer(DataBuffer* buffer, int size)
clear data from the buffer(already used portion of buffer Not any unused portion unless u clear till end)
void BUFFER_DestroyDataBuffer(DataBuffer* buffer)
To Destroy a buffer
void BUFFER_AddDataToDataBuffer(DataBuffer* buffer, char * data, int size)
BUFFER
void
BUFFER
Structure
DataBuffer
Structure
Structure
Function / Macro Detail Function / Macro BUFFER_GetCurrentSize(x) Format Returns the current size of the buffer
BUFFER_GetMaxSize(x)
BUFFER_GetData(x)
BUFFER_GetAnticipatedSize(x)
BUFFER_SetCurrentSize(x,y)
BUFFER_GetFreeSpace(x)
BUFFER_ReturnTop(x)
BUFFER_NumberOfBlocks(X)
BUFFER
BUFFER_InitializeDataBuffer
Initializing Data buffer. Keeping in mind that buffer will be initialized once and the guess for initial size is a good one. For all the other manipulation of the buffer will try to allocate in the initial if not asked to increase size and this size will remain until end of program for re-using unless the buffer is closed completely. BUFFER_AddSpaceToDataBuffer
buffer size
- buffer to be intialized
Returns:
void
- None
buffer size
- size to be added
Returns:
void
- None
BUFFER_ClearDataFromDataBuffer
void BUFFER_ClearDataFromDataBuffer (DataBuffer* buffer, char * startLocation, int size, BOOL destroy) Parameters:
clear data from the buffer(already used portion of buffer Not any unused portion unless u clear till end)
buffer
startLocation size
destroy
Returns:
void
- None
BUFFER_DestroyDataBuffer
To Destroy a buffer
buffer
- buffer to be destroyed
Returns:
void
- None
BUFFER_AddDataToDataBuffer
buffer
BUFFER
data size
Returns:
void
- None
BUFFER_RemoveDataFromDataBuffer
buffer
- buffer from which data is to be removed - starting location from whcih data is removed
startLocation size
Returns:
void
- None
InitializeReassemblyBuffer
buffer size
- ReassemblyBuffer to be initialized
Returns:
void
- None
BUFFER_AddDataToAssemblyBuffer
void BUFFER_AddDataToAssemblyBuffer (ReassemblyBuffer* buffer, char* data, int size, BOOL allowOverflow) Parameters:
- Pointer to ReassemblyBuffer
allowOverflow
Returns:
void
- None
BUFFER_ClearAssemblyBuffer
BUFFER
buffer max
- Pointer to ReassemblyBuffer
- the maximum size you want to set, if setSize is TRUE - TRUE, if the buffer max-size is to be re-set
setSize
Returns:
void
- None
BUFFER_SetAnticipatedSizeForAssemblyBuffer
buffer size
- Pointer to ReassemblyBuffer
- size to be set
Returns:
void
- None
BUFFER_AllocatePacketBuffer
PacketBuffer * BUFFER_AllocatePacketBuffer (int initialSize, int anticipatedHeaderMax, BOOL allowOverflow, char ** dataPtr) Parameters:
- if overflow is allowed
Returns:
PacketBuffer *
- Pointer to packetbuffer
BUFFER_AllocatePacketBufferWithInitialHeader
PacketBuffer * BUFFER_AllocatePacketBufferWithInitialHeader (int initialSize, int initialHeaderSize, int anticipatedHeaderMax, BOOL allowOverflow, char ** dataPtr, char ** headerPtr) Parameters:
- intial buffer size - initial header size - expected max header size
initialHeaderSize
- if overflow is allowed
headerPtr
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/BUFFER.html[5/24/2011 12:32:49 PM]
BUFFER
Returns:
PacketBuffer *
- Pointer to packetbuffer
BUFFER_AddHeaderToPacketBuffer
buffer
headerSize headerPtr
Returns:
void
- None
BUFFER_RemoveHeaderFromPacketBuffer
buffer
headerSize dataPtr
Returns:
void
- None
BUFFER_ClearPacketBufferData
buffer
- Pointer to PacketBuffer
Returns:
void
- None
BUFFER_FreePacketBuffer
buffer
- Pointer to PacketBuffer
Returns:
void
- None
BUFFER_ConcatenatePacketBuffer
BUFFER
Parameters: Add useful contents of source buffer as header to to the destination buffer
source dest
- Pointer to PacketBuffer
- Pointer to PacketBuffer
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
CIRCULAR-BUFFER
CIRCULAR-BUFFER
This file describes data structures and functions used for circular buffer implementation. Constant / Data Structure Summary Type
CONSTANT
Name
CIR_BUF_SIZE
Summary
CircularBuffer.incPos(Int32 increment, Int32 operation)
Constructor
None CircularBuffer.CircularBuffer(Int32 queueSize)
Constructor
None CircularBuffer.CircularBuffer(unsigned short index)
CIRCULAR-BUFFER
Constructor
None CircularBuffer.CircularBuffer(unsigned short index, Int32 queueSize)
Constructor
Node CircularBuffer.~CircularBuffer()
Destructor
bool CircularBuffer.create(Int32 queueSize)
Read data from Buffer and pass the length of data read
bool CircularBuffer.readFromBuffer(unsigned char* data, Int32 length, bool noIncrement)
CIRCULAR-BUFFER
Int32
CircularBuffer.getIndex(Int32 operation)
Constant
CIR_BUF_SIZE 256
Default Circular Buffer Size Enumeration Type of Circular Buffer Operation Enumeration Type of Wrap operation
Function / Macro Detail Function / Macro CircularBuffer.incPos Format bool CircularBuffer.incPos (Int32 increment, Int32 operation) Parameters: increment read/write position based on operation
increment operation
Returns:
bool
- Successful or not
CircularBuffer.CircularBuffer
None CircularBuffer.CircularBuffer ()
CIRCULAR-BUFFER
- None
CircularBuffer.CircularBuffer
Constructor
queueSize
Returns:
None
- None
CircularBuffer.CircularBuffer
Constructor
index
Returns:
None
- None
CircularBuffer.CircularBuffer
Constructor
index
queueSize
Returns:
None
- None
CircularBuffer.~CircularBuffer
Destructor
Returns:
Node
- None
CircularBuffer.create
queueSize
- Size of queue
Returns:
bool
- Successful or not
CIRCULAR-BUFFER
CircularBuffer.release
- None Returns:
void
- None
CircularBuffer.reset
- None Returns:
void
- None
CircularBuffer.getCount
count
operation
Returns:
bool
- successful or not
CircularBuffer.lengthToEnd
operation
Returns:
Int32
CircularBuffer.readWithCount
Read data from Buffer and pass the length of data read
data
length
Returns:
bool
- Successful or not
CIRCULAR-BUFFER
CircularBuffer.readFromBuffer
bool CircularBuffer.readFromBuffer (unsigned char* data, Int32 length, bool noIncrement) Parameters:
data
- Container to which data will be read - length of data to be read - Whether the read pointer is to be incremented or not
length
noIncrement
Returns:
bool
- successful or not
CircularBuffer.write
data
length
Returns:
bool
- successful or not
CircularBuffer.read
buffer
Returns:
bool
- Succesful or not
CircularBuffer.getIndex
operation
Returns:
Int32
CircularBuffer.getCirBufSize
none
- None
Returns:
Int32
CIRCULAR-BUFFER
CircularBuffer.getIndex
none
- None
Returns:
unsigned short
- unique index
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
CLOCK
CLOCK
This file describes data structures and functions used for time-related operations. Constant / Data Structure Summary Type
CONSTANT
Name
CLOCKTYPE_MAX
CLOCKTYPE_MAX is the maximum value of clocktype. This value can be anything as long as it is less than or equal to the maximum value of the type which is typedefed to clocktype. Users can simulate the model up to CLOCKTYPE_MAX - 1.
CONSTANT NANO_SECOND
CLOCK
Summary
ctoa
Read the string in "buf" and provide the corresponding clocktype value for the string using the following conversions: NS - nanoseconds MS - milli-seconds S - seconds (default if no specification) H - hours D - days
void TIME_PrintClockInSecond(clocktype clock, char * stringInSecond)
CLOCK
void
Constant
Constant
CLOCKTYPE_MAX is the maximum value of clocktype. This value can be anything as long as it is less than or equal to the maximum value of the type which is typedefed to clocktype. Users can simulate the model up to CLOCKTYPE_MAX - 1. NANO_SECOND ((clocktype) 1)
Constant
Constant
Defined as 1000 times the basic unit of clocktype MILLI_SECOND (1000 * MICRO_SECOND)
Constant
Constant
CLOCK
Constant
Constant
Constant
Function / Macro Detail Function / Macro ctoa Format like sprintf, prints a clocktype to a string
atoc
getSimTime(node)
getSimStartTime(node)
TIME_getSimTime(node)
TIME_ConvertToClock
Read the string in "buf" and provide the corresponding clocktype value for the string using the following conversions: NS - nanoseconds MS - milli-seconds S - seconds (default if no specification) H - hours D days TIME_PrintClockInSecond
buf
Returns:
clocktype
- Time in clocktype
clock
- Time in clocktype
CLOCK
stringInSecond
Returns:
void
- None
TIME_PrintClockInSecond
clock
stringInSecond node
- Input node
Returns:
void
- None
TIME_PrintClockInSecond
clock
stringInSecond partition
- Input partition
Returns:
void
- None
TIME_ReturnMaxSimClock
node
- Input node
Returns:
clocktype
TIME_ReturnStartSimClock
node
- Input node
Returns:
clocktype
CLOCK
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
COORDINATES
COORDINATES
This file describes data structures and functions used for coordinates-related operations. Constant / Data Structure Summary Type
CONSTANT
Name
PI
Defines ANGLE_RESOLUTION
CONSTANT IN_RADIAN
COORDINATES
Defines coordinates
STRUCT Orientation
Summary
MAX(X, Y)
Calculate the shortest propagation delay. Shortest delay is assumed with light speed. Actual delay could be longer if propagation medium is not eletromegnatic waves, such as acoustic wave.
BOOL COORD_CoordinatesAreTheSame(const Coordinates c1, const Coordinates c2)
To compare two coordinates and determine if they have the same orientation
static int COORD_NormalizeAzimuthAngle(int angle)
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/COORDINATES.html[5/24/2011 12:33:26 PM]
COORDINATES
To calculate the distance between two nodes(points) given the coordinateSystemType and the coordinates of the two points
static void COORD_CalcDistanceAndAngle(int coordinateSystemType, const position1, const position2, double* distance, Orientation* DOA1, Orientation* DOA2)
COORDINATES
Read the string in "buf" and provide the corresponding coordinates for the string.
static void COORD_MapCoordinateSystemToType(int coordinateSystem, Coordinates* coordinates)
Set coordinates type field (CoordinateRepresentationType) based on the user-provided coordinate system (coordinate_system_type)
static void COORD_NormalizeLongitude(Coordinates* coordinates)
Correct the longitude value to between -180 and 180. This function assumes the coordinate system is LLA.
bool COORD_PointWithinRange(int coordinateSystemType, Coordinates* sw, Coordinates* ne, Coordinates* point)
Is the point within the given range. Assume -90 <= lat <= 90 and -180 <= long <= 180 for all inputs.
bool COORD_RegionsOverlap(int coordinateSystemType, Coordinates* sw1, Coordinates* ne1, Coordinates* sw2, Coordinates* ne2)
Convenience function for geodetic that, given two longitudes, returns the difference (in degrees) in the shorter direction.
void COORD_PrintCoordinates(int coordinateSystemType, Coordinates* point)
Constant
PI 3.14159265358979323846264338328
Constant
Constant
COORDINATES
Constant
Enumeration
Enumeration
Enumeration
Structure
Structure
Structure
Structure
Structure
COORDINATES
MIN(X, Y)
COORD_ShortestPropagationDelay(dist)
Calculate the shortest propagation delay. Shortest delay is assumed with light speed. Actual delay could be longer if propagation medium is not eletromegnatic waves, such as acoustic wave. BOOL COORD_CoordinatesAreTheSame (const Coordinates c1, const Coordinates c2) Parameters:
COORD_CoordinatesAreTheSame
c1 c2
Returns:
BOOL
COORD_OrientationsAreTheSame
To compare two coordinates and determine if they have the same orientation
o1 o2
Returns:
BOOL
COORD_NormalizeAzimuthAngle
angle
- azimuth angle
Returns:
static int
- None
COORD_NormalizeElevationAngle
angle
- Angle of elevation
Returns:
COORDINATES
static int
- None
COORD_NormalizeAngleIndex
angleIndex
- angleIndex - angleResolution
angleResolution
Returns:
static int
COORD_CalcDistance
BOOL COORD_CalcDistance (int coordinateSystemType, const Coordinates* position1, const Coordinates* position2, CoordinateType distance) Parameters:
To calculate the distance between two nodes(points) given the coordinateSystemType and the coordinates of the two points
Returns:
BOOL
COORD_CalcDistanceAndAngle
static void COORD_CalcDistanceAndAngle (int coordinateSystemType, const position1, const position2, double* distance, Orientation* DOA1, Orientation* DOA2) Parameters:
- coordinateSystem Type
- Coordinates* - Coordinates*
- distance
- DOA 1 - DOA 2
Returns:
static void
- None
COORD_ChangeCoordinateSystem
static void COORD_ChangeCoordinateSystem (const CoordinateRepresentationType source_type, const Coordinates* const source, const CoordinateRepresentationType target_type, Coordinates* const target)
COORDINATES
- coordinate system of
target_type target
Returns:
static void
- None
COORD_ChangeCoordinateSystem
static void COORD_ChangeCoordinateSystem (const Coordinates* const source, const CoordinateRepresentationType target_type, Coordinates* const target) Parameters:
source
target_type target
Returns:
static void
- None
COORD_GeodeticToGeocentricCartesian
static void COORD_GeodeticToGeocentricCartesian (const Coordinates* const source, Coordinates* const target) Parameters:
source target
Returns:
static void
- None
COORD_GeocentricCartesianToGeodetic
static void COORD_GeocentricCartesianToGeodetic (const Coordinates* const source, Coordinates* const target) Parameters:
source target
Returns:
static void
- None
COORD_JGISToGeodetic
static void COORD_JGISToGeodetic (const Coordinates* const source, Coordinates* const target)
COORDINATES
Returns:
static void
- None
COORD_JGISToUnreferencedCartesian
static void COORD_JGISToUnreferencedCartesian (const Coordinates* const source, Coordinates* const target) Parameters:
source target
Returns:
static void
- None
COORD_ConvertToCoordinates
Read the string in "buf" and provide the corresponding coordinates for the string.
buf
coordinates
Returns:
static void
- None
COORD_MapCoordinateSystemToType
Set coordinates type field (CoordinateRepresentationType) based on the user-provided coordinate system (coordinate_system_type)
coordinateSystem coordinates
Returns:
static void
- None
COORD_NormalizeLongitude
Correct the longitude value to between -180 and 180. This function assumes the coordinate system is LLA.
coordinates
Returns:
static void
- None
COORDINATES
COORD_PointWithinRange
bool COORD_PointWithinRange (int coordinateSystemType, Coordinates* sw, Coordinates* ne, Coordinates* point) Parameters:
Is the point within the given range. Assume 90 <= lat <= 90 and -180 <= long <= 180 for all inputs.
coordinateSystemType sw ne
- Cartesian or Geodetic
- Pointer to the SW corner (0,0) if Cartesian - Pointer to the NE corner (dimensions if Cartesian) - Pointer to the coordinates
point
Returns:
bool
COORD_RegionsOverlap
bool COORD_RegionsOverlap (int coordinateSystemType, Coordinates* sw1, Coordinates* ne1, Coordinates* sw2, Coordinates* ne2) Parameters:
- Cartesian or Geodetic
- Pointer to the SW corner of the first region - Pointer to the NE corner of the first region - Pointer to the SW corner of the second region - Pointer to the NE corner of the second region
Returns:
bool
COORD_LongitudeDelta
Convenience function for geodetic that, given two longitudes, returns the difference (in degrees) in the shorter direction.
long1 long2
- coordinate 1 - coordinate 2
Returns:
void
- None
COORD_PrintCoordinates
coordinateSystemType point
- Cartesian or Geodetic
COORDINATES
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
ERROR
ERROR
This file defines data structures and functions used in error-handling. Constant / Data Structure Summary Type
CONSTANT
Name
ERROR_ASSERTION
Summary
ERROR_Assert(expr, str)
In DEBUG mode assert macro will be replaced by ERROR_WriteError with ERROR_ASSERTION type
MACRO ERROR_ReportError(str)
Function call used to report an error condition in QualNet, and notify GUI of such.
MACRO ERROR_ReportWarning(str)
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/ERROR.html[5/24/2011 12:33:34 PM]
ERROR
Function call used to report a recoverable error condition. This macro in turns calls ERROR_WriteError with ERROR_WARNING type. It reports a warning message in QualNet, and notify GUI of such
extern BOOL ERROR_WriteError(int type, char* condition, char* msg, char* file, int lineno)
Function call used to report failed assertions, errors, and warnings, and notify the GUI of such. The user should not call this function directly, but should use one of the previously defined macros.
void ERROR_InstallHandler(int type, char* condition, char* msg, char* file, int lineno, QErrorHandler functionPointer)
Function used to register a callback function. The callback function will be invoked by ERROR_ when ERROR_WriteError () is invoked. For example - logging error messages into a log file or send the error messages to another application (e.g. to the Qualnet IDE that started the simulation.)
void ERROR_ReportMissingAddon(const char* model, const char* addon)
Reports an error when user attempts to use a model that hasn't been installed, either because the customer hasn't purchased that feature, or they haven't downloaded and compiled it.
void ERROR_ReportMissingInterface(const char* model, const char* iface)
Reports an error when user attempts to use a model that hasn't been installed, either because the customer hasn't purchased that feature, or they haven't downloaded and compiled it.
void ERROR_ReportMissingLibrary(const char* model, const char* library)
Reports an error when user attempts to use a model that hasn't been installed, either because the customer hasn't purchased that feature, or they haven't downloaded and compiled it.
Constant
ERROR_ASSERTION 0
Constant
Constant
ERROR
Function / Macro Detail Function / Macro ERROR_Assert(expr, str) Format May be used in place of assert,to include an error message
assert(expr)
In DEBUG mode assert macro will be replaced by ERROR_WriteError with ERROR_ASSERTION type
ERROR_ReportError(str)
Function call used to report an error condition in QualNet, and notify GUI of such.
ERROR_ReportWarning(str)
Function call used to report a recoverable error condition. This macro in turns calls ERROR_WriteError with ERROR_WARNING type. It reports a warning message in QualNet, and notify GUI of such extern BOOL ERROR_WriteError (int type, char* condition, char* msg, char* file, int lineno) Parameters:
ERROR_WriteError
Function call used to report failed assertions, errors, and warnings, and notify the GUI of such. The user should not call this function directly, but should use one of the previously defined macros.
type
condition msg
- an error message - the file name in which the assertion failed - the line on which the assertion failed.
file
lineno
Returns:
extern BOOL
- None
ERROR_InstallHandler
void ERROR_InstallHandler (int type, char* condition, char* msg, char* file, int lineno, QErrorHandler functionPointer) Parameters:
Function used to register a callback function. The callback function will be invoked by ERROR_ when ERROR_WriteError () is invoked. For example - logging error messages into a log file or send the error messages to another application (e.g. to the Qualnet IDE that started the simulation.)
type
condition msg
- an error message - the file name in which the assertion failed - the line on which the assertion failed.
file
lineno
ERROR
functionPointer
Returns:
void
- None
ERROR_ReportMissingAddon
Reports an error when user attempts to use a model that hasn't been installed, either because the customer hasn't purchased that feature, or they haven't downloaded and compiled it.
model addon
- the name of the model/protocol being used. - the name of the addon to which the model belongs
Returns:
void
- None
ERROR_ReportMissingInterface
Reports an error when user attempts to use a model that hasn't been installed, either because the customer hasn't purchased that feature, or they haven't downloaded and compiled it.
model iface
- the name of the model/protocol being used. - the name of the interface to which the model belongs
Returns:
void
- None
ERROR_ReportMissingLibrary
Reports an error when user attempts to use a model that hasn't been installed, either because the customer hasn't purchased that feature, or they haven't downloaded and compiled it.
model
- the name of the model/protocol being used. - the name of the library to which the model belongs
library
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
ERROR
EXTERNAL
EXTERNAL
This file defines the generic interface to external modules. Constant / Data Structure Summary Type
CONSTANT
Name
EXTERNAL_MAX_TIME
A struct containing data needed to send a message from an external thread to the main thread.
STRUCT EXTERNAL_ThreadedForwarded
A struct containing data needed to send a forwarded packet from the main thread to an external forward function
STRUCT EXTERNAL_Mapping
EXTERNAL
A linked list node containing one mapping. The key may be of any size, specified by keySize. The value the key maps to is a pointer to some piece of data. It is assumed that whoever created the mapping will know what to do with the pointer. The user will not use this structure directly.
STRUCT EXTERNAL_MobilityEvent
Summary
EXTERNAL_RegisterExternalInterface(EXTERNAL_InterfaceList* list, char* name, EXTERNAL_PerformanceParameters params)
This function will register a new external interface with QualNet and create the necessary data structures. This function must be called before any other function that requires an EXTERNAL_Interface* argument.
EXTERNAL_Interface * EXTERNAL_RegisterExternalInterface(EXTERNAL_InterfaceList* list, char* name, EXTERNAL_PerformanceParameters params, ExternalInterfaceType type)
This function is an overloaded variation. for registering a new external interface with QualNet
void EXTERNAL_RegisterFunction(EXTERNAL_Interface* iface, EXTERNAL_FunctionType type, EXTERNAL function)
Turns time management on and specifies the lookahead value. The lookahead value may be changed later by calling EXTERNAL_ChangeRealTimeLookahead().
void EXTERNAL_ChangeRealTimeLookahead(EXTERNAL_Interface* iface, clocktype lookahead)
EXTERNAL
Modifies the lookahead value. Must be called after EXTERNAL_SetTimeManagementRealTime(). May be called during the simulation.
void EXTERNAL_InitializeWarmupParams(EXTERNAL_Interface* iface, NodeInput* nodeInput)
void
Sets this interface's warmup time. The actual warmup time used is the maximum of all interface's. The default is no warmup time (warmup == -1). This function must be called before or during the initialize nodes step. It will have no effect during the simulation.
void EXTERNAL_BeginWarmup(EXTERNAL_Interface* iface)
Each interface that calls EXTERNAL_SetWarmupTime must call EXTERNAL_BeginWarmup when it is ready to enter warmup time.
clocktype EXTERNAL_QueryWarmupTime(EXTERNAL_Interface* iface)
Get the warmup time for the entire simulation. Interfaces should use this function to test when warmup time is over.
BOOL EXTERNAL_IsInWarmup(EXTERNAL_Interface* iface)
Resume every interface. Only usable when running in real-time, and after calling pause.
clocktype EXTERNAL_QueryExternalTime(EXTERNAL_Interface* iface)
EXTERNAL
This function will sleep for a minimum amount of time as indicated by the amount parameter. Depending on which platform it is called on the amount of time spent sleeping could be greater.
void EXTERNAL_SetReceiveDelay(EXTERNAL_Interface* iface, clocktype delay)
This function will set the minimum delay between two consecutive calls to the receive function. The time used is the simulation time.
void EXTERNAL_SendMessage(EXTERNAL_Interface* iface, Node* node, Message* msg, clocktype timestamp)
This function will send a message from the external interface. This function is thread-safe.
void EXTERNAL_ForwardData(EXTERNAL_Interface* iface, Node* node, void* forwardData, int forwardSize, EXTERNAL_ForwardData_ReceiverOpt FwdReceiverOpt)
Send data back to the external source with no time stamp. The user defined Forward function will receive this message and process it. This will handle threading issues if necessary.
void EXTERNAL_RemoteForwardData(EXTERNAL_Interface* iface, Node* node, void* forwardData, int forwardSize, int partitionId)
Send data back to the external source with no time stamp. This function is similar to EXTERNAL_ForwardData, except that this function can forward the message to and external interface on a different partition.
void EXTERNAL_ForwardDataTimeStamped(EXTERNAL_Interface* iface, Node* node, Message* message, clocktype timestamp)
Send data in the form of a message back to the external source with a time stamp. The user defined Forward function will receive this message and process it. This will handle threading issues if necessary.
void EXTERNAL_UserFunctionRegistration(EXTERNAL_InterfaceList * list, NodeInput* nodeInput)
This function will give a convenient place for users to add their function registration code. This is the only part of the External Interface API code that the user is expected to modify.
void EXTERNAL_InitializeInterface(EXTERNAL_Interface* iface)
This function will free an external interface, as well as call the finalize function registered by EXTERNAL_RegisterFinalizeFunction()
void EXTERNAL_InitializeInterfaceList(EXTERNAL_InterfaceList* list, PartitionData* partition)
EXTERNAL
This function will be called early in the simulation initialization process (after MPI_Init(), but before partitions are created, and before EXTERNAL_InitializeInterfaceList (). In a shared parallel simulation the threads for partitions won't be created yet.
void EXTERNAL_PreBootstrap(int argc, char* argv [])
This function will be called early in the simulation initialization process (after MPI_Init(), but before partitions are created, and before EXTERNAL_InitializeInterfaceList (). In a shared parallel simulation the threads for partitions won't be created yet. This function handles the mini-configuration file conversion, and make sures that if simProps needs to change it is changed and then a broadcast message is sent to other partitions.
void EXTERNAL_FinalizeInterfaceList(EXTERNAL_InterfaceList* list)
This function will finalize all ExternalInterfaces in the list, as well as the list itself
EXTERNAL_Interface* EXTERNAL_GetInterfaceByName(EXTERNAL_InterfaceList* list, char* name)
This function will search an interface list for an interface with the given name
void EXTERNAL_CallInitializeFunctions(EXTERNAL_InterfaceList* list, NodeInput* nodeInput)
This function will start the receive/forward threads for all threaded interfaces. Called after EXTERNAL_CallInitializeNodesFunctions.
clocktype EXTERNAL_CalculateMinSimulationHorizon(EXTERNAL_InterfaceList* list, clocktype now)
This function will call all simulation horizon functions to determine how far into the future the simulation can run. An individual simulation horizon function will only be called if the current time (now) is >= that interface's current horizon.
void EXTERNAL_CallReceiveFunctions(EXTERNAL_InterfaceList* list)
This function will call all receive function that were not started in a thread
void EXTERNAL_CallFinalizeFunctions(EXTERNAL_InterfaceList* list)
EXTERNAL
Function used to initialize a generic interface to an external source of messages, e.g. an HLA federate. Called before nodes are created.
void EXTERNAL_PostInitialize(partitionData* partitionData)
Function used to initialize a generic interface to an external source of messages, e.g. an HLA federate.Called after nodes are created. The developer can use either this function, the preceding one or both.
void EXTERNAL_GetExternalMessages(partitionData* partitionData, clocktype nextInternalEventTime)
Function used to retrieve messages from a remote source, such as a DIS gateway or HLA federation. Called before events at time X are executed. Many events at time X may be executed before the next call
void EXTERNAL_Finalize(partitionData* partitionData)
Remove the indicated interface for the list of currently activateed interfaces.
void EXTERNAL_ProcessEvent(Node* node, Message* msg)
Get the next internal event on the given partition. This includes both regular events and mobility events.
Constant
EXTERNAL_MAX_TIME
Constant
EXTERNAL
Constant
EXTERNAL_MAPPING_TABLE_SIZE 31
Constant
Enumeration
Structure
Structure
A struct containing data needed to send a message from an external thread to the main thread. EXTERNAL_ThreadedForwarded
Structure
A struct containing data needed to send a forwarded packet from the main thread to an external forward function EXTERNAL_Mapping
Structure
A linked list node containing one mapping. The key may be of any size, specified by keySize. The value the key maps to is a pointer to some piece of data. It is assumed that whoever created the mapping will know what to do with the pointer. The user will not use this structure directly. EXTERNAL_MobilityEvent
Structure
Structure
A buffer containing all mobility events yet to be added to the simulation. EXTERNAL_InterfaceList
Structure
EXTERNAL
Function / Macro Detail Function / Macro EXTERNAL_RegisterExternalInterface Format EXTERNAL_Interface * EXTERNAL_RegisterExternalInterface (EXTERNAL_InterfaceList* list, char* name, EXTERNAL_PerformanceParameters params) Parameters: This function will register a new external interface with QualNet and create the necessary data structures. This function must be called before any other function that requires an EXTERNAL_Interface* argument.
list name
- The list of external interfaces - The name of the external interface. - The performance parameters
params
Returns:
EXTERNAL_Interface *
EXTERNAL_RegisterExternalInterface
EXTERNAL_Interface * EXTERNAL_RegisterExternalInterface (EXTERNAL_InterfaceList* list, char* name, EXTERNAL_PerformanceParameters params, ExternalInterfaceType type) Parameters:
This function is an overloaded variation. for registering a new external interface with QualNet
list name
- The list of external interfaces - The name of the external interface. - The performance parameters
params type
Returns:
EXTERNAL_Interface *
EXTERNAL_RegisterFunction
function
Returns:
void
- None
EXTERNAL_SetTimeManagementRealTime
EXTERNAL
Parameters: Turns time management on and specifies the lookahead value. The lookahead value may be changed later by calling EXTERNAL_ChangeRealTimeLookahead().
iface
- The external interface - How far into the future the simulation is
lookahead
Returns:
void
- None
EXTERNAL_ChangeRealTimeLookahead
Modifies the lookahead value. Must be called after EXTERNAL_SetTimeManagementRealTime(). May be called during the simulation.
iface
lookahead
Returns:
void
- None
EXTERNAL_InitializeWarmupParams
nodeInput
Returns:
void
- None
EXTERNAL_SetWarmupTime
Sets this interface's warmup time. The actual warmup time used is the maximum of all interface's. The default is no warmup time (warmup == -1). This function must be called before or during the initialize nodes step. It will have no effect during the simulation. EXTERNAL_BeginWarmup
iface
warmup
Returns:
void
- None
Each interface that calls EXTERNAL_SetWarmupTime must call EXTERNAL_BeginWarmup when it is ready to enter warmup time.
iface
Returns:
void
- None
EXTERNAL
EXTERNAL_QueryWarmupTime
Get the warmup time for the entire simulation. Interfaces should use this function to test when warmup time is over.
iface
Returns:
clocktype
EXTERNAL_IsInWarmup
iface
Returns: - TRUE if in warmup, FALSE if not This is now a wrapper function ONLY. It passes a pointer to partition data. We overload this function in order to check if simulator is in warm-up phase even when we do not have access to External interface
BOOL
EXTERNAL_IsInWarmup
partitionData
Returns:
BOOL
EXTERNAL_Pause
iface
Returns:
void
- None
EXTERNAL_Resume
Resume every interface. Only usable when running in real-time, and after calling pause.
iface
Returns:
void
- None
EXTERNAL_QueryExternalTime
EXTERNAL
Parameters: This function will return the External Time of an external interface
iface
Returns:
clocktype
EXTERNAL_QuerySimulationTime
iface
Returns:
clocktype
EXTERNAL_Sleep
This function will sleep for a minimum amount of time as indicated by the amount parameter. Depending on which platform it is called on the amount of time spent sleeping could be greater. EXTERNAL_SetReceiveDelay
amount
Returns:
void
- None
This function will set the minimum delay between two consecutive calls to the receive function. The time used is the simulation time.
iface delay
Returns:
void
- None
EXTERNAL_SendMessage
void EXTERNAL_SendMessage (EXTERNAL_Interface* iface, Node* node, Message* msg, clocktype timestamp) Parameters:
This function will send a message from the external interface. This function is thread-safe.
- The message to send - The timestamp for this message. Since this message is
timestamp
Returns:
EXTERNAL
void
- None
EXTERNAL_ForwardData
void EXTERNAL_ForwardData (EXTERNAL_Interface* iface, Node* node, void* forwardData, int forwardSize, EXTERNAL_ForwardData_ReceiverOpt FwdReceiverOpt) Parameters:
Send data back to the external source with no time stamp. The user defined Forward function will receive this message and process it. This will handle threading issues if necessary.
iface node
- The node that is forwarding the data - The data to forward - The size of the data to forward - Whether to store the
forwardData forwardSize
FwdReceiverOpt
Returns:
void
- None
EXTERNAL_RemoteForwardData
void EXTERNAL_RemoteForwardData (EXTERNAL_Interface* iface, Node* node, void* forwardData, int forwardSize, int partitionId) Parameters:
Send data back to the external source with no time stamp. This function is similar to EXTERNAL_ForwardData, except that this function can forward the message to and external interface on a different partition.
iface node
- The node that is forwarding the data - The data to forward - The size of the data to forward - The partition Id to forward the message to
Returns:
void
- None
EXTERNAL_ForwardDataTimeStamped
void EXTERNAL_ForwardDataTimeStamped (EXTERNAL_Interface* iface, Node* node, Message* message, clocktype timestamp) Parameters:
Send data in the form of a message back to the external source with a time stamp. The user defined Forward function will receive this message and process it. This will handle threading issues if necessary.
iface node
- The node that is forwarding the data - The message - The time stamp. This value is in external
message
timestamp
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/EXTERNAL.html[5/24/2011 12:33:43 PM]
EXTERNAL
void
- None
EXTERNAL_UserFunctionRegistration
This function will give a convenient place for users to add their function registration code. This is the only part of the External Interface API code that the user is expected to modify.
list
nodeInput
Returns:
void
- None
EXTERNAL_InitializeInterface
iface
Returns:
void
- None
EXTERNAL_FinalizeExternalInterface
This function will free an external interface, as well as call the finalize function registered by EXTERNAL_RegisterFinalizeFunction()
iface
Returns:
void
- None
EXTERNAL_InitializeInterfaceList
list
partition
Returns:
void
- None
EXTERNAL_Bootstrap
This function will be called early in the simulation initialization process (after MPI_Init(), but before partitions are created, and before EXTERNAL_InitializeInterfaceList (). In
argc
argv []
Returns:
EXTERNAL
a shared parallel simulation the threads for partitions won't be created yet.
void
- None
EXTERNAL_PreBootstrap
This function will be called early in the simulation initialization process (after MPI_Init(), but before partitions are created, and before EXTERNAL_InitializeInterfaceList (). In a shared parallel simulation the threads for partitions won't be created yet. This function handles the mini-configuration file conversion, and make sures that if simProps needs to change it is changed and then a broadcast message is sent to other partitions. EXTERNAL_FinalizeInterfaceList
argc
argv []
Returns:
void
- None
This function will finalize all ExternalInterfaces in the list, as well as the list itself
list
Returns:
void
- None
EXTERNAL_GetInterfaceByName
This function will search an interface list for an interface with the given name
list name
Returns:
EXTERNAL_Interface*
EXTERNAL_CallInitializeFunctions
list
nodeInput
Returns:
void
- None
EXTERNAL_CallInitializeNodesFunctions
EXTERNAL
nodeInput
Returns:
void
- None
EXTERNAL_StartThreads
This function will start the receive/forward threads for all threaded interfaces. Called after EXTERNAL_CallInitializeNodesFunctions.
list
Returns:
void
- None
EXTERNAL_CalculateMinSimulationHorizon
This function will call all simulation horizon functions to determine how far into the future the simulation can run. An individual simulation horizon function will only be called if the current time (now) is >= that interface's current horizon.
list now
Returns:
clocktype
EXTERNAL_CallReceiveFunctions
This function will call all receive function that were not started in a thread
list
Returns:
void
- None
EXTERNAL_CallFinalizeFunctions
list
Returns:
void
- None
EXTERNAL_InitializeExternalInterfaces
EXTERNAL
Function used to initialize a generic interface to an external source of messages, e.g. an HLA federate. Called before nodes are created.
partitionData
Returns:
void
- None
EXTERNAL_PostInitialize
Function used to initialize a generic interface to an external source of messages, e.g. an HLA federate.Called after nodes are created. The developer can use either this function, the preceding one or both. EXTERNAL_GetExternalMessages
partitionData
Returns:
void
- None
Function used to retrieve messages from a remote source, such as a DIS gateway or HLA federation. Called before events at time X are executed. Many events at time X may be executed before the next call
partitionData
- pointer to data for this partition - the time of the next event,
nextInternalEventTime
Returns:
void
- None
EXTERNAL_Finalize
partitionData
Returns:
void
- None
EXTERNAL_SetActive
partitionData
Returns:
void
- None
EXTERNAL_DeactivateInterface
ifaceToDeactivate
EXTERNAL
- None
EXTERNAL_ProcessEvent
node msg
- Message to be processed.
Returns:
void
- None
GetNextInternalEventTime
Get the next internal event on the given partition. This includes both regular events and mobility events.
partitionData
Returns:
clocktype
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
EXTERNAL_SOCKET
EXTERNAL_SOCKET
This file describes utilities for managing socket connections to external programs. Constant / Data Structure Summary Type
CONSTANT
Name
EXTERNAL_DEFAULT_VAR_ARRAY_SIZE
A variable sized array. This structure is primarily used to assemble data to be sent on a socket connection.
STRUCT EXTERNAL_Socket
Summary
EXTERNAL_VarArrayInit(EXTERNAL_VarArray* array, unsigned int size)
This function will initialize a VarArray and allocate memory for the array. When the array is finished being used, call EXTERNAL_VarArrayFree to free the memory.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/EXTERNAL_SOCKET.html[5/24/2011 12:33:54 PM]
EXTERNAL_SOCKET
void
This function will increase the maximum size of the VarArray so that it can contain at least "size" bytes.
void EXTERNAL_VarArrayAppendData(EXTERNAL_VarArray* array, char* data, unsigned int size)
This function will add data to the end of the VarArray. The size of the VarArray will be increased if necessary.
void EXTERNAL_VarArrayConcatString(EXTERNAL_VarArray* array, char* string)
This function will add a string to the end of the VarArray including the terminating NULL character. This function ASSUMES that the previous data in the VarArray is also a string -- ie, several bytes of data terminated with a NULL character. If this is not the case then the function EXTERNAL_VarArrayAppendData should be used instead.
void EXTERNAL_VarArrayFree(EXTERNAL_VarArray* array)
void
EXTERNAL_SocketInit(EXTERNAL_Socket* socket)
Initialize a socket. Must be called before all other socket API calls on the individual socket.
EXTERNAL_SocketErrorType EXTERNAL_SocketInitUDP(EXTERNAL_Socket* socket)
Initialize a UDP socket. Must be called before all other socket API calls on the individual socket.
BOOL EXTERNAL_SocketValid(EXTERNAL_Socket* socket)
Listen and accept a connections on a socket. This function is a wrapper for EXTERNAL_SocketInitListen and EXTERNAL_SocketAccept.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/EXTERNAL_SOCKET.html[5/24/2011 12:33:54 PM]
EXTERNAL_SOCKET
EXTERNAL_SocketErrorType
Initialize an input socket and have it listen on the given port. Call EXTERNAL_SocketAccept to accept connections on the socket. Call EXTERNAL_SocketDataAvailable to see if there is an incoming connection that has not been accepted.
EXTERNAL_SocketErrorType EXTERNAL_SocketAccept(EXTERNAL_Socket* listenSocket, EXTERNAL_Socket* connectSocket)
Accept a connection on a listening socket. This operation may block if there is no incoming connection, use EXTERNAL_SocketDataAvailable to check if there is an incoming connection.
EXTERNAL_SocketErrorType EXTERNAL_SocketDataAvailable(EXTERNAL_Socket* s, BOOL* available)
Test if a socket has readable data. For a listening socket this will test for an incoming connection. For a data socket this will test if there is incoming data.
EXTERNAL_SocketErrorType EXTERNAL_SocketConnect(EXTERNAL_Socket* socket, char* address, int port, int maxAttempts)
Send data on a connected socket. Since the socket is non-blocking, it is possible that the send would result in a block: If the "block" parameter is FALSE, then EXTERNAL_DataNotSent is returned, and no data is sent.
EXTERNAL_SocketErrorType EXTERNAL_SocketSend(EXTERNAL_Socket* socket, EXTERNAL_VarArray* data, BOOL block)
Receive data on a connected socket. Since the socket is non-blocking, it is possible that the send would result in a block: If the "block" parameter is FALSE, the "receiveSize" parameter will be set to the amount of data received before the blocking operation. This amount could be any value between 0 and size - 1.
EXTERNAL_SocketErrorType EXTERNAL_SocketClose(EXTERNAL_Socket* socket)
Close a socket. Must be called for each socket that is listening or connected.
Constant
EXTERNAL_DEFAULT_VAR_ARRAY_SIZE 512
EXTERNAL_SOCKET
Constant
Enumeration
Structure
Structure
A variable sized array. This structure is primarily used to assemble data to be sent on a socket connection. EXTERNAL_Socket
Function / Macro Detail Function / Macro EXTERNAL_VarArrayInit Format void EXTERNAL_VarArrayInit (EXTERNAL_VarArray* array, unsigned int size) Parameters: This function will initialize a VarArray and allocate memory for the array. When the array is finished being used, call EXTERNAL_VarArrayFree to free the memory.
array size
Returns:
void
- None
EXTERNAL_VarArrayAccomodateSize
This function will increase the maximum size of the VarArray so that it can contain at least "size" bytes.
array size
Returns:
void
- None
EXTERNAL_SOCKET
EXTERNAL_VarArrayAppendData
void EXTERNAL_VarArrayAppendData (EXTERNAL_VarArray* array, char* data, unsigned int size) Parameters:
This function will add data to the end of the VarArray. The size of the VarArray will be increased if necessary.
Returns:
void
- None
EXTERNAL_VarArrayConcatString
This function will add a string to the end of the VarArray including the terminating NULL character. This function ASSUMES that the previous data in the VarArray is also a string -- ie, several bytes of data terminated with a NULL character. If this is not the case then the function EXTERNAL_VarArrayAppendData should be used instead. EXTERNAL_VarArrayFree
array
string
Returns:
void
- None
array
Returns:
void
- None
EXTERNAL_hton
ptr
size
Returns:
void
- None
EXTERNAL_ntoh
ptr
EXTERNAL_SOCKET
byte order
size
Returns:
void
- None
EXTERNAL_swapBitfield
size
Returns:
void
- None
EXTERNAL_SocketInit
Initialize a socket. Must be called before all other socket API calls on the individual socket.
socket
Returns:
void
- None
EXTERNAL_SocketInitUDP
Initialize a UDP socket. Must be called before all other socket API calls on the individual socket.
socket
Returns:
EXTERNAL_SocketErrorType
- Error type
EXTERNAL_SocketValid
socket
Returns:
BOOL
EXTERNAL_SocketListen
listenSocket
EXTERNAL_SOCKET
port
connectSocket
Returns:
EXTERNAL_SocketErrorType
due to a number of reasons. EXTERNAL_SocketInitListen EXTERNAL_SocketErrorType EXTERNAL_SocketInitListen (EXTERNAL_Socket* listenSocket, int port) Parameters: Initialize an input socket and have it listen on the given port. Call EXTERNAL_SocketAccept to accept connections on the socket. Call EXTERNAL_SocketDataAvailable to see if there is an incoming connection that has not been accepted. EXTERNAL_SocketAccept
listenSocket port
Returns:
EXTERNAL_SocketErrorType
due to a number of reasons. EXTERNAL_SocketErrorType EXTERNAL_SocketAccept (EXTERNAL_Socket* listenSocket, EXTERNAL_Socket* connectSocket) Parameters:
Accept a connection on a listening socket. This operation may block if there is no incoming connection, use EXTERNAL_SocketDataAvailable to check if there is an incoming connection.
listenSocket
- Pointer to the socket to listen on. - Pointer to the newly created socket
connectSocket
Returns:
EXTERNAL_SocketErrorType
due to a number of reasons. EXTERNAL_SocketDataAvailable EXTERNAL_SocketErrorType EXTERNAL_SocketDataAvailable (EXTERNAL_Socket* s, BOOL* available) Parameters: Test if a socket has readable data. For a listening socket this will test for an incoming connection. For a data socket this will test if there is incoming data.
s
available
Returns:
EXTERNAL_SocketErrorType
due to a number of reasons. EXTERNAL_SocketConnect EXTERNAL_SocketErrorType EXTERNAL_SocketConnect (EXTERNAL_Socket* socket, char* address, int port, int maxAttempts) Parameters:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/EXTERNAL_SOCKET.html[5/24/2011 12:33:54 PM]
EXTERNAL_SOCKET
socket
address port
maxAttempts
Returns:
EXTERNAL_SocketErrorType
due to a number of reasons. EXTERNAL_SocketSend EXTERNAL_SocketErrorType EXTERNAL_SocketSend (EXTERNAL_Socket* socket, char* data, unsigned int size, BOOL block) Parameters: Send data on a connected socket. Since the socket is non-blocking, it is possible that the send would result in a block: If the "block" parameter is FALSE, then EXTERNAL_DataNotSent is returned, and no data is sent.
socket data size
- Pointer to the data - Size of the data - If this call may block. Defaults to TRUE.
block
Returns:
EXTERNAL_SocketErrorType
due to a number of reasons. EXTERNAL_SocketSend EXTERNAL_SocketErrorType EXTERNAL_SocketSend (EXTERNAL_Socket* socket, EXTERNAL_VarArray* data, BOOL block) Parameters: This is a wrapper for the above overloaded function.
socket data
- Pointer to the VarArray to send - If this call may block. Defaults to TRUE.
block
Returns:
EXTERNAL_SocketErrorType
due to a number of reasons. EXTERNAL_SocketRecv EXTERNAL_SocketErrorType EXTERNAL_SocketRecv (EXTERNAL_Socket* socket, char* data, unsigned int size, unsigned int* size, BOOL block) Parameters: Receive data on a connected socket. Since the socket is non-blocking, it is possible that the send would result in a block: If the "block"
socket
EXTERNAL_SOCKET
parameter is FALSE, the "receiveSize" parameter will be set to the amount of data received before the blocking operation. This amount could be any value between 0 and size - 1.
- Pointer to the destination - The amount of data to receive in bytes - The number of bytes received. This could be less - TRUE if the call can block, FALSE if non-blocking.
block
Returns:
EXTERNAL_SocketErrorType
due to a number of reasons. EXTERNAL_SocketClose EXTERNAL_SocketErrorType EXTERNAL_SocketClose (EXTERNAL_Socket* socket) Parameters: Close a socket. Must be called for each socket that is listening or connected.
socket
Returns:
EXTERNAL_SocketErrorType
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
EXTERNAL_UTILITIES
EXTERNAL_UTILITIES
This file describes utilities for external interfaces. Constant / Data Structure Summary Type
ENUMERATION
Name
ExternalScheduleType
Structure of a Splaytree
STRUCT EXTERNAL_ForwardInstantiate
A record in the table. Contains a pointer value and a timestamp, as well as information for maintaining a linked list.
STRUCT EXTERNAL_SimulationDurationInfo
EXTERNAL_UTILITIES
A overflow record.
STRUCT EXTERNAL_Table
A table. Generally used for storing external packet data, but can be used for anything.
STRUCT EXTERNAL_NetworkLayerPacket
A packet that will be sent at the network layer. Created by EXTERNAL_SendDataNetworkLayer, sent by EXTERNAL_SendNetworkLayerPacket
Summary
EXTERNAL_TreeInitialize(EXTERNAL_Tree* tree, BOOL useStore, int maxStore)
This function will initialize the table. The size parameter represents the number of records that will be allocated in one block.
void EXTERNAL_FinalizeTable(EXTERNAL_Table* table)
This function will retrieve an unused record from the table. If the packet table is full it will allocate a new block of records. The user may fill in the record's contents. It will never return NULL.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/EXTERNAL_UTILITIES.html[5/24/2011 12:34:05 PM]
EXTERNAL_UTILITIES
EXTERNAL_TableRecord*
EXTERNAL_GetEarliestRecord(EXTERNAL_Table* table)
This function will retrieve the earliest record in the table or NULL if the table is empty.
BOOL EXTERNAL_GetEarliestRecord(EXTERNAL_Table* table, char* data)
This function frees a record previously returned from EXTERNAL_GetUnusedRecord(). The memory contained in the data portion of the record is the user's responsiblity to free.
void EXTERNAL_SendDataAppLayerUDP(EXTERNAL_Interface* iface, NodeAddress from, NodeAddress to, char* data, int dataSize, clocktype timestamp, AppType app, TraceProtocolType trace, TosType priority)
Sends data originating from the app layer using UDP. When the packet reaches its destination it will call the forward function of the external interface, if it exists.
void EXTERNAL_SendDataAppLayerUDP(EXTERNAL_Interface* iface, NodeAddress from, NodeAddress to, char* header, int headerSize, int virtualDataSize, clocktype timestamp, AppType app, TraceProtocolType trace, TosType priority)
Sends virtual data originating from the app layer using UDP. When the packet reaches its destination it will call the forward forward function of the external interface, if it exists.
void EXTERNAL_SendDataAppLayerTCP(EXTERNAL_Interface* iface, NodeAddress from, NodeAddress to, char* data, int dataSize, clocktype timestamp)
Sends data originating from the app layer using TCP. When the last byte of data reaches its destination it will call the forward function of the external interface, if it exists.
void EXTERNAL_SendDataNetworkLayer(EXTERNAL_Interface* iface, NodeAddress from, NodeAddress srcAddr, NodeAddress destAddr, TosType tos, unsigned char protocol, unsigned int ttl, char* payload, int payloadSize, clocktype timestamp)
Sends data originating from network layer. No provisions are made for handling this data once it enters the QualNet network. This is the responsibility of the external interface or protocols the data is sent to.
void EXTERNAL_SendDataNetworkLayerOnInterface(EXTERNAL_Interface* iface, NodeAddress from, NodeAddress srcAddr, NodeAddress destAddr, unsigned short identification, BOOL dontFragment, BOOL moreFragments, unsigned short fragmentOffset, TosType tos, unsigned char protocol, unsigned int ttl, char* payload, int payloadSize, int interfaceIndex, clocktype timestamp)
Sends data originating from network layer on a specific interface of the node. No provisions are made for handling this data once it enters the QualNet network. This is the responsibility of the external interface or protocols the data is sent to.
void EXTERNAL_SendVirtualDataNetworkLayer(EXTERNAL_Interface* iface, NodeAddress from, NodeAddress srcAddr, NodeAddress destAddr, TosType tos, unsigned char protocol, unsigned int ttl, char* payload, int dataSize, int virtualSize, clocktype timestamp)
EXTERNAL_UTILITIES
Sends data originating from network layer. No provisions are made for handling this data once it enters the QualNet network. This is the responsibility of the external interface or protocols the data is sent to.
void EXTERNAL_SendDataNetworkLayer(EXTERNAL_Interface* iface, NodeAddress from, NodeAddress srcAddr, NodeAddress destAddr, unsigned short identification, BOOL dontFragment, BOOL moreFragments, unsigned short fragmentOffset, TosType tos, unsigned char protocol, unsigned int ttl, char* payload, int payloadSize, int ipHeaderLength, char* ipOptions, clocktype timestamp)
Sends data originating from network layer. No provisions are made for handling this data once it enters the QualNet network. This is the responsibility of the external interface or protocols the data is sent to.
void EXTERNAL_SendNetworkLayerPacket(Node* node, Message* msg)
Sends the packet from EXTERNAL_SendDataNetworkLayer after some delay. This function should never be called directly.
void EXTERNAL_CreateMapping(EXTERNAL_Interface* iface, char* key, int keySize, char* value, int valueSize)
Creates a mapping between a key and a value. The key may be any value and any length, such as an IP address, a MAC address, or a generic string. The value may be anything and is the responsibility of the user. Memory will be allocated for the key and the value.
int EXTERNAL_ResolveMapping(EXTERNAL_Interface* iface, char* key, int keySize, char** value, int* valueSize)
Resolves a mapping created by EXTERNAL_CreateMapping. If it exists it is placed in the value and valueSize parameters and returns 0. The returned value will point to the memory block allocated by EXTERNAL_CreateMapping. If it does not exist it returns non-zero and the value and valueSize parameters are invalid.
int EXTERNAL_DeleteMapping(EXTERNAL_Interface* iface, char* key, int keySize)
Just like PHY_SetTxPower (), but able to handle setting transmission power when node is owned by a remote partition. Change to TxPower will be scheduled as "best-effort" for remote nodes. The range of coordinate values depends on the terrain data.
void EXTERNAL_PHY_GetTxPower(Node* node, int phyIndex, double * txPowerPtr)
EXTERNAL_UTILITIES
Just like PHY_GetTxPower (), but able to handle getting transmission power when node is owned by a remote partition.
void EXTERNAL_ChangeNodePosition(EXTERNAL_Interface* iface, Node* node, double c1, double c2, double c3)
Change the position of a node. This function will work using both coordinate systems. Orientation is not changed. Coordinate values are checked to be in the proper range, and are converted if they are not. The range of coordinate values depends on the terrain data.
void EXTERNAL_ChangeNodeOrientation(EXTERNAL_Interface* iface, Node* node, short azimuth, short elevation)
Change the orientation of a node. Position is not changed. Azimuth/elevation are checked to be in the proper range, and are converted if they are not.
void EXTERNAL_ChangeNodePositionAndOrientation(EXTERNAL_Interface* iface, Node* node, double c1, double c2, double c3, short azimuth, short elevation)
Change both the position and orientation of a node. This function will work using both coordinate systems. Coordinate values and Azimuth/elevation values are checked to be in the proper range, and are converted if they are not. The range of coordinate values depends on the terrain data.
void EXTERNAL_ChangeNodePositionOrientationAndSpeedAtTime(EXTERNAL_Interface* iface, Node* node, clocktype mobilityEventTime, double c1, double c2, double c3, short azimuth, short elevation, double speed)
Change the position, orientation, and speed of a node at a user-specified time. This function will work using both coordinate systems. Coordinate values, azimuth/elevation, and speed values are checked to be in the proper range, and are converted if they are not. The range of coordinate values depends on the terrain data.
void EXTERNAL_ChangeNodePositionOrientationAndVelocityAtTime(EXTERNAL_Interface* iface, Node* node, clocktype mobilityEventTime, double c1, double c2, double c3, short azimuth, short elevation, double speed, double c1Speed, double c2Speed, double c3Speed)
Update the position, orientation, and velocity vector of a node at a user-specified time. The velocity vector is expected to be in the same distance units used for the the position, per one second. The speed parameter must also be provided, accurate for the provided velocity vector, and always in meters per second. Coordinate values, azimuth/elevation, and speed values are checked to be in the proper range, and are converted if they are not. The range of coordinate values depends on the terrain data.
void EXTERNAL_ChangeNodePositionOrientationAndVelocityAtTime(EXTERNAL_Interface* iface, Node* node, clocktype mobilityEventTime, double c1, double c2, double c3, short azimuth, short elevation, double c1Speed, double c2Speed, double c3Speed)
Update the position, orientation, and velocity vector of a node at a user-specified time. The velocity vector is expected to be in the same distance units used for the the position, per one second. Coordinate values, azimuth/elevation, and speed values are checked to be in the proper range, and are converted if they are not. The range of coordinate values depends on the terrain data.
void EXTERNAL_ChangeNodeVelocityAtTime(EXTERNAL_Interface* iface, Node* node, clocktype mobilityEventTime, double speed, double c1Speed, double c2Speed, double c3Speed)
Update the velocity vector of a node at a user-specified time. The velocity vector is expected to be in the same distance units used for the terrain, per one second. The speed parameter must also be provided, accurate for the provided velocity vector, and always in meters per second.
void EXTERNAL_ChangeNodeVelocityAtTime(EXTERNAL_Interface* iface, Node* node, clocktype mobilityEventTime,
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/EXTERNAL_UTILITIES.html[5/24/2011 12:34:05 PM]
EXTERNAL_UTILITIES
Update the velocity vector of a node at a user-specified time. The velocity vector is expected to be in the same distance units used for the terrain, per one second.
BOOL EXTERNAL_ConfigStringPresent(NodeInput* nodeInput, char* string)
This function will check the config file for a string. Typically this is used during interface registration to see if the interface is turned on in the config file.
BOOL EXTERNAL_ConfigStringIsYes(NodeInput* nodeInput, char* string)
This function will check the config file for a string. Typically this is used during interface registration to see if the interface is turned on in the config file. Checks that the string is YES.
void EXTERNAL_MESSAGE_RemoteSend(EXTERNAL_Interface* iface, int destinationPartitionId, Message * msg, clocktype delay, ExternalScheduleType scheduling)
Send a message to the external interface on a different partition. This function makes it possible for your external interface to send a message to your external interface that is on on a different/remote partition. You will then need to add your message handler into the function EXTERNAL_ProcessEvent (). Lastly, you can request a best-effort delivery of your message to the remote external interface by passing in a delay value of 0 and a scheduling type of EXTERNAL_SCHEDULE_LOOSELY. Be aware that best-effort messages may be scheduled at slightly different simulation times each time your run your simulation. Further notes about scheduling. If your external event won't result in additional qualnet events, except those that will be scheduled after safe time, then you can use LOOSELY. If, your event is going to schedule additional qualnet event though, then you must use EXTERNAL_SCHEDULE_SAFE (so that the event is delayed to the next safe time). If you violate safe time you will get assertion failures for safe time of signal receive time.
void EXTERNAL_SetSimulationEndTime(partitionData* partitionData, clocktype endTime)
This function is a means to programatically set the end of the simulation. The endTime argument can be omitted, in which case the endTime is the current simulation time. If the requested time has already passed, the simulation will end as soon as possible.
clocktype EXTERNAL_QueryRealTime()
This function will return the wall clock time in the qualnet time format. NOTE: Interfaces that are running in real-time should not use this function to check the simulation time. The simulation time will not be the same as real time if the simulation was paused. Use the interface's time function instead.
clocktype EXTERNAL_QueryRealTime()
This function will return the wall clock time in the qualnet time format. NOTE: Interfaces that are running in real-time should not use this function to check the simulation time. The simulation time will not be the same as real time if the simulation was paused. Use the interface's time function instead.
clocktype EXTERNAL_QueryCPUTime(EXTERNAL_Interface* iface)
EXTERNAL_UTILITIES
This function will return the amount of Cpu time used by QualNet. The first call to this function will by an interface will return 0, and timing will begin from that point.
void EXTERNAL_Sleep(clocktype amount)
This function will sleep for a minimum amount of time as indicated by the amount parameter. Depending on which platform it is called on the amount of time spent sleeping could be greater.
Enumeration
ExternalScheduleType
Structure
Structure
Structure
Structure
Structure
Structure
Structure
A record in the table. Contains a pointer value and a timestamp, as well as information for maintaining a linked list. EXTERNAL_SimulationDurationInfo
EXTERNAL_UTILITIES
Structure
Structure
Structure
A table. Generally used for storing external packet data, but can be used for anything. EXTERNAL_NetworkLayerPacket
A packet that will be sent at the network layer. Created by EXTERNAL_SendDataNetworkLayer, sent by EXTERNAL_SendNetworkLayerPacket
Function / Macro Detail Function / Macro EXTERNAL_TreeInitialize Format void EXTERNAL_TreeInitialize (EXTERNAL_Tree* tree, BOOL useStore, int maxStore) Parameters: To initialize the splaytree
tree
useStore maxStore
Returns:
void
- None
SCHED_SplayTreeInsert
tree
treeNode
Returns:
void
- None
EXTERNAL_TreePeekMin
EXTERNAL_UTILITIES
tree
Returns:
void
- None
EXTERNAL_InitializeTable
This function will initialize the table. The size parameter represents the number of records that will be allocated in one block.
table size
- The table
Returns:
void
- None
EXTERNAL_FinalizeTable
table
- The table
Returns:
void
- None
EXTERNAL_GetUnusedRecord
This function will retrieve an unused record from the table. If the packet table is full it will allocate a new block of records. The user may fill in the record's contents. It will never return NULL.
table
- The table
Returns:
EXTERNAL_TableRecord*
EXTERNAL_GetEarliestRecord
This function will retrieve the earliest record in the table or NULL if the table is empty.
table
- The table
Returns:
EXTERNAL_TableRecord*
EXTERNAL_GetEarliestRecord
table
- The table
EXTERNAL_UTILITIES
data
Returns:
BOOL
EXTERNAL_FreeRecord
This function frees a record previously returned from EXTERNAL_GetUnusedRecord(). The memory contained in the data portion of the record is the user's responsiblity to free.
table
- The table
Returns:
EXTERNAL_TableRecord*
EXTERNAL_SendDataAppLayerUDP
void EXTERNAL_SendDataAppLayerUDP (EXTERNAL_Interface* iface, NodeAddress from, NodeAddress to, char* data, int dataSize, clocktype timestamp, AppType app, TraceProtocolType trace, TosType priority) Parameters:
iface from to
Sends data originating from the app layer using UDP. When the packet reaches its destination it will call the forward function of the external interface, if it exists.
- The address of the receiving node - The data that is to be sent. This may be NULL if there - The size of the data - The time to send this message. Pass 0 to send
data
dataSize
timestamp app
- The application to send to, defaults to APP_FORWARD - The trace protocol, defaults to TRACE_FORWARD - The priority to send this message at
trace
priority
Returns:
void
- None
EXTERNAL_SendDataAppLayerUDP
void EXTERNAL_SendDataAppLayerUDP (EXTERNAL_Interface* iface, NodeAddress from, NodeAddress to, char* header, int headerSize, int virtualDataSize, clocktype timestamp, AppType app, TraceProtocolType trace, TosType priority) Parameters:
iface from to
Sends virtual data originating from the app layer using UDP. When the packet reaches its destination it will call the forward forward function of the external interface, if it exists.
EXTERNAL_UTILITIES
header
- The header that is to be sent. - The size of the header - The size of the virtual data
headerSize
- The application to send to, defaults to APP_FORWARD - The trace protocol, defaults to TRACE_FORWARD - The priority to send this message at. defaults to IPTOS_PREC_ROUTINE
trace
priority
Returns:
void
- None
EXTERNAL_SendDataAppLayerTCP
void EXTERNAL_SendDataAppLayerTCP (EXTERNAL_Interface* iface, NodeAddress from, NodeAddress to, char* data, int dataSize, clocktype timestamp) Parameters:
Sends data originating from the app layer using TCP. When the last byte of data reaches its destination it will call the forward function of the external interface, if it exists.
iface from to
- The address of the receiving node - The data that is to be sent. This may be NULL if there - The size of the data - The time to send this message. Pass 0 to send
data
dataSize
timestamp
Returns:
void
- None
EXTERNAL_SendDataNetworkLayer
void EXTERNAL_SendDataNetworkLayer (EXTERNAL_Interface* iface, NodeAddress from, NodeAddress srcAddr, NodeAddress destAddr, TosType tos, unsigned char protocol, unsigned int ttl, char* payload, int payloadSize, clocktype timestamp) Parameters:
iface from
Sends data originating from network layer. No provisions are made for handling this data once it enters the QualNet network. This is the responsibility of the external interface or protocols the data is sent to.
- The address of the node that will send the - The IP address of the node originally - The address of the receiving node
srcAddr
destAddr tos
EXTERNAL_UTILITIES
protocol ttl
- The Time to Live field in the IP header - The data that is to be sent. This should include - The size of the data
payload
payloadSize timestamp
Returns:
void
- None
EXTERNAL_SendDataNetworkLayerOnInterface
Sends data originating from network layer on a specific interface of the node. No provisions are made for handling this data once it enters the QualNet network. This is the responsibility of the external interface or protocols the data is sent to.
void EXTERNAL_SendDataNetworkLayerOnInterface (EXTERNAL_Interface* iface, NodeAddress from, NodeAddress srcAddr, NodeAddress destAddr, unsigned short identification, BOOL dontFragment, BOOL moreFragments, unsigned short fragmentOffset, TosType tos, unsigned char protocol, unsigned int ttl, char* payload, int payloadSize, int interfaceIndex, clocktype timestamp) Parameters:
iface from
- The address of the node that will send the - The IP address of the node originally - The address of the receiving node - The identification field in the IP
srcAddr
destAddr
identification dontFragment
- Whether to set the dont fragment bit in the IP - Whether to set the more fragments bit in the IP - The fragment offset field in the IP
moreFragments
fragmentOffset tos
- The Type of Service field in the IP header - The protocol field in the IP header
protocol ttl
- The Time to Live field in the IP header - The data that is to be sent. This should include - The size of the data - The interface index
payload
payloadSize
interfaceIndex timestamp
Returns:
void
- None
EXTERNAL_UTILITIES
EXTERNAL_SendVirtualDataNetworkLayer
void EXTERNAL_SendVirtualDataNetworkLayer (EXTERNAL_Interface* iface, NodeAddress from, NodeAddress srcAddr, NodeAddress destAddr, TosType tos, unsigned char protocol, unsigned int ttl, char* payload, int dataSize, int virtualSize, clocktype timestamp) Parameters:
iface from
Sends data originating from network layer. No provisions are made for handling this data once it enters the QualNet network. This is the responsibility of the external interface or protocols the data is sent to.
- The address of the node that will send the - The IP address of the node originally - The address of the receiving node
srcAddr
destAddr tos
- The Type of Service field in the IP header - The protocol field in the IP header
protocol ttl
- The Time to Live field in the IP header - The data that is to be sent. This should include - The size of the data - The size of the virtual data
payload
dataSize
virtualSize timestamp
Returns:
void
- None
EXTERNAL_SendDataNetworkLayer
Sends data originating from network layer. No provisions are made for handling this data once it enters the QualNet network. This is the responsibility of the external interface or protocols the data is sent to.
void EXTERNAL_SendDataNetworkLayer (EXTERNAL_Interface* iface, NodeAddress from, NodeAddress srcAddr, NodeAddress destAddr, unsigned short identification, BOOL dontFragment, BOOL moreFragments, unsigned short fragmentOffset, TosType tos, unsigned char protocol, unsigned int ttl, char* payload, int payloadSize, int ipHeaderLength, char* ipOptions, clocktype timestamp) Parameters:
iface from
- The address of the node that will send the - The IP address of the node originally - The address of the receiving node - The identification field in the IP
srcAddr
destAddr
identification dontFragment
- Whether to set the dont fragment bit in the IP - Whether to set the more fragments bit in the IP - The fragment offset field in the IP
moreFragments
fragmentOffset
EXTERNAL_UTILITIES
tos
- The Type of Service field in the IP header - The protocol field in the IP header
protocol ttl
- The Time to Live field in the IP header - The data that is to be sent. This should include - The size of the data - length of the IP Header including options if any
payload
payloadSize
- pointer to the IP Option. - The time to send this packet. Pass 0 to send
Returns:
void
- None
EXTERNAL_SendNetworkLayerPacket
Sends the packet from EXTERNAL_SendDataNetworkLayer after some delay. This function should never be called directly.
node msg
- The message
Returns:
void
- None
EXTERNAL_CreateMapping
void EXTERNAL_CreateMapping (EXTERNAL_Interface* iface, char* key, int keySize, char* value, int valueSize) Parameters:
Creates a mapping between a key and a value. The key may be any value and any length, such as an IP address, a MAC address, or a generic string. The value may be anything and is the responsibility of the user. Memory will be allocated for the key and the value.
iface key
keySize value
- The address of what the value maps to - The size of the value in bytes
valueSize
Returns:
void
- None
EXTERNAL_ResolveMapping
int EXTERNAL_ResolveMapping (EXTERNAL_Interface* iface, char* key, int keySize, char** value, int* valueSize) Parameters:
EXTERNAL_UTILITIES
Resolves a mapping created by EXTERNAL_CreateMapping. If it exists it is placed in the value and valueSize parameters and returns 0. The returned value will point to the memory block allocated by EXTERNAL_CreateMapping. If it does not exist it returns non-zero and the value and valueSize parameters are invalid.
iface key
keySize value
- Pointer to the value (output) - The size of the key in bytes (output)
valueSize
Returns:
int
EXTERNAL_DeleteMapping
iface key
keySize
Returns:
int
EXTERNAL_ActivateNode
iface node
- The node
Returns:
void
- None
EXTERNAL_DectivateNode
iface node
- The node
Returns:
void
- None
EXTERNAL_PHY_SetTxPower
EXTERNAL_UTILITIES
Parameters: Just like PHY_SetTxPower (), but able to handle setting transmission power when node is owned by a remote partition. Change to TxPower will be scheduled as "best-effort" for remote nodes. The range of coordinate values depends on the terrain data.
node
- The node (can be either a local node or remote) - The physical index - The new transmission power.
phyIndex
newTxPower
Returns:
void
- None
EXTERNAL_PHY_GetTxPower
Just like PHY_GetTxPower (), but able to handle getting transmission power when node is owned by a remote partition.
node
- The node (can be either a local node or remote) - The physical index - (OUT) value of transmission power will be
phyIndex
txPowerPtr
Returns:
void
- None
EXTERNAL_ChangeNodePosition
void EXTERNAL_ChangeNodePosition (EXTERNAL_Interface* iface, Node* node, double c1, double c2, double c3) Parameters:
Change the position of a node. This function will work using both coordinate systems. Orientation is not changed. Coordinate values are checked to be in the proper range, and are converted if they are not. The range of coordinate values depends on the terrain data.
iface node c1 c2 c3
- The node
Returns:
void
- None
EXTERNAL_ChangeNodeOrientation
void EXTERNAL_ChangeNodeOrientation (EXTERNAL_Interface* iface, Node* node, short azimuth, short elevation) Parameters:
Change the orientation of a node. Position is not changed. Azimuth/elevation are checked to be in the proper range, and are converted if they are not.
iface node
azimuth
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/EXTERNAL_UTILITIES.html[5/24/2011 12:34:05 PM]
EXTERNAL_UTILITIES
elevation
Returns:
void
- None
EXTERNAL_ChangeNodePositionAndOrientation
void EXTERNAL_ChangeNodePositionAndOrientation (EXTERNAL_Interface* iface, Node* node, double c1, double c2, double c3, short azimuth, short elevation) Parameters:
Change both the position and orientation of a node. This function will work using both coordinate systems. Coordinate values and Azimuth/elevation values are checked to be in the proper range, and are converted if they are not. The range of coordinate values depends on the terrain data.
iface node c1 c2 c3
- The node
- The first coordinate - The second coordinate - The third coordinate - The azimuth, 0 <= azimuth <= 359 - The elevation, -180 <= elevation <= 180
azimuth
elevation
Returns:
void
- None
EXTERNAL_ChangeNodePositionOrientationAndSpeedAtTime
void EXTERNAL_ChangeNodePositionOrientationAndSpeedAtTime (EXTERNAL_Interface* iface, Node* node, clocktype mobilityEventTime, double c1, double c2, double c3, short azimuth, short elevation, double speed) Parameters:
iface node
Change the position, orientation, and speed of a node at a userspecified time. This function will work using both coordinate systems. Coordinate values, azimuth/elevation, and speed values are checked to be in the proper range, and are converted if they are not. The range of coordinate values depends on the terrain data.
mobilityEventTime c1 c2 c3
- The first coordinate - The second coordinate - The third coordinate - The azimuth, 0 <= azimuth <= 359 - The elevation, -180 <= elevation <= 180
azimuth
elevation speed
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/EXTERNAL_UTILITIES.html[5/24/2011 12:34:05 PM]
EXTERNAL_UTILITIES
void
- None
EXTERNAL_ChangeNodePositionOrientationAndVelocityAtTime
void EXTERNAL_ChangeNodePositionOrientationAndVelocityAtTime (EXTERNAL_Interface* iface, Node* node, clocktype mobilityEventTime, double c1, double c2, double c3, short azimuth, short elevation, double speed, double c1Speed, double c2Speed, double c3Speed) Parameters:
iface node
Update the position, orientation, and velocity vector of a node at a user-specified time. The velocity vector is expected to be in the same distance units used for the the position, per one second. The speed parameter must also be provided, accurate for the provided velocity vector, and always in meters per second. Coordinate values, azimuth/elevation, and speed values are checked to be in the proper range, and are converted if they are not. The range of coordinate values depends on the terrain data.
mobilityEventTime c1 c2 c3
- The first coordinate - The second coordinate - The third coordinate - The azimuth, 0 <= azimuth <= 359 - The elevation, -180 <= elevation <= 180
azimuth
elevation speed
- The speed in m/s - The rate of change of the first coordinate in the - The rate of change of the second coordinate in the - The rate of change of the third coordinate in the
Returns:
void
- None
EXTERNAL_ChangeNodePositionOrientationAndVelocityAtTime
void EXTERNAL_ChangeNodePositionOrientationAndVelocityAtTime (EXTERNAL_Interface* iface, Node* node, clocktype mobilityEventTime, double c1, double c2, double c3, short azimuth, short elevation, double c1Speed, double c2Speed, double c3Speed) Parameters:
iface node
Update the position, orientation, and velocity vector of a node at a user-specified time. The velocity vector is expected to be in the same distance units used for the the position, per one second. Coordinate values, azimuth/elevation, and speed values are checked to be in the proper range, and are converted if they are not. The range of coordinate values depends on the terrain data.
mobilityEventTime c1 c2 c3
- The first coordinate - The second coordinate - The third coordinate - The azimuth, 0 <= azimuth <= 359
azimuth
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/EXTERNAL_UTILITIES.html[5/24/2011 12:34:05 PM]
EXTERNAL_UTILITIES
- The rate of change of the first coordinate in the - The rate of change of the second coordinate in the - The rate of change of the third coordinate in the
Returns:
void
- None
EXTERNAL_ChangeNodeVelocityAtTime
void EXTERNAL_ChangeNodeVelocityAtTime (EXTERNAL_Interface* iface, Node* node, clocktype mobilityEventTime, double speed, double c1Speed, double c2Speed, double c3Speed) Parameters:
Update the velocity vector of a node at a user-specified time. The velocity vector is expected to be in the same distance units used for the terrain, per one second. The speed parameter must also be provided, accurate for the provided velocity vector, and always in meters per second.
iface node
mobilityEventTime speed
- The speed in m/s - The rate of change of the first coordinate in the - The rate of change of the second coordinate in the - The rate of change of the third coordinate in the
Returns:
void
- None
EXTERNAL_ChangeNodeVelocityAtTime
void EXTERNAL_ChangeNodeVelocityAtTime (EXTERNAL_Interface* iface, Node* node, clocktype mobilityEventTime, double c1Speed, double c2Speed, double c3Speed) Parameters:
Update the velocity vector of a node at a user-specified time. The velocity vector is expected to be in the same distance units used for the terrain, per one second.
iface node
- The rate of change of the first coordinate in the - The rate of change of the second coordinate in the - The rate of change of the third coordinate in the
Returns:
void
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/EXTERNAL_UTILITIES.html[5/24/2011 12:34:05 PM]
EXTERNAL_UTILITIES
- None EXTERNAL_ConfigStringPresent BOOL EXTERNAL_ConfigStringPresent (NodeInput* nodeInput, char* string) Parameters: This function will check the config file for a string. Typically this is used during interface registration to see if the interface is turned on in the config file.
nodeInput string
Returns:
BOOL
EXTERNAL_ConfigStringIsYes
This function will check the config file for a string. Typically this is used during interface registration to see if the interface is turned on in the config file. Checks that the string is YES.
nodeInput string
Returns:
BOOL
EXTERNAL_MESSAGE_RemoteSend
void EXTERNAL_MESSAGE_RemoteSend (EXTERNAL_Interface* iface, int destinationPartitionId, Message * msg, clocktype delay, ExternalScheduleType scheduling) Parameters:
Send a message to the external interface on a different partition. This function makes it possible for your external interface to send a message to your external interface that is on on a different/remote partition. You will then need to add your message handler into the function EXTERNAL_ProcessEvent (). Lastly, you can request a besteffort delivery of your message to the remote external interface by passing in a delay value of 0 and a scheduling type of EXTERNAL_SCHEDULE_LOOSELY. Be aware that best-effort messages may be scheduled at slightly different simulation times each time your run your simulation. Further notes about scheduling. If your external event won't result in additional qualnet events, except those that will be scheduled after safe time, then you can use LOOSELY. If, your event is going to schedule additional qualnet event though, then you must use EXTERNAL_SCHEDULE_SAFE (so that the event is delayed to the next safe time). If you violate safe time you will get assertion failures for safe time of signal receive time. EXTERNAL_SetSimulationEndTime
iface
destinationPartitionId msg
- The external message to send - When the message should be scheduled on the remote partion. - Whether this event can be executed lossely
delay
scheduling
Returns:
void
- None
This function is a means to programatically set the end of the simulation. The endTime argument can be omitted, in which case the endTime is the current simulation time. If the requested time has already passed, the simulation will end as soon as possible.
partitionData endTime
EXTERNAL_UTILITIES
Returns:
void
- None
EXTERNAL_QueryRealTime
This function will return the wall clock time in the qualnet time format. NOTE: Interfaces that are running in real-time should not use this function to check the simulation time. The simulation time will not be the same as real time if the simulation was paused. Use the interface's time function instead. EXTERNAL_QueryRealTime
Returns:
clocktype
This function will return the wall clock time in the qualnet time format. NOTE: Interfaces that are running in real-time should not use this function to check the simulation time. The simulation time will not be the same as real time if the simulation was paused. Use the interface's time function instead. EXTERNAL_QueryCPUTime
Returns:
clocktype
This function will return the amount of Cpu time used by QualNet. The first call to this function will by an interface will return 0, and timing will begin from that point.
iface
Returns:
clocktype
EXTERNAL_Sleep
This function will sleep for a minimum amount of time as indicated by the amount parameter. Depending on which platform it is called on the amount of time spent sleeping could be greater.
amount
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
EXTERNAL_UTILITIES
FILEIO
FILEIO
This file describes data strucutres and functions used for reading from input files and printing to output files. Constant / Data Structure Summary Type
CONSTANT
Name
ANY_NODEID
Optional macro values to use when calling IO_Read...() APIs. Defines any node id.
CONSTANT ANY_ADDRESS
Optional macro values to use when calling IO_Read...() APIs. Defines any node address.
CONSTANT ANY_INSTANCE
Optional macro values to use when calling IO_Read...() APIs. Defines any instance.
CONSTANT MAX_INPUT_FILE_LINE_LENGTH
Max number of -FILE references in an input file. (Restriction is only for immediate children)
CONSTANT MATCH_NODE_ID
FILEIO
Summary
IO_ConvertIpAddressToString(NodeAddress ipAddress, char* addressString)
Searches source buffer for the first %s-style token encountered, and copies it to dst.
char* IO_GetDelimitedToken(char* dst, const char* src, const char* delim, char** next)
Searches source buffer for the first delimited token encountered, and copies it to dst.
const char* IO_Right(const char * s, unsigned count)
Returns a pointer to the right side of the string of length "count" characters.
char* IO_Chop(const char* s)
FILEIO
Strips leading white space from a string (by memmove()ing string contents left).
void IO_TrimRight(char* s)
Strips trailing white space from a string (by inserting early NULL).
void IO_CompressWhiteSpace(char* s)
Compresses white space between words in the string to one space in a string. White space at the very beginning and very end of the string is also compressed to one space -- not stripped entirely.
BOOL IO_IsStringNonNegativeInteger(const char* s)
Returns TRUE if every character in string is a digit. (Even white space will cause return of FALSE)
void IO_ConvertStringToLowerCase(char s[])
Runs tolower() on each character in string and converts the same to lowercase.
void IO_ConvertStringToUpperCase(char s[])
Runs toupper() on each character in string and converts the same to uppercase.
BOOL IO_CaseInsensitiveStringsAreEqual(const char[] s1, const char[] s2, char lengthToCompare)
FILEIO
Allocates a NodeInput datastructure that can then be passed to IO_ReadNodeInput Called for each file variable in the config file.
void IO_InitializeNodeInput(NodeInput* nodeInput)
Reads an input file into a NodeInput struct. Calls IO_ReadFileParameters to first read in -FILE paramters. Then calls IO_ReadFileParameters to read the rest of the parameters.
void IO_ReadNodeInputEx(NodeInput* nodeInput, const char* filename, const char* includeComment)
Reads an input file into a NodeInput struct. The includeComment Flag facilitate whether to include the commented line lines in the nodeInput structure or not. The commented lines should only be included in Backward Compatibity for Old scenario exe. This exe is responsible for creating new config file and router model file. These new files contains changes according to current VERSION of QualNet. Calls IO_ReadFileParameters to first read in -FILE paramters. Then calls IO_ReadFileParameters to read the rest of the parameters.
BOOL IO_ConvertFile(NodeInput* nodeInput, NodeInput* nodeOutput, char* version)
This API is used to retrieve a string parameter value from input files.
void IO_ReadBool(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, BOOL* readVal)
This API is used to retrieve a boolean parameter value from input files.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/FILEIO.html[5/24/2011 12:34:20 PM]
FILEIO
void
IO_ReadInt(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, int* readVal)
This API is used to retrieve an integer parameter value from input files.
void IO_ReadDouble(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, double* readVal)
This API is used to retrieve a double parameter value from input files.
void IO_ReadFloat(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, float* readVal)
This API is used to retrieve a float parameter value from input files.
void IO_ReadTime(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, clocktype* readVal)
This API is used to retrieve time parameter value from input files.
void IO_ReadCachedFile(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, NodeInput* parameterValue)
This API is used to retrieve cached file parameter value from input files.
void IO_ReadStringInstance(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, char* parameterValue)
This API is used to retrieve string parameter values from input files for a specific instance.
void IO_ReadBoolInstance(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, BOOL* parameterValue)
This API is used to retrieve boolean parameter values from input files for a specific instance.
void IO_ReadIntInstance(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, int* parameterValue)
This API is used to retrieve integer parameter values from input files for a specific instance.
void IO_ReadDoubleInstance(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, double* parameterValue)
This API is used to retrieve double parameter values from input files for a specific instance.
void IO_ReadFloatInstance(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch,
FILEIO
This API is used to retrieve float parameter values from input files for a specific instance.
void IO_ReadTimeInstance(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, clocktype* parameterValue)
This API is used to retrieve time parameter values from input files for a specific instance.
void IO_ReadCachedFileInstance(const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, NodeInput* parameterValue)
This API is used to retrieve file parameter values from input files for a specific instance.
void IO_ParseNodeIdHostOrNetworkAddress(const char s[], NodeAddress* outputNodeAddress, int* numHostBits, BOOL* isNodeId)
Print out the relevant stat in "buf", along with the node id and the layer type generating this stat.
void IO_AppParseSourceAndDestStrings(Node* node, const char* inputString, const char* sourceString, NodeAddress* sourceNodeId, NodeAddress* sourceAddr, const char* destString, NodeAddress* destNodeId, NodeAddress* destAddr)
Application input parsing API. Parses the source and destination strings.
void IO_AppParseSourceString(Node* node, const char* inputString, const char* sourceString, NodeAddress* sourceNodeId, NodeAddress* sourceAddr)
FILEIO
void
IO_AppParseDestString(Node* node, const char* inputString, const char* destString, NodeAddress* destNodeId, NodeAddress* destAddr)
Application input checking API. Checks for the same source and destination node id. Calls abort() for same source and destination.
BOOL QualifierMatches(const NodeAddress nodeId, const NodeAddress interfaceAddress, const char* qualifier, int* matchType)
This API is used to retrieve boolean parameter values from input files. Overloaded API for Ipv6 compatibility.
None IO_ReadBool()
This API is used to retrieve boolean parameter values from input files. Overloaded API for Ipv6 compatibility.
void IO_ReadString(const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, char* readVal)
This API is used to retrieve a string parameter value from input files. Overloaded API for Ipv6 compatibility.
void IO_ReadString(const NodeId nodeId, const AtmAddress* interfaceAddress, const NodeInput * nodeInput, const char * parameterName, BOOL * wasFound, char * parameterValue)
This API is used to retrieve a string parameter value from input files. Overloaded API for Ipv6 compatibility.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/FILEIO.html[5/24/2011 12:34:20 PM]
FILEIO
void
IO_ReadInt(const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, int* readVal)
This API is used to retrieve an integer parameter value from input files. Overloaded API for Ipv6 compatibility.
void IO_ReadInt(const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* index, BOOL* wasFound, int* readVal)
This API is used to retrieve an integer parameter value from input files. Overloaded API for Ipv6 compatibility.
void IO_ReadInt()
This API is used to retrieve a double parameter value from input files. Overloaded API for Ipv6 compatibility.
None IO_ReadDouble()
This API is used to retrieve a double parameter value from input files. Overloaded API for Ipv6 compatibility.
void IO_ReadFloat(const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, float* readVal)
This API is used to retrieve a float parameter value from input files. Overloaded API for Ipv6 compatibility.
void IO_ReadFloat()
This API is used to retrieve a float parameter value from input files. Overloaded API for Ipv6 compatibility.
void IO_ReadTime(const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, clocktype* readVal)
This API is used to retrieve time parameter value from input files. Overloaded API for Ipv6 compatibility.
void IO_ReadTime()
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/FILEIO.html[5/24/2011 12:34:20 PM]
FILEIO
This API is used to retrieve time parameter value from input files. Overloaded API for Ipv6 compatibility.
None IO_ReadBoolInstance()
This API is used to retrieve string parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
void IO_ReadStringInstance()
This API is used to retrieve string parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
void IO_ReadIntInstance(const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, int* parameterValue)
This API is used to retrieve integer parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
void IO_ReadIntInstance(const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, int* parameterValue)
This API is used to retrieve integer parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
void IO_ReadDoubleInstance(const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, double* parameterValue)
This API is used to retrieve double parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
void IO_ReadDoubleInstance()
FILEIO
This API is used to retrieve double parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
void IO_ReadFloatInstance(const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, float* parameterValue)
This API is used to retrieve float parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
void IO_ReadFloatInstance(const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, float* parameterValue)
This API is used to retrieve float parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
void IO_ReadTimeInstance(const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, clocktype* parameterValue)
This API is used to retrieve time parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
void IO_ReadTimeInstance()
This API is used to retrieve time parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
void IO_ReadCachedFile(const NodeAddress nodeId, const Address* address, const NodeInput* nodeInput, const char* index, BOOL* wasFound, NodeInput* parameterValue)
This API is used to retrieve cached file parameter value from input files. Overloaded API for Ipv6 compatibility.
void IO_ReadCachedFileInstance(const NodeAddress nodeId, const Address* address, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, NodeInput* parameterValue)
This API is used to retrieve file parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
void IO_PrintStat(Node* node, const char* layer, const char* protocol, const char* interfaceAddress, int instanceId, const char* buf)
Print out the relevant stat in "buf", along with the node id and the layer type generating this stat. Overloaded API for Ipv6 compatibility.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/FILEIO.html[5/24/2011 12:34:20 PM]
FILEIO
void
Parses a string for a nodeId, host address, or network address. Overloaded API for Ipv6 compatibility.
void IO_ParseNodeIdHostOrNetworkAddress(const char s[], ATM addr* atmAddress, BOOL* isAtmAddr, NodeId* nodeId)
Parses a string for a nodeId, host address, or network address. Overloaded API for Ipv6 compatibility.
void IO_ParseNodeIdOrHostAddress(const char s[], in6_addr* outputNodeAddress, BOOL* isNodeId)
Parses a string for a network address. Overloaded API for Ipv6 compatibility.
void IO_AppParseSourceAndDestStrings(Node* node, const char* inputString, const char* sourceString, NodeId* sourceNodeId, Address* sourceAddr, const char* destString, NodeId* destNodeId, Address* destAddr)
Application input parsing API. Parses the source and destination strings. Overloaded for Ipv6 compatibility.
void IO_AppParseSourceString(Node* node, const char* inputString, const char* sourceString, NodeAddress* sourceNodeId, Address* sourceAddr, NetworkType networkType)
Application input parsing API. Parses the source string. Overloaded for Ipv6 compatibility.
void IO_AppParseDestString(Node* node, const char* inputString, const char* destString, NodeAddress* destNodeId, Address* destAddr, NetworkType networkType)
Application input parsing API. Parses the destination string. Overloaded for Ipv6 compatibility.
BOOL QualifierMatches(const NodeId nodeId, const in6_addr interfaceAddress, const char* qualifier, int* matchType)
This is an auxiliary API used by the IO_Read...() set of APIs. Overloaded for Ipv6 compatibility
BOOL QualifierMatches(const NodeId nodeId, const AtmAddress* interfaceAddress, const char* qualifier, int* matchType)
This is an auxiliary API used by the IO_Read...() set of APIs. Overloaded for Ipv6 compatibility
void IO_ConvertIpv6StringToAddress()(char* interfaceAddr, in6_addr* ipAddress)
Convert IPv6 address string to in6_addr structure. API for Ipv6 compatibility.
void IO_ConvertIpAddressToString(in6_addr* ipAddress, char* interfaceAddr)
FILEIO
Parses IPv6 address into a formatted string. Overloaded API for Ipv6 compatibility.
void IO_ConvertIpAddressToString(Address* ipAddress, char* interfaceAddr)
Parses IPv6 address into a formatted string. Overloaded API for Ipv6 compatibility.
void IO_ConvertStringToNodeAddress(char* addressString, NodeAddress* outputNodeAddress)
This API is used to retrieve a string parameter value from input files.
void IO_CacheFile(const NodeInput* nodeInput, const char* filename)
This API is used to read an auxiliary input file into a NodeInput struct Called for each file variable in the config file.
int IO_GetMaxLen(fileName char*)
This API is used to get the maximun length of a line in the file.
int IO_GetMaxLen(fp FILE*)
This API is used to get the maximun length of a line in the file.
int NI_GetMaxLen(nodeInput NodeInput*)
Parses a string for a network address. Overloaded API for ATM compatibility.
void IO_ConvertAddrToString(Address* address, char* addrStr)
FILEIO
void
This API is used to retrieve a string parameter value from input files.
void IO_ReadInt64(Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, Int64* parameterValue)
This API is used to retrieve a Int64 parameter value from input files.
void IO_ReadTime(Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, clocktype* parameterValue)
This API is used to retrieve a clocktype parameter value from input files.
void IO_ReadInt(Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, int* parameterValue)
This API is used to retrieve a Int parameter value from input files.
void IO_ReadDouble(Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, double* parameterValue)
This API is used to retrieve a double parameter value from input files.
void IO_ReadCachedFile(Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, NodeInput* parameterValue)
This API is used to retrieve a cached file parameter value from input files.
void IO_ReadLine(Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, char* parameterValue)
FILEIO
char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, char* parameterValue)
This API is used to retrieve string parameter values from input files for a specific instance.
void IO_ReadDoubleInstance(Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, double* parameterValue)
This API is used to retrieve double parameter values from input files for a specific instance.
void IO_ReadIntInstance(Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, int* parameterValue)
This API is used to retrieve int parameter values from input files for a specific instance.
void IO_ReadTimeInstance(Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, clocktype* parameterValue)
This API is used to retrieve clocktype parameter values from input files for a specific instance.
void IO_ReadCachedFileInstance(Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, NodeInput* parameterValue)
This API is used to retrieve cached file parameter values from input files for a specific instance.
void IO_ReadStringUsingIpAddress(Node* node, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, char* parameterValue)
This API is used to retrieve a string parameter value from input files using the ip-address.
void IO_ReadString(const NodeAddress nodeId, NodeAddress ipv4Address, in6_addr* ipv6Address, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, char* parameterValue)
This API is used to retrieve a string parameter value from input files.
void IO_ReadString(const NodeAddress nodeId, int interfaceIndex, const NodeAddress ipv4SubnetAddress, const in6_addr* ipv6SubnetAddress, const NodeInput* nodeInput, const char* parameterName, char* parameterValue, BOOL& wasFound, int& matchType)
This API is used to retrieve a string parameter value from input files.
FILEIO
Constant
ANY_NODEID 0xffffffff
Constant
Optional macro values to use when calling IO_Read...() APIs. Defines any node id. ANY_ADDRESS 0xffffffff
Constant
Optional macro values to use when calling IO_Read...() APIs. Defines any node address. ANY_INSTANCE 0xffffffff
Constant
Optional macro values to use when calling IO_Read...() APIs. Defines any instance. MAX_INPUT_FILE_LINE_LENGTH 6 * MAX_STRING_LENGTH
Constant
Constant
Constant
Max number of -FILE references in an input file. (Restriction is only for immediate children) MATCH_NODE_ID 4
Constant
Constant
Constant
Structure
FILEIO
Function / Macro Detail Function / Macro IO_ConvertIpAddressToString Format void IO_ConvertIpAddressToString (NodeAddress ipAddress, char* addressString) Parameters: Parses IPv4 address into a dotted-decimal string.
ipAddress
addressString
Returns:
void
- None
IO_FindStringPos
s[]
subString[]
Returns:
int
IO_GetToken
char* IO_GetToken (char* dst, const char* src, char ** next) Parameters:
Searches source buffer for the first %s-style token encountered, and copies it to dst.
dst src
- Buffer to copy token too. If passed in as - Source string. - Storage for pointer to remainder of string.
next
Returns:
char*
- dst, if string was found and dst was passed in as non-NULL. Pointer to token in src, if string was found and dst was passed in as NULL. NULL, otherwise.
IO_GetDelimitedToken
char* IO_GetDelimitedToken (char* dst, const char* src, const char* delim, char** next) Parameters:
Searches source buffer for the first delimited token encountered, and copies it to dst.
dst
FILEIO
src
delim next
Returns:
char*
- dst, if string was found and dst was passed in as non-NULL. Pointer to token in src, if string was found and dst was passed in as NULL. NULL, otherwise.
IO_Right
Returns a pointer to the right side of the string of length "count" characters.
count
Returns:
const char*
- A pointer to the right side of the string of length "count" characters. If count is 0, then a pointer to the string's terminating NULL is returned. If count is equal to or greater than the number of characters in the string, then the whole string is returned. A "character" is just a byte of char type that's not NULL. So, '\n' counts as a character.
IO_Chop
- String.
Returns:
char*
- s. If the string has a strlen() of zero, then the string is returned unmodified. A "character" is just a byte of char type that's not NULL. So, '\n' counts as a character.
IO_TrimNsbpSpaces
- String.
Returns:
void
- None
IO_TrimLeft
Strips leading white space from a string (by memmove()ing string contents left).
- String.
Returns:
void
- None
FILEIO
IO_TrimRight
Strips trailing white space from a string (by inserting early NULL).
- String.
Returns:
void
- None
IO_CompressWhiteSpace
Compresses white space between words in the string to one space in a string. White space at the very beginning and very end of the string is also compressed to one space -not stripped entirely. IO_IsStringNonNegativeInteger
- String.
Returns:
void
- None
Returns TRUE if every character in string is a digit. (Even white space will cause return of FALSE)
- String.
Returns:
BOOL
IO_ConvertStringToLowerCase
Runs tolower() on each character in string and converts the same to lowercase.
s[]
- String.
Returns:
void
- None
IO_ConvertStringToUpperCase
Runs toupper() on each character in string and converts the same to uppercase.
s[]
- String.
Returns:
void
- None
IO_CaseInsensitiveStringsAreEqual
BOOL IO_CaseInsensitiveStringsAreEqual (const char[] s1, const char[] s2, char lengthToCompare) Parameters:
FILEIO
s1 s2
lengthToCompare
Returns:
BOOL
IO_BlankLine
s[]
- String.
Returns:
BOOL
IO_CommentLine
s[]
- String.
Returns:
BOOL
IO_FindCaseInsensitiveStringPos
s[]
subString[]
Returns:
int
- Returns the position of case insensitive sub string if found. -1, otherwise.
IO_FindCaseInsensitiveStringPos
s[]
subString[]
Returns:
int
- Returns the position of case insensitive sub string if found. -1, otherwise.
FILEIO
IO_SkipToken.
token
tokenSep skip
- number of skips.
Returns: IO_CreateNodeInput NodeInput * IO_CreateNodeInput (NodeInput* nodeInput, const char* filename) Parameters: Allocates a NodeInput datastructure that can then be passed to IO_ReadNodeInput Called for each file variable in the config file.
nodeInput filename
Returns:
NodeInput *
- None
IO_InitializeNodeInput
nodeInput
Returns:
void
- None
IO_ReadNodeInput
Reads an input file into a NodeInput struct. Calls IO_ReadFileParameters to first read in FILE paramters. Then calls IO_ReadFileParameters to read the rest of the parameters.
nodeInput filename
Returns:
void
- None
IO_ReadNodeInputEx
void IO_ReadNodeInputEx (NodeInput* nodeInput, const char* filename, const char* includeComment) Parameters:
Reads an input file into a NodeInput struct. The includeComment Flag facilitate whether to include the commented line lines in the
nodeInput filename
FILEIO
nodeInput structure or not. The commented lines should only be included in Backward Compatibity for Old scenario exe. This exe is responsible for creating new config file and router model file. These new files contains changes according to current VERSION of QualNet. Calls IO_ReadFileParameters to first read in -FILE paramters. Then calls IO_ReadFileParameters to read the rest of the parameters. IO_ConvertFile
includeComment
Returns:
void
- None
nodeInput
nodeOutput version
- Not used.
Returns:
BOOL
- Returns TRUE if able to convert. FALSE, otherwise. Either couldn't load the database or something else bad happened, so just copy the old into the new.
IO_ReadLine
void IO_ReadLine (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, char* readVal) Parameters:
nodeId
wasFound readVal
Returns:
void
- None
IO_ReadString
void IO_ReadString (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, char* readVal) Parameters:
This API is used to retrieve a string parameter value from input files.
nodeId
interfaceAddress
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/FILEIO.html[5/24/2011 12:34:20 PM]
FILEIO
nodeInput index
wasFound readVal
Returns:
void
- None
IO_ReadBool
void IO_ReadBool (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, BOOL* readVal) Parameters:
This API is used to retrieve a boolean parameter value from input files.
nodeId
wasFound readVal
Returns:
void
- None
IO_ReadInt
void IO_ReadInt (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, int* readVal) Parameters:
This API is used to retrieve an integer parameter value from input files.
nodeId
wasFound readVal
Returns:
void
- None
IO_ReadDouble
void IO_ReadDouble (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const
FILEIO
char* index, BOOL* wasFound, double* readVal) Parameters: This API is used to retrieve a double parameter value from input files.
nodeId
wasFound readVal
Returns:
void
- None
IO_ReadFloat
void IO_ReadFloat (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, float* readVal) Parameters:
This API is used to retrieve a float parameter value from input files.
nodeId
wasFound readVal
Returns:
void
- None
IO_ReadTime
void IO_ReadTime (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, clocktype* readVal) Parameters:
This API is used to retrieve time parameter value from input files.
nodeId
wasFound
FILEIO
readVal
Returns:
void
- None
IO_ReadCachedFile
void IO_ReadCachedFile (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, NodeInput* parameterValue) Parameters:
This API is used to retrieve cached file parameter value from input files.
nodeId
- Parameter name. - Storage for success of seach. - Storage for parameter value.
wasFound
parameterValue
Returns:
void
- None
IO_ReadStringInstance
void IO_ReadStringInstance (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, char* parameterValue) Parameters:
nodeId
This API is used to retrieve string parameter values from input files for a specific instance.
interfaceAddress nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadBoolInstance
void IO_ReadBoolInstance (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput,
FILEIO
const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, BOOL* parameterValue) This API is used to retrieve boolean parameter values from input files for a specific instance. Parameters:
nodeId
interfaceAddress nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadIntInstance
void IO_ReadIntInstance (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, int* parameterValue) Parameters:
nodeId
This API is used to retrieve integer parameter values from input files for a specific instance.
interfaceAddress nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadDoubleInstance
void IO_ReadDoubleInstance (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, double* parameterValue)
FILEIO
This API is used to retrieve double parameter values from input files for a specific instance.
Parameters:
nodeId
interfaceAddress nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadFloatInstance
void IO_ReadFloatInstance (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, float* parameterValue) Parameters:
nodeId
This API is used to retrieve float parameter values from input files for a specific instance.
interfaceAddress nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadTimeInstance
void IO_ReadTimeInstance (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, clocktype* parameterValue) Parameters:
nodeId
This API is used to retrieve time parameter values from input files for a specific instance.
FILEIO
interfaceAddress nodeInput
- IP address of interface.
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadCachedFileInstance
void IO_ReadCachedFileInstance (const NodeAddress nodeId, const NodeAddress interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, NodeInput* parameterValue) Parameters:
nodeId
This API is used to retrieve file parameter values from input files for a specific instance.
interfaceAddress nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ParseNodeIdHostOrNetworkAddress
void IO_ParseNodeIdHostOrNetworkAddress (const char s[], NodeAddress* outputNodeAddress, int* numHostBits, BOOL* isNodeId) Parameters:
s[]
outputNodeAddress numHostBits
FILEIO
isNodeId
Returns:
void
- None
IO_ParseNodeIdOrHostAddress
void IO_ParseNodeIdOrHostAddress (const char s[], NodeAddress* outputNodeAddress, BOOL* isNodeId) Parameters:
s[]
outputNodeAddress isNodeId
Returns:
void
- None
IO_ParseNetworkAddress
void IO_ParseNetworkAddress (const char s[], NodeAddress* outputNodeAddress, int* numHostBits) Parameters:
s[]
outputNodeAddress numHostBits
Returns:
void
- None
IO_FreeNodeInput
nodeInput
Returns:
void
- None
IO_PrintStat
void IO_PrintStat (Node* node, const char* layer, const char* protocol, NodeAddress interfaceAddress, int instanceId, const char* buf) Parameters:
Print out the relevant stat in "buf", along with the node id and the layer type generating this stat.
node
- The node generating the stat. - The layer generating the stat. - The protocol generating the stat.
layer
protocol
FILEIO
- Interface address.
- Instance id.
Returns:
void
- None
IO_AppParseSourceAndDestStrings
void IO_AppParseSourceAndDestStrings (Node* node, const char* inputString, const char* sourceString, NodeAddress* sourceNodeId, NodeAddress* sourceAddr, const char* destString, NodeAddress* destNodeId, NodeAddress* destAddr) Parameters:
node
Application input parsing API. Parses the source and destination strings.
- A pointer to Node. - The input string. - The source string. - A pointer to NodeAddress.
inputString
- A pointer to NodeAddress.
Returns:
void
- None
IO_AppParseSourceString
void IO_AppParseSourceString (Node* node, const char* inputString, const char* sourceString, NodeAddress* sourceNodeId, NodeAddress* sourceAddr) Parameters:
node
- A pointer to Node. - The input string. - The source string. - A pointer to NodeAddress.
inputString
- A pointer to NodeAddress.
Returns:
void
- None
FILEIO
IO_AppParseDestString
void IO_AppParseDestString (Node* node, const char* inputString, const char* destString, NodeAddress* destNodeId, NodeAddress* destAddr) Parameters:
node
- A pointer to NodeAddress.
Returns:
void
- None
IO_AppParseHostString
void IO_AppParseHostString (Node* node, const char* inputString, const char* destString, NodeAddress* destNodeId, NodeAddress* destAddr) Parameters:
node
- A pointer to NodeAddress.
Returns:
void
- None
IO_AppForbidSameSourceAndDest
void IO_AppForbidSameSourceAndDest (const char* inputString, NodeAddress sourceNodeId, NodeAddress destNodeId) Parameters:
Application input checking API. Checks for the same source and destination node id. Calls abort() for same source and destination.
inputString
sourceNodeId destNodeId
Returns:
void
- None
QualifierMatches
BOOL QualifierMatches (const NodeAddress nodeId, const NodeAddress interfaceAddress, const char* qualifier, int* matchType)
FILEIO
Returns:
BOOL
IO_ReadBool
void IO_ReadBool (const NodeAddress nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, BOOL* parameterValue) Parameters:
This API is used to retrieve boolean parameter values from input files. Overloaded API for Ipv6 compatibility.
nodeId
interfaceAddress nodeInput
parameterName wasFound
parameterValue
Returns:
void
- None
IO_ReadBool
Returns:
None
- None
void IO_ReadBool (const NodeAddress nodeId, const Address* address, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, BOOL* parameterValue) Parameters:
This API is used to retrieve boolean parameter values from input files. Overloaded API for Ipv6 compatibility.
nodeId
- nodeId. Can be ANY_NODEID. - Address of interface. - Pointer to node input. - Parameter name.
address
nodeInput
parameterName
FILEIO
wasFound
parameterValue
Returns:
void
- None
IO_ReadString
void IO_ReadString (const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, char* readVal) Parameters:
This API is used to retrieve a string parameter value from input files. Overloaded API for Ipv6 compatibility.
nodeId
wasFound readVal
Returns:
void
- None
IO_ReadString
void IO_ReadString (const NodeId nodeId, const AtmAddress* interfaceAddress, const NodeInput * nodeInput, const char * parameterName, BOOL * wasFound, char * parameterValue) Parameters:
nodeId
interfaceAddress nodeInput
parameterName wasFound
parameterValue
Returns:
void
- None
IO_ReadString
void IO_ReadString (const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* index, BOOL* wasFound, char* readVal) Parameters:
FILEIO
This API is used to retrieve a string parameter value from input files. Overloaded API for Ipv6 compatibility.
nodeId
address
nodeInput index
wasFound readVal
Returns:
void
- None
IO_ReadInt
void IO_ReadInt (const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, int* readVal) Parameters:
This API is used to retrieve an integer parameter value from input files. Overloaded API for Ipv6 compatibility.
nodeId
wasFound readVal
Returns:
void
- None
IO_ReadInt
void IO_ReadInt (const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* index, BOOL* wasFound, int* readVal) Parameters:
This API is used to retrieve an integer parameter value from input files. Overloaded API for Ipv6 compatibility.
nodeId
address
nodeInput index
wasFound readVal
FILEIO
Returns:
void
- None
IO_ReadInt
Returns:
void
IO_ReadDouble
void IO_ReadDouble (const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, double* readVal) Parameters:
This API is used to retrieve a double parameter value from input files. Overloaded API for Ipv6 compatibility.
nodeId
wasFound readVal
Returns:
void
- None
IO_ReadDouble
Returns:
None
- None
void IO_ReadDouble (const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* index, BOOL* wasFound, double* readVal) Parameters:
This API is used to retrieve a double parameter value from input files. Overloaded API for Ipv6 compatibility.
nodeId
address
nodeInput index
wasFound
FILEIO
readVal
Returns:
void
- None
IO_ReadFloat
void IO_ReadFloat (const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, float* readVal) Parameters:
This API is used to retrieve a float parameter value from input files. Overloaded API for Ipv6 compatibility.
nodeId
wasFound readVal
Returns:
void
- None
IO_ReadFloat
Returns:
void
IO_ReadFloat
void IO_ReadFloat (const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* index, BOOL* wasFound, float* readVal) Parameters:
This API is used to retrieve a float parameter value from input files. Overloaded API for Ipv6 compatibility.
nodeId
address
nodeInput index
wasFound readVal
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/FILEIO.html[5/24/2011 12:34:20 PM]
FILEIO
void
- None
IO_ReadTime
void IO_ReadTime (const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* index, BOOL* wasFound, clocktype* readVal) Parameters:
This API is used to retrieve time parameter value from input files. Overloaded API for Ipv6 compatibility.
nodeId
wasFound readVal
Returns:
void
- None
IO_ReadTime
Returns:
void
- None
IO_ReadTime
void IO_ReadTime (const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* index, BOOL* wasFound, clocktype* readVal) Parameters:
This API is used to retrieve time parameter value from input files. Overloaded API for Ipv6 compatibility.
nodeId
address
nodeInput index
wasFound readVal
Returns:
void
- None
IO_ReadBoolInstance
FILEIO
Returns:
None
- None
void IO_ReadStringInstance (const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, char* parameterValue) Parameters:
nodeId
This API is used to retrieve string parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
interfaceAddress nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadStringInstance
Returns:
void
void IO_ReadStringInstance (const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, char* parameterValue) Parameters:
nodeId
This API is used to retrieve string parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
- nodeId. Can be ANY_NODEID. - Address of interface. - Pointer to node input. - Parameter name. - Instance number.
address
nodeInput
parameterName
parameterInstanceNumber
FILEIO
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadIntInstance
void IO_ReadIntInstance (const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, int* parameterValue) Parameters:
nodeId
This API is used to retrieve integer parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
interfaceAddress nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadIntInstance
void IO_ReadIntInstance (const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, int* parameterValue) Parameters:
nodeId
This API is used to retrieve integer parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
- nodeId. Can be ANY_NODEID. - Address of interface. - Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
address
nodeInput
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
FILEIO
parameterValue
Returns:
void
- None
IO_ReadDoubleInstance
void IO_ReadDoubleInstance (const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, double* parameterValue) Parameters:
nodeId
This API is used to retrieve double parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
interfaceAddress nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadDoubleInstance
Returns:
void
void IO_ReadDoubleInstance (const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, double* parameterValue) Parameters:
nodeId
This API is used to retrieve double parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
- nodeId. Can be ANY_NODEID. - IPv6 address of interface. - Pointer to node input. - Parameter name.
address
nodeInput
parameterName
FILEIO
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadFloatInstance
void IO_ReadFloatInstance (const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, float* parameterValue) Parameters:
nodeId
This API is used to retrieve float parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
interfaceAddress nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadFloatInstance
void IO_ReadFloatInstance (const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, float* parameterValue) Parameters:
nodeId
This API is used to retrieve float parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
- nodeId. Can be ANY_NODEID. - Address of interface. - Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
address
nodeInput
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/FILEIO.html[5/24/2011 12:34:20 PM]
FILEIO
wasFound
parameterValue
Returns:
void
- None
IO_ReadTimeInstance
void IO_ReadTimeInstance (const NodeId nodeId, const in6_addr* interfaceAddress, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, clocktype* parameterValue) Parameters:
nodeId
This API is used to retrieve time parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
interfaceAddress nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadTimeInstance
Returns:
void
void IO_ReadTimeInstance (const NodeId nodeId, const Address* address, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, clocktype* parameterValue) Parameters:
nodeId
This API is used to retrieve time parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
address
nodeInput
FILEIO
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadCachedFile
void IO_ReadCachedFile (const NodeAddress nodeId, const Address* address, const NodeInput* nodeInput, const char* index, BOOL* wasFound, NodeInput* parameterValue) Parameters:
This API is used to retrieve cached file parameter value from input files. Overloaded API for Ipv6 compatibility.
nodeId
address
nodeInput index
- Parameter name. - Storage for success of seach. - Storage for parameter value.
wasFound
parameterValue
Returns:
void
- None
IO_ReadCachedFileInstance
void IO_ReadCachedFileInstance (const NodeAddress nodeId, const Address* address, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, NodeInput* parameterValue) Parameters:
nodeId
This API is used to retrieve file parameter values from input files for a specific instance. Overloaded API for Ipv6 compatibility.
- nodeId. Can be ANY_NODEID. - Address of interface. - Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
address
nodeInput
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
FILEIO
parameterValue
Returns:
void
- None
IO_PrintStat
void IO_PrintStat (Node* node, const char* layer, const char* protocol, const char* interfaceAddress, int instanceId, const char* buf) Parameters:
Print out the relevant stat in "buf", along with the node id and the layer type generating this stat. Overloaded API for Ipv6 compatibility.
node
- The node generating the stat. - The layer generating the stat. - The protocol generating the stat. - The Interface address the stat.
layer
protocol
- Instance id.
Returns:
void
- None
IO_ParseNodeIdHostOrNetworkAddress
void IO_ParseNodeIdHostOrNetworkAddress (const char s[], in6_addr* ipAddress, BOOL* isIpAddr, NodeId* nodeId) Parameters:
Parses a string for a nodeId, host address, or network address. Overloaded API for Ipv6 compatibility.
s[]
Returns:
void
- None
IO_ParseNodeIdHostOrNetworkAddress
void IO_ParseNodeIdHostOrNetworkAddress (const char s[], ATM addr* atmAddress, BOOL* isAtmAddr, NodeId* nodeId) Parameters:
Parses a string for a nodeId, host address, or network address. Overloaded API for Ipv6 compatibility.
s[]
FILEIO
Returns:
void
- None
IO_ParseNodeIdOrHostAddress
void IO_ParseNodeIdOrHostAddress (const char s[], in6_addr* outputNodeAddress, BOOL* isNodeId) Parameters:
s[]
outputNodeAddress isNodeId
Returns:
void
- None
IO_ParseNetworkAddress
void IO_ParseNetworkAddress (const char s[], unsigned int* tla, unsigned int* nla, unsigned int* sla) Parameters:
Parses a string for a network address. Overloaded API for Ipv6 compatibility.
- String to parse. - Storage for tla - Storage for nla. - Storage for sla.
Returns:
void
- None
IO_AppParseSourceAndDestStrings
void IO_AppParseSourceAndDestStrings (Node* node, const char* inputString, const char* sourceString, NodeId* sourceNodeId, Address* sourceAddr, const char* destString, NodeId* destNodeId, Address* destAddr) Parameters:
Application input parsing API. Parses the source and destination strings. Overloaded for Ipv6 compatibility.
node
- A pointer to Node. - The input string. - The source string. - A pointer to NodeId.
inputString
- A pointer to Address.
FILEIO
Returns:
void
- None
IO_AppParseSourceString
void IO_AppParseSourceString (Node* node, const char* inputString, const char* sourceString, NodeAddress* sourceNodeId, Address* sourceAddr, NetworkType networkType) Parameters:
Application input parsing API. Parses the source string. Overloaded for Ipv6 compatibility.
node
- A pointer to Node. - The input string. - The source string. - A pointer to NodeAddress.
inputString
networkType
Returns:
void
- None
IO_AppParseDestString
void IO_AppParseDestString (Node* node, const char* inputString, const char* destString, NodeAddress* destNodeId, Address* destAddr, NetworkType networkType) Parameters:
Application input parsing API. Parses the destination string. Overloaded for Ipv6 compatibility.
node
networkType
Returns:
void
- None
QualifierMatches
BOOL QualifierMatches (const NodeId nodeId, const in6_addr interfaceAddress, const char* qualifier, int* matchType) Parameters:
This is an auxiliary API used by the IO_Read...() set of APIs. Overloaded for Ipv6 compatibility
nodeId
interfaceAddress qualifier
FILEIO
matchType
Returns:
BOOL
QualifierMatches
BOOL QualifierMatches (const NodeId nodeId, const AtmAddress* interfaceAddress, const char* qualifier, int* matchType) Parameters:
This is an auxiliary API used by the IO_Read...() set of APIs. Overloaded for Ipv6 compatibility
nodeId
Returns:
BOOL
IO_ConvertIpv6StringToAddress()
Convert IPv6 address string to in6_addr structure. API for Ipv6 compatibility.
interfaceAddr ipAddress
Returns:
void
- None
IO_ConvertIpAddressToString
Parses IPv6 address into a formatted string. Overloaded API for Ipv6 compatibility.
ipAddress
interfaceAddr
Returns:
void
- None
IO_ConvertIpAddressToString
Parses IPv6 address into a formatted string. Overloaded API for Ipv6 compatibility.
ipAddress
interfaceAddr
FILEIO
Returns:
void
- None
IO_ConvertStringToNodeAddress
addressString
outputNodeAddress
Returns:
void
- None
IO_CheckIsSameAddress
addr1 addr2
- Storage for IPv4 | IPv6 address - Storage for IPv4 | IPv6 address
Returns:
BOOL
- None
IO_ReadString
void IO_ReadString (Node* node node, const NodeInput* nodeInput, const char* index, BOOL* wasFound, char* readVal) Parameters:
This API is used to retrieve a string parameter value from input files.
node
nodeInput index
wasFound readVal
Returns:
void
- None
IO_CacheFile
This API is used to read an auxiliary input file into a NodeInput struct Called for each file variable in the config file.
nodeInput filename
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/FILEIO.html[5/24/2011 12:34:20 PM]
FILEIO
void
- NULL
IO_GetMaxLen
This API is used to get the maximun length of a line in the file.
char*
Returns:
int
IO_GetMaxLen
This API is used to get the maximun length of a line in the file.
FILE*
Returns:
int
NI_GetMaxLen
NodeInput*
Returns:
int
NI_GetMaxLen
const NodeInput*
Returns:
int
IO_ParseNetworkAddress
Parses a string for a network address. Overloaded API for ATM compatibility.
s[]
u_atmVal
Returns:
void
- None
FILEIO
IO_ConvertAddrToString
address addrStr
Returns:
void
- NULL
IO_ConvertAtmAddressToString
addr
addrStr
Returns:
void
- NULL
IO_InsertIntValue
void IO_InsertIntValue (const char s[], const unsigned int val, unsigned int u_atmVal) Parameters:
s[] val
u_atmVal
Returns:
void
- NULL
IO_ReadCachedFileIndex
int IO_ReadCachedFileIndex (NodeAddress nodeId, NodeAddress interfaceAddress, unsigned int nodeInput) Parameters:
nodeId
interfaceAddress nodeInput
Returns:
int
- None
IO_ReadString
void IO_ReadString (Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, char* parameterValue)
FILEIO
Parameters: This API is used to retrieve a string parameter value from input files.
node
nodeId
interfaceIndex nodeInput
parameterName wasFound
parameterValue
Returns:
void
- None
IO_ReadInt64
void IO_ReadInt64 (Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, Int64* parameterValue) Parameters:
This API is used to retrieve a Int64 parameter value from input files.
node
nodeId
interfaceIndex nodeInput
parameterName wasFound
parameterValue
Returns:
void
- None
IO_ReadTime
void IO_ReadTime (Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, clocktype* parameterValue) Parameters:
This API is used to retrieve a clocktype parameter value from input files.
node
nodeId
interfaceIndex nodeInput
FILEIO
parameterName wasFound
- Parameter name.
parameterValue
Returns:
void
- None
IO_ReadInt
void IO_ReadInt (Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, int* parameterValue) Parameters:
This API is used to retrieve a Int parameter value from input files.
node
nodeId
interfaceIndex nodeInput
parameterName wasFound
parameterValue
Returns:
void
- None
IO_ReadDouble
void IO_ReadDouble (Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, double* parameterValue) Parameters:
This API is used to retrieve a double parameter value from input files.
node
nodeId
interfaceIndex nodeInput
parameterName wasFound
parameterValue
Returns:
void
- None
FILEIO
IO_ReadCachedFile
void IO_ReadCachedFile (Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, NodeInput* parameterValue) Parameters:
This API is used to retrieve a cached file parameter value from input files.
node
nodeId
interfaceIndex nodeInput
parameterName wasFound
parameterValue
Returns:
void
- None
IO_ReadLine
void IO_ReadLine (Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, char* parameterValue) Parameters:
node
nodeId
interfaceIndex nodeInput
parameterName wasFound
parameterValue
Returns:
void
- None
IO_ReadStringInstance
void IO_ReadStringInstance (Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, char* parameterValue) Parameters:
node
This API is used to retrieve string parameter values from input files for a specific instance.
FILEIO
nodeId
interfaceIndex nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadDoubleInstance
void IO_ReadDoubleInstance (Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, double* parameterValue) Parameters:
node
This API is used to retrieve double parameter values from input files for a specific instance.
nodeId
interfaceIndex nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadIntInstance
void IO_ReadIntInstance (Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, int* parameterValue) Parameters:
node
This API is used to retrieve int parameter values from input files for a specific instance.
FILEIO
nodeId
interfaceIndex nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadTimeInstance
void IO_ReadTimeInstance (Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, clocktype* parameterValue) Parameters:
node
This API is used to retrieve clocktype parameter values from input files for a specific instance.
nodeId
interfaceIndex nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadCachedFileInstance
void IO_ReadCachedFileInstance (Node* node, const NodeId nodeId, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, const int parameterInstanceNumber, const BOOL fallbackIfNoInstanceMatch, BOOL* wasFound, NodeInput* parameterValue) Parameters:
node
This API is used to retrieve cached file parameter values from input files for a
FILEIO
specific instance.
interfaceIndex nodeInput
- Pointer to node input. - Parameter name. - Instance number. - Selects parameter without
parameterName
parameterInstanceNumber
fallbackIfNoInstanceMatch wasFound
parameterValue
Returns:
void
- None
IO_ReadStringUsingIpAddress
void IO_ReadStringUsingIpAddress (Node* node, int interfaceIndex, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, char* parameterValue) Parameters:
This API is used to retrieve a string parameter value from input files using the ip-address.
node
interfaceIndex nodeInput
parameterName wasFound
parameterValue
Returns:
void
- None
IO_ReadString
void IO_ReadString (const NodeAddress nodeId, NodeAddress ipv4Address, in6_addr* ipv6Address, const NodeInput* nodeInput, const char* parameterName, BOOL* wasFound, char* parameterValue) Parameters:
This API is used to retrieve a string parameter value from input files.
nodeId
FILEIO
parameterName wasFound
- Parameter name.
parameterValue
Returns:
void
- None
IO_ReadString
void IO_ReadString (const NodeAddress nodeId, int interfaceIndex, const NodeAddress ipv4SubnetAddress, const in6_addr* ipv6SubnetAddress, const NodeInput* nodeInput, const char* parameterName, char* parameterValue, BOOL& wasFound, int& matchType) Parameters:
nodeId
This API is used to retrieve a string parameter value from input files.
interfaceIndex
parameterName
parameterValue wasFound
matchType
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
FILEIO
GUI
GUI
This file describes data structures and functions for interfacing with the QualNet GUI and the other graphical tools. Constant / Data Structure Summary Type
CONSTANT
Name
GUI_DEFAULT_STEP
GUI
GUI
Summary
GUI_HandleHITLInput(const char * args, PartitionData * partition)
Called from GUI_EXTERNAL_ReceiveCommand() if command type is GUI_USER_DEFINED. Created so that GUI Human In the loop commands can also be given through a file, instead of giving it through the GUI. Will serve for good unit testing of GUI HITL commands
void GUI_Initialize(NodeInput* nodeInput, int numNodes, int coordinateSystem, Coordinates origin, Coordinates dimensions, clocktype maxClock)
Initializes the GUI in order to start the animation. The terrain map should give the path (either absolute, or relative to
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/GUI.html[5/24/2011 12:34:32 PM]
GUI
This function will allow the protocol designer to specify the effect to use to display certain events.
void GUI_InitNode(Node* node, NodeInput* nodeInput, clocktype time)
Provides the initial location and orientation of the node, the transmission range (for wireless nodes), a node type, and optional icon and label.
void GUI_InitWirelessInterface(Node* node, int interfaceIndex)
Provides the initial location and orientation of the node, the transmission range (for wireless nodes), a node type, and optional icon and label.
void GUI_InitializeInterfaces(NodeInput* nodeInput)
Sets the Subnet mask associated with one of the node's interfaces.
void GUI_SetInterfaceName(NodeId nodeID, char* interfaceAddress, int interfaceIndex, clocktype time)
Sets the Interface name associated with one of the node's interfaces.
void GUI_MoveNode(NodeId nodeID, Coordinates position, clocktype time)
GUI
Sets the antenna pattern to one of a previously specified antenna pattern file.
void GUI_SetPatternAndAngle(node node*, int interfaceIndex, int index, int angleInDegrees, clocktype time)
For steerable antennas, it sets the pattern to use, and also an angle relative to the node's current orientation.
void GUI_AddLink(NodeId sourceID, NodeId destID, GuiLayers layer, int type, NodeAddress subnetAddress, int numHostBits, clocktype time)
Adds a link (one hop on a route) between two nodes. In a wired topology, this could be a static route; in wireless, a dynamic one.
void GUI_AddLink(NodeId sourceID, NodeId destID, GuiLayers layer, int type, int tla, int nla, int sla, clocktype time)
Adds an IPv6 link (one hop on a route) between two nodes. In a wired topology, this could be a static route; in wireless, a dynamic one.
void GUI_AddLink(NodeId sourceID, NodeId destID, GuiLayers layer, int type, IPv6subnetAddress ip6_addr, IPv6subnetPrefixLen unsigned int, clocktype time)
Adds an IPv6 link (one hop on a route) between two nodes. In a wired topology, this could be a static route; in wireless, a dynamic one.
void GUI_DeleteLink(NodeId sourceID, NodeId destID, GuiLayers layer, int type, clocktype time)
Indicates a broadcast.
void GUI_EndBroadcast(NodeId nodeID, GuiLayers layer, int type, int interfaceIndex, clocktype time)
GUI
Sends a unicast packet/frame/signal to a destination. Will probably be drawn as a temporary line between source and destination, followed by a signal (at the receiver) indicating success or failure.
void GUI_Receive(NodeId sourceID, NodeId destID, GuiLayers layer, int type, int sendingInterfaceIndex, int receivingInterfaceIndex, clocktype time)
Since the GUI supports hierarchical design, this function informs the GUI of the contents of a hierarchical component.
void GUI_MoveHierarchy(int hierarchyId, Coordinates centerCoordinates, Orientation orientation, clocktype time)
GUI
Shows label beside the client and the server as app link is setup.
void GUI_DeleteApplication(NodeId sourceID, NodeId destID, char* appName, int uniqueId, clocktype time)
Dropping one packet from a queue for a node, interface and priority.
void GUI_QueueDequeuePacket(NodeId nodeID, GuiLayers layer, int interfaceIndex, unsigned priority, int packetSize, clocktype time)
Dequeuing one packet from a queue for a node, interface and priority
int GUI_DefineMetric(char* name, NodeId nodeID, GuiLayers layer, int linkID, GuiDataTypes datatype, GuiMetrics metrictype)
This function defines a metric by giving it a name and a description. The system will assign a number to this data item. Future references to the data should use the number rather than the name. The link ID will be used to associate a metric with a particular application link, or MAC interface, etc.
void GUI_SendIntegerData(NodeId nodeID, int metricID, int value, clocktype time)
GUI
Function used to replace newline characters in a string being sent to the GUI.
Constant
GUI_DEFAULT_STEP 1 econds
Constant
The default interval before waiting for the Animator handshake/STEP. GUI_DEFAULT_ICON ""
Constant
Constant
By default, there are 8 layers, but users may add more GUI_DEFAULT_DATA_TYPE 0
GUI
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Enumeration
Enumeration
GUI
Enumeration
Enumeration
Enumeration
Enumeration
Enumeration
Enumeration
Enumeration
Enumeration
Enumeration
Structure
Structure
GUI
Structure
Contains a list of the metrics collected at a layer of the protocol stack. GuiCommand
Function / Macro Detail Function / Macro GUI_HandleHITLInput Format void GUI_HandleHITLInput (const char * args, PartitionData * partition) Parameters: Called from GUI_EXTERNAL_ReceiveCommand() if command type is GUI_USER_DEFINED. Created so that GUI Human In the loop commands can also be given through a file, instead of giving it through the GUI. Will serve for good unit testing of GUI HITL commands GUI_Initialize
args
partition
Returns:
void
- NULL
void GUI_Initialize (NodeInput* nodeInput, int numNodes, int coordinateSystem, Coordinates origin, Coordinates dimensions, clocktype maxClock) Parameters:
Initializes the GUI in order to start the animation. The terrain map should give the path (either absolute, or relative to QUALNET_HOME) of an file to represent the terrain.
nodeInput numNodes
- configuration file
coordinateSystem origin
dimensions maxClock
Returns:
void
- NULL
GUI_SetEffect
void GUI_SetEffect (GuiEvents event, GuiLayers layer, int type, GuiEffects effect, GuiColors color) Parameters:
event
GUI
layer type
effect color
Returns:
void
- NULL
GUI_InitNode
Provides the initial location and orientation of the node, the transmission range (for wireless nodes), a node type, and optional icon and label.
node
nodeInput time
Returns:
void
- NULL
GUI_InitWirelessInterface
Provides the initial location and orientation of the node, the transmission range (for wireless nodes), a node type, and optional icon and label.
node
interfaceIndex
Returns:
void
- NULL
GUI_InitializeInterfaces
nodeInput
- configuration file
Returns:
void
- NULL
GUI_SetInterfaceAddress
void GUI_SetInterfaceAddress (NodeId nodeID, NodeAddress interfaceAddress, int interfaceIndex, clocktype time) Parameters:
nodeID
- the node's ID
GUI
- new IP address
Returns:
void
- NULL
GUI_SetSubnetMask
void GUI_SetSubnetMask (NodeId nodeID, NodeAddress interfaceAddress, int interfaceIndex, clocktype time) Parameters:
Sets the Subnet mask associated with one of the node's interfaces.
nodeID
Returns:
void
- NULL
GUI_SetInterfaceName
void GUI_SetInterfaceName (NodeId nodeID, char* interfaceAddress, int interfaceIndex, clocktype time) Parameters:
Sets the Interface name associated with one of the node's interfaces.
nodeID
Returns:
void
- NULL
GUI_MoveNode
nodeID
position time
Returns:
void
- NULL
GUI
GUI_SetNodeOrientation
nodeID
orientation time
Returns:
void
- NULL
GUI_SetNodeIcon
nodeID
iconFile time
Returns:
void
- NULL
GUI_SetNodeLabel
- the node's ID
Returns:
void
- NULL
GUI_SetNodeRange
void GUI_SetNodeRange (NodeId nodeID, int interfaceIndex, double range, clocktype time) Parameters:
nodeID
GUI
Returns:
void
- NULL
GUI_SetNodeType
- the node's ID
- user defined type, used with GUI_SetEffect - the current simulation time
Returns:
void
- NULL
GUI_SetPatternIndex
void GUI_SetPatternIndex (Node* node, int interfaceIndex, int index, clocktype time) Parameters:
Sets the antenna pattern to one of a previously specified antenna pattern file.
node
Returns:
void
- NULL
GUI_SetPatternAndAngle
void GUI_SetPatternAndAngle (node node*, int interfaceIndex, int index, int angleInDegrees, clocktype time) Parameters:
For steerable antennas, it sets the pattern to use, and also an angle relative to the node's current orientation.
node*
interfaceIndex index
- index into the node's antenna pattern file - angle to rotate the pattern
angleInDegrees time
Returns:
void
- NULL
GUI_AddLink
void GUI_AddLink (NodeId sourceID, NodeId destID, GuiLayers layer, int type, NodeAddress subnetAddress, int numHostBits, clocktype time)
GUI
Parameters: Adds a link (one hop on a route) between two nodes. In a wired topology, this could be a static route; in wireless, a dynamic one.
sourceID destID layer type
- a user-defined type for the link - subnet address for network links
Returns:
void
- NULL
GUI_AddLink
void GUI_AddLink (NodeId sourceID, NodeId destID, GuiLayers layer, int type, int tla, int nla, int sla, clocktype time) Parameters:
Adds an IPv6 link (one hop on a route) between two nodes. In a wired topology, this could be a static route; in wireless, a dynamic one.
- TLA field of IPv6 address - NLA field of IPv6 address - SLA field of IPv6 address - the current simulation time
time
Returns:
void
- NULL
GUI_AddLink
void GUI_AddLink (NodeId sourceID, NodeId destID, GuiLayers layer, int type, IPv6subnetAddress ip6_addr, IPv6subnetPrefixLen unsigned int, clocktype time) Parameters:
Adds an IPv6 link (one hop on a route) between two nodes. In a wired topology, this could be a static route; in wireless, a dynamic one.
GUI
type
- a user-defined type for the link - IPv6 address - IPv6 address prefix length
ip6_addr
Returns:
void
- NULL
GUI_DeleteLink
void GUI_DeleteLink (NodeId sourceID, NodeId destID, GuiLayers layer, int type, clocktype time) Parameters:
Returns:
void
- NULL
GUI_DeleteLink
void GUI_DeleteLink (NodeId sourceID, NodeId destID, GuiLayers layer, clocktype time) Parameters:
Returns:
void
- NULL
GUI_Broadcast
void GUI_Broadcast (NodeId nodeID, GuiLayers layer, int type, int interfaceIndex, clocktype time) Parameters:
Indicates a broadcast.
- the node's ID
GUI
interfaceIndex time
Returns:
void
- NULL
GUI_EndBroadcast
void GUI_EndBroadcast (NodeId nodeID, GuiLayers layer, int type, int interfaceIndex, clocktype time) Parameters:
- the node's ID
- a user-defined type for the link - which of the node's interfaces to use
interfaceIndex time
Returns:
void
- NULL
GUI_Multicast
void GUI_Multicast (NodeId nodeID, GuiLayers layer, int type, int interfaceIndex, clocktype time) Parameters:
- the node's ID
- a user-defined type for the link - which of the node's interfaces to use
interfaceIndex time
Returns:
void
- NULL
GUI_Unicast
void GUI_Unicast (NodeId sourceID, NodeId destID, GuiLayers layer, int type, int sendingInterfaceIndex, int receivingInterfaceIndex, clocktype time) Parameters:
Sends a unicast packet/frame/signal to a destination. Will probably be drawn as a temporary line between source and destination, followed by a signal (at the receiver) indicating success or failure.
GUI
type
sendingInterfaceIndex
receivingInterfaceIndex time
Returns:
void
- NULL
GUI_Receive
void GUI_Receive (NodeId sourceID, NodeId destID, GuiLayers layer, int type, int sendingInterfaceIndex, int receivingInterfaceIndex, clocktype time) Parameters:
sendingInterfaceIndex
receivingInterfaceIndex time
Returns:
void
- NULL
GUI_Drop
void GUI_Drop (NodeId sourceID, NodeId destID, GuiLayers layer, int type, int sendingInterfaceIndex, int receivingInterfaceIndex, clocktype time) Parameters:
sendingInterfaceIndex
receivingInterfaceIndex time
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/GUI.html[5/24/2011 12:34:32 PM]
GUI
void
- NULL
GUI_Collision
- the node's ID
Returns:
void
- NULL
GUI_CreateSubnet
void GUI_CreateSubnet (GuiSubnetTypes type, NodeAddress subnetAddress, int numHostBits, const char* nodeList, clocktype time) Parameters:
Returns:
void
- NULL
GUI_CreateSubnet
void GUI_CreateSubnet (GuiSubnetTypes type, in6_addr IPv6subnetAddress, unsigned int IPv6subnetPrefixLen, const char* nodeList, clocktype time) Parameters:
type
- GUI_WIRED/WIRELESS/SATELLITE_NETWORK - base address for the subnet - number of network bits present
IPv6subnetAddress
Returns:
void
- NULL
GUI
GUI_CreateSubnet
void GUI_CreateSubnet (GuiSubnetTypes type, IPv6subnetAddress ip6_addr, IPv6subnetPrefixLen unsigned int, const char* nodeList, clocktype time) Parameters:
type
ip6_addr
Returns:
void
- NULL
GUI_CreateHierarchy
Since the GUI supports hierarchical design, this function informs the GUI of the contents of a hierarchical component.
componentID nodeList
Returns:
void
- NULL
GUI_MoveHierarchy
void GUI_MoveHierarchy (int hierarchyId, Coordinates centerCoordinates, Orientation orientation, clocktype time) Parameters:
hierarchyId
Returns:
void
- NULL
GUI_CreateWeatherPattern
patternID inputLine
GUI
Returns:
void
- NULL
GUI_MoveWeatherPattern
patternID
coordinates time
Returns:
void
- NULL
GUI_AddApplication
void GUI_AddApplication (NodeId sourceID, NodeId destID, char* appName, int uniqueId, clocktype time) Parameters:
Shows label beside the client and the server as app link is setup.
sourceID destID
- the destination node - the application name, e.g. "CBR" - unique label for this application session
appName
uniqueId time
Returns:
void
- NULL
GUI_DeleteApplication
void GUI_DeleteApplication (NodeId sourceID, NodeId destID, char* appName, int uniqueId, clocktype time) Parameters:
sourceID destID
- the destination node - the application name, e.g. "CBR" - unique label for this application session
appName
uniqueId time
Returns:
void
- NULL
GUI_AddInterfaceQueue
void GUI_AddInterfaceQueue (NodeId nodeID, GuiLayers layer, int interfaceIndex, unsigned priority, int queueSize,
GUI
clocktype time) Parameters: Creates a queue for a node, interface and priority.
nodeID layer
- the node's ID
interfaceIndex priority
queueSize time
Returns:
void
- NULL
GUI_QueueInsertPacket
void GUI_QueueInsertPacket (NodeId nodeID, GuiLayers layer, int interfaceIndex, unsigned priority, int packetSize, clocktype time) Parameters:
nodeID layer
- the node's ID
interfaceIndex priority
packetSize time
Returns:
void
- NULL
GUI_QueueDropPacket
void GUI_QueueDropPacket (NodeId nodeID, GuiLayers layer, int interfaceIndex, unsigned priority, clocktype time) Parameters:
Dropping one packet from a queue for a node, interface and priority.
nodeID layer
- the node's ID
- priority of queue
GUI
Returns:
void
- NULL
GUI_QueueDequeuePacket
void GUI_QueueDequeuePacket (NodeId nodeID, GuiLayers layer, int interfaceIndex, unsigned priority, int packetSize, clocktype time) Parameters:
Dequeuing one packet from a queue for a node, interface and priority
nodeID layer
- the node's ID
interfaceIndex priority
packetSize time
Returns:
void
- NULL
GUI_DefineMetric
int GUI_DefineMetric (char* name, NodeId nodeID, GuiLayers layer, int linkID, GuiDataTypes datatype, GuiMetrics metrictype) Parameters:
This function defines a metric by giving it a name and a description. The system will assign a number to this data item. Future references to the data should use the number rather than the name. The link ID will be used to associate a metric with a particular application link, or MAC interface, etc.
name
nodeID layer
- protocol layer associated w/ the event - e.g., an application session ID - real/unsigned/integer - cumulative/average, etc.
linkID
datatype
metrictype
Returns:
int
GUI_SendIntegerData
void GUI_SendIntegerData (NodeId nodeID, int metricID, int value, clocktype time) Parameters:
nodeID
metricID value
GUI
time
Returns:
void
- NULL
GUI_SendUnsignedData
void GUI_SendUnsignedData (NodeId nodeID, int metricID, unsigned value, clocktype time) Parameters:
nodeID
Returns:
void
- NULL
GUI_SendRealData
void GUI_SendRealData (NodeId nodeID, int metricID, double value, clocktype time) Parameters:
nodeID
Returns:
void
- NULL
GUI_isAnimateOrInteractive
Returns true if the GUI was activated on the command line. GUI_EXTERNAL_Bootstrap
Returns:
bool
void GUI_EXTERNAL_Bootstrap (int argc, char** argv, NodeInput* nodeInput, int numberOfProcessors, int thisPartitionId) Parameters:
argc argv
GUI
nodeInput
numberOfProcessors thisPartitionId
Returns:
void
- NULL
GUI_EXTERNAL_Registration
partitionData list
Returns:
void
- NULL
GUI_CreateReply
Function used to replace newline characters in a string being sent to the GUI.
replyType msg
- string*
Returns:
void
- NULL
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
IP
IP
This file contains data structures and prototypes of functions used by IP. Constant / Data Structure Summary Type
CONSTANT
Name
IPVERSION4
Version of IP
CONSTANT IPTOS_LOWDELAY
Bits 6 and 7 in the IPv4 TOS octet are designated as the ECN field. Bit 6 is designated as the ECT bit.
CONSTANT IPTOS_CE
Bits 6 and 7 in the IPv4 TOS octet are designated as the ECN field. Bit 7 is designated as the CE bit.
CONSTANT IPTOS_DSCP_MAX
IP
Bits 0 to 5 in the IPv4 TOS octet are designated as DSCP field.The range for this 6-bit field is < 0 - 63 >.
CONSTANT IPTOS_DSCP_MIN
Bits 0 to 5 in the IPv4 TOS octet are designated as DSCP field.The range for this 6-bit field is < 0 - 63 >.
CONSTANT IPTOS_PREC_EFINTERNETCONTROL
IP precedence 'flash'
CONSTANT IPTOS_PREC_IMMEDIATE
IP precedence 'immediate'
CONSTANT IPTOS_PREC_PRIORITY
IP precedence 'priority'
CONSTANT IPTOS_PREC_ROUTINE
IP precedence 'routing'
CONSTANT IPTOS_PREC_INTERNETCONTROL_MIN_DELAY_SET
IP
IP option 'control'
CONSTANT IPOPT_RESERVED1
IP option 'reserved1'.
CONSTANT IPOPT_DEBMEAS
IP option 'debmeas'
CONSTANT IPOPT_RESERVED2
IP option 'reserved2'
CONSTANT IPOPT_EOL
IP option 'timestamp'.
CONSTANT IPOPT_SECURITY
IP
CONSTANT
IPOPT_SATID
IP option 'Traceroute'.
CONSTANT IPOPT_OPTVAL
IP
IP
IP protocol numbers.
CONSTANT IPPROTO_ICMP
IP protocol numbers.
CONSTANT IPPROTO_ESP
IP
IP protocol numbers.
CONSTANT IPPROTO_OSPF
IP
IP
CONSTANT
IPPROTO_IPIP_ROUTING_CES_SRW
IP
IP
Network unreachable.
CONSTANT DEFAULT_INTERFACE
IP
IP
Structure for maintaining IP interface informations. This struct must be allocated by new, not MEM_malloc. All member variables MUST be initialized in the constructor.
STRUCT ip_frag_data
IP
QualNet typedefs struct ip_frag_data to IpFragData. is a simple queue to hold fragmented packets.
STRUCT Ipv6FragQueue
QualNet typedefs struct fragmeted_msg_struct to ip6q. struct fragmeted_msg_struct is a simple fragmented packets msg hold structure.
STRUCT NetworkDataIp;
Summary
IPOPT_COPIED(o)
IP option 'copied'.
MACRO IPOPT_CLASS(o)
IP option 'class'
MACRO IPOPT_NUMBER(o)
IP option 'number'
MACRO IpHeaderSize(ipHeader)
IP
Returns IP header ip_hl field * 4, which is the size of the IP header in bytes.
MACRO SetIpHeaderSize(IpHeader, Size)
IP
IP
unsigned char
To mask a ip address.
NodeAddress MaskIpAddressWithNumHostBits(NodeAddress address, int numHostBits)
To mask a ip address.
NodeAddress CalcBroadcastIpAddress(NodeAddress address, int numHostBits)
Searches the IP header for the option field with option code that matches optionKey, and returns a pointer to the option field header.
void NetworkIpPreInit(Node* node)
IP initialization required before any of the other layers are initialized. This is mainly for MAC initialization, which requires certain IP structures be pre-initialized.
void NetworkIpInit(Node* node, const NodeInput* nodeInput)
IP
Handle IP layer events, incoming messages and messages sent to itself (timers, etc.).
void NetworkIpFinalize(Node* node)
Finalize function for the IP model. Finalize functions for all network-layer IP protocols are called here.
void NetworkIpReceivePacketFromTransportLayer(Node* node, Message* msg, NodeAddress sourceAddress, NodeAddress destinationAddress, int outgoingInterface, TosType priority, unsigned char protocol, BOOL isEcnCapable)
Called by transport layer protocols (UDP, TCP) to send UDP datagrams and TCP segments using IP. Simply calls NetworkIpSendRawMessage().
void NetworkIpSendRawMessage(Node* node, Message* msg, NodeAddress sourceAddress, NodeAddress destinationAddress, int outgoingInterface, TosType priority, unsigned char protocol, unsigned ttl)
Called by NetworkIpReceivePacketFromTransportLayer() to send to send UDP datagrams, TCP segments using IP. Also called by network-layer routing protocols (AODV, OSPF, etc.) to send IP packets. This function adds an IP header and calls RoutePacketAndSendToMac().
void NetworkIpSendRawMessageWithDelay(Node* node, Message* msg, NodeAddress sourceAddress, NodeAddress destinationAddress, int outgoingInterface, TosType priority, unsigned char protocol, unsigned ttl, clocktype delay)
Called by network-layer routing protocols (AODV, OSPF, etc.) to add an IP header to payload data, and with the resulting IP packet, calls NetworkIpSendPacketOnInterface().
void NetworkIpSendRawMessageToMacLayerWithDelay(Node* node, Message* msg, NodeAddress sourceAddress, NodeAddress destinationAddress, TosType priority, unsigned char protocol, unsigned ttl, int interfaceIndex, NodeAddress nextHop, clocktype delay)
Same as NetworkIpSendRawMessageToMacLayer(), but schedules the event after a simulation delay by calling NetworkIpSendPacketOnInterfaceWithDelay().
void NetworkIpSendPacketToMacLayer(Node* node, Message* msg, int interfaceIndex, NodeAddress nextHop)
This function is called once the outgoing interface index and next hop address to which to route an IP packet are known.
void NetworkIpSendPacketOnInterface(Node* node, Message* msg, int incomingInterface, int outgoingInterface, NodeAddress nextHop)
IP
This function is called once the outgoing interface index and next hop address to which to route an IP packet are known. This queues an IP packet for delivery to the MAC layer. This functions calls QueueUpIpFragmentForMacLayer(). This function is used to initiate fragmentation if required, but since fragmentation has been disabled, all it does is assert false if the IP packet is too big before calling the next function.
void NetworkIpSendPacketToMacLayerWithDelay(Node* node, Message* msg, int interfaceIndex, NodeAddress nextHop, clocktype delay)
Same as NetworkIpSendPacketOnInterface(), but schedules event after a simulation delay and denotes raw packet.
void NetworkIpSendPacketToMacLayerWithNewStrictSourceRoute(Node* node, Message* msg, NodeAddress[] newRouteAddresses, int numNewRouteAddresses, BOOL removeExistingRecordedRoute)
Tacks on a new source route to an existing IP packet and then sends the packet to the MAC layer.
void NetworkIpReceivePacketFromMacLayer(Node* node, Message* msg, NodeAddress previousHopNodeId, int interfaceIndex)
IP received IP packet from MAC layer. Updates the Stats database and then calls NetworkIpReceivePacket.
void NetworkIpReceivePacket(Node* node, Message* msg, NodeAddress previousHopNodeId, int interfaceIndex)
IP received IP packet. Determine whether the packet is to be delivered to this node, or needs to be forwarded. ipHeader->ip_ttl is decremented here, instead of the way BSD TCP/IP does it, which is to decrement TTL right before forwarding the packet. QualNet's alternative method suits its network-layer ad hoc routing protocols, which may do their own forwarding.
void NetworkIpNotificationOfPacketDrop(Node* node, Message* msg, NodeAddress nextHopNodeAddres, int interfaceIndex)
IP
Allows the MAC layer to send status messages (e.g., packet drop, link failure) to a network-layer routing protocol for routing optimization.
void NetworkIpSneakPeekAtMacPacket(Node* node, const Message* msg, int interfaceIndex, NodeAddress prevHop)
Called Directly by the MAC layer, this allows a routing protocol to "sneak a peek" or "tap" messages it would not normally see from the MAC layer. This function will possibly unfragment such packets and call the function registered by the routing protocol to do the "Peek".
PromiscuousMessagePeekFunctionType NetworkIpGetPromiscuousMessagePeekFunction(Node* node, int interfaceIndex)
Returns the network-layer function which will promiscuously inspect packets. See NetworkIpSneakPeekAtMacPacket().
void NetworkIpSetPromiscuousMessagePeekFunction(Node* node, PromiscuousMessagePeekFunctionType PeekFunctionPtr, int interfaceIndex)
Sets the network-layer function which will promiscuously inspect packets. See NetworkIpSneakPeekAtMacPacket().
void NetworkIpReceiveMacAck(Node* node, int interfaceIndex, const Message* msg, NodeAddress nextHop)
Sends a UDP packet to UDP in the transport layer. The source IP address, destination IP address, and priority of the packet are also sent.
void SendToTcp(Node* node, Message* msg, TosType priority, NodeAddress sourceAddress, NodeAddress destinationAddress, BOOL aCongestionExperienced)
Sends a TCP packet to TCP in the transport layer. The source IP address, destination IP address, and priority of the packet are also sent..
void SendToRsvp(Node* node, Message* msg, TosType priority, NodeAddress sourceAddress, NodeAddress destinationAddress, int interfaceIndex, unsigned ttl)
Sends a RSVP packet to RSVP in the transport layer. The source IP address, destination IP address, and priority of the packet are
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
also sent.
void NetworkIpRemoveIpHeader(Node* node, Message* msg, NodeAddress* sourceAddress, NodeAddress* destinationAddress, TosType* priority, unsigned char* protocol, unsigned* ttl)
Removes the IP header from a message while also returning all the fields of the header.
void AddIpOptionField(Node* node, Message* msg, int optionCode, int optionSize)
Retrieves a copy of the source and recorded route from the options field in the header.
RouterFunctionType NetworkIpGetRouterFunction(Node* node, int interfaceIndex)
Allows a routing protocol to set the "routing function" (one of its functions) which is called when a packet needs to be routed. NetworkIpSetRouterFunction() allows a routing protocol to define the routing function. The routing function is called by the network layer to ask the routing protocol to route the packet. The routing function is given the packet and its destination. The routing protocol can route the packet and set "PacketWasRouted" to TRUE; or not route the packet and set to FALSE. If the packet, was not routed, then the network layer will try to use the forwarding table or the source route the source route in the IP header. This function will also be given packets for the local node the routing protocols can look at packets for protocol reasons. In this case, the message should not be modified and PacketWasRouted must be set to FALSE.
void NetworkIpAddUnicastRoutingProtocolType(Node* node, NetworkRoutingProtocolType routingProtocolType, int interfaceIndex)
Get routing protocol structure associated with routing protocol running on this interface.
NetworkRoutingProtocolType NetworkIpGetUnicastRoutingProtocolType(Node* node, int interfaceIndex)
IP
NetworkIpSetHsrpOnInterface
Initialize the scheduler parameters and also allocate memory for queues if require.
void NetworkIpSchedulerInit(Node* node, const NodeInput* nodeInput, int interfaceIndex, Scheduler* schedulerPtr, const char* schedulerTypeString)
Calls the cpu packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IP address. The packet's priority value is also returned.
void NetworkIpInputQueueInsert(Node* node, int incomingInterface, Message* msg, NodeAddress nextHopAddress, NodeAddress destinationAddress, int outgoingInterface, int networkType, BOOL* queueIsFull)
IP
Calls input packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IP address. The packet's priority value is also returned.
void NetworkIpOutputQueueInsert(Node* node, int interfaceIndex, Message* msg, NodeAddress nextHopAddress, NodeAddress destinationAddress, int networkType, BOOL* queueIsFull)
Calls output packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IP address. The packet's priority value is also returned. Called by QueueUpIpFragmentForMacLayer().
BOOL NetworkIpInputQueueDequeuePacket(Node* node, int incomingInterface, Message** msg, NodeAddress* nextHopAddress, int* outgoingInterface, int* networkType, QueuePriorityType* priority)
Calls the packet scheduler for an interface to retrieve an IP packet from the input queue associated with the interface.
BOOL NetworkIpOutputQueueDequeuePacket(Node* node, int interfaceIndex, Message** msg, NodeAddress* nextHopAddress, int* networkType, QueuePriorityType* priority)
Calls the packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IP address. The packet's priority value is also returned. This function is called by MAC_OutputQueueDequeuePacket() (mac/mac.pc), which itself is called from mac/mac_802_11.pc and other MAC protocol source files. This function will assert false if the scheduler cannot return an IP packet for whatever reason.
BOOL NetworkIpOutputQueueDequeuePacketForAPriority(Node* node, int interfaceIndex, QueuePriorityType priority, Message** msg, NodeAddress* nextHopAddress, int* networkType, int posInQueue)
Same as NetworkIpOutputQueueDequeuePacket(), except the packet dequeued is requested by a specific priority, instead of leaving the priority decision up to the packet scheduler. This function is called by MAC_OutputQueueDequeuePacketForAPriority() (mac/mac.pc), which itself is called from mac/mac_802_11.pc and other MAC protocol source files. This function will assert false if the scheduler cannot return an IP packet for whatever reason.
BOOL NetworkIpOutputQueueDequeuePacketWithIndex(Node* node, int interfaceIndex, int msgIndex, Message** msg, NodeAddress* nextHopAddress, int* networkType)
Same as NetworkIpOutputQueueDequeuePacket(), except the packet dequeued is requested by a specific index This function is called by MAC_OutputQueueDequeuePacketForAPriority() (mac/mac.pc), which itself is called from mac/mac_802_11.pc and other MAC protocol source files. This function will assert false if the scheduler cannot return an IP packet for whatever reason.
BOOL NetworkIpInputQueueTopPacket(Node* node, int incomingInterface, Message** msg, NodeAddress* nextHopAddress, int* outgoingInterface, int* networkType, QueuePriorityType* priority)
Same as NetworkIpInputQueueDequeuePacket(), except the packet is not actually dequeued. Note that the message containing the packet is not copied; the contents may (inadvertently or not) be directly modified.
BOOL NetworkIpOutputQueueTopPacket(Node* node, int interfaceIndex, Message** msg, NodeAddress* nextHopAddress, int* networkType, QueuePriorityType* priority)
Same as NetworkIpOutputQueueDequeuePacket(), except the packet is not actually dequeued. Note that the message containing the
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
packet is not copied; the contents may (inadvertently or not) be directly modified. This function is called by MAC_OutputQueueTopPacket() (mac/mac.pc), which itself is called from mac/mac_802_11.pc and other MAC protocol source files. This function will assert false if the scheduler cannot return an IP packet for whatever reason.
BOOL NetworkIpOutputQueuePeekWithIndex(Node* node, int interfaceIndex, int msgIndex, Message** msg, NodeAddress* nextHopAddress, QueuePriorityType* priority)
Same as NetworkIpOutputQueueDequeuePacket(), except the packet is not actually dequeued. Note that the message containing the packet is not copied; the contents may (inadvertently or not) be directly modified. This function is called by MAC_OutputQueueTopPacket() (mac/mac.pc), which itself is called from mac/mac_802_11.pc and other MAC protocol source files. This function will assert false if the scheduler cannot return an IP packet for whatever reason.
BOOL NetworkIpOutputQueueTopPacketForAPriority(Node* node, int interfaceIndex, QueuePriorityType priority, Message** msg, NodeAddress* nextHopAddress, int posInQueue)
Same as NetworkIpOutputQueueDequeuePacketForAPriority(), except the packet is not actually dequeued. Note that the message containing the packet is not copied; the contents may (inadvertently or not) be directly modified. This function is called by MAC_OutputQueueTopPacketForAPriority() (mac/mac.pc), which itself is called from mac/mac_802_11.pc and other MAC protocol source files. This function will assert false if the scheduler cannot return an IP packet for whatever reason.
BOOL NetworkIpInputQueueIsEmpty(Node* node, int incomingInterface)
Calls the packet scheduler for an interface to determine whether the interface's input queue is empty
BOOL NetworkIpOutputQueueIsEmpty(Node* node, int interfaceIndex)
Calls the packet scheduler for an interface to determine whether the interface's output queue is empty.
int NetworkIpOutputQueueNumberInQueue(Node* node, int interfaceIndex, BOOL specificPriorityOnly, QueuePriorityType priority)
Calls the packet scheduler for an interface to determine how many packets are in a queue. There may be multiple queues on an interface, so the priority of the desired queue is also provided.
NodeAddress NetworkIpOutputQueueDropPacket(Node* node, int interfaceIndex, Message** msg)
Deletes all packets in the queue going (probably broken), to the specified next hop address. There is option to return all such packets back to the routing protocols. via the usual mechanism (callback).
unsigned GetQueueNumberFromPriority(TosType userTos, int numQueues)
Get queue number through which a given user priority will be forwarded.
QueuePriorityType ReturnPriorityForPHB(Node* node, TosType tos)
IP
Do a lookup on the routing table with a destination IP address to obtain a route (index of an outgoing interface and a next hop Ip address).
void NetworkGetInterfaceAndNextHopFromForwardingTable(Node* node, int currentInterface, NodeAddress destinationAddress, int* interfaceIndex, NodeAddress* nextHopAddress)
Do a lookup on the routing table with a destination IP address to obtain a route (index of an outgoing interface and a next hop Ip address).
void NetworkGetInterfaceAndNextHopFromForwardingTable(Node* node, NodeAddress destinationAddress, int* interfaceIndex, NodeAddress* nextHopAddress, BOOL testType, NetworkRoutingProtocolType type)
Do a lookup on the routing table with a destination IP address to obtain a route (index of an outgoing interface and a next hop Ip address).
void NetworkGetInterfaceAndNextHopFromForwardingTable(Node* node, int operatingInterface, NodeAddress destinationAddress, int* interfaceIndex, NodeAddress* nextHopAddress, BOOL testType, NetworkRoutingProtocolType type)
Do a lookup on the routing table with a destination IP address to obtain a route (index of an outgoing interface and a next hop Ip address).
int NetworkIpGetInterfaceIndexForNextHop(Node* node, NodeAddress nextHopAddress)
This function looks at the network address of each of a node's network interfaces. When nextHopAddress is matched to a network, the interface index corresponding to the network is returned. (used by NetworkUpdateForwardingTable() and ospfv2.pc)
int NetworkGetInterfaceIndexForDestAddress(Node* node, NodeAddress destAddress)
Get the administrative distance of a routing protocol. These values don't quite match those recommended by Cisco.
void NetworkInitForwardingTable(Node* node)
Initialize the IP fowarding table, allocate enough memory for number of rows.
void NetworkUpdateForwardingTable(Node* node, NodeAddress destAddress, NodeAddress destAddressMask, NodeAddress nextHopAddress, int outgoingInterfaceIndex, int cost, NetworkRoutingProtocolType type)
IP
Update or add entry to IP routing table. Search the routing table for an entry with an exact match for destAddress, destAddressMask, and routing protocol. Update this entry with the specified nextHopAddress (the outgoing interface is automatically determined from the nextHopAddress -- see code). If no matching entry found, then add a new route.
void NetworkRemoveForwardingTableEntry(Node* node, NodeAddress destAddress, NodeAddress destAddressMask, NodeAddress nextHopAddress, int outgoingInterfaceIndex)
Get the cost metric for a destination from the forwarding table.
void NetworkIpSetRouteUpdateEventFunction(Node* node, NetworkRouteUpdateEventType routeUpdateFunctionPtr)
IP
IP
Assign multicast routing protocol structure and router function to an interface. We are only allocating the multicast routing protocol structure and router function once by using pointers to the original structures.
void NetworkIpUpdateUnicastRoutingProtocolAndRouterFunction(Node* node, NetworkRoutingProtocolType routingProtocolType, int interfaceIndex)
IP
Assign unicast routing protocol structure and router function to an interface. We are only allocating the unicast routing protocol structure and router function once by using pointers to the original structures.
int NetworkIpGetInterfaceIndexFromAddress(Node* node, NodeAddress address)
initialize the multicast fowarding table, allocate enough memory for number of rows, used by ip
void NetworkEmptyMulticastForwardingTable(Node* node)
empty out all the entries in the multicast forwarding table. basically set the size of table back to 0.
LinkedList* NetworkGetOutgoingInterfaceFromMulticastForwardingTable(Node* node, NodeAddress sourceAddress, NodeAddress groupAddress)
get the interface Id node that lead to the (source, multicast group) pair.
void NetworkUpdateMulticastForwardingTable(Node* node, NodeAddress sourceAddress, NodeAddress multicastGroupAddress, int interfaceIndex)
update entry with(sourceAddress,multicastGroupAddress) pair. search for the row with(sourceAddress,multicastGroupAddress) and update its interface.
void NetworkPrintMulticastForwardingTable(Node* node)
IP
Tries to route and send the packet using the node's forwarding table.
int GetNetworkIPFragUnit(Node* node, int interfaceIndex)
Tries to route the multicast packet using the multicast forwarding table.
int NETWORKIpRoutingInit(Node * node, const NodeInput *nodeInput nodeInput)
IP
Searches the IP header for the Traceroute option field , and returns a pointer to traceroute header.
IP
Constant
IPVERSION4 4
Constant
Constant
Constant
Constant
Constant
Constant
Bits 6 and 7 in the IPv4 TOS octet are designated as the ECN field. Bit 6 is designated as the ECT bit. IPTOS_CE 0x01
Constant
Bits 6 and 7 in the IPv4 TOS octet are designated as the ECN field. Bit 7 is designated as the CE bit. IPTOS_DSCP_MAX 0x3f
Constant
Bits 0 to 5 in the IPv4 TOS octet are designated as DSCP field.The range for this 6-bit field is < 0 - 63 >. IPTOS_DSCP_MIN 0x00
Constant
Bits 0 to 5 in the IPv4 TOS octet are designated as DSCP field.The range for this 6-bit field is < 0 - 63 >. IPTOS_PREC_EFINTERNETCONTROL 0xb8
Constant
IP
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IP precedence 'internet control'with the 'minimize delay' bit set IPTOS_PREC_CRITIC_ECP_MIN_DELAY_SET 0xb0
Constant
IP precedence 'critic ecp'with the 'minimize delay' bit set IPOPT_CONTROL 0x00
IP
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IP
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IP
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IP
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IP
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IP
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IP
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IP
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IP
Constant
Constant
IP protocol numbers for Internet gateway for emulated nodes IPPROTO_EXATA_VIRTUAL_LAN 241
Constant
IP protocol numbers for Internet gateway for emulated nodes IPPROTO_NDP 255
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IP
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Enumeration
Structure
IP
Structure
Structure
Structure
Structure
Structure
Structure
Structure
Structure
Structure
Structure
Structure
IP
Structure
Structure
Structure
Structure
Structure
Structure for maintaining IP interface informations. This struct must be allocated by new, not MEM_malloc. All member variables MUST be initialized in the constructor. ip_frag_data
Structure
QualNet typedefs struct ip_frag_data to IpFragData. is a simple queue to hold fragmented packets. Ipv6FragQueue
Structure
Structure
QualNet typedefs struct fragmeted_msg_struct to ip6q. struct fragmeted_msg_struct is a simple fragmented packets msg hold structure. NetworkDataIp;
Structure
Structure
IP
Structure
IPOPT_CLASS(o)
IP option 'class'
IPOPT_NUMBER(o)
IP option 'number'
IpHeaderSize(ipHeader)
Returns IP header ip_hl field * 4, which is the size of the IP header in bytes.
SetIpHeaderSize(IpHeader, Size)
FragmentOffset(ipHeader)
SetFragmentOffset(ipHeader, offset)
IpHeaderSetVersion()
ip_v_hl_tos_len version
Returns:
void
- None
IpHeaderSetHLen()
ip_v_hl_tos_len
IP
hlen
Returns:
void
- None
IpHeaderSetTOS()
ip_v_hl_tos_len ipTos
Returns:
void
- None
IpHeaderSetIpLength()
ip_v_hl_tos_len ipLen
Returns:
void
- None
IpHeaderSetIpFragOffset()
ipFragment offset
Returns:
void
- None
IpHeaderSetIpReserved()
ipFragment ipReserved
- The variable containing the value of - Input value for set operation
Returns:
void
- None
IP
IpHeaderSetIpDontFrag()
ipFragment dontFrag
Returns:
void
- None
IpHeaderSetIpMoreFrag()
ipFragment moreFrag
Returns:
void
- None
IpHeaderGetVersion()
ip_v_hl_tos_len
Returns:
unsigned int
- None
IpHeaderGetHLen()
ip_v_hl_tos_len
Returns:
unsigned int
- None
IpHeaderGetTOS()
ip_v_hl_tos_len
Returns:
unsigned int
- None
IpHeaderGetIpLength()
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
Returns:
unsigned int
- None
IpHeaderGetIpFragOffset()
ipFragment
Returns:
UInt16
- None
IpHeaderGetIpDontFrag()
ipFragment
Returns:
BOOL
- None
IpHeaderGetIpMoreFrag()
ipFragment
Returns:
BOOL
- None
IpHeaderGetIpReserved()
ipFragment
Returns:
BOOL
- None
Ip_timestampSetFlag()
flgOflw
IP
flag
Returns:
void
- None
Ip_timestampSetOvflw()
flgOflw ovflw
Returns:
void
- None
Ip_timestampGetFlag()
flgOflw
Returns:
unsigned char
- None
Ip_timestampGetOvflw()
flgOflw
Returns:
unsigned char
- None
ConvertNumHostBitsToSubnetMask
numHostBits
Returns:
NodeAddress
- subnetmask
ConvertSubnetMaskToNumHostBits
subnetMask
- subnetmask.
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
int
MaskIpAddress
To mask a ip address.
address mask
- address of a node
- mask of subnet.
Returns:
NodeAddress
MaskIpAddressWithNumHostBits
To mask a ip address.
address
numHostBits
Returns:
NodeAddress
CalcBroadcastIpAddress
address
numHostBits
Returns:
NodeAddress
- Broadcast address.
IsIpAddressInSubnet
address
subnetAddress numHostbits
Returns:
BOOL
NetworkIpAddHeader
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
NodeAddress destinationAddress, TosType priority, unsigned char protocol, unsigned ttl) Parameters: Add an IP packet header to a message. Just calls AddIpHeader.
node msg
- Pointer to node.
sourceAddress
Returns:
void
- None
FindAnIpOptionField
Searches the IP header for the option field with option code that matches optionKey, and returns a pointer to the option field header.
ipHeader
optionKey
Returns:
IpOptionsHeaderType* - to the header of the desired option field. NULL if no option fields, or the desired option field cannot be found.
NetworkIpPreInit
IP initialization required before any of the other layers are initialized. This is mainly for MAC initialization, which requires certain IP structures be pre-initialized.
node
- pointer to node.
Returns:
void
- None
NetworkIpInit
node
nodeInput
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
void
- None
NetworkIpLayer
Handle IP layer events, incoming messages and messages sent to itself (timers, etc.).
node msg
- Pointer to node.
- Pointer to message.
Returns:
void
- None
NetworkIpFinalize
Finalize function for the IP model. Finalize functions for all network-layer IP protocols are called here.
node
- Pointer to node.
Returns:
void
- None
NetworkIpReceivePacketFromTransportLayer
void NetworkIpReceivePacketFromTransportLayer (Node* node, Message* msg, NodeAddress sourceAddress, NodeAddress destinationAddress, int outgoingInterface, TosType priority, unsigned char protocol, BOOL isEcnCapable) Parameters:
node msg
Called by transport layer protocols (UDP, TCP) to send UDP datagrams and TCP segments using IP. Simply calls NetworkIpSendRawMessage().
- Pointer to node.
sourceAddress
isEcnCapable
Returns:
void
- None
NetworkIpSendRawMessage
void NetworkIpSendRawMessage (Node* node, Message* msg, NodeAddress sourceAddress, NodeAddress destinationAddress, int outgoingInterface, TosType priority, unsigned char protocol, unsigned ttl) Parameters:
IP
to send UDP datagrams, TCP segments using IP. Also called by network-layer routing protocols (AODV, OSPF, etc.) to send IP packets. This function adds an IP header and calls RoutePacketAndSendToMac().
node msg
- Pointer to node.
sourceAddress
- Time to live.
Returns:
void
- None
NetworkIpSendRawMessageWithDelay
void NetworkIpSendRawMessageWithDelay (Node* node, Message* msg, NodeAddress sourceAddress, NodeAddress destinationAddress, int outgoingInterface, TosType priority, unsigned char protocol, unsigned ttl, clocktype delay) Parameters:
node msg
- Pointer to node.
sourceAddress
delay
Returns:
void
- None
NetworkIpSendRawMessageToMacLayer
void NetworkIpSendRawMessageToMacLayer (Node* node, Message* msg, NodeAddress sourceAddress, NodeAddress destinationAddress, TosType priority, unsigned char protocol, unsigned ttl, int interfaceIndex, NodeAddress nextHop) Parameters:
Called by network-layer routing protocols (AODV, OSPF, etc.) to add an IP header to payload data, and with the resulting IP packet,
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
calls NetworkIpSendPacketOnInterface().
node msg
- Pointer to node.
sourceAddress
interfaceIndex nextHop
Returns:
void
- None
NetworkIpSendRawMessageToMacLayerWithDelay
void NetworkIpSendRawMessageToMacLayerWithDelay (Node* node, Message* msg, NodeAddress sourceAddress, NodeAddress destinationAddress, TosType priority, unsigned char protocol, unsigned ttl, int interfaceIndex, NodeAddress nextHop, clocktype delay) Parameters:
node msg
Same as NetworkIpSendRawMessageToMacLayer(), but schedules the event after a simulation delay by calling NetworkIpSendPacketOnInterfaceWithDelay().
- Pointer to node.
sourceAddress
- delay.
Returns:
void
- None
NetworkIpSendPacketToMacLayer
void NetworkIpSendPacketToMacLayer (Node* node, Message* msg, int interfaceIndex, NodeAddress nextHop)
IP
Parameters: This function is called once the outgoing interface index and next hop address to which to route an IP packet are known.
node msg
- Pointer to node.
interfaceIndex nextHop
Returns:
void
- None
NetworkIpSendPacketOnInterface
void NetworkIpSendPacketOnInterface (Node* node, Message* msg, int incomingInterface, int outgoingInterface, NodeAddress nextHop) Parameters:
This function is called once the outgoing interface index and next hop address to which to route an IP packet are known. This queues an IP packet for delivery to the MAC layer. This functions calls QueueUpIpFragmentForMacLayer(). This function is used to initiate fragmentation if required, but since fragmentation has been disabled, all it does is assert false if the IP packet is too big before calling the next function.
node msg
- Pointer to node.
- Pointer to message with ip packet. - Index of incoming interface. - Index of outgoing interface.
Returns:
void
- None
NetworkIpSendPacketToMacLayerWithDelay
void NetworkIpSendPacketToMacLayerWithDelay (Node* node, Message* msg, int interfaceIndex, NodeAddress nextHop, clocktype delay) Parameters:
node msg
- Pointer to node.
- delay
Returns:
void
- None
NetworkIpSendPacketOnInterfaceWithDelay
void NetworkIpSendPacketOnInterfaceWithDelay (Node* node, Message* msg, int incommingInterface, int outgoingInterface, NodeAddress nextHop, clocktype delay)
IP
- Pointer to node.
- delay
Returns:
void
- None
NetworkIpSendRawPacketOnInterfaceWithDelay
void NetworkIpSendRawPacketOnInterfaceWithDelay (Node* node, Message* msg, int incommingInterface, int outgoingInterface, NodeAddress nextHop, clocktype delay) Parameters:
Same as NetworkIpSendPacketOnInterface(), but schedules event after a simulation delay and denotes raw packet.
node msg
- Pointer to node.
- delay
Returns:
void
- None
NetworkIpSendPacketToMacLayerWithNewStrictSourceRoute
void NetworkIpSendPacketToMacLayerWithNewStrictSourceRoute (Node* node, Message* msg, NodeAddress[] newRouteAddresses, int numNewRouteAddresses, BOOL removeExistingRecordedRoute) Parameters:
Tacks on a new source route to an existing IP packet and then sends the packet to the MAC layer.
node msg
- Pointer to node.
- Pointer to message with ip packet. - Source route (address array). - Number of array elements. - Flag to indicate previous record
newRouteAddresses
numNewRouteAddresses
removeExistingRecordedRoute
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
void
- None
NetworkIpReceivePacketFromMacLayer
void NetworkIpReceivePacketFromMacLayer (Node* node, Message* msg, NodeAddress previousHopNodeId, int interfaceIndex) Parameters:
IP received IP packet from MAC layer. Updates the Stats database and then calls NetworkIpReceivePacket.
node msg
- Pointer to node.
previousHopNodeId interfaceIndex
Returns:
void
- None
NetworkIpReceivePacket
void NetworkIpReceivePacket (Node* node, Message* msg, NodeAddress previousHopNodeId, int interfaceIndex) Parameters:
IP received IP packet. Determine whether the packet is to be delivered to this node, or needs to be forwarded. ipHeader->ip_ttl is decremented here, instead of the way BSD TCP/IP does it, which is to decrement TTL right before forwarding the packet. QualNet's alternative method suits its network-layer ad hoc routing protocols, which may do their own forwarding.
node msg
- Pointer to node.
previousHopNodeId interfaceIndex
Returns:
void
- None
NetworkIpNotificationOfPacketDrop
void NetworkIpNotificationOfPacketDrop (Node* node, Message* msg, NodeAddress nextHopNodeAddres, int interfaceIndex) Parameters:
- Pointer to node.
nextHopNodeAddres interfaceIndex
Returns:
void
- None
NetworkIpGetMacLayerStatusEventHandlerFunction
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
MacLayerStatusEventHandlerFunctionType NetworkIpGetMacLayerStatusEventHandlerFunction
IP
(Node* node, int interfaceIndex) Parameters: Get the status event handler function pointer.
node
interfaceIndex
Returns:
MacLayerStatusEventHandlerFunctionType
NetworkIpSetMacLayerStatusEventHandlerFunction
Allows the MAC layer to send status messages (e.g., packet drop, link failure) to a network-layer routing protocol for routing optimization.
node
StatusEventHandlerPtr interfaceIndex
Returns:
void
- None
NetworkIpSneakPeekAtMacPacket
void NetworkIpSneakPeekAtMacPacket (Node* node, const Message* msg, int interfaceIndex, NodeAddress prevHop) Parameters:
Called Directly by the MAC layer, this allows a routing protocol to "sneak a peek" or "tap" messages it would not normally see from the MAC layer. This function will possibly unfragment such packets and call the function registered by the routing protocol to do the "Peek".
node msg
- Pointer to node.
- The message being peeked at from the - The interface of which the "peeked" message belongs to.
interfaceIndex prevHop
Returns:
void
- None
NetworkIpGetPromiscuousMessagePeekFunction
Returns the network-layer function which will promiscuously inspect packets. See NetworkIpSneakPeekAtMacPacket().
node
interfaceIndex
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
PromiscuousMessagePeekFunctionType
- Function pointer
NetworkIpSetPromiscuousMessagePeekFunction
Sets the network-layer function which will promiscuously inspect packets. See NetworkIpSneakPeekAtMacPacket().
node
PeekFunctionPtr interfaceIndex
Returns:
void
- None
NetworkIpReceiveMacAck
void NetworkIpReceiveMacAck (Node* node, int interfaceIndex, const Message* msg, NodeAddress nextHop) Parameters:
interfaceIndex msg
- Message that was ACKed. - Next hop that sent the MAC layer ACK
nextHop
Returns:
void
- None
NetworkIpGetMacLayerAckHandler
node
interfaceIndex
Returns:
MacLayerAckHandlerType
NetworkIpSetMacLayerAckHandler
macAckHandlerPtr
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
interfaceIndex
Returns:
void
- None
SendToUdp
void SendToUdp (Node* node, Message* msg, TosType priority, NodeAddress sourceAddress, NodeAddress destinationAddress, int incomingInterfaceIndex) Parameters:
Sends a UDP packet to UDP in the transport layer. The source IP address, destination IP address, and priority of the packet are also sent.
node msg
- Pointer to node.
- Pointer to message with UDP packet. - TOS of UDP packet. - Source IP address. - Destination IP address. - interface that received the packet
priority
sourceAddress
destinationAddress
incomingInterfaceIndex
Returns:
void
- None
SendToTcp
void SendToTcp (Node* node, Message* msg, TosType priority, NodeAddress sourceAddress, NodeAddress destinationAddress, BOOL aCongestionExperienced) Parameters:
Sends a TCP packet to TCP in the transport layer. The source IP address, destination IP address, and priority of the packet are also sent..
node msg
- Pointer to node.
- Pointer to message with TCP packet. - TOS of TCP packet. - Source IP address. - Destination IP address. - Determine if congestion is
priority
sourceAddress
destinationAddress
aCongestionExperienced
Returns:
void
- None
SendToRsvp
void SendToRsvp (Node* node, Message* msg, TosType priority, NodeAddress sourceAddress, NodeAddress destinationAddress, int interfaceIndex, unsigned ttl) Parameters:
Sends a RSVP packet to RSVP in the transport layer. The source IP address, destination IP address, and priority of the packet are also sent.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
node
- Pointer to node.
IP
msg
- Pointer to message with RSVP packet. - TOS of UDP packet. - Source IP address. - Destination IP address.
priority
sourceAddress
- Receiving TTL
Returns:
void
- None
NetworkIpRemoveIpHeader
void NetworkIpRemoveIpHeader (Node* node, Message* msg, NodeAddress* sourceAddress, NodeAddress* destinationAddress, TosType* priority, unsigned char* protocol, unsigned* ttl) Parameters:
Removes the IP header from a message while also returning all the fields of the header.
node msg
- Pointer to node.
sourceAddress
Returns:
void
- None
AddIpOptionField
void AddIpOptionField (Node* node, Message* msg, int optionCode, int optionSize) Parameters:
node msg
- Pointer to node.
optionCode optionSize
Returns:
void
- None
IP
ExtractIpSourceAndRecordedRoute
void ExtractIpSourceAndRecordedRoute (Message* msg, NodeAddress[] RouteAddresses, int* NumAddresses, int* RouteAddressIndex) Parameters:
Retrieves a copy of the source and recorded route from the options field in the header.
msg
RouteAddresses NumAddresses
- Storage for size of RouteAddresses[] array. - The index of the first address of the
RouteAddressIndex
Returns:
void
- None
NetworkIpGetRouterFunction
node
interfaceIndex
Returns:
RouterFunctionType
NetworkIpSetRouterFunction
Allows a routing protocol to set the "routing function" (one of its functions) which is called when a packet needs to be routed. NetworkIpSetRouterFunction() allows a routing protocol to define the routing function. The routing function is called by the network layer to ask the routing protocol to route the packet. The routing function is given the packet and its destination. The routing protocol can route the packet and set "PacketWasRouted" to TRUE; or not route the packet and set to FALSE. If the packet, was not routed, then the network layer will try to use the forwarding table or the source route the source route in the IP header. This function will also be given packets for the local node the routing protocols can look at packets for protocol reasons. In this case, the message should not be modified and PacketWasRouted must be set to FALSE. NetworkIpAddUnicastRoutingProtocolType
node
RouterFunctionPtr interfaceIndex
Returns:
void
- None
- Pointer to node.
IP
routingProtocolType interfaceIndex
Returns:
void
- None
NetworkIpAddUnicastIntraRegionRoutingProtocolType
routingProtocolType interfaceIndex
Returns:
void
- None
NetworkIpGetRoutingProtocol
Get routing protocol structure associated with routing protocol running on this interface.
node
routingProtocolType
Returns:
void*
NetworkIpGetUnicastRoutingProtocolType
interfaceIndex
Returns:
NetworkRoutingProtocolType
NetworkIpSetHsrpOnInterface
node
interfaceIndex
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
Returns:
void
- None
NetworkIpIsHsrpEnabled
node
interfaceIndex
Returns:
BOOL
- return TRUE if any one interface is hsrp enabled else return FALSE.
NetworkIpAddNewInterface
void NetworkIpAddNewInterface (Node* node, NodeAddress interfaceIpAddress, int numHostBits, int* newInterfaceIndex, const NodeInput* nodeInput) Parameters:
interfaceIpAddress numHostBits
- Number of host bits for the interface. - The interface number of the new interface.
newInterfaceIndex nodeInput
- Provides access to
Returns:
void
- None
NetworkIpInitCpuQueueConfiguration
node
nodeInput
Returns:
void
- None
NetworkIpInitInputQueueConfiguration
void NetworkIpInitInputQueueConfiguration (Node* node, const NodeInput* nodeInput, int interfaceIndex) Parameters:
- Pointer to node.
IP
nodeInput
interfaceIndex
Returns:
void
- None
NetworkIpInitOutputQueueConfiguration
void NetworkIpInitOutputQueueConfiguration (Node* node, const NodeInput* nodeInput, int interfaceIndex) Parameters:
nodeInput
interfaceIndex
Returns:
void
- None
NetworkIpCreateQueues
void NetworkIpCreateQueues (Node* node, const NodeInput* nodeInput, int interfaceIndex) Parameters:
node
nodeInput
interfaceIndex
Returns:
void
- None
NetworkIpSchedulerParameterInit
void NetworkIpSchedulerParameterInit (Scheduler* schedulerPtr, const int numPriorities, Queue* queue) Parameters:
Initialize the scheduler parameters and also allocate memory for queues if require.
schedulerPtr
numPriorities queue
- pointer to ip queue.
Returns:
void
- None
NetworkIpSchedulerInit
void NetworkIpSchedulerInit (Node* node, const NodeInput* nodeInput, int interfaceIndex, Scheduler* schedulerPtr, const char* schedulerTypeString) Parameters:
IP
nodeInput
interfaceIndex schedulerPtr
schedulerTypeString
Returns:
void
- None
NetworkIpCpuQueueInsert
void NetworkIpCpuQueueInsert (Node* node, Message* msg, NodeAddress nextHopAddress, NodeAddress destinationAddress, int outgoingInterface, int networkType, BOOL* queueIsFull, int incomingInterface) Parameters:
node msg
Calls the cpu packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IP address. The packet's priority value is also returned.
- Pointer to node.
- Pointer to message with IP packet. - Packet's next hop address. - Packet's destination address.
nextHopAddress
- Type of network packet is using (IP, - Storage for boolean indicator. - Incoming interface of packet.
incomingInterface
Returns:
void
- None
NetworkIpInputQueueInsert
void NetworkIpInputQueueInsert (Node* node, int incomingInterface, Message* msg, NodeAddress nextHopAddress, NodeAddress destinationAddress, int outgoingInterface, int networkType, BOOL* queueIsFull) Parameters:
node
Calls input packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IP address. The packet's priority value is also returned.
incomingInterface msg
nextHopAddress
IP
Returns:
void
- None
NetworkIpOutputQueueInsert
void NetworkIpOutputQueueInsert (Node* node, int interfaceIndex, Message* msg, NodeAddress nextHopAddress, NodeAddress destinationAddress, int networkType, BOOL* queueIsFull) Parameters:
Calls output packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IP address. The packet's priority value is also returned. Called by QueueUpIpFragmentForMacLayer().
node
interfaceIndex msg
- Pointer to message with IP packet. - Packet's next hop address. - Packet's destination address.
nextHopAddress
Returns:
void
- None
NetworkIpInputQueueDequeuePacket
BOOL NetworkIpInputQueueDequeuePacket (Node* node, int incomingInterface, Message** msg, NodeAddress* nextHopAddress, int* outgoingInterface, int* networkType, QueuePriorityType* priority) Parameters:
Calls the packet scheduler for an interface to retrieve an IP packet from the input queue associated with the interface.
node
incomingInterface msg
- Storage for pointer to message - Storage for Packet's - Used to determine where packet
nextHopAddress
- Storage for
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
BOOL
NetworkIpOutputQueueDequeuePacket
BOOL NetworkIpOutputQueueDequeuePacket (Node* node, int interfaceIndex, Message** msg, NodeAddress* nextHopAddress, int* networkType, QueuePriorityType* priority) Parameters:
Calls the packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IP address. The packet's priority value is also returned. This function is called by MAC_OutputQueueDequeuePacket() (mac/mac.pc), which itself is called from mac/mac_802_11.pc and other MAC protocol source files. This function will assert false if the scheduler cannot return an IP packet for whatever reason.
node
interfaceIndex msg
- Storage for pointer to message - Storage for Packet's next hop address.
Returns:
BOOL
NetworkIpOutputQueueDequeuePacketForAPriority
BOOL NetworkIpOutputQueueDequeuePacketForAPriority (Node* node, int interfaceIndex, QueuePriorityType priority, Message** msg, NodeAddress* nextHopAddress, int* networkType, int posInQueue) Parameters:
node
Same as NetworkIpOutputQueueDequeuePacket(), except the packet dequeued is requested by a specific priority, instead of leaving the priority decision up to the packet scheduler. This function is called by MAC_OutputQueueDequeuePacketForAPriority() (mac/mac.pc), which itself is called from mac/mac_802_11.pc and other MAC protocol source files. This function will assert false if the scheduler cannot return an IP packet for whatever reason.
- priority of packet.
- Storage for pointer to message - Storage for Packet's next hop address.
Returns:
BOOL
NetworkIpOutputQueueDequeuePacketWithIndex
BOOL NetworkIpOutputQueueDequeuePacketWithIndex (Node* node, int interfaceIndex, int msgIndex, Message** msg, NodeAddress* nextHopAddress, int* networkType) Parameters:
Same as NetworkIpOutputQueueDequeuePacket(), except the packet dequeued is requested by a specific index This function is called by MAC_OutputQueueDequeuePacketForAPriority()
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
node
- Pointer to node.
IP
(mac/mac.pc), which itself is called from mac/mac_802_11.pc and other MAC protocol source files. This function will assert false if the scheduler cannot return an IP packet for whatever reason.
- index to interface .
- index of packet.
- Storage for pointer to message - Storage for Packet's next hop address.
nextHopAddress networkType
Returns:
BOOL
NetworkIpInputQueueTopPacket
BOOL NetworkIpInputQueueTopPacket (Node* node, int incomingInterface, Message** msg, NodeAddress* nextHopAddress, int* outgoingInterface, int* networkType, QueuePriorityType* priority) Parameters:
Same as NetworkIpInputQueueDequeuePacket(), except the packet is not actually dequeued. Note that the message containing the packet is not copied; the contents may (inadvertently or not) be directly modified.
node
incomingInterface msg
- Storage for pointer to message - Storage for Packet's next hop addr. - Used to determine where packet should go
nextHopAddress
Returns:
BOOL
NetworkIpOutputQueueTopPacket
BOOL NetworkIpOutputQueueTopPacket (Node* node, int interfaceIndex, Message** msg, NodeAddress* nextHopAddress, int* networkType, QueuePriorityType* priority) Parameters:
Same as NetworkIpOutputQueueDequeuePacket(), except the packet is not actually dequeued. Note that the message containing the packet is not copied; the contents may (inadvertently or not) be directly modified. This function is called by MAC_OutputQueueTopPacket() (mac/mac.pc), which itself is called from mac/mac_802_11.pc and other MAC protocol source files. This function will assert false if the scheduler cannot return an IP packet for whatever reason.
node
interfaceIndex msg
- Storage for pointer to message - Storage for Packet's next hop addr.
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
BOOL
NetworkIpOutputQueuePeekWithIndex
BOOL NetworkIpOutputQueuePeekWithIndex (Node* node, int interfaceIndex, int msgIndex, Message** msg, NodeAddress* nextHopAddress, QueuePriorityType* priority) Parameters:
Same as NetworkIpOutputQueueDequeuePacket(), except the packet is not actually dequeued. Note that the message containing the packet is not copied; the contents may (inadvertently or not) be directly modified. This function is called by MAC_OutputQueueTopPacket() (mac/mac.pc), which itself is called from mac/mac_802_11.pc and other MAC protocol source files. This function will assert false if the scheduler cannot return an IP packet for whatever reason.
node
- index to message .
- Storage for pointer to message - Storage for Packet's next hop addr.
nextHopAddress priority
Returns:
BOOL
NetworkIpOutputQueueTopPacketForAPriority
BOOL NetworkIpOutputQueueTopPacketForAPriority (Node* node, int interfaceIndex, QueuePriorityType priority, Message** msg, NodeAddress* nextHopAddress, int posInQueue) Parameters:
Same as NetworkIpOutputQueueDequeuePacketForAPriority(), except the packet is not actually dequeued. Note that the message containing the packet is not copied; the contents may (inadvertently or not) be directly modified. This function is called by MAC_OutputQueueTopPacketForAPriority() (mac/mac.pc), which itself is called from mac/mac_802_11.pc and other MAC protocol source files. This function will assert false if the scheduler cannot return an IP packet for whatever reason.
node
- priority of packet
- Storage for pointer to message - Storage for packet's next hop address.
nextHopAddress posInQueue
Returns:
BOOL
NetworkIpInputQueueIsEmpty
Calls the packet scheduler for an interface to determine whether the interface's input queue is empty
node
incomingInterface
Returns:
BOOL
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
- TRUE if the scheduler says the interface's input queue is empty. FALSE if the scheduler says the interface's input queue is not empty. NetworkIpOutputQueueIsEmpty BOOL NetworkIpOutputQueueIsEmpty (Node* node, int interfaceIndex) Parameters: Calls the packet scheduler for an interface to determine whether the interface's output queue is empty.
node
interfaceIndex
Returns:
BOOL
- TRUE if the scheduler says the interface's output queue is empty. FALSE if the scheduler says the interface's output queue is not empty.
NetworkIpOutputQueueNumberInQueue
int NetworkIpOutputQueueNumberInQueue (Node* node, int interfaceIndex, BOOL specificPriorityOnly, QueuePriorityType priority) Parameters:
Calls the packet scheduler for an interface to determine how many packets are in a queue. There may be multiple queues on an interface, so the priority of the desired queue is also provided.
node
- Pointer to node. - Index of interface. - Should we only get the number of packets
interfaceIndex
specificPriorityOnly priority
- Priority of queue.
Returns:
int
NetworkIpOutputQueueDropPacket
node
interfaceIndex msg
Returns:
NodeAddress
NetworkIpDeleteOutboundPacketsToANode
void NetworkIpDeleteOutboundPacketsToANode (Node* node, const NodeAddress nextHopAddress, const NodeAddress destinationAddress, const BOOL returnPacketsToRoutingProtocol) Parameters:
Deletes all packets in the queue going (probably broken), to the specified next hop address. There is option to return all such packets back to the routing protocols. via the usual mechanism
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
node
nextHopAddress
IP
(callback).
destinationAddress
returnPacketsToRoutingProtocol
Returns:
void
- None
GetQueueNumberFromPriority
Get queue number through which a given user priority will be forwarded.
userTos
numQueues
Returns:
unsigned
ReturnPriorityForPHB
node tos
- Pointer to node.
- TOS field
Returns:
QueuePriorityType
- priority queue
NetworkGetInterfaceAndNextHopFromForwardingTable
void NetworkGetInterfaceAndNextHopFromForwardingTable (Node* node, NodeAddress destinationAddress, int* interfaceIndex, NodeAddress* nextHopAddress) Parameters:
Do a lookup on the routing table with a destination IP address to obtain a route (index of an outgoing interface and a next hop Ip address).
node
Returns:
void
- None
NetworkGetInterfaceAndNextHopFromForwardingTable
void NetworkGetInterfaceAndNextHopFromForwardingTable (Node* node, int currentInterface, NodeAddress destinationAddress, int* interfaceIndex, NodeAddress* nextHopAddress) Parameters:
IP
Do a lookup on the routing table with a destination IP address to obtain a route (index of an outgoing interface and a next hop Ip address).
node
currentInterface
Returns:
void
- None
NetworkGetInterfaceAndNextHopFromForwardingTable
void NetworkGetInterfaceAndNextHopFromForwardingTable (Node* node, NodeAddress destinationAddress, int* interfaceIndex, NodeAddress* nextHopAddress, BOOL testType, NetworkRoutingProtocolType type) Parameters:
node
Do a lookup on the routing table with a destination IP address to obtain a route (index of an outgoing interface and a next hop Ip address).
Returns:
void
- None
NetworkGetInterfaceAndNextHopFromForwardingTable
void NetworkGetInterfaceAndNextHopFromForwardingTable (Node* node, int operatingInterface, NodeAddress destinationAddress, int* interfaceIndex, NodeAddress* nextHopAddress, BOOL testType, NetworkRoutingProtocolType type) Parameters:
node
Do a lookup on the routing table with a destination IP address to obtain a route (index of an outgoing interface and a next hop Ip address).
IP
type
Returns:
void
- None
NetworkIpGetInterfaceIndexForNextHop
This function looks at the network address of each of a node's network interfaces. When nextHopAddress is matched to a network, the interface index corresponding to the network is returned. (used by NetworkUpdateForwardingTable() and ospfv2.pc)
node
nextHopAddress
Returns:
int
NetworkGetInterfaceIndexForDestAddress
node
destAddress
Returns:
int
NetworkRoutingGetAdminDistance
Get the administrative distance of a routing protocol. These values don't quite match those recommended by Cisco.
node type
Returns:
NetworkRoutingAdminDistanceType
NetworkInitForwardingTable
Initialize the IP fowarding table, allocate enough memory for number of rows.
node
- Pointer to node.
Returns:
void
- None
NetworkUpdateForwardingTable
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
NodeAddress destAddressMask, NodeAddress nextHopAddress, int outgoingInterfaceIndex, int cost, NetworkRoutingProtocolType type) Update or add entry to IP routing table. Search the routing table for an entry with an exact match for destAddress, destAddressMask, and routing protocol. Update this entry with the specified nextHopAddress (the outgoing interface is automatically determined from the nextHopAddress -- see code). If no matching entry found, then add a new route. Parameters:
node
destAddress
destAddressMask nextHopAddress
Returns:
void
- None
NetworkRemoveForwardingTableEntry
void NetworkRemoveForwardingTableEntry (Node* node, NodeAddress destAddress, NodeAddress destAddressMask, NodeAddress nextHopAddress, int outgoingInterfaceIndex) Parameters:
destAddress
destAddressMask nextHopAddress
outgoingInterfaceIndex
Returns:
void
- None
NetworkEmptyForwardingTable
node type
Returns:
void
- None
NetworkPrintForwardingTable
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
- Pointer to node.
Returns:
void
- None
NetworkGetMetricForDestAddress
Get the cost metric for a destination from the forwarding table.
node
destAddress
Returns:
int
NetworkIpSetRouteUpdateEventFunction
routeUpdateFunctionPtr
Returns:
void
- None
NetworkIpGetRouteUpdateEventFunction
node
- Pointer to node.
Returns:
NetworkRouteUpdateEventType
NetworkIpGetInterfaceAddress
node
interfaceIndex
Returns:
NodeAddress
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
NetworkIpGetInterfaceName
node
interfaceIndex
Returns:
char*
- interface name
NetworkIpGetInterfaceNetworkAddress
node
interfaceIndex
Returns:
NodeAddress
NetworkIpGetInterfaceSubnetMask
node
interfaceIndex
Returns:
NodeAddress
NetworkIpGetInterfaceNumHostBits
node
interfaceIndex
Returns:
int
NetworkIpGetInterfaceBroadcastAddress
node
IP
interfaceIndex
- Number of interface
Returns:
NodeAddress
IsOutgoingBroadcast
BOOL IsOutgoingBroadcast (Node* node, NodeAddress destAddress, int* outgoingInterface, NodeAddress* outgoingBroadcastAddress) Parameters:
- Pointer to the node - IP packet's destination IP address. - Outgoing interface index. - Broadcast address
destAddress
outgoingInterface
outgoingBroadcastAddress
Returns:
BOOL
NetworkIpIsMyIP
node
ipAddress
Returns:
BOOL
NetworkIpConfigurationError
node
parameterName
interfaceIndex
Returns:
void
- None
NetworkPrintIpHeader
msg
- Pointer to Message
IP
Returns:
void
- None
NetworkIpAddToMulticastGroupList
node
groupAddress
Returns:
void
- None
NetworkIpRemoveFromMulticastGroupList
node
groupAddress
Returns:
void
- None
NetworkIpPrintMulticastGroupList
node
Returns:
void
- None
NetworkIpIsPartOfMulticastGroup
node
groupAddress
Returns:
BOOL
- None
NetworkIpJoinMulticastGroup
node
IP
mcastAddr delay
Returns:
void
- None
NetworkIpJoinMulticastGroup
node
mcastAddr delay
Returns:
void
- None
NetworkIpLeaveMulticastGroup
node
mcastAddr delay
Returns:
void
- None
NetworkIpLeaveMulticastGroup
node
mcastAddr delay
Returns:
void
- None
NetworkIpSetMulticastTimer
void NetworkIpSetMulticastTimer (Node* node, long eventType, NodeAddress mcastAddr, clocktype delay) Parameters:
IP
Returns:
void
- None
NetworkIpSetMulticastRoutingProtocol
multicastRoutingProtocol interfaceIndex
- interface number
Returns:
void
- None
NetworkIpGetMulticastRoutingProtocol
routingProtocolType
Returns:
void *
- None
NetworkIpAddMulticastRoutingProtocolType
multicastProtocolType interfaceIndex
Returns:
void
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
- None
IP
NetworkIpSetMulticastRouterFunction
routerFunctionPtr interfaceIndex
Returns:
void
- None
NetworkIpGetMulticastRouterFunction
node
interfaceIndex
Returns:
MulticastRouterFunctionType
NetworkIpUpdateMulticastRoutingProtocolAndRouterFunction
Assign multicast routing protocol structure and router function to an interface. We are only allocating the multicast routing protocol structure and router function once by using pointers to the original structures.
node
routingProtocolType interfaceIndex
- interface index.
Returns:
void
- None
NetworkIpUpdateUnicastRoutingProtocolAndRouterFunction
Assign unicast routing protocol structure and router function to an interface. We are only allocating the unicast routing protocol structure and router function once by using pointers to the original structures.
node
routingProtocolType interfaceIndex
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
void
- None
NetworkIpGetInterfaceIndexFromAddress
node
address
Returns:
int
NetworkIpGetInterfaceIndexFromSubnetAddress
node
address
Returns:
int
NetworkIpIsMulticastAddress
node
address
Returns:
BOOL
NetworkInitMulticastForwardingTable
initialize the multicast fowarding table, allocate enough memory for number of rows, used by ip
node
- this node
Returns:
void
- None
NetworkEmptyMulticastForwardingTable
empty out all the entries in the multicast forwarding table. basically set the size of table back to 0.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
node
- this node
IP
Returns:
void
- None
NetworkGetOutgoingInterfaceFromMulticastForwardingTable
get the interface Id node that lead to the (source, multicast group) pair.
node
sourceAddress groupAddress
- multicast group
Returns:
LinkedList*
- interface Id from node to (source, multicast group), or NETWORK_UNREACHABLE (no such entry is found)
NetworkUpdateMulticastForwardingTable
void NetworkUpdateMulticastForwardingTable (Node* node, NodeAddress sourceAddress, NodeAddress multicastGroupAddress, int interfaceIndex) Parameters:
update entry with(sourceAddress,multicastGroupAddress) pair. search for the row with(sourceAddress,multicastGroupAddress) and update its interface.
node
sourceAddress
multicastGroupAddress interfaceIndex
Returns:
void
- None
NetworkPrintMulticastForwardingTable
node
- this node
Returns:
void
- None
NetworkPrintMulticastOutgoingInterface
node list
IP
Returns:
void
- None
NetworkInMulticastOutgoingInterface
node list
interfaceIndex
Returns:
BOOL
NetworkIpPrintTraceXML
node msg
- this node
Returns:
void
- None
RouteThePacketUsingLookupTable
Tries to route and send the packet using the node's forwarding table.
node msg
- this node
incomingInterface
Returns:
void
- NULL
GetNetworkIPFragUnit
node
interfaceIndex
Returns:
int
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
- None
IP
NetworkIpUserProtocolInit
void NetworkIpUserProtocolInit (Node* node, const NodeInput* nodeInput, const char* routingProtocolString, NetworkRoutingProtocolType* routingProtocolType, void** routingProtocolData) Parameters:
node
nodeInput
Returns:
void
- None
NetworkIpUserHandleProtocolEvent
node msg
Returns:
void
- None
NetworkIpUserHandleProtocolPacket
void NetworkIpUserHandleProtocolPacket (Node* node, Message* msg, unsigned char ipProtocol, NodeAddress sourceAddress, NodeAddress destinationAddress, int ttl) Parameters:
- this node
ipProtocol
sourceAddress
destinationAddress ttl
- time to live
Returns:
void
- None
NetworkIpUserProtocolFinalize
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
userProtocolNumber
Returns:
void
- None
Atm_RouteThePacketUsingLookupTable
void Atm_RouteThePacketUsingLookupTable (Node* node, NodeAddress* destAddr, int* outIntf, NodeAddress* nextHop) Parameters:
Returns:
void
- None
RouteThePacketUsingMulticastForwardingTable
Tries to route the multicast packet using the multicast forwarding table.
node msg
- this node
incomingInterface
Returns:
void
- NULL.
NETWORKIpRoutingInit
node
nodeInput
Returns:
int
- None
IP
NetworkIpGetBandwidth
node
interfaceIndex
Returns:
Int64
- inverted bandwidth ASSUMPTION : Bandwidth read from interface is in from of bps unit. To invert the bandwidth we use the equation 10000000 / bandwidth. Where bandwidth is in Kbps unit.
NetworkIpGetPropDelay
node
interfaceIndex
Returns:
clocktype
NetworkIpInterfaceIsEnabled
node
interfaceIndex
Returns:
BOOL
- None
NetworkIpIsWiredNetwork
node
interfaceIndex
Returns:
BOOL
- None
NetworkIpIsPointToPointNetwork
node
IP
interfaceIndex
- interface Index.
Returns:
BOOL
- None
IsIPV4MulticastEnabledOnInterface
node
interfaceIndex
Returns:
BOOL
- None
IsIPV4RoutingEnabledOnInterface
node
interfaceIndex
Returns:
BOOL
- None
NetworkIpGetNetworkProtocolType
node
nodeId
Returns:
NetworkProtocolType
- None
ResolveNetworkTypeFromSrcAndDestNodeId
sourceNodeId destNodeId
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IP.html[5/24/2011 12:34:46 PM]
IP
NetworkType
- None
NetworkIpIsWiredBroadcastNetwork
node
interfaceIndex
Returns:
BOOL
- None
FindTraceRouteOption
Searches the IP header for the Traceroute option field , and returns a pointer to traceroute header.
ipHeader
- Pointer to an IP header.
Returns:
ip_traceroute*
- pointer to the header of the traceroute option field. NULL if no option fields, or the desired option field cannot be found.
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
IPv6
IPv6
Data structures and parameters used in network layer are defined here. Constant / Data Structure Summary Type
CONSTANT
Name
MAX_KEY_LEN
IPv6
IPv6 anycast.
CONSTANT ND_DEFAULT_HOPLIM
IPv6
CONSTANT
IP_FRAGMENT_HOLD_TIME
IPv6
TTL decrement.
CONSTANT ENETUNREACH
Network unreachable.
CONSTANT EHOSTUNREACH
Host unreachable.
CONSTANT MAX_INITIAL_RTR_ADVERT_INTERVAL
reachable time
CONSTANT UNREACHABLE_TIME
unreachable time
CONSTANT RETRANS_TIMER
retransmission timer
CONSTANT MAX_NEIGHBOR_ADVERTISEMENT
IPv6
maximum Router Solicitations NOTE : Sending only one Solicitation; modify it once autoconfiguration supported.
CONSTANT MAX_MULTICAST_SOLICIT
type 0
CONSTANT IP6_NIMRT
type 1
CONSTANT IP6_RT_MAX
proxy (host)
CONSTANT IP6ANY_ROUTER_PROXY
IPv6
proxy (router)
STRUCT ip6_hdr_struct
QualNet typedefs struct ip6_hdr_struct to ip6_hdr. struct ip6_hdr_struct is 40 bytes, just like in the BSD code.
STRUCT in6_multi_struct
QualNet typedefs struct in6_multi_struct to in6_multi. struct in6_multi_struct is just like in the BSD code.
STRUCT ipv6_h2hhdr_struct
QualNet typedefs struct ipv6_h2hhdr_struct to ipv6_h2hhdr. struct ipv6_h2hhdr_struct is hop-by-Hop Options Header of 14 bytes, just like in the BSD code.
STRUCT ipv6_rthdr_struct
QualNet typedefs struct ipv6_rthdr_struct to ipv6_rthdr. struct ipv6_h2hhdr_struct is routing options header of 8 bytes, just like in the BSD code.
STRUCT ipv6_rthdr_struct
QualNet typedefs struct ipv6_rthdr_struct to ipv6_rthdr. struct ipv6_h2hhdr_struct is destination options header of 8 bytes, just like in the BSD code.
STRUCT ip_moptions_struct
QualNet typedefs struct ip_moptions_struct to ip_moptions. struct ip_moptions_struct is multicast option structure, just like in the BSD code.
STRUCT ip6_frag_struct
QualNet typedefs struct ip6_frag_struct to ipv6_fraghdr. struct ip6_frag_struct is fragmentation header structure.
STRUCT ip6Stat_struct
QualNet typedefs struct ip6stat_struct to ip6Stat. struct ip6stat_struct is statistic information structure.
STRUCT Ipv6MulticastForwardingTableRow
IPv6
STRUCT
Ipv6MulticastGroupEntry
QualNet typedefs struct ipv6_interface_struct to IPv6InterfaceInfo. struct ipv6_interface_struct is interface information structure.
STRUCT messageBuffer
QualNet typedefs struct messageBufferStruct to messageBuffer. struct messageBufferStruct is the buffer to hold messages when neighbour discovery is not done.
STRUCT ip6q
QualNet typedefs struct ip6q_struct to ip6q. struct ip6q is a simple queue to hold fragmented packets.
STRUCT Ipv6FragQueue
QualNet typedefs struct fragmeted_msg_struct to ip6q. struct fragmeted_msg_struct is a simple fragmented packets msg hold structure.
STRUCT defaultRouterList
QualNet typedefs struct destination_route_struct to destinationRoute. struct destination_route_struct is destination information structure of a node.
STRUCT DestinationCache
IPv6
QualNet typedefs struct ipv6_data_struct to IPv6Data. struct ipv6_data_struct is ipv6 information structure of a node.
STRUCT ndpNadvEvent
QualNet typedefs struct ndp_event_struct to IPv6Data. struct ndp_event_struct is neighbor advertisement information structure.
Summary
ND_DEFAULT_CLASS(0xe0)
IPv6
IPv6
IPv6 Initialization.
BOOL Ipv6IsMyPacket(Node* node, in6_addr* dst_addr)
Checks whether the packet is the nodes packet. if the packet is of the node then returns TRUE, otherwise FALSE.
BOOL Ipv6IsAddressInNetwork(const in6_addr* globalAddr, unsigned int tla, unsigned int vla, unsigned int sla)
Checks whether the address is in the same network. : if in the same network then returns TRUE, otherwise FALSE.
NodeAddress Ipv6GetLinkLayerAddress(Node* node, int interfaceId, char* ll_addr_str)
Handle IPv6 layer events, incoming messages and messages sent to itself (timers, etc.).
None Ipv6Finalize(Node* node)
Finalize function for the IPv6 model. Finalize functions for all network-layer IPv6 protocols are called here.
int Ipv6GetMTU(Node* node, int interfaceId)
Calls the cpu packet scheduler for an interface to retrieve an IPv6 packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IPv6 address. The packet's priority value is also returned.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IPv6.html[5/24/2011 12:35:23 PM]
IPv6
None
Ipv6InputQueueInsert(Node* node, int incomingInterface, Message* msg, NodeAddress nextHopAddress, in6_addr destinationAddress, int outgoingInterface, int networkType, BOOL* queueIsFull)
Calls input packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IPv6 address. The packet's priority value is also returned.
None Ipv6OutputQueueInsert(Node* node, int interfaceIndex, Message* msg, NodeAddress nextHopAddress, NodeAddress destinationAddress, int networkType, BOOL* queueIsFull)
Calls output packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IPv6 address. The packet's priority value is also returned. Called by QueueUpIpFragmentForMacLayer().
None QueueUpIpv6FragmentForMacLayer(Node* node, int interfaceIndex, Message* msg, NodeAddress nextHopAddress, NodeAddress destinationAddress, int networkType, BOOL* queueIsFull)
Calls output packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IPv6 address. The packet's priority value is also returned. Called by QueueUpIpFragmentForMacLayer().
None Ipv6SendPacketOnInterface(Node* node, Message* msg, int incommingInterface, int outgoingInterface, NodeAddress nextHop)
This function is called once the outgoing interface index and next hop address to which to route an IPv6 packet are known. This queues an IPv6 packet for delivery to the MAC layer. This functions calls QueueUpIpFragmentForMacLayer(). This function is used to initiate fragmentation if required,before calling the next function.
None Ipv6SendOnBackplane(Node* node, Message* msg, int incommingInterface, int outgoingInterface, NodeAddress hopAddr)
This function is called when the packet delivered through backplane delay. required,before calling the next function.
None Ipv6SendRawMessage(Node* node, Message* msg, in6_addr sourceAddress, in6_addr destinationAddress, int outgoingInterface, TosType priority, unsigned char protocol, unsigned ttl)
Called by NetworkIpReceivePacketFromTransportLayer() to send to send UDP datagrams using IPv6. This function adds an IPv6 header and calls RoutePacketAndSendToMac().
None Ipv6SendToUdp(Node* node, Message* msg, TosType priority, Address sourceAddress, Address destinationAddress, int incomingInterfaceIndex)
Sends a UDP packet to UDP in the transport layer. The source IPv6 address, destination IPv6 address, and priority of the packet are also sent.
None Ipv6SendToTCP(Node* node, Message* msg, TosType priority, Address sourceAddress, Address destinationAddress, int incomingInterfaceIndex)
Sends a TCP packet to UDP in the transport layer. The source IPv6 address, destination IPv6 address, and priority of the packet are also sent.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IPv6.html[5/24/2011 12:35:23 PM]
IPv6
None
IPv6 received IPv6 packet from MAC layer. Determine whether the packet is to be delivered to this node, or needs to be forwarded.
BOOL Ipv6AddMessageInBuffer(Node* node, Message* msg, in6_addr* nextHopAddr, int inCommingInterface)
Gets ipv6 link local address of the interface in output parameter addr.
None IPv6GetSiteLocalAddress( node, int interface, in6_addr* addr)
Gets ipv6 site local address of the interface in output parameter addr.
None IPv6GetSiteLocalAddress( node, int interface, in6_addr* addr)
Gets ipv6 global agreeable address of the interface in output parameter addr.
None Ipv6GetPrefix(in6_addr* addr, in6_addr* prefix)
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IPv6.html[5/24/2011 12:35:23 PM]
IPv6
IPv6
Do a lookup on the routing table with a destination IPv6 address to obtain an outgoing interface and a next hop Ipv6 address.
interface index associated with destination. Ipv6GetInterfaceIndexForDestAddress(Node* node node, in6_addr destAddr)
Get the cost metric for a destination from the forwarding table.
Interface index associated with destination if found, Ipv6IpGetInterfaceIndexForNextHop(Node* node node, in6_addr destAddr)
This function looks at the network address of each of a node's network interfaces. When nextHopAddress is matched to a network, the interface index corresponding to the network is returned.
Ipv6RouterFunctionType Ipv6GetRouterFunction(Node* node, int interfaceIndex)
IPv6
void
update entry with (sourceAddress, multicastGroupAddress) pair. search for the row with (sourceAddress, multicastGroupAddress) and update its interface.
Interface List if match found, NULL otherwise. Ipv6GetOutgoingInterfaceFromMulticastTable(Node* node, in6_addr sourceAddress, in6_addr groupAddress)
get the interface List that lead to the (source, multicast group) pair.
void Ipv6CreateBroadcastAddress()
Allows the MAC layer to send status messages (e.g., packet drop, link failure) to a network-layer routing protocol for routing optimization.
void Ipv6DeleteOutboundPacketsToANode(Node* node, const in6_addr nextHopAddress, const in6_addr destinationAddress, const BOOL returnPacketsToRoutingProtocol)
IPv6
Deletes all packets in the queue going to the specified next hop address. There is option to return all such packets back to the routing protocols.
void Ipv6IsLoopbackAddress(Node* node, in6_addr address)
Constant
MAX_KEY_LEN 128
Constant
Constant
Constant
Constant
IPv6
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IPv6
Constant
IP6_MMTU 1280
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IPv6
Constant
Constant
Constant
T Flag if set indicates transient multicast address. Multicast Address Scope Related constants.
Constant
IP_FRAGMENT_HOLD_TIME 60 * SECOND
Constant
Constant
Constant
Constant
Constant
Constant
Constant
IPv6
Constant
Constant
Constant
Constant
Constant
Constant
maximum Router Solicitations NOTE : Sending only one Solicitation; modify it once autoconfiguration supported. MAX_MULTICAST_SOLICIT 3
Constant
Constant
Constant
Constant
IPv6
Constant
Constant
Constant
type 0 IP6_NIMRT 1
Constant
type 1 IP6_RT_MAX 3
Constant
Constant
Structure
Structure
QualNet typedefs struct ip6_hdr_struct to ip6_hdr. struct ip6_hdr_struct is 40 bytes, just like in the BSD code. in6_multi_struct
Structure
QualNet typedefs struct in6_multi_struct to in6_multi. struct in6_multi_struct is just like in the BSD code. ipv6_h2hhdr_struct
Structure
QualNet typedefs struct ipv6_h2hhdr_struct to ipv6_h2hhdr. struct ipv6_h2hhdr_struct is hop-by-Hop Options Header of 14 bytes, just like in the BSD code. ipv6_rthdr_struct
QualNet typedefs struct ipv6_rthdr_struct to ipv6_rthdr. struct ipv6_h2hhdr_struct is routing options header of 8 bytes, just like in the BSD
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IPv6.html[5/24/2011 12:35:23 PM]
IPv6
Structure
code. ipv6_rthdr_struct
Structure
QualNet typedefs struct ipv6_rthdr_struct to ipv6_rthdr. struct ipv6_h2hhdr_struct is destination options header of 8 bytes, just like in the BSD code. ip_moptions_struct
Structure
QualNet typedefs struct ip_moptions_struct to ip_moptions. struct ip_moptions_struct is multicast option structure, just like in the BSD code. ip6_frag_struct
Structure
QualNet typedefs struct ip6_frag_struct to ipv6_fraghdr. struct ip6_frag_struct is fragmentation header structure. ip6Stat_struct
Structure
QualNet typedefs struct ip6stat_struct to ip6Stat. struct ip6stat_struct is statistic information structure. Ipv6MulticastForwardingTableRow
Structure
Structure
Structure
Structure
QualNet typedefs struct ipv6_interface_struct to IPv6InterfaceInfo. struct ipv6_interface_struct is interface information structure. messageBuffer
Structure
QualNet typedefs struct messageBufferStruct to messageBuffer. struct messageBufferStruct is the buffer to hold messages when neighbour discovery is not done. ip6q
IPv6
Structure
QualNet typedefs struct ip6q_struct to ip6q. struct ip6q is a simple queue to hold fragmented packets. Ipv6FragQueue
Structure
Structure
QualNet typedefs struct fragmeted_msg_struct to ip6q. struct fragmeted_msg_struct is a simple fragmented packets msg hold structure. defaultRouterList
Structure
Structure
QualNet typedefs struct destination_route_struct to destinationRoute. struct destination_route_struct is destination information structure of a node. DestinationCache
Structure
Structure
Structure
Structure
Structure
IPv6
Structure
QualNet typedefs struct ipv6_data_struct to IPv6Data. struct ipv6_data_struct is ipv6 information structure of a node. ndpNadvEvent
QualNet typedefs struct ndp_event_struct to IPv6Data. struct ndp_event_struct is neighbor advertisement information structure.
Function / Macro Detail Function / Macro ND_DEFAULT_CLASS(0xe0) Format Node Discovery sets class.
NDP_DELAY
IPV6JITTER_RANGE
IPV6_SET_CLASS(hdr, priority)
IPV6_GET_CLASS(hdr)
ip6_hdrSetVersion()
ipv6HdrVcf version
Returns:
void
- NULL.
ip6_hdrSetClass()
ipv6HdrVcf ipv6Class
Returns:
void
- NULL.
ip6_hdrSetFlow()
IPv6
Returns:
void
- NULL.
ip6_hdrGetVersion()
ipv6HdrVcf
Returns:
UInt32
- None
ip6_hdrGetClass()
ipv6HdrVcf
Returns:
UInt32
- None
ip6_hdrGetFlow()
ipv6HdrVcf
Returns:
UInt32
- None
in6_isanycast
node addr
Returns:
int
- None
Ipv6AddIpv6Header
None Ipv6AddIpv6Header (Node* node, Message* msg, in6_addr srcaddr, in6_addr dst_addr, TosType priority, unsigned char protocol, unsigned hlim)
IPv6
- Pointer to node.
- Pointer to message. - Source IPv6 address. - Destination IPv6 address. - Current type of service - IPv6 protocol number.
srcaddr
- Hop limit.
Returns:
None
- None
Ipv6AddFragmentHeader
None Ipv6AddFragmentHeader (Node *node node, Message *msg msg, unsigned char nextHeader, unsigned short offset, unsigned int id) Parameters:
- Pointer to node
nextHeader offset id
- offset
- id
Returns:
None
- None
Ipv6RemoveIpv6Header
None Ipv6RemoveIpv6Header (Node *node node, Message *msg msg, Address* sourceAddress, Address* destinationAddress destinationAddress, TosType *priority priority, unsigned char *protocol protocol, unsigned *hLim hLim) Parameters:
node msg
- Pointer to node
sourceAddress
destinationAddress priority
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IPv6.html[5/24/2011 12:35:23 PM]
- Priority
IPv6
protocol hLim
- protocol
- hLim
Returns:
None
- None
Ipv6PreInit
node
Returns:
None
- None
IPv6Init
IPv6 Initialization.
node
nodeInput
Returns:
None
- None
Ipv6IsMyPacket
Checks whether the packet is the nodes packet. if the packet is of the node then returns TRUE, otherwise FALSE.
node
dst_addr
Returns:
BOOL
- None
Ipv6IsAddressInNetwork
BOOL Ipv6IsAddressInNetwork (const in6_addr* globalAddr, unsigned int tla, unsigned int vla, unsigned int sla) Parameters:
Checks whether the address is in the same network. : if in the same network then returns TRUE, otherwise FALSE.
- Top level ipv6 address. - Next level ipv6 address. - Site local ipv6 address.
IPv6
Returns:
BOOL
- None
Ipv6GetLinkLayerAddress
node
interfaceId ll_addr_str
Returns:
NodeAddress
- None
Ipv6AddNewInterface
None Ipv6AddNewInterface (Node* node, in6_addr* globalAddr, unsigned int tla, unsigned int nla, unsigned int sla, int* newinterfaceIndex, const NodeInput* nodeInput) Parameters:
- Top level id. - Next level id. - Site level id. - Pointer to new interface index.
newinterfaceIndex nodeInput
- Node Input.
Returns:
None
- None
Ipv6IsForwardingEnabled
ipv6
Returns:
BOOL
- None
Ipv6Layer
IPv6
Handle IPv6 layer events, incoming messages and messages sent to itself (timers, etc.).
node msg
- Pointer to node.
- Pointer to message.
Returns:
None
- None
Ipv6Finalize
Finalize function for the IPv6 model. Finalize functions for all network-layer IPv6 protocols are called here.
node
- Pointer to node.
Returns:
None
- None
Ipv6GetMTU
node
interfaceId
Returns:
int
- None
Ipv6GetInterfaceIndexFromAddress
node dst
- Pointer to node.
- IPv6 address.
Returns:
int
- None
Ipv6CpuQueueInsert
None Ipv6CpuQueueInsert (Node* node, Message* msg, NodeAddress nextHopAddress, in6_addr destinationAddress, int outgoingInterface, int networkType, BOOL* queueIsFull) Parameters:
Calls the cpu packet scheduler for an interface to retrieve an IPv6 packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IPv6 address. The packet's priority value is also returned.
node msg
- Pointer to node.
- Pointer to message with IPv6 packet. - Packet's next hop link layer address. - Packet's destination address.
nextHopAddress
destinationAddress
IPv6
Returns:
None
- None
Ipv6InputQueueInsert
None Ipv6InputQueueInsert (Node* node, int incomingInterface, Message* msg, NodeAddress nextHopAddress, in6_addr destinationAddress, int outgoingInterface, int networkType, BOOL* queueIsFull) Parameters:
Calls input packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IPv6 address. The packet's priority value is also returned.
node
incomingInterface msg
- Pointer to message with IPv6 packet. - Packet's next hop link layer address. - Packet's destination address.
nextHopAddress
Returns:
None
- None
Ipv6OutputQueueInsert
None Ipv6OutputQueueInsert (Node* node, int interfaceIndex, Message* msg, NodeAddress nextHopAddress, NodeAddress destinationAddress, int networkType, BOOL* queueIsFull) Parameters:
Calls output packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IPv6 address. The packet's priority value is also returned. Called by QueueUpIpFragmentForMacLayer().
node
interfaceIndex msg
- Pointer to message with IPv6 packet. - Packet's next link layer hop address. - Packet's destination address.
nextHopAddress
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IPv6.html[5/24/2011 12:35:23 PM]
IPv6
None
- None
QueueUpIpv6FragmentForMacLayer
None QueueUpIpv6FragmentForMacLayer (Node* node, int interfaceIndex, Message* msg, NodeAddress nextHopAddress, NodeAddress destinationAddress, int networkType, BOOL* queueIsFull) Parameters:
Calls output packet scheduler for an interface to retrieve an IP packet from a queue associated with the interface. The dequeued packet, since it's already been routed, has an associated next-hop IPv6 address. The packet's priority value is also returned. Called by QueueUpIpFragmentForMacLayer().
node
interfaceIndex msg
- Pointer to message with IPv6 packet. - Packet's next hop address. - Packet's destination address.
nextHopAddress
Returns:
None
- None
Ipv6SendPacketOnInterface
None Ipv6SendPacketOnInterface (Node* node, Message* msg, int incommingInterface, int outgoingInterface, NodeAddress nextHop) Parameters:
This function is called once the outgoing interface index and next hop address to which to route an IPv6 packet are known. This queues an IPv6 packet for delivery to the MAC layer. This functions calls QueueUpIpFragmentForMacLayer(). This function is used to initiate fragmentation if required,before calling the next function.
node msg
- Pointer to node.
Returns:
None
- None
Ipv6SendOnBackplane
None Ipv6SendOnBackplane (Node* node, Message* msg, int incommingInterface, int outgoingInterface, NodeAddress hopAddr) Parameters:
This function is called when the packet delivered through backplane delay. required,before calling the next function.
node msg
- Pointer to node.
incommingInterface
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IPv6.html[5/24/2011 12:35:23 PM]
IPv6
outgoingInterface hopAddr
Returns:
None
- None
Ipv6SendRawMessage
None Ipv6SendRawMessage (Node* node, Message* msg, in6_addr sourceAddress, in6_addr destinationAddress, int outgoingInterface, TosType priority, unsigned char protocol, unsigned ttl) Parameters:
Called by NetworkIpReceivePacketFromTransportLayer() to send to send UDP datagrams using IPv6. This function adds an IPv6 header and calls RoutePacketAndSendToMac().
node msg
- Pointer to node.
- Pointer to message with payload data - Source IPv6 address. - Destination IPv6 address.
sourceAddress
- Time to live.
Returns:
None
- None
Ipv6SendToUdp
None Ipv6SendToUdp (Node* node, Message* msg, TosType priority, Address sourceAddress, Address destinationAddress, int incomingInterfaceIndex) Parameters:
Sends a UDP packet to UDP in the transport layer. The source IPv6 address, destination IPv6 address, and priority of the packet are also sent.
node msg
- Pointer to node.
- Pointer to message with UDP packet. - Priority of UDP - Source IP address info. - Destination IP address info. - interface that received the packet
priority
sourceAddress
destinationAddress
incomingInterfaceIndex
Returns:
None
- None
Ipv6SendToTCP
None Ipv6SendToTCP (Node* node, Message* msg, TosType priority, Address sourceAddress,
IPv6
Address destinationAddress, int incomingInterfaceIndex) Parameters: Sends a TCP packet to UDP in the transport layer. The source IPv6 address, destination IPv6 address, and priority of the packet are also sent.
node msg
- Pointer to node.
- Pointer to message with UDP packet. - Priority of TCP - Source IP address info. - Destination IP address info. - interface that received the packet
priority
sourceAddress
destinationAddress
incomingInterfaceIndex
Returns:
None
- None
Ipv6ReceivePacketFromMacLayer
None Ipv6ReceivePacketFromMacLayer (Node* node, Message* msg, NodeAddress previousHopNodeId, int interfaceIndex) Parameters:
IPv6 received IPv6 packet from MAC layer. Determine whether the packet is to be delivered to this node, or needs to be forwarded.
node msg
- Pointer to node.
previousHopNodeId interfaceIndex
Returns:
None
- None
Ipv6AddMessageInBuffer
BOOL Ipv6AddMessageInBuffer (Node* node, Message* msg, in6_addr* nextHopAddr, int inCommingInterface) Parameters:
node msg
nextHopAddr
inCommingInterface
Returns:
BOOL
- None
Ipv6DeleteMessageInBuffer
IPv6
Returns:
BOOL
- None
Ipv6DropMessageFromBuffer
node mBuf
Returns:
void
- None
Ipv6GetAddressTypeFromString
interfaceAddr
Returns:
NetworkType
- None
Ipv6GetInterfaceMulticastAddress
node
interfaceIndex
Returns:
IPv6 multicast address
- None
Ipv6SolicitationMulticastAddress
dst_addr target
Returns:
None
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IPv6.html[5/24/2011 12:35:23 PM]
- None
IPv6
Ipv6AllRoutersMulticastAddress
dst
Returns:
None
- None
IPv6GetLinkLocalAddress
Gets ipv6 link local address of the interface in output parameter addr.
node
interface addr
Returns:
None
- None
IPv6GetSiteLocalAddress
Gets ipv6 site local address of the interface in output parameter addr.
node
interface addr
Returns:
None
- None
IPv6GetSiteLocalAddress
Gets ipv6 global agreeable address of the interface in output parameter addr.
node
interface addr
Returns:
None
- None
Ipv6GetPrefix
IPv6
prefix
Returns:
None
- None
Ipv6GetPrefixFromInterfaceIndex
Prefix for this interface Ipv6GetPrefixFromInterfaceIndex (Node* node, int interfaceIndex) Parameters:
node
interfaceIndex
Returns:
Prefix for this interface
- None
Ipv6OutputQueueIsEmpty
node
interfaceIndex
Returns:
BOOL
- None
Ipv6RoutingStaticInit
None Ipv6RoutingStaticInit (Node *node node, const NodeInput nodeInput, NetworkRoutingProtocolType type) Parameters:
node
nodeInput type
- type
Returns:
None
- None
Ipv6RoutingStaticEntry
node
currentLine
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IPv6.html[5/24/2011 12:35:23 PM]
IPv6
Returns:
None
- None
Ipv6AddDestination
node ro
- Pointer to node
Returns:
None
- None
Ipv6DeleteDestination
node
- Pointer to node
Returns:
None
- None
Ipv6CheckForValidPacket
int Ipv6CheckForValidPacket (Node* node node, SchedulerType* scheduler scheduler, unsigned int* pIndex pIndex) Parameters:
node
scheduler pIndex
- packet index
Returns:
int
- None
Ipv6NdpProcessing
node
- Pointer to node
Returns:
None
- None
Ipv6UpdateForwardingTable
None Ipv6UpdateForwardingTable (Node* node node, in6_addr destPrefix destPrefix, in6_addr nextHopPrefix nextHopPrefix, int interfaceIndex, int metric metric) Parameters:
IPv6
- Pointer to node - IPv6 destination address - IPv6 next hop address for this destination - interfaceIndex
destPrefix
nextHopPrefix
interfaceIndex metric
Returns:
None
- None
Ipv6EmptyForwardingTable
node type
Returns:
None
- None
Ipv6PrintForwardingTable
node
- Pointer to node
Returns:
None
- None
Ipv6InterfaceIndexFromSubnetAddress
Interface index associated with specified subnet address. Ipv6InterfaceIndexFromSubnetAddress (Node* node node, in6_addr* address) Parameters:
address
Returns:
Interface index associated with specified subnet address.
- None
Ipv6GetInterfaceAndNextHopFromForwardingTable
void Ipv6GetInterfaceAndNextHopFromForwardingTable (Node* node node, in6_addr destAddr, int* interfaceIndex, in6_addr* nextHopAddr) Parameters:
IPv6
node
destAddr
interfaceIndex nextHopAddr
Returns:
void
- NULL.
Ipv6GetInterfaceIndexForDestAddress
interface index associated with destination. Ipv6GetInterfaceIndexForDestAddress (Node* node node, in6_addr destAddr) Parameters:
destAddr
Returns:
interface index associated with destination.
- None
Ipv6GetMetricForDestAddress
interface index associated with destination. Ipv6GetMetricForDestAddress (Node* node node, in6_addr destAddr) Parameters:
Get the cost metric for a destination from the forwarding table.
node
destAddr
Returns:
interface index associated with destination.
- None
Ipv6IpGetInterfaceIndexForNextHop
Interface index associated with destination if found, Ipv6IpGetInterfaceIndexForNextHop (Node* node node, in6_addr destAddr) Parameters:
This function looks at the network address of each of a node's network interfaces. When nextHopAddress is matched to a network, the interface index corresponding to the network is returned.
node
destAddr
Returns:
Interface index associated with destination if found,
- None
Ipv6GetRouterFunction
node
- Pointer to node.
IPv6
interfaceIndex
Returns:
Ipv6RouterFunctionType
Ipv6SendPacketToMacLayer
void Ipv6SendPacketToMacLayer (Node* node node, Message* msg, in6_addr destAddr, in6_addr* nextHopAddr, int* interfaceIndex) Parameters:
node msg
- Pointer to node
- Pointer to message - Destination Address - Next Hop Addr for destination. - Pointer to interface index
destAddr
nextHopAddr
interfaceIndex
Returns:
void
- NULL.
Ipv6JoinMulticastGroup
node
mcastAddr delay
- delay.
Returns:
void
- NULL.
Ipv6AddToMulticastGroupList
node
groupAddress
Returns:
void
- NULL.
Ipv6LeaveMulticastGroup
IPv6
node
mcastAddr
Returns:
void
- NULL.
Ipv6RemoveFromMulticastGroupList
node
groupAddress
Returns:
void
- NULL.
Ipv6NotificationOfPacketDrop
void Ipv6NotificationOfPacketDrop (Node* node, Message* msg, const NodeAddress nextHopAddress, int interfaceIndex) Parameters:
- Pointer to node.
nextHopAddress interfaceIndex
Returns:
void
- NULL.
Ipv6IsPartOfMulticastGroup
TRUE if node is part of multicast group, Ipv6IsPartOfMulticastGroup (Node* node, Message* msg, in6_addr groupAddress) Parameters:
- Pointer to node.
groupAddress
Returns:
TRUE if node is part of multicast group,
- None
Ipv6IsReservedMulticastAddress
TRUE if reserved multicast address, FALSE otherwise. Ipv6IsReservedMulticastAddress (Node* node, in6_addr mcastAddr)
IPv6
mcastAddr
Returns:
TRUE if reserved multicast address, FALSE otherwise.
- None
Ipv6InMulticastOutgoingInterface
TRUE if interface is in multicast outgoing interface Ipv6InMulticastOutgoingInterface (Node* node, LinkedList* list, int interfaceIndex) Parameters:
node list
interfaceIndex
Returns:
TRUE if interface is in multicast outgoing interface
- None
Ipv6UpdateMulticastForwardingTable
update entry with (sourceAddress, multicastGroupAddress) pair. search for the row with (sourceAddress, multicastGroupAddress) and update its interface.
node
sourceAddress
multicastGroupAddress
Returns:
void
- NULL.
Ipv6GetOutgoingInterfaceFromMulticastTable
Interface List if match found, NULL otherwise. Ipv6GetOutgoingInterfaceFromMulticastTable (Node* node, in6_addr sourceAddress, in6_addr groupAddress) Parameters:
get the interface List that lead to the (source, multicast group) pair.
node
sourceAddress groupAddress
Returns:
Interface List if match found, NULL otherwise.
- None
IPv6
Ipv6CreateBroadcastAddress
Returns:
void
- NULL.
Returns:
Prefix Length.
- None
Ipv6SetMacLayerStatusEventHandlerFunction
Allows the MAC layer to send status messages (e.g., packet drop, link failure) to a network-layer routing protocol for routing optimization.
node
StatusEventHandlerPtr interfaceIndex
- Interface Index
Returns:
void
- NULL.
Ipv6DeleteOutboundPacketsToANode
void Ipv6DeleteOutboundPacketsToANode (Node* node, const in6_addr nextHopAddress, const in6_addr destinationAddress, const BOOL returnPacketsToRoutingProtocol) Parameters:
Deletes all packets in the queue going to the specified next hop address. There is option to return all such packets back to the routing protocols.
node
nextHopAddress
destinationAddress
returnPacketsToRoutingProtocol
Returns:
void
- NULL.
Ipv6IsLoopbackAddress
node
address
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/IPv6.html[5/24/2011 12:35:23 PM]
IPv6
Returns:
void
- NULL.
Ipv6IsMyIp
TRUE if my Ip, FALSE otherwise. Ipv6IsMyIp (Node* node, in6_addr* dst_addr) Parameters:
node
dst_addr
Returns:
TRUE if my Ip, FALSE otherwise.
- None
Ipv6IsValidGetMulticastScope
Scope value if valid multicast address, 0 otherwise. Ipv6IsValidGetMulticastScope (Node* node, in6_addr multiAddr) Parameters:
node
multiAddr
Returns:
Scope value if valid multicast address, 0 otherwise.
- None
IsIPV6RoutingEnabledOnInterface
node
interfaceIndex
Returns:
BOOL
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
IPv6
LIST
LIST
This file describes the data structures and functions used in the implementation of lists. Constant / Data Structure Summary Type
STRUCT
Name
ListItem template
Summary
ListInit(Node* node, LinkedList** list)
LIST
LIST
Structure
ListItem template
Structure
Structure
Function / Macro Detail Function / Macro ListInit Format void ListInit (Node* node, LinkedList** list) Parameters: Initialize the list
node list
Returns:
void
- NULL
ListIsEmpty
node list
Returns:
BOOL
ListGetSize
LIST
node list
Returns:
int
ListInsert
void ListInsert (Node* node, LinkedList* list, clocktype timeStamp, void* data) Parameters:
node list
- Pointer to the node containing the list - Pointer to the list - Time the item was last inserted.
timeStamp data
- item to be inserted
Returns:
void
- NULL
FindItem
void* FindItem (Node* node, List* list, int byteSkip, char* key, int size) Parameters:
node list
- Pointer to the node containing the list - Pointer to the list - How many bytes skip to get the key item
byteSkip key
- The key that an item is idendified. - Size of the key element in byte
size
Returns:
void*
FindItem
void* FindItem (Node* node, List* list, int byteSkip, char* key, int size) Parameters:
node list
- Pointer to the node containing the list - Pointer to the list - How many bytes skip to get the key item
byteSkip key
- The key that an item is idendified. - Size of the key element in byte
size
LIST
Returns:
void*
ListGet
void ListGet (Node* node, List* list, ListItem* listItem, BOOL freeItem, BOOL isMsg) Parameters:
node list
- Pointer to the node containing the list - Pointer to the list to remove item from - item to be removed - Whether to free the item
Returns:
void
- NULL
ListFree
node list
- Pointer to the node containing the list - Pointer to the list to be freed - Does the list contain Messages? If so, we
isMsg
Returns:
void
- NULL
IntListInit
node list
Returns:
void
- NULL
IntListIsEmpty
node
LIST
list
Returns:
BOOL
IntListGetSize
node list
Returns:
int
ListInsert
void ListInsert (Node* node, List* list, clocktype timeStamp, void* data) Parameters:
node list
- Pointer to the node containing the list - Pointer to the list - Time the item was last inserted.
timeStamp data
- item to be inserted
Returns:
void
- NULL
IntListGet
void IntListGet (Node* node, IntList* list, IntListItem* listItem, BOOL freeItem, BOOL isMsg) Parameters:
node list
- Pointer to the node containing the list - Pointer to the list to remove item from - item to be removed - Whether to free the item
Returns:
void
- NULL
IntListFree
LIST
node list
- Pointer to the node containing the list - Pointer to the list to be freed - Does the list contain Messages? If so, we
isMsg
Returns:
void
- NULL
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
MAC LAYER
MAC LAYER
This file describes data structures and functions used by the MAC Layer. Constant / Data Structure Summary Type
CONSTANT
Name
MAC_PROPAGATION_DELAY
MAC LAYER
ATM 10/100Mbps
CONSTANT HW_TYPE_METRICOM
MAC LAYER
Hardware identifier
CONSTANT HW_TYPE_UNKNOWN
Hardware identifier
CONSTANT HW_NODE_ID
Hardware identifier
CONSTANT INVALID_MAC_ADDRESS
Describes one out of two possible states of MAC interface - enable or disable
ENUMERATION MacLinkType
MAC LAYER
ENUMERATION
ManagementRequestType
MAC LAYER
Summary
MAC_EnableInterface(node, interfaceIndex)
Set the MAC interface handler function to be called when interface faults occurs
MacReportInterfaceStatus MAC_GetInterfaceStatusHandlerFunction(Node* node, int interfaceIndex)
Callback funtion for sending packet. It calls when network layer has packet to send.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAC LAYER.html[5/24/2011 12:35:45 PM]
MAC LAYER
void
Handles packets from the network layer when the network queue is empty
void MAC_SwitchHasPacketToSend(Node* node, int interfaceIndex)
MAC LAYER
void
To remove the packet at the front of the specified priority output queue
BOOL MAC_OutputQueueDequeuePacketForAPriority(Node* node, int interfaceIndex, TosType priority, Message** msg, MacHWAddress* nextHopAddress, int* networkType)
To remove the packet at the front of the specified priority output queue
BOOL MAC_OutputQueueDequeuePacketForAPriority(Node* node, int interfaceIndex, TosType priority, Message** msg, Mac802Address* nextHopAddress, int* networkType)
To remove the packet at the front of the specified priority output queue
BOOL MAC_OutputQueueDequeuePacketForAPriority(Node* node, int interfaceIndex, TosType* priority, Message** msg, MacHWAddress* destMacAddr, int* networkType, int* packType)
To allow a peek by network layer at packet before processing It is overloading function used for ARP packet
BOOL MAC_OutputQueueDequeuePacketForAPriority(Node* node, int interfaceIndex, TosType* priority, Message** msg, Mac802Address* destMacAddr, int* networkType, int* packType)
To allow a peek by network layer at packet before processing It is overloading function used for ARP packet
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAC LAYER.html[5/24/2011 12:35:45 PM]
MAC LAYER
void
MAC_SneakPeekAtMacPacket(Node* node, int interfaceIndex, const Message* msg, NodeAddress prevHop, NodeAddress destAddr, int messageType)
Pass packet successfully up to the network layer It is overloading function used for ARP packet
void MAC_HandOffSuccessfullyReceivedPacket(Node* node, int interfaceIndex, Message* msg, Mac802Address* lastHopAddress, int arpMessageType)
MAC LAYER
Pass packet successfully up to the network layer It is overloading function used for ARP packet
BOOL MAC_OutputQueueTopPacket(Node* node, int interfaceIndex, Message** msg, NodeAddress* nextHopAddress, int networkType, TosType* priority)
To remove packet(s) from front of output queue; process packets with options for example, pakcing multiple packets with same next hop address together
BOOL MAC_OutputQueueDequeuePacketForAPriority(Node* node, int interfaceIndex, int priority, Message** msg, NodeAddress* nextHopAddress, int* networkType, MacOutputQueueDequeueOption dequeueOption, MacOutputQueueDequeueCriteria dequeueCriteria, int * numFreeByte, int* numPacketPacked, TraceProtocolType tracePrt, BOOL eachWithMacHeader, int maxHeaderSize, BOOL returnPackedMsg)
To remove packet(s) from front of output queue; process packets with options for example, pakcing multiple packets with same next hop address together
BOOL MAC_IsMyUnicastFrame(Node* node, NodeAddress destAddr)
MAC LAYER
Check if a packet (or frame) belongs to this node Should be used only for four byte mac address
BOOL MAC_IsWiredNetwork(Node* node, int interfaceIndex)
MAC LAYER
Retrieve the IP Address from Default HW Address . Default HW address is equal to 6 bytes
void MacGetHardwareLength(Node* node, int interface, unsigned short hwLength)
Init and read VLAN configuration from user input for node and interface passed as arguments
NodeAddress MacReleaseVlanInfoForThisInterface(Node* node, int interfaceIndex)
MAC LAYER
MAC LAYER
BOOL
MAC_OutputQueueDequeuePacketWithIndex(Node* node, int interfaceIndex, int msgIndex, Message** msg, Mac802Address* nextHopMacAddress, int networkType)
This functions converts variable length Mac address to IPv4 address It checks the type of hardware address and based on that conversion is done.
char* decToHex(int dec)
MAC LAYER
NodeAddress
Add which protocols in the Mac layer to be reset to a fuction list pointer.
Constant
MAC_PROPAGATION_DELAY 1 * MICRO_SECOND
MAC LAYER
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
MAC LAYER
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
Constant
MAC LAYER
Constant
Constant
Constant
Constant
Enumeration
Enumeration
Describes one out of two possible states of MAC interface - enable or disable MacLinkType
Enumeration
Enumeration
Enumeration
Enumeration
Enumeration
MAC LAYER
Structure
Structure
Structure
MAC address of size MAC_ADDRESS_LENGTH_IN_BYTE. It is default Mac address of type 802 MacVlan
Structure
Structure
Structure
A composite structure representing MAC sublayer which is typedefed to MacData in main.h ManagementRequest
Structure
Structure
Structure
Structure
MAC LAYER
Function / Macro Detail Function / Macro MAC_EnableInterface(node, interfaceIndex) Format Enable the MAC_interface
MAC_DisableInterface(node, interfaceIndex)
MAC_ToggleInterfaceStatus(node, interfaceIndex)
MAC_InterfaceIsEnabled(node, interfaceIndex)
MacReportInterfaceStatus
node
interfaceIndex state
Returns:
void
- None
MAC_SetInterfaceStatusHandlerFunction
Set the MAC interface handler function to be called when interface faults occurs
node
interfaceIndex statusHandler
Returns:
void
- None
MAC_GetInterfaceStatusHandlerFunction
node
MAC LAYER
interfaceIndex
- index of interface
Returns:
MacReportInterfaceStatus
MacHasFrameToSendFn
Callback funtion for sending packet. It calls when network layer has packet to send.
node
interfaceIndex
Returns:
void
- NULL
MacReceiveFrameFn
node
interfaceIndex msg
Returns:
void
- NULL
MAC_NetworkLayerHasPacketToSend
Handles packets from the network layer when the network queue is empty
node
interfaceIndex
Returns:
void
- None
MAC_SwitchHasPacketToSend
node
interfaceIndex
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAC LAYER.html[5/24/2011 12:35:45 PM]
MAC LAYER
void
- None
MAC_ReceivePacketFromPhy
node
interfaceIndex packet
- Pointer to Message
Returns:
void
- None
MAC_ManagementRequest
void MAC_ManagementRequest (Node* node, int interfaceIndex, ManagementRequest* req, ManagementResponse* resp) Parameters:
interfaceIndex req
resp
Returns:
void
- None
MAC_ReceivePhyStatusChangeNotification
void MAC_ReceivePhyStatusChangeNotification (Node* node, int interfaceIndex, PhyStatusType oldPhyStatus, PhyStatusType newPhyStatus, clocktype receiveDuration, Message* potentialIncomingPacket) Parameters:
node
- Old status of physical layer - New status of physical layer - Duration after which received - Pointer to incoming message
receiveDuration
potentialIncomingPacket
Returns:
void
- None
MAC LAYER
MAC_InitUserMacProtocol
void MAC_InitUserMacProtocol (Node* node, NodeInput nodeInput, const char* macProtocolName, int interfaceIndex) Parameters:
- Pointer to a network node - Configured Inputs for the node - MAC protocol name
nodeInput
macProtocolName interfaceIndex
- interface index
Returns:
void
- None
MacFinalizeUserMacProtocol
node
interfaceIndex
Returns:
void
- None
MAC_HandleUserMacProtocolEvent
node
interfaceIndex packet
- Pointer to Message
Returns:
void
- None
MAC_OutputQueueIsEmpty
node
interfaceIndex
Returns:
BOOL
- empty or not
MAC LAYER
MAC_NotificationOfPacketDrop
void MAC_NotificationOfPacketDrop (Node* node, NodeAddress nextHopAddress, int interfaceIndex, Message* msg) Parameters:
- Pointer to Message
Returns:
void
- None
MAC_NotificationOfPacketDrop
void MAC_NotificationOfPacketDrop (Node* node, MacHWAddress nextHopAddress, int interfaceIndex, Message* msg) Parameters:
- Pointer to Message
Returns:
void
- None
MAC_NotificationOfPacketDrop
void MAC_NotificationOfPacketDrop (Node* node, Mac802Address nextHopAddress, int interfaceIndex, Message* msg) Parameters:
- Pointer to Message
Returns:
void
- None
MAC_OutputQueueTopPacketForAPriority
BOOL MAC_OutputQueueTopPacketForAPriority (Node* node, int interfaceIndex, TosType priority, Message** msg, NodeAddress nextHopAddress) Parameters:
MAC LAYER
- Message Priority
nextHopAddress
Returns:
BOOL
MAC_OutputQueueTopPacketForAPriority
BOOL MAC_OutputQueueTopPacketForAPriority (Node* node, int interfaceIndex, TosType priority, Message** msg, Mac802Address* nextHopAddress) Parameters:
- Message Priority
nextHopAddress
Returns:
BOOL
MAC_OutputQueueTopPacketForAPriority
BOOL MAC_OutputQueueTopPacketForAPriority (Node* node, int interfaceIndex, TosType priority, Message** msg, MacHWAddress* nextHopAddress) Parameters:
- Message Priority
nextHopAddress
Returns:
BOOL
MAC_OutputQueueDequeuePacketForAPriority
BOOL MAC_OutputQueueDequeuePacketForAPriority (Node* node, int interfaceIndex, TosType priority, Message** msg, NodeAddress* nextHopAddress, int* networkType)
MAC LAYER
Parameters: To remove the packet at the front of the specified priority output queue
node
- Message Priority
nextHopAddress networkType
- network type
Returns:
BOOL
MAC_OutputQueueDequeuePacketForAPriority
BOOL MAC_OutputQueueDequeuePacketForAPriority (Node* node, int interfaceIndex, TosType priority, Message** msg, MacHWAddress* nextHopAddress, int* networkType) Parameters:
To remove the packet at the front of the specified priority output queue
node
- Message Priority
nextHopAddress networkType
- network type
Returns:
BOOL
MAC_OutputQueueDequeuePacketForAPriority
BOOL MAC_OutputQueueDequeuePacketForAPriority (Node* node, int interfaceIndex, TosType priority, Message** msg, Mac802Address* nextHopAddress, int* networkType) Parameters:
To remove the packet at the front of the specified priority output queue
node
- Message Priority
nextHopAddress
MAC LAYER
networkType
- network type
Returns:
BOOL
MAC_OutputQueueDequeuePacketForAPriority
BOOL MAC_OutputQueueDequeuePacketForAPriority (Node* node, int interfaceIndex, TosType* priority, Message** msg, MacHWAddress* destMacAddr, int* networkType, int* packType) Parameters:
To allow a peek by network layer at packet before processing It is overloading function used for ARP packet
node
- tos value
Returns:
BOOL
MAC_OutputQueueDequeuePacketForAPriority
BOOL MAC_OutputQueueDequeuePacketForAPriority (Node* node, int interfaceIndex, TosType* priority, Message** msg, Mac802Address* destMacAddr, int* networkType, int* packType) Parameters:
To allow a peek by network layer at packet before processing It is overloading function used for ARP packet
node
- tos value
Returns:
BOOL
MAC_SneakPeekAtMacPacket
void MAC_SneakPeekAtMacPacket (Node* node, int interfaceIndex, const Message* msg, NodeAddress prevHop, NodeAddress destAddr, int messageType)
MAC LAYER
interfaceIndex msg
- Pointer to Message - Previous Node address - Destination Node address - Distinguish between the ARP and general message
prevHop
destAddr
messageType
Returns:
void
- NULL
MAC_SneakPeekAtMacPacket
void MAC_SneakPeekAtMacPacket (Node* node, int interfaceIndex, const Message* msg, MacHWAddress prevHop, MacHWAddress destAddr, int arpMessageType) Parameters:
interfaceIndex msg
- Pointer to Message - Previous Node mac address - Destination Node mac address - Distinguish between the ARP and general message
prevHop
destAddr
arpMessageType
Returns:
void
- NULL
MAC_SneakPeekAtMacPacket
void MAC_SneakPeekAtMacPacket (Node* node, int interfaceIndex, const Message* msg, Mac802Address prevHop, Mac802Address destAddr, int messageType) Parameters:
interfaceIndex msg
- Pointer to Message - Previous Node address - Destination Node address - Distinguish between the ARP and general message
prevHop
destAddr
messageType
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAC LAYER.html[5/24/2011 12:35:45 PM]
MAC LAYER
Returns:
void
- NULL
MAC_MacLayerAcknowledgement
void MAC_MacLayerAcknowledgement (Node* node, int interfaceIndex, Message* msg, NodeAddress nextHop) Parameters:
interfaceIndex msg
nextHop
Returns:
void
- None
MAC_MacLayerAcknowledgement
void MAC_MacLayerAcknowledgement (Node* node, int interfaceIndex, Message* msg, MacHWAddress& nextHop) Parameters:
interfaceIndex msg
nextHop
Returns:
void
- None
MAC_MacLayerAcknowledgement
void MAC_MacLayerAcknowledgement (Node* node, int interfaceIndex, Message* msg, Mac802Address& nextHop) Parameters:
interfaceIndex msg
nextHop
Returns:
void
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAC LAYER.html[5/24/2011 12:35:45 PM]
- None
MAC LAYER
MAC_HandOffSuccessfullyReceivedPacket
void MAC_HandOffSuccessfullyReceivedPacket (Node* node, int interfaceIndex, Message* msg, NodeAddress lastHopAddress) Parameters:
interfaceIndex msg
lastHopAddress
Returns:
void
- None
MAC_HandOffSuccessfullyReceivedPacket
void MAC_HandOffSuccessfullyReceivedPacket (Node* node, int interfaceIndex, Message* msg, MacHWAddress* lastHopAddr) Parameters:
interfaceIndex msg
lastHopAddr
Returns:
void
- None
MAC_HandOffSuccessfullyReceivedPacket
void MAC_HandOffSuccessfullyReceivedPacket (Node* node, int interfaceIndex, Message* msg, Mac802ddress* lastHopAddr) Parameters:
interfaceIndex msg
lastHopAddr
Returns:
void
- None
MAC_HandOffSuccessfullyReceivedPacket
void MAC_HandOffSuccessfullyReceivedPacket (Node* node, int interfaceIndex, Message* msg, MacHWAddress* lastHopAddress, int arpMessageType)
MAC LAYER
Parameters: Pass packet successfully up to the network layer It is overloading function used for ARP packet
node
interfaceIndex msg
- Pointer to Message - mac address - Distinguish between ARP and general message
lastHopAddress arpMessageType
Returns:
void
- NULL
MAC_HandOffSuccessfullyReceivedPacket
void MAC_HandOffSuccessfullyReceivedPacket (Node* node, int interfaceIndex, Message* msg, Mac802Address* lastHopAddress, int arpMessageType) Parameters:
Pass packet successfully up to the network layer It is overloading function used for ARP packet
node
interfaceIndex msg
- Pointer to Message - mac address - Distinguish between ARP and general message
lastHopAddress arpMessageType
Returns:
void
- NULL
MAC_OutputQueueTopPacket
BOOL MAC_OutputQueueTopPacket (Node* node, int interfaceIndex, Message** msg, NodeAddress* nextHopAddress, int networkType, TosType* priority) Parameters:
interfaceIndex msg
- network type
- Message Priority
Returns:
BOOL
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAC LAYER.html[5/24/2011 12:35:45 PM]
MAC LAYER
MAC_OutputQueueTopPacket
BOOL MAC_OutputQueueTopPacket (Node* node, int interfaceIndex, Message** msg, MacHWAddress* nextHopAddress, int networkType, TosType* priority) Parameters:
interfaceIndex msg
- network type
- Message Priority
Returns:
BOOL
MAC_OutputQueueTopPacket
BOOL MAC_OutputQueueTopPacket (Node* node, int interfaceIndex, Message** msg, Mac802Address* nextHopAddress, int networkType, TosType* priority) Parameters:
interfaceIndex msg
- network type
- Message Priority
Returns:
BOOL
MAC_OutputQueueDequeuePacket
BOOL MAC_OutputQueueDequeuePacket (Node* node, int interfaceIndex, Message** msg, NodeAddress* nextHopAddress, int networkType, TosType * priority) Parameters:
interfaceIndex msg
nextHopAddress
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAC LAYER.html[5/24/2011 12:35:45 PM]
MAC LAYER
networkType priority
- network type
Returns:
BOOL
MAC_OutputQueueDequeuePacket
BOOL MAC_OutputQueueDequeuePacket (Node* node, int interfaceIndex, Message** msg, MacHWAddress* nextHopAddress, int networkType, TosType * priority) Parameters:
interfaceIndex msg
- network type
Returns:
BOOL
MAC_OutputQueueDequeuePacket
BOOL MAC_OutputQueueDequeuePacket (Node* node, int interfaceIndex, Message** msg, Mac802Address* nextHopAddress, int networkType, TosType * priority) Parameters:
node
interfaceIndex msg
- network type
Returns:
BOOL
MAC_OutputQueueDequeuePacket
BOOL MAC_OutputQueueDequeuePacket (Node* node, int interfaceIndex, Message** msg, NodeAddress* nextHopAddress, int* networkType, TosType * priority, MacOutputQueueDequeueOption dequeueOption, MacOutputQueueDequeueCriteria dequeueCriteria, int * numFreeByte, int* numPacketPacked, TraceProtocolType tracePrt, BOOL eachWithMacHeader, int maxHeaderSize, BOOL returnPackedMsg)
MAC LAYER
with options for example, pakcing multiple packets with same next hop address together
Parameters:
node
interfaceIndex msg
- network type
dequeueOption
dequeueCriteria numFreeByte
numPacketPacked tracePrt
- Trace Protocol Type - Each msg has its own MAC header?
eachWithMacHeader maxHeaderSize
returnPackedMsg
Returns:
BOOL
MAC_OutputQueueDequeuePacketForAPriority
To remove packet(s) from front of output queue; process packets with options for example, pakcing multiple packets with same next hop address together
BOOL MAC_OutputQueueDequeuePacketForAPriority (Node* node, int interfaceIndex, int priority, Message** msg, NodeAddress* nextHopAddress, int* networkType, MacOutputQueueDequeueOption dequeueOption, MacOutputQueueDequeueCriteria dequeueCriteria, int * numFreeByte, int* numPacketPacked, TraceProtocolType tracePrt, BOOL eachWithMacHeader, int maxHeaderSize, BOOL returnPackedMsg) Parameters:
node
nextHopAddress networkType
- network type
MAC LAYER
dequeueOption
- option - criteria
dequeueCriteria numFreeByte
numPacketPacked tracePrt
- Trace Protocol Type - Each msg has its own MAC header?
eachWithMacHeader maxHeaderSize
returnPackedMsg
Returns:
BOOL
MAC_IsMyUnicastFrame
Check if a packet (or frame) belongs to this node Should be used only for four byte mac address
node
destAddr
Returns:
BOOL
- boolean
MAC_IsWiredNetwork
node
interfaceIndex
Returns:
BOOL
- boolean
MAC_IsPointToPointNetwork
node
interfaceIndex
Returns:
BOOL
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAC LAYER.html[5/24/2011 12:35:45 PM]
- boolean
MAC LAYER
MAC_IsPointToMultiPointNetwork
node
interfaceIndex
Returns:
BOOL
- boolean
MAC_IsWiredBroadcastNetwork
node
interfaceIndex
Returns:
BOOL
- boolean
MAC_IsWirelessNetwork
node
interfaceIndex
Returns:
BOOL
- boolean
MAC_IsWirelessAdHocNetwork
node
interfaceIndex
Returns:
BOOL
- boolean
MAC_IsOneHopBroadcastNetwork
node
MAC LAYER
interfaceIndex
- interfaceIndex
Returns:
BOOL
- boolean
MAC_IsASwitch
node
Returns:
BOOL
- boolean
MAC_SetVirtualMacAddress
node
interfaceIndex
virtualMacAddress
Returns:
void
- None
MacSetDefaultHWAddress
node
- Pointer to Node structure - Pointer to hardware structure - Interface on which the hardware address set
macAddr
interfaceIndex
Returns:
void
- NULL
MAC_IsMyMacAddress
node
interfaceIndex destAddr
- dest address
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAC LAYER.html[5/24/2011 12:35:45 PM]
MAC LAYER
NodeAddress
- Node Address
MAC_IsMyHWAddress
node
interfaceIndex macAddr
- Mac Address
Returns:
BOOL
- None
MacValidateAndSetHWAddress
macAddrStr macAddr
Returns:
void
- NULL
DefaultMacHWAddressToIpv4Address
Retrieve the IP Address from Default HW Address . Default HW address is equal to 6 bytes
node
macAddr
Returns:
NodeAddress
- Ip address
MacGetHardwareLength
void MacGetHardwareLength (Node* node, int interface, unsigned short hwLength) Parameters:
node
interface hwLength
Returns:
void
- NULL
MAC LAYER
MacGetHardwareType
void MacGetHardwareType (Node* node, int interface, unsigned short* type) Parameters:
node
interface type
Returns:
void
- NULL
MacGetHardwareAddressString
node
interface
Returns:
void
- NULL
MacAddNewInterface
void MacAddNewInterface (Node* node, NodeAddress interfaceAddress, int numHostBits, int* interfaceIndex, const NodeInput nodeInput, char* macProtocolName) Parameters:
interfaceAddress numHostBits
interfaceIndex nodeInput
macProtocolName
Returns:
void
- None
MacAddVlanInfoForThisInterface
void MacAddVlanInfoForThisInterface (Node* node, int* interfaceIndex, NodeAddress interfaceAddress, const NodeInput nodeInput) Parameters:
Init and read VLAN configuration from user input for node and interface passed as arguments
node
interfaceIndex
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAC LAYER.html[5/24/2011 12:35:45 PM]
MAC LAYER
interfaceAddress nodeInput
- interface IP add
- node input
Returns:
void
- None
MacReleaseVlanInfoForThisInterface
node
interfaceIndex
Returns:
NodeAddress
- Node Address
MAC_IsBroadcastHWAddress
macAddr
Returns:
BOOL
- TRUE or FALSE
MAC_IsIdenticalHWAddress
macAddr1 macAddr2
Returns:
BOOL
- TRUE or FALSE
MAC_PrintHWAddr
macAddr
- Mac address
Returns:
void
- None
MAC_PrintMacAddr
MAC LAYER
- Mac address
Returns:
void
- None
MAC_RandFaultInit
void MAC_RandFaultInit (Node* node, int interfaceIndex, const char* currentLine) Parameters:
node
interfaceIndex currentLine
Returns:
void
- NULL
MAC_RandFaultFinalize
node
interfaceIndex
Returns:
void
- NULL
MAC_GetPacketsPriority
msg
- Node Pointer
Returns:
TosType
MAC_TranslateMulticatIPv4AddressToMulticastMacAddress
- Multicast ip address
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAC LAYER.html[5/24/2011 12:35:45 PM]
MAC LAYER
void
- NULL
MAC_OutputQueuePeekByIndex
BOOL MAC_OutputQueuePeekByIndex (Node* node, int interfaceIndex, int msgIndex, Message** msg, NodeAddress nextHopAddress, TosType priority) Parameters:
- Message index
nextHopAddress priority
- priority
Returns:
BOOL
MAC_OutputQueuePeekByIndex
BOOL MAC_OutputQueuePeekByIndex (Node* node, int interfaceIndex, int msgIndex, Message** msg, Mac802Address* nextHopAddress, TosType priority) Parameters:
- Message index
nextHopAddress priority
- priority
Returns:
BOOL
MAC_OutputQueuePeekByIndex
BOOL MAC_OutputQueuePeekByIndex (int interfaceIndex, int msgIndex, Message** msg, MacHWAddress* nextHopAddress, TosType priority) Parameters:
- Interface index
- Message index
MAC LAYER
nextHopAddress priority
- priority
Returns:
BOOL
MAC_OutputQueueDequeuePacketWithIndex
BOOL MAC_OutputQueueDequeuePacketWithIndex (Node* node, int interfaceIndex, int msgIndex, Message** msg, NodeAddress nextHopAddress, int networkType) Parameters:
- Message index
nextHopAddress networkType
- Type of network
Returns:
BOOL
MAC_OutputQueueDequeuePacketWithIndex
BOOL MAC_OutputQueueDequeuePacketWithIndex (Node* node, int interfaceIndex, int msgIndex, Message** msg, Mac802Address* nextHopMacAddress, int networkType) Parameters:
- Message index
nextHopMacAddress networkType
- Type of network
Returns:
BOOL
MAC_OutputQueueDequeuePacketWithIndex
BOOL MAC_OutputQueueDequeuePacketWithIndex (Node* node, int interfaceIndex, int msgIndex, Message** msg, MacHWAddress nextHopMacAddress, int networkType) Parameters:
MAC LAYER
node
- Message index
nextHopMacAddress networkType
- Type of network
Returns:
BOOL
MAC_IPv4addressIsMulticastAddress
ipV4
- ipV4 address
Returns:
BOOL
- TRUE or FALSE
MAC_IsBroadcastMacAddress
macAddr
- Mac Address.
Returns:
BOOL
- None
IPv4AddressToDefaultMac802Address
void IPv4AddressToDefaultMac802Address (Node* node, int index, NodeAddress ipv4Address, Mac802Address* macAddr) Parameters:
- Pointer to Node structure - Interface Index - Ipv4 address from which the
index
ipv4Address macAddr
Returns:
void
- NULL
ConvertVariableHWAddressTo802Address
MAC LAYER
- Pointer to Node structure - Pointer to hardware address structure - Pointer to mac 802 address structure
macHWAddr
mac802Addr
Returns:
Bool
- None
MAC_CopyMacHWAddress
destAddr srcAddr
Returns:
void
- NULL
DefaultMac802AddressToIpv4Address
node
macAddr
Returns:
NodeAddress
- Ipv4 Address
IPv4AddressToHWAddress
BOOL IPv4AddressToHWAddress (Node* node, int interfaceIndex, Message* msg, NodeAddress ipv4Address) Parameters:
interfaceIndex msg
ipv4Address
Returns:
BOOL
MacHWAddressToIpv4Address
MAC LAYER
Parameters: This functions converts variable length Mac address to IPv4 address It checks the type of hardware address and based on that conversion is done.
node
interfaceIndex macAddr
Returns:
NodeAddress
- IP address
decToHex
dec
- decimal number
Returns:
char*
- return correspondig hex digit string for one byte decimal number
MAC_FourByteMacAddressToVariableHWAddress
void MAC_FourByteMacAddressToVariableHWAddress (Node * node, int interfaceIndex, MacHWAddress * macAddr, NodeAddress nodeAddr) Parameters:
node
interfaceIndex macAddr
nodeAddr
Returns:
void
- None
MAC_VariableHWAddressToFourByteMacAddress
node
macAddr
Returns:
NodeAddress
- Ipv4 Address
GetBroadCastAddress
MAC LAYER
interfaceIndex
Returns:
MacHWAddress
GetMacHWAddress
node
interfaceIndex
Returns:
MacHWAddress
MacGetInterfaceIndexFromMacAddress
node
macAddr
Returns:
int
- interfaceIndex of node
MacGetInterfaceIndexFromMacAddress
node
macAddr
Returns:
int
- interfaceIndex of node
MacGetInterfaceIndexFromMacAddress
node
macAddr
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAC LAYER.html[5/24/2011 12:35:45 PM]
MAC LAYER
int
- interfaceIndex of node
MAC_Reset
node
InterfaceIndex
Returns:
void
- None
MAC_AddResetFunctionList
Add which protocols in the Mac layer to be reset to a fuction list pointer.
node
InterfaceIndex param
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
MAIN
MAIN
This file contains some common definitions. Constant / Data Structure Summary Type
CONSTANT
Name
MAX_NUM_PHYS
ARP type
CONSTANT ANY_DEST
This is a special addresses used in the MAC and network layers. It defines any destination.
CONSTANT ANY_MAC802
This is a special addresses used in the MAC and network layers. It defines any destination of six byte.
CONSTANT INVALID_802ADDRESS
This is a special addresses used in the MAC and network layers. It is used for invalid address
CONSTANT ANY_SOURCE_ADDR
MAIN
This is a special addresses used in the MAC and network layers. It defines any source.
CONSTANT ANY_IP
This is a special addresses used in the MAC and network layers. It defines any IP.
CONSTANT ANY_INTERFACE
This is a special addresses used in the MAC and network layers. It defines any Interface.
CONSTANT CPU_INTERFACE
This is a special addresses used in the MAC and network layers. It defines CPU Interface.
CONSTANT INVALID_ADDRESS
Generic maximum length of a string. The maximum length of any line in the input file is 3x this value.
CONSTANT BIG_STRING_LENGTH
Defines the Maximum Network Packet Size which can handled by the physical network. In QualNet, its value is 2048. Packet larger than this will be fragmented by IP.
ENUMERATION NetworkType
enum for the various layers in QualNet. New layers added to the simulation should be added here as well. Used by models at all layers in the protocol stack to mark newly created messages to be destined to the right layer/module.
STRUCT in6_addr
MAIN
Describes the address structure which contains the interface address and network type
Summary
MAX(X, Y)
Utility function MAX. Calculates the Maximum one from two given numbers.
MACRO MIN(X, Y)
Utility function MIN. Calculates the Minimum one from two given numbers.
MACRO ABS(X)
Utility function, decibel converter. Performs the 10 base log operation on the given number and then multiply with 10.
MACRO NON_DB(x)
Utility function, decibel converter. Performs power operation on the given number.
MACRO MEM_malloc
MAIN
Round a float point number to an integer. This function tries to get consistent value on different platforms
void* MEM_malloc(size_t size, char* filename, int lineno)
Left shifts data where eposition determines the position of thelast bit after the shift and (size-eposition) determines the number of bits to be shifted
UInt16 LshiftShort(UInt16 x, UInt16 eposition)
Left shifts data where eposition determines the position of thelast bit after the shift and (size-eposition) determines the number of bits to be shifted
UInt32 LshiftInt(UInt32 x, int eposition)
MAIN
Left shifts data where eposition determines the position of thelast bit after the shift and (size-eposition) determines the number of bits to be shifted
UInt8 RshiftChar(UInt8 x, UInt8 eposition)
Right shifts data where eposition determines the position of thelast bit after the shift and (size-eposition) determines the number of bits to be shifted
UInt16 RshiftShort(UInt16 x, UInt16 eposition)
Right shifts data where eposition determines the position of thelast bit after the shift and (size-eposition) determines the number of bits to be shifted
UInt32 RshiftInt(UInt32 x, int eposition)
Right shifts data where eposition determines the position of thelast bit after the shift and (size-eposition) determines the number of bits to be shifted
Constant
MAX_NUM_PHYS 28
Constant
Constant
Constant
Constant
This is a special addresses used in the MAC and network layers. It defines any destination.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAIN.html[5/24/2011 12:36:07 PM]
MAIN
Constant
ANY_MAC802 0xffffffffffff
Constant
This is a special addresses used in the MAC and network layers. It defines any destination of six byte. INVALID_802ADDRESS 0xfffffffffffe
Constant
This is a special addresses used in the MAC and network layers. It is used for invalid address ANY_SOURCE_ADDR 0xffffffff
Constant
This is a special addresses used in the MAC and network layers. It defines any source. ANY_IP 0xffffffff
Constant
This is a special addresses used in the MAC and network layers. It defines any IP. ANY_INTERFACE -1
Constant
This is a special addresses used in the MAC and network layers. It defines any Interface. CPU_INTERFACE -2
Constant
This is a special addresses used in the MAC and network layers. It defines CPU Interface. INVALID_ADDRESS 987654321
Constant
Constant
Generic maximum length of a string. The maximum length of any line in the input file is 3x this value. BIG_STRING_LENGTH 512
Constant
Constant
MAIN
Enumeration
Defines the Maximum Network Packet Size which can handled by the physical network. In QualNet, its value is 2048. Packet larger than this will be fragmented by IP. NetworkType
Enlisted different network type Enumeration enum for the various layers in QualNet. New layers added to the simulation should be added here as well. Used by models at all layers in the protocol stack to mark newly created messages to be destined to the right layer/module. in6_addr
Structure
Structure
Structure
Describes the address structure which contains the interface address and network type
Function / Macro Detail Function / Macro MAX(X, Y) Format Utility function MAX. Calculates the Maximum one from two given numbers.
MIN(X, Y)
Utility function MIN. Calculates the Minimum one from two given numbers.
ABS(X)
IN_DB(x)
Utility function, decibel converter. Performs the 10 base log operation on the given number and then multiply with 10.
NON_DB(x)
Utility function, decibel converter. Performs power operation on the given number.
MEM_malloc
MAIN
GetIPv4Address
addr
- generic address.
Returns:
NodeAddress
- IPv4 address
GetIPv6Address
addr
- generic address.
Returns:
in6_addr
- IPv6 address
SetIPv4AddressInfo
address addr
- generic address.
Returns:
void
- NULL
SetIPv6AddressInfo
address addr
- generic address.
Returns:
void
- NULL
RoundToInt
Round a float point number to an integer. This function tries to get consistent value on different platforms
Returns:
int
MAIN
MEM_malloc
size
- Size of the memory block to be allocated. - Name of file allocating the memory
filename lineno
Returns:
void*
MEM_free
ptr
Returns:
void
- None
maskChar
sposition eposition
Returns:
UInt8
- None
maskShort
sposition eposition
Returns:
UInt16
- None
maskInt
sposition eposition
MAIN
- None
LshiftChar
Left shifts data where eposition determines the position of thelast bit after the shift and (size-eposition) determines the number of bits to be shifted
eposition
Returns:
UInt8
- None
LshiftShort
Left shifts data where eposition determines the position of thelast bit after the shift and (size-eposition) determines the number of bits to be shifted
eposition
Returns:
UInt16
- None
LshiftInt
Left shifts data where eposition determines the position of thelast bit after the shift and (size-eposition) determines the number of bits to be shifted
eposition
Returns:
UInt32
- None
RshiftChar
Right shifts data where eposition determines the position of thelast bit after the shift and (size-eposition) determines the number of bits to be shifted
eposition
Returns:
UInt8
- None
RshiftShort
MAIN
Parameters: Right shifts data where eposition determines the position of thelast bit after the shift and (size-eposition) determines the number of bits to be shifted
x
eposition
Returns:
UInt16
- None
RshiftInt
Right shifts data where eposition determines the position of thelast bit after the shift and (size-eposition) determines the number of bits to be shifted
eposition
Returns:
UInt32
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
MAPPING
MAPPING
This file describes data structures and functions for mapping between node pointers, node identifiers, and node addresses. Constant / Data Structure Summary Type
CONSTANT
Name
INVALID_MAPPING
Defines node hash size. Hashes the nodeIds using a mod NODE_HASH_SIZE hash.
STRUCT NetworkProperty
Used to determine what the next address counter should be for each subnet address. This is needed to allow different SUBNET/LINK statements to declare the same subnet address.
STRUCT AddressMapType
MAPPING
Summary
MADDR6_SCOPE(a)
MAPPING
MAPPING
Compairs to ipv6 address. if a is greater than b then returns positive, if equals then 0, a is smaller then b then negative.
BOOL Ipv6IsAddressInNetwork(const in6_addr* globalAddr, unsigned int tla, unsigned int vla, unsigned int sla)
Checks whether the address is in the same network. : if in the same network then returns TRUE, otherwise FALSE.
BOOL Ipv6IsAddressInNetwork(const in6_addr* globalAddr, const in6_addr* ipv6SubnetAddr, unsigned int prefixLenth)
Checks whether the address is in the same network. : if in the same network then returns TRUE, otherwise FALSE.
BOOL Ipv6CheckNetworkParams(unsigned int tla tla, unsigned int nla nla, unsigned int sla sla)
Hashes the nodeIds using a mod NODE_HASH_SIZE hash. This is not thread safe.
Node* MAPPING_GetNodePtrFromHash(IdToNodePtrMap* hash, NodeAddress nodeId)
MAPPING
Get node interface Address according to the network specific interface index. Overloaded function for ATM compatibility.
NodeAddress MAPPING_GetNodeIdFromInterfaceAddress(Node* node, NodeAddress interfaceAddress)
MAPPING
Get node interface Address, generic interfaceIndex and Atm related interfaceIndex from ATM Network information.
unsigned int MAPPING_GetInterfaceIdForDestAddress(Node* node, NodeId nodeId, NodeAddress destAddr)
For a given nodeId & destination address find the subnet mask for the associated network
NodeAddress MAPPING_GetInterfaceAddrForNodeIdAndIntfId(Node* node, NodeId nodeId, int intfId)
MAPPING
MAPPING
MAPPING
Constant
INVALID_MAPPING 0xffffffff
MAPPING
Constant
Constant
Structure
Defines node hash size. Hashes the nodeIds using a mod NODE_HASH_SIZE hash. NetworkProperty
Structure
Structure
Structure
Structure
Used to determine what the next address counter should be for each subnet address. This is needed to allow different SUBNET/LINK statements to declare the same subnet address. AddressMapType
Structure
Function / Macro Detail Function / Macro MADDR6_SCOPE(a) Format Multicast Address Scope.
MAPPING
IS_MULTIADDR6(a)
CLR_ADDR6(a)
IS_CLR_ADDR6(a)
COPY_ADDR6(from, to)
SAME_ADDR6(a, b)
IS_ANYADDR6(a)
IS_LOOPADDR6(a)
CMP_ADDR6(a, b)
IS_IPV4ADDR6(a)
IS_LOCALADDR6(a)
IS_LINKLADDR6(a)
IS_SITELADDR6(a)
SAME_ADDR4(a, b)
IS_ANYADDR4(a)
Address_IsSameAddress
addr1 addr2
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAPPING.html[5/24/2011 12:36:33 PM]
MAPPING
BOOL
- None
Address_IsAnyAddress
addr
- Pointer to address
Returns:
BOOL
- None
Address_IsMulticastAddress
addr
- Pointer to address
Returns:
BOOL
- None
Address_IsSubnetBroadcastAddress
node addr
Returns:
BOOL
- None
Address_SetToAnyAddress
addr
refAddr
Returns:
void
- None
Address_AddressCoopy
dstAddress srcAddress
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAPPING.html[5/24/2011 12:36:33 PM]
MAPPING
void
- NULL
Ipv6CompareAddr6
Compairs to ipv6 address. if a is greater than b then returns positive, if equals then 0, a is smaller then b then negative.
a b
Returns:
int
- None
Ipv6IsAddressInNetwork
BOOL Ipv6IsAddressInNetwork (const in6_addr* globalAddr, unsigned int tla, unsigned int vla, unsigned int sla) Parameters:
Checks whether the address is in the same network. : if in the same network then returns TRUE, otherwise FALSE.
- Top level ipv6 address. - Next level ipv6 address. - Site local ipv6 address.
Returns:
BOOL
- None
Ipv6IsAddressInNetwork
BOOL Ipv6IsAddressInNetwork (const in6_addr* globalAddr, const in6_addr* ipv6SubnetAddr, unsigned int prefixLenth) Parameters:
Checks whether the address is in the same network. : if in the same network then returns TRUE, otherwise FALSE.
globalAddr
ipv6SubnetAddr prefixLenth
Returns:
BOOL
Ipv6CheckNetworkParams
BOOL Ipv6CheckNetworkParams (unsigned int tla tla, unsigned int nla nla, unsigned int sla sla) Parameters:
MAPPING
Returns:
BOOL
- None
MAPPING_HashNodeId
Hashes the nodeIds using a mod NODE_HASH_SIZE hash. This is not thread safe.
hash
nodeId
nodePtr
Returns:
void
- None
MAPPING_GetNodePtrFromHash
hash
nodeId
Returns:
Node*
MAPPING_MallocAddressMap
Returns:
AddressMapType*
MAPPING_InitAddressMap
map
Returns:
void
- None
MAPPING_BuildAddressMap
void MAPPING_BuildAddressMap (const NodeInput* nodeInput, NodeAddress** nodeIdArrayPtr, AddressMapType* map) Parameters:
MAPPING
nodeIdArrayPtr map
Returns:
void
- None
MAPPING_GetInterfaceAddressForSubnet
NodeAddress MAPPING_GetInterfaceAddressForSubnet (Node* node, NodeAddress nodeId, NodeAddress subnetAddress, int numHostBits) Parameters:
nodeId
subnetAddress numHostBits
Returns:
NodeAddress
MAPPING_GetInterfaceAddressForSubnet
NodeAddress MAPPING_GetInterfaceAddressForSubnet (const AddressMapType* map, NodeAddress nodeId, NodeAddress subnetAddress, int numHostBits) Parameters:
nodeId
subnetAddress numHostBits
Returns:
NodeAddress
MAPPING_GetSubnetAddressForInterface
node
nodeId
interfaceIndex
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAPPING.html[5/24/2011 12:36:33 PM]
MAPPING
NodeAddress
MAPPING_GetSubnetMaskForInterface
node
nodeId
interfaceIndex
Returns:
NodeAddress
MAPPING_GetNumHostBitsForInterface
node
nodeId
interfaceIndex
Returns:
int
MAPPING_GetInterfaceInfoForInterface
void MAPPING_GetInterfaceInfoForInterface (Node* node, NodeAddress nodeId, int interfaceIndex, NodeAddress* interfaceAddress, NodeAddress* subnetAddress, NodeAddress* subnetMask, int* numHostBits) Parameters:
- A pointer to node being initialized. - Node id - Interface index - Interface address, int pointer.
nodeId
interfaceIndex
numHostBits
Returns:
void
- None
MAPPING_GetInterfaceAddressForInterface
MAPPING
nodeId
interfaceIndex
Returns:
NodeAddress
MAPPING_GetInterfaceAddressForInterface
Get node interface Address according to the network specific interface index. Overloaded function for ATM compatibility.
netType
relativeInfInx
Returns:
Address
- Return Address.
MAPPING_GetNodeIdFromInterfaceAddress
node
interfaceAddress
Returns:
NodeAddress
- None
MAPPING_GetNodeIdFromInterfaceAddress
node
interfaceAddress
Returns:
NodeAddress
- None
MAPPING_GetDefaultInterfaceAddressFromNodeId
node
MAPPING
nodeId
- Node id
Returns:
NodeAddress
MAPPING_GetNumNodesInSubnet
node
subnetAddress
Returns:
unsigned int
MAPPING_GetSubnetAddressCounter
map
subnetAddress
Returns:
unsigned int
MAPPING_UpdateSubnetAddressCounter
subnetAddress
addressCounter
Returns:
void
- None
MAPPING_GetInterfaceIndexFromInterfaceAddress
node
interfaceAddress
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAPPING.html[5/24/2011 12:36:33 PM]
MAPPING
int
MAPPING_GetNodeInfoFromAtmNetInfo
Get node interface Address, generic interfaceIndex and Atm related interfaceIndex from ATM Network information.
index
- return atm related interface index of a - return generic interface index of a node.
genIndex
Returns:
Address
- Return valid ATM Address related to Network information if genIndex is not equal to -1.
MAPPING_GetInterfaceIdForDestAddress
unsigned int MAPPING_GetInterfaceIdForDestAddress (Node* node, NodeId nodeId, NodeAddress destAddr) Parameters:
node
nodeId
destAddr
Returns:
unsigned int
- None
MAPPING_GetSubnetMaskForDestAddress
For a given nodeId & destination address find the subnet mask for the associated network
node
nodeId
destAddr
Returns:
NodeAddress
- None
MAPPING_GetInterfaceAddrForNodeIdAndIntfId
node
nodeId intfId
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAPPING.html[5/24/2011 12:36:33 PM]
MAPPING
NodeAddress
- None
MAPPING_GetIPv6NetworkAddressCounter
unsigned int MAPPING_GetIPv6NetworkAddressCounter (AddressMapType* map, in6_addr subnetAddr, unsigned int subnetPrefixLen) Parameters:
subnetAddr
subnetPrefixLen
Returns:
unsigned int
MAPPING_UpdateIPv6NetworkAddressCounter
void MAPPING_UpdateIPv6NetworkAddressCounter (AddressMapType* map, in6_addr subnetAddr, unsigned int subnetPrefixLen, int addressCounter) Parameters:
subnetAddr
subnetPrefixLen addressCounter
Returns:
void
- None
MAPPING_GetNumNodesInIPv6Network
unsigned int MAPPING_GetNumNodesInIPv6Network (Node* node, in6_addr subnetAddr, unsigned int subnetPrefixLen) Parameters:
- The pointer to the node. - The IPv6 address. - The prefix length.
subnetAddr
subnetPrefixLen
Returns:
unsigned int
- None
MAPPING_GetNetworkIPVersion
addrString
MAPPING
Returns:
NetworkType
- None
MAPPING_GetNetworkType
addrString
Returns:
NetworkType
- None
MAPPING_GetIpv6InterfaceInfoForInterface
void MAPPING_GetIpv6InterfaceInfoForInterface (Node *node node, NodeId nodeId nodeId, int interfaceIndex, in6_addr* globalAddr, in6_addr* subnetAddr, unsigned int* subnetPrefixLen) Parameters:
nodeId
- The global IPv6 address. - The subnet IPv6 address. - THe subnet prefex length.
subnetPrefixLen
Returns:
void
- None
MAPPING_GetIpv6GlobalAddress
BOOL MAPPING_GetIpv6GlobalAddress (Node *node node, NodeId nodeId nodeId, unsigned int tla, unsigned int nla, unsigned int sla, in6_addr * addr6) Parameters:
- Top level aggregation - Next level aggregation - Site level aggregation - The global IPv6 address.
addr6
Returns:
BOOL
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAPPING.html[5/24/2011 12:36:33 PM]
- None
MAPPING
MAPPING_GetIpv6GlobalAddressForInterface
BOOL MAPPING_GetIpv6GlobalAddressForInterface (Node * node, NodeId nodeId, int interfaceIndex, in6_addr * addr6, BOOL isDeprecated) Parameters:
nodeId
interfaceIndex addr6
isDeprecated
Returns:
BOOL
- None
MAPPING_CreateIpv6GlobalUnicastAddr
void MAPPING_CreateIpv6GlobalUnicastAddr (unsigned int tla, unsigned int nla, unsigned int sla, int addressCounter, in6_addr* globalAddr) Parameters:
- Top level aggregation - Next level aggregation - Site level aggregation - The address counter.
addressCounter globalAddr
Returns:
void
- None
MAPPING_CreateIpv6GlobalUnicastAddr
void MAPPING_CreateIpv6GlobalUnicastAddr (AddressMapType * map, in6_addr IPv6subnetAddress, uunsigned int IPv6subnetPrefixLen, int addressCounter, in6_addr* globalAddr) Parameters:
IPv6subnetAddress
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAPPING.html[5/24/2011 12:36:33 PM]
MAPPING
void
- None
MAPPING_CreateIpv6LinkLocalAddr
void MAPPING_CreateIpv6LinkLocalAddr (in6_addr* globalAddr, in6_addr* linkLocalAddr, unsigned int subnetPrefixLen) Parameters:
- The global IPv6 address. - The subnet IPv6 address. - The subnet prefix length.
linkLocalAddr
subnetPrefixLen
Returns:
void
- None
MAPPING_CreateIpv6SiteLocalAddr
void MAPPING_CreateIpv6SiteLocalAddr (in6_addr* globalAddr, in6_addr* siteLocalAddr, unsigned short siteCounter, unsigned int subnetPrefixLen) Parameters:
siteLocalAddr siteCounter
subnetPrefixLen
Returns:
void
- None
MAPPING_CreateIpv6MulticastAddr
globalAddr
multicastAddr
Returns:
void
- None
MAPPING_CreateIpv6SubnetAddr
void MAPPING_CreateIpv6SubnetAddr (unsigned int tla, unsigned int nla, unsigned int sla, unsigned int* IPv6subnetPrefixLen, in6_addr* IPv6subnetAddress) Parameters:
MAPPING
sla
IPv6subnetPrefixLen IPv6subnetAddress
Returns:
void
- None
MAPPING_GetNodeIdFromGlobalAddr
node
globalAddr
Returns:
NodeId
- None
MAPPING_GetNodeIdFromLinkLayerAddr
node
linkLayerAddr
Returns:
NodeId
- None
MAPPING_CreateIpv6LinkLayerAddr
nodeId
interfaceId
Returns:
NodeAddress
- None
MAPPING_IsIpv6AddressOfThisNode
BOOL MAPPING_IsIpv6AddressOfThisNode (Node* node, const NodeAddress nodeId, in6_addr* globalAddr) Parameters:
node
nodeId
globalAddr
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAPPING.html[5/24/2011 12:36:33 PM]
MAPPING
- None
MAPPING_IsNodeInThisIpRange
BOOL MAPPING_IsNodeInThisIpRange (Node* node, NodeId nodeId, NodeAddress startRange, NodeAddress endRange) Parameters:
nodeId
startRange endRange
Returns:
BOOL
- None
MAPPING_IsIpAddressOfThisNode
BOOL MAPPING_IsIpAddressOfThisNode (Node* node, const NodeAddress nodeId, NodeAddress addr) Parameters:
node
nodeId addr
- The address.
Returns:
BOOL
- None
MAPPING_GetInterfaceAddressForSubnet
BOOL MAPPING_GetInterfaceAddressForSubnet (Node* node, NodeId nodeId, in6_addr* ipv6SubnetAddr, unsigned int prefixLenth, in6_addr* ipv6InterfaceAddr, int* interfaceIndex) Parameters:
nodeId
ipv6SubnetAddr prefixLenth
ipv6InterfaceAddr interfaceIndex
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAPPING.html[5/24/2011 12:36:33 PM]
MAPPING
BOOL
- None
MAPPING_GetInterfaceAddressForSubnet
BOOL MAPPING_GetInterfaceAddressForSubnet (const AddressMapType* map, NodeId nodeId, in6_addr* ipv6SubnetAddr, unsigned int prefixLenth, in6_addr* ipv6InterfaceAddr, int* interfaceIndex) Parameters:
nodeId
ipv6SubnetAddr prefixLenth
ipv6InterfaceAddr interfaceIndex
Returns:
BOOL
- None
MAPPING_GetInterfaceAddressForSubnet
BOOL MAPPING_GetInterfaceAddressForSubnet (Node* node node, NodeId nodeId nodeId, unsigned int tla, unsigned int nla, unsigned int sla, in6_addr* ipv6Addr, int* interfaceIndex) Parameters:
- Top level aggregation. - Next level aggregation. - Site level aggregation. - The ipv6 interface address. - The interface index.
ipv6Addr
interfaceIndex
Returns:
BOOL
- None
; MAPPING_GetInterfaceAddressForSubnet
BOOL ; MAPPING_GetInterfaceAddressForSubnet (const AddressMapType* map, NodeId nodeId, unsigned int tla, unsigned int nla, unsigned int sla, in6_addr* ipv6Addr, int* interfaceIndex) Parameters:
nodeId
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAPPING.html[5/24/2011 12:36:33 PM]
MAPPING
- Top level aggregation. - Next level aggregation. - Site level aggregation. - The ipv6 interface address. - The interface index.
ipv6Addr
interfaceIndex
Returns:
BOOL
- None
MAPPING_GetInterfaceFromLinkLayerAddress
node
linkLayerAddr
Returns:
int
- None
MAPPING_GetInterfaceIndexFromInterfaceAddress
node
interfaceAddress
Returns:
int
- None
MAPPING_GetIpv6GlobalAddress
BOOL MAPPING_GetIpv6GlobalAddress (Node* node, NodeId nodeId, in6_addr subnetAddr, UInt32 prefixLen, in6_addr* addr6) Parameters:
nodeId
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAPPING.html[5/24/2011 12:36:33 PM]
MAPPING
BOOL
- None
MAPPING_GetDefaultInterfaceAddressInfoFromNodeId
Address MAPPING_GetDefaultInterfaceAddressInfoFromNodeId (Node *node node, NodeAddress nodeId nodeId, NetworkType networktype networktype) Parameters:
nodeId
networktype
Returns:
Address
- None
Mapping_AutoCreateIPv6SubnetAddress
ipAddress
subnetString
Returns:
void
- NONE
MAPPING_GetSubnetAddressFromInterfaceAddress
interfaceAddress
Returns:
NodeAddress
- subnet address
MAPPING_GetSubnetAddressFromInterfaceAddress
ipv6InterfaceAddr ipv6SubnetAddr
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MAPPING.html[5/24/2011 12:36:33 PM]
MAPPING
BOOL
- None
MAPPING_GetPrefixLengthForInterfaceAddress
BOOL MAPPING_GetPrefixLengthForInterfaceAddress (Node* node, in6_addr* ipv6InterfaceAddr, unsigned int prefixLenth) Parameters:
ipv6InterfaceAddr prefixLenth
Returns:
BOOL
- None
MAPPING_GetNetworkProtocolTypeForNode
nodeInput
Returns:
NetworkProtocolType
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
MEMORY
MEMORY
This file describes the memory management data structures and functions. Constant / Data Structure Summary Type
STRUCT
Name
MemoryUsageData
Defines the parameters collected by the memory system. Restricted to kernel use.
Summary
MEM_CreateThreadData()
Creates partition-specific space for collecting memory usage statistics. This is used in threaded versions of QualNet, but not in distributed versions, currently.
void MEM_InitializeThreadData(MemoryUsageData* data)
MEMORY
Prints out the total memory usage statistics for the simulation. In a parallel run, the peak usage is the sum of the partition's peak usage and might not be precisely accurate.
Structure
MemoryUsageData
Defines the parameters collected by the memory system. Restricted to kernel use.
Function / Macro Detail Function / Macro MEM_CreateThreadData Format void MEM_CreateThreadData () Parameters: Creates partition-specific space for collecting memory usage statistics. This is used in threaded versions of QualNet, but not in distributed versions, currently. MEM_InitializeThreadData Returns:
void
- None
data
- the data
Returns:
void
- None
MEM_PrintThreadData
Returns:
void
- None
MEM_ReportPartitionUsage
void MEM_ReportPartitionUsage (int partitionId, UInt32 totalAllocatedMemory, UInt32 totalFreedMemory, UInt32 totalPeakUsage) Parameters:
partitionId
MEMORY
Returns:
void
- None
MEM_ReportTotalUsage
Prints out the total memory usage statistics for the simulation. In a parallel run, the peak usage is the sum of the partition's peak usage and might not be precisely accurate.
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
MESSAGE
MESSAGE
This file describes the message structure used to implement events and functions for message operations. Constant / Data Structure Summary Type
CONSTANT
Name
MSG_MAX_HDR_SIZE
Size of small Info field. Should be larger than all commonly used info field data structures, especially PropTxInfo and PropRxInfo.
CONSTANT MSG_PAYLOAD_LIST_MAX
MESSAGE
Type of information in the info field. One message can only have up to one info field with a specific info type.
STRUCT MessageInfoHeader
This is the main data strucure that represents a discrete event in qualnet. This is used to represent timer as well as to simulate actual sending of packets across the network.
Summary
MESSAGE_PrintMessage(Node* node, Message* msg)
void
Function call used to send a message within QualNet. When a message is sent using this mechanism, only the pointer to the message is actually sent through the system. So the user has to be careful not to do anything with the content of the pointer once MESSAGE_Send has been called.
void MESSAGE_SendMT(Node* node, Message* msg, clocktype delay)
Function call used to send a message from independent threads running within QualNet, for example those associated with external interfaces.
void MESSAGE_RemoteSend(Node* node, NodeId destNodeId, Message* msg, clocktype delay)
Function used to send a message to a node that might be on a remote partition. The system will make a shallow copy of the message, meaning it can't contain any pointers in the info field or the packet itself. This function is very unsafe. If you use it, your program will probably crash. Only I can use it.
void MESSAGE_RouteReceivedRemoteEvent(Node* node, Message* msg)
Counterpart to MESSAGE_RemoteSend, this function allows models that send remote messages to provide special handling for them on the receiving partition. This function is called in real time as the messages are received, so must be used carefully.
void MESSAGE_CancelSelfMsg(Node* node, Message* msgToCancelPtr)
Function call used to cancel a event message in the QualNet scheduler. The Message must be a self message (timer) .i.e. a message a node sent to itself. The msgToCancelPtr must a pointer to the original message that needs to be canceled.
Message* (Node* node, int layerType, int protocol, int eventType)
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MESSAGE.html[5/24/2011 12:37:03 PM]
MESSAGE
MESSAGE_Alloc
Allocate a new Message structure. This is called when a new message has to be sent through the system. The last three parameters indicate the layerType, protocol and the eventType that will be set for this message.
Message* MESSAGE_Alloc(PartitionData* partition, int layerType, int protocol, int eventType)
Allocate a new Message structure. This is called when a new message has to be sent through the system. The last three parameters indicate the layerType, protocol and the eventType that will be set for this message.
Message* MESSAGE_AllocMT(PartitionData* partition, int layerType, int protocol, int eventType)
Allocate one "info" field with given info type for the message. This function is used for the delivery of data for messages which are NOT packets as well as the delivery of extra information for messages which are packets. If a "info" field with the same info type has previously been allocated for the message, it will be replaced by a new "info" field with the specified size. Once this function has been called, MESSAGE_ReturnInfo function can be used to get a pointer to the allocated space for the info field in the message structure.
char* MESSAGE_AddInfo(PartitionData* partition, Message* msg, int infoSize, unsigned short infoType)
Allocate one "info" field with given info type for the message. This function is used for the delivery of data for messages which are NOT packets as well as the delivery of extra information for messages which are packets. If a "info" field with the same info type has previously been allocated for the message, it will be replaced by a new "info" field with the specified size. Once this function has been called, MESSAGE_ReturnInfo function can be used to get a pointer to the allocated space for the info field in the message structure.
void MESSAGE_RemoveInfo(Node* node, Message* msg, unsigned short infoType)
MESSAGE
Remove one "info" field with given info type from the info array of the message.
char * MESSAGE_InfoAlloc(Node* node, Message* msg, int infoSize)
Allocate the default "info" field for the message. This function is similar to MESSAGE_AddInfo. The difference is that it assumes the type of the info field to be allocated is INFO_TYPE_DEFAULT.
char * MESSAGE_InfoAlloc(PartitionData* partition, Message* msg, int infoSize)
Allocate the default "info" field for the message. This function is similar to MESSAGE_AddInfo. The difference is that it assumes the type of the info field to be allocated is INFO_TYPE_DEFAULT.
int MESSAGE_ReturnInfoSize(Message* msg, unsigned short infoType, int fragmentNumber)
Returns the size of a "info" field with given info type in the info array of the message.
int MESSAGE_ReturnInfoSize(Message* msg, unsigned short infoType)
Returns the size of a "info" field with given info type in the info array of the message.
char* MESSAGE_ReturnInfo(Message* msg, unsigned short infoType)
Returns a pointer to the "info" field with given info type in the info array of the message.
void MESSAGE_CopyInfo(Node* node, Message* dsgMsg, Message* srcMsg)
Copy the "info" fields of the source message to the destination message.
void MESSAGE_CopyInfo(Node* node, Message* dsgMsg, MessageInfoHeader* srcInfo)
Copy the "info" fields of the source info header to the destination message.
void MESSAGE_FragmentPacket(Node* node, Message* msg, int fragUnit, Message*** fragList, int* numFrags, TraceProtocolType protocolType)
Fragment one packet into multiple fragments Note: The original packet will be freed in this function. The array for storing pointers to fragments will be dynamically allocated. The caller of this function will need to free the memory.
Message* MESSAGE_ReassemblePacket(Node* node, Message** fragList, int numFrags, TraceProtocolType protocolType)
Reassemble multiple fragments into one packet Note: All the fragments will be freed in this function.
Message* MESSAGE_PackMessage(Node* node, Message* msgList, TraceProtocolType origProtocol, int* actualPktSize)
MESSAGE
Pack a list of messages to be one message structure Whole contents of the list messages will be put as payload of the new message. So the packet size of the new message cannot be directly used now. The original lis of msgs will be freed.
Message* MESSAGE_UnpackMessage(Node* node, Message* msg, bool copyInfo, bool freeOld)
Unpack a super message to the original list of messages The list of messages were stored as payload of this super message.
void MESSAGE_PacketAlloc(Node* node, Message* msg, int packetSize, TraceProtocolType originalProtocol)
Allocate the "payload" field for the packet to be delivered. Add additional free space in front of the packet for headers that might be added to the packet. This function can be called from the application layer or anywhere else (e.g TCP, IP) that a packet may originiate from. The "packetSize" variable will be set to the "packetSize" parameter specified in the function call. Once this function has been called the "packet" variable in the message structure can be used to access this space.
void MESSAGE_PacketAlloc(PartitionData* partition, Message* msg, int packetSize, TraceProtocolType originalProtocol, bool isMT)
Allocate the "payload" field for the packet to be delivered. Add additional free space in front of the packet for headers that might be added to the packet. This function can be called from the application layer or anywhere else (e.g TCP, IP) that a packet may originiate from. The "packetSize" variable will be set to the "packetSize" parameter specified in the function call. Once this function has been called the "packet" variable in the message structure can be used to access this space.
void MESSAGE_AddHeader(Node* node, Message* msg, int hdrSize, TraceProtocolType traceProtocol)
This function is called to reserve additional space for a header of size "hdrSize" for the packet enclosed in the message. The "packetSize" variable in the message structure will be increased by "hdrSize". Since the header has to be prepended to the current packet, after this function is called the "packet" variable in the message structure will point the space occupied by this new header.
void MESSAGE_RemoveHeader(Node* node, Message* msg, int hdrSize, TraceProtocolType traceProtocol)
This function is called to remove a header from the packet. The "packetSize" variable in the message will be decreased by "hdrSize".
char* MESSAGE_ReturnHeader(Message* msg, int header)
This is kind of a hack so that MAC protocols (dot11) that need to peak at a packet that still has the PHY header can return the contents after the first (N) headers without first removing those headers.
void MESSAGE_ExpandPacket(Node* node, Message* msg, int size)
MESSAGE
When the message is no longer needed it can be freed. Firstly the "payload" and "info" fields of the message are freed. Then the message itself is freed. It is important to remember to free the message. Otherwise there will nasty memory leaks in the program.
void MESSAGE_Free(Node* node, Message* msg)
When the message is no longer needed it can be freed. Firstly the "payload" and "info" fields of the message are freed. Then the message itself is freed. It is important to remember to free the message. Otherwise there will nasty memory leaks in the program.
void MESSAGE_FreeList(Node* node, Message* msg)
Free a list of message until the next pointer of the message is NULL.
Message* MESSAGE_Duplicate(Node* node, Message* msg)
Create a new message which is an exact duplicate of the message supplied as the parameter to the function and return the new message.
Message* MESSAGE_Duplicate(PartitionData* partition, Message* msg, bool isMT)
Create a new message which is an exact duplicate of the message supplied as the parameter to the function and return the new message.
Message* MESSAGE_DuplicateMT(PartitionData* partition, Message* msg)
Create a new message which is an exact duplicate of the message supplied as the parameter to the function and return the new message.
char* MESSAGE_PayloadAlloc(Node* node, int payloadSize)
Allocate a character payload out of the free list, if possible otherwise via malloc.
char* MESSAGE_PayloadAlloc(PartitionData* partition, int payloadSize, bool isMT)
Allocate a character payload out of the free list, if possible otherwise via malloc.
void MESSAGE_PayloadFree(PartitionData* partition, Char* payload, int payloadSize)
Return a character payload to the free list, if possible otherwise free it.
void MESSAGE_PayloadFree(Node* node, Char* payload, int payloadSize)
Return a character payload to the free list, if possible otherwise free it.
void MESSAGE_FreeList(Node* node, Message* msg)
Free a list of messages until the next pointer of the message is NULL.
int MESSAGE_ReturnNumFrags(Message* msg)
MESSAGE
Returns the number of info fields associated with a particular fragment in the TCP packet.
void MESSAGE_AppendInfo(Node* node, Message* msg, int infosize, short infoType)
Appends the "info" fields of the source message to the destination message.
void MESSAGE_AppendInfo(Node* node, Message* dsgMsg, MessageInfoHeader* srcInfo)
Appends the "info" fields of the source message to the destination message.
void MESSAGE_AppendInfo(Node* node, Message* dsgMsg, Message* srcMsg)
Appends the "info" fields of the source message to the destination message.
size_t MESSAGE_SizeOf()
Returns the size of a message. Used in place of sizeof() in the kernel code to allow for users to add more fields to the message.
BOOL MESSAGE_FragmentPacket(Node* node, Message*& msg, Message*& fragmentedMsg, Message*& remainingMsg, int fragUnit, TraceProtocolType protocolType, bool freeOriginalMsg)
Fragment one packet into TWO fragments Note:(i) This API treats the original packet as raw packet and does not take account of fragmentation related information like fragment id. The caller of this API will have to itself put in logic for distinguishing the fragmented packets (ii) Overloaded MESSAGE_FragmentPacket
Message* MESSAGE_ReassemblePacket(Node* node, Message* fragMsg1, Message* fragMsg2, TraceProtocolType protocolType)
Reassemble TWO fragments into one packet Note: (i) None of the fragments will be freed in this API. The caller of this API will itself have to free the fragments (ii) Overloaded MESSAGE_ReassemblePacket
void MESSAGE_SendAsEarlyAsPossible(Node* node, Message* msg)
MESSAGE
This function is used primarily by external interfaces to inject events into the Simulator as soon as possible without causing problems for parallel execution.
Constant
MSG_MAX_HDR_SIZE 512
Constant
Constant
Size of small Info field. Should be larger than all commonly used info field data structures, especially PropTxInfo and PropRxInfo. MSG_PAYLOAD_LIST_MAX 1000
Constant
Constant
Constant
Constant
Enumeration
Structure
Type of information in the info field. One message can only have up to one info field with a specific info type. MessageInfoHeader
MESSAGE
Structure
This is the main data strucure that represents a discrete event in qualnet. This is used to represent timer as well as to simulate actual sending of packets across the network.
Function / Macro Detail Function / Macro MESSAGE_PrintMessage Format void MESSAGE_PrintMessage (Node* node, Message* msg) Parameters:
node msg
- message to be printed
Returns:
void
- NULL
MESSAGE_Send
void MESSAGE_Send (Node* node, Message* msg, clocktype delay, bool isMT) Parameters:
Function call used to send a message within QualNet. When a message is sent using this mechanism, only the pointer to the message is actually sent through the system. So the user has to be careful not to do anything with the content of the pointer once MESSAGE_Send has been called.
node msg
delay isMT
Returns:
void
- NULL
MESSAGE_SendMT
Function call used to send a message from independent threads running within QualNet, for example those associated with external interfaces.
node msg
delay
Returns:
void
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MESSAGE.html[5/24/2011 12:37:03 PM]
MESSAGE
- NULL MESSAGE_RemoteSend void MESSAGE_RemoteSend (Node* node, NodeId destNodeId, Message* msg, clocktype delay) Parameters: Function used to send a message to a node that might be on a remote partition. The system will make a shallow copy of the message, meaning it can't contain any pointers in the info field or the packet itself. This function is very unsafe. If you use it, your program will probably crash. Only I can use it.
node
destNodeId msg
delay
Returns:
void
- NULL
MESSAGE_RouteReceivedRemoteEvent
Counterpart to MESSAGE_RemoteSend, this function allows models that send remote messages to provide special handling for them on the receiving partition. This function is called in real time as the messages are received, so must be used carefully. MESSAGE_CancelSelfMsg
node msg
- message to be delivered
Returns:
void
- NULL
Function call used to cancel a event message in the QualNet scheduler. The Message must be a self message (timer) .i.e. a message a node sent to itself. The msgToCancelPtr must a pointer to the original message that needs to be canceled. MESSAGE_Alloc
node
msgToCancelPtr
Returns:
void
- NULL
Message* MESSAGE_Alloc (Node* node, int layerType, int protocol, int eventType) Parameters:
Allocate a new Message structure. This is called when a new message has to be sent through the system. The last three parameters indicate the layerType, protocol and the eventType that will be set for this message.
node
- node which is allocating message - Layer type to be set for this message
layerType protocol
- Protocol to be set for this message - event type to be set for this message
eventType
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MESSAGE.html[5/24/2011 12:37:03 PM]
MESSAGE
Message*
MESSAGE_Alloc
Message* MESSAGE_Alloc (PartitionData* partition, int layerType, int protocol, int eventType) Parameters:
Allocate a new Message structure. This is called when a new message has to be sent through the system. The last three parameters indicate the layerType, protocol and the eventType that will be set for this message.
- partition that is allocating message - Layer type to be set for this message
- Protocol to be set for this message - event type to be set for this message
eventType
Returns:
Message*
MESSAGE_AllocMT
Message* MESSAGE_AllocMT (PartitionData* partition, int layerType, int protocol, int eventType) Parameters:
- partition that is allocating message - Layer type to be set for this message
- Protocol to be set for this message - event type to be set for this message
eventType
Returns:
Message*
MESSAGE_InfoFieldAlloc
node
infoSize
Returns:
char*
MESSAGE_InfoFieldAlloc
partition infoSize
MESSAGE
Returns:
char*
MESSAGE_InfoFieldAllocMT
partition infoSize
Returns:
char*
MESSAGE_InfoFieldFree
node
hdrPtr
Returns:
void
- NULL
MESSAGE_AddInfo
char* MESSAGE_AddInfo (Node* node, Message* msg, int infoSize, unsigned short infoType) Parameters:
Allocate one "info" field with given info type for the message. This function is used for the delivery of data for messages which are NOT packets as well as the delivery of extra information for messages which are packets. If a "info" field with the same info type has previously been allocated for the message, it will be replaced by a new "info" field with the specified size. Once this function has been called, MESSAGE_ReturnInfo function can be used to get a pointer to the allocated space for the info field in the message structure. MESSAGE_AddInfo
node msg
- message for which "info" field - size of the "info" field to be allocated - type of the "info" field to be allocated.
infoSize infoType
Returns:
char*
char* MESSAGE_AddInfo (PartitionData* partition, Message* msg, int infoSize, unsigned short infoType) Parameters:
Allocate one "info" field with given info type for the message. This function is used for the delivery of data for messages which are NOT packets as well as the delivery of extra information for messages which are packets.
partition msg
- message for which "info" field - size of the "info" field to be allocated
infoSize
MESSAGE
If a "info" field with the same info type has previously been allocated for the message, it will be replaced by a new "info" field with the specified size. Once this function has been called, MESSAGE_ReturnInfo function can be used to get a pointer to the allocated space for the info field in the message structure. MESSAGE_RemoveInfo
infoType
Returns:
char*
void MESSAGE_RemoveInfo (Node* node, Message* msg, unsigned short infoType) Parameters:
Remove one "info" field with given info type from the info array of the message.
node msg
- message for which "info" field - type of the "info" field to be removed.
infoType
Returns:
void
- NULL
MESSAGE_InfoAlloc
Allocate the default "info" field for the message. This function is similar to MESSAGE_AddInfo. The difference is that it assumes the type of the info field to be allocated is INFO_TYPE_DEFAULT.
node msg
- message for which "info" field - size of the "info" field to be allocated
infoSize
Returns:
char *
- None
MESSAGE_InfoAlloc
Allocate the default "info" field for the message. This function is similar to MESSAGE_AddInfo. The difference is that it assumes the type of the info field to be allocated is INFO_TYPE_DEFAULT.
partition msg
- message for which "info" field - size of the "info" field to be allocated
infoSize
Returns:
char *
- None
MESSAGE_ReturnInfoSize
int MESSAGE_ReturnInfoSize (Message* msg, unsigned short infoType, int fragmentNumber) Parameters:
MESSAGE
Returns the size of a "info" field with given info type in the info array of the message.
msg
- message for which "info" field - type of the "info" field. - Location of the fragment in the TCP packet
infoType
fragmentNumber
Returns:
int
MESSAGE_ReturnInfoSize
Returns the size of a "info" field with given info type in the info array of the message.
msg
infoType
Returns:
int
MESSAGE_ReturnInfo
Returns a pointer to the "info" field with given info type in the info array of the message.
msg
- message for which "info" field - type of the "info" field to be returned.
infoType
Returns:
char*
- Pointer to the "info" field with given type. NULL if not found.
MESSAGE_CopyInfo
Copy the "info" fields of the source message to the destination message.
node
- Node which is copying the info fields - Destination message - Source message
dsgMsg srcMsg
Returns:
void
- NULL
MESSAGE_CopyInfo
Copy the "info" fields of the source info header to the destination message.
node
dsgMsg
MESSAGE
srcInfo
Returns:
void
- NULL
MESSAGE_FragmentPacket
void MESSAGE_FragmentPacket (Node* node, Message* msg, int fragUnit, Message*** fragList, int* numFrags, TraceProtocolType protocolType) Parameters:
Fragment one packet into multiple fragments Note: The original packet will be freed in this function. The array for storing pointers to fragments will be dynamically allocated. The caller of this function will need to free the memory.
node msg
- The packet to be fragmented - The unit size for fragmenting the packet - A list of fragments created. - Number of fragments in the fragment list. - Protocol type for packet tracing.
protocolType
Returns:
void
- NULL
MESSAGE_ReassemblePacket
Message* MESSAGE_ReassemblePacket (Node* node, Message** fragList, int numFrags, TraceProtocolType protocolType) Parameters:
Reassemble multiple fragments into one packet Note: All the fragments will be freed in this function.
node
- node which is assembling the packet - A list of fragments. - Number of fragments in the fragment list. - Protocol type for packet tracing.
fragList numFrags
protocolType
Returns:
Message*
MESSAGE_PackMessage
Message* MESSAGE_PackMessage (Node* node, Message* msgList, TraceProtocolType origProtocol, int* actualPktSize) Parameters:
Pack a list of messages to be one message structure Whole contents of the list messages will be put as payload of the new message. So the packet size of the new message cannot be directly used now. The original lis of msgs will be freed.
node
- Pointer to node. - Pointer to a list of messages - Protocol allocating this packet - For return sum of packet size of msgs in list
msgList
origProtocol
actualPktSize
MESSAGE
Returns:
Message*
MESSAGE_UnpackMessage
Message* MESSAGE_UnpackMessage (Node* node, Message* msg, bool copyInfo, bool freeOld) Parameters:
Unpack a super message to the original list of messages The list of messages were stored as payload of this super message.
node msg
- Pointer to node.
- Pointer to the supper msg contains list of msgs - Whether copy info from old msg to first msg
copyInfo freeOld
Returns:
Message*
MESSAGE_PacketAlloc
void MESSAGE_PacketAlloc (Node* node, Message* msg, int packetSize, TraceProtocolType originalProtocol) Parameters:
Allocate the "payload" field for the packet to be delivered. Add additional free space in front of the packet for headers that might be added to the packet. This function can be called from the application layer or anywhere else (e.g TCP, IP) that a packet may originiate from. The "packetSize" variable will be set to the "packetSize" parameter specified in the function call. Once this function has been called the "packet" variable in the message structure can be used to access this space. MESSAGE_PacketAlloc
node msg
- message for which packet has to be allocated - size of the packet to be allocated - Protocol allocating this packet
packetSize
originalProtocol
Returns:
void
- NULL
void MESSAGE_PacketAlloc (PartitionData* partition, Message* msg, int packetSize, TraceProtocolType originalProtocol, bool isMT) Parameters:
Allocate the "payload" field for the packet to be delivered. Add additional free space in front of the packet for headers that might be added to the packet. This function can be called from the application layer or anywhere else (e.g TCP, IP) that a packet may originiate from. The "packetSize" variable will be set to the "packetSize" parameter specified in the function call. Once this function has been called the "packet" variable in the message structure can be used to access this space.
partition msg
- message for which packet has to be allocated - size of the packet to be allocated - Protocol allocating this packet
packetSize
originalProtocol isMT
Returns:
void
- NULL
MESSAGE
MESSAGE_AddHeader
void MESSAGE_AddHeader (Node* node, Message* msg, int hdrSize, TraceProtocolType traceProtocol) Parameters:
This function is called to reserve additional space for a header of size "hdrSize" for the packet enclosed in the message. The "packetSize" variable in the message structure will be increased by "hdrSize". Since the header has to be prepended to the current packet, after this function is called the "packet" variable in the message structure will point the space occupied by this new header. MESSAGE_RemoveHeader
node msg
- message for which header has to be added - size of the header to be added - protocol name, from trace.h
hdrSize
traceProtocol
Returns:
void
- NULL
void MESSAGE_RemoveHeader (Node* node, Message* msg, int hdrSize, TraceProtocolType traceProtocol) Parameters:
This function is called to remove a header from the packet. The "packetSize" variable in the message will be decreased by "hdrSize".
node msg
- message for which header is being removed - size of the header being removed - protocol removing this header.
hdrSize
traceProtocol
Returns:
void
- NULL
MESSAGE_ReturnHeader
This is kind of a hack so that MAC protocols (dot11) that need to peak at a packet that still has the PHY header can return the contents after the first (N) headers without first removing those headers.
msg
header
Returns:
char*
MESSAGE_ExpandPacket
node msg
size
MESSAGE
Returns:
void
- NULL
MESSAGE_ShrinkPacket
node msg
size
Returns:
void
- NULL
MESSAGE_Free
When the message is no longer needed it can be freed. Firstly the "payload" and "info" fields of the message are freed. Then the message itself is freed. It is important to remember to free the message. Otherwise there will nasty memory leaks in the program. MESSAGE_Free
partition msg
Returns:
void
- NULL
When the message is no longer needed it can be freed. Firstly the "payload" and "info" fields of the message are freed. Then the message itself is freed. It is important to remember to free the message. Otherwise there will nasty memory leaks in the program. MESSAGE_FreeList
node msg
Returns:
void
- NULL
Free a list of message until the next pointer of the message is NULL.
node msg
Returns:
void
- NULL
MESSAGE_Duplicate
MESSAGE
Parameters: Create a new message which is an exact duplicate of the message supplied as the parameter to the function and return the new message.
node msg
Returns:
Message*
MESSAGE_Duplicate
Create a new message which is an exact duplicate of the message supplied as the parameter to the function and return the new message.
partition msg
- message for which duplicate has to be made - Is this function being called from the context
isMT
Returns:
Message*
MESSAGE_DuplicateMT
Create a new message which is an exact duplicate of the message supplied as the parameter to the function and return the new message.
partition msg
Returns:
Message*
MESSAGE_PayloadAlloc
Allocate a character payload out of the free list, if possible otherwise via malloc.
node
payloadSize
Returns:
char*
MESSAGE_PayloadAlloc
Allocate a character payload out of the free list, if possible otherwise via malloc.
partition
MESSAGE
payloadSize isMT
Returns:
char*
MESSAGE_PayloadFree
Return a character payload to the free list, if possible otherwise free it.
partition payload
payloadSize
Returns:
void
- NULL
MESSAGE_PayloadFree
Return a character payload to the free list, if possible otherwise free it.
node
- node which is freeing payload - Pointer to the payload field - size of the payload field
payload
payloadSize
Returns:
void
- NULL
MESSAGE_FreeList
Free a list of messages until the next pointer of the message is NULL.
node msg
Returns:
void
- NULL
MESSAGE_ReturnNumFrags
msg
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MESSAGE.html[5/24/2011 12:37:03 PM]
MESSAGE
int
MESSAGE_ReturnFragSeqNum
msg
- message for which "info" field - fragment location in the TCP message.
fragmentNumber
Returns:
int
MESSAGE_ReturnFragSize
msg
- message for which "info" field - fragment location in the TCP message.
fragmentNumber
Returns:
int
MESSAGE_ReturnFragNumInfos
Returns the number of info fields associated with a particular fragment in the TCP packet.
msg
- message for which "info" field - fragment location in the TCP message.
fragmentNumber
Returns:
int
MESSAGE_AppendInfo
void MESSAGE_AppendInfo (Node* node, Message* msg, int infosize, short infoType) Parameters:
Appends the "info" fields of the source message to the destination message.
node msg
infosize infoType
Returns:
void
- NULL
MESSAGE
MESSAGE_AppendInfo
Appends the "info" fields of the source message to the destination message.
node
- Node which is copying the info fields - Destination message - Source message info vector
dsgMsg
srcInfo
Returns:
void
- NULL
MESSAGE_AppendInfo
Appends the "info" fields of the source message to the destination message.
node
- Node which is copying the info fields - Destination message - Source message
dsgMsg srcMsg
Returns:
void
- NULL
MESSAGE_SizeOf
Returns the size of a message. Used in place of sizeof() in the kernel code to allow for users to add more fields to the message. MESSAGE_FragmentPacket
Returns:
size_t
- sizeof(msg)
BOOL MESSAGE_FragmentPacket (Node* node, Message*& msg, Message*& fragmentedMsg, Message*& remainingMsg, int fragUnit, TraceProtocolType protocolType, bool freeOriginalMsg) Parameters:
Fragment one packet into TWO fragments Note:(i) This API treats the original packet as raw packet and does not take account of fragmentation related information like fragment id. The caller of this API will have to itself put in logic for distinguishing the fragmented packets (ii) Overloaded MESSAGE_FragmentPacket
node msg
- Remaining packet
- The unit size for fragmenting the packet - Protocol type for packet tracing. - If TRUE, then original msg is set to NULL
protocolType
freeOriginalMsg
MESSAGE
Returns:
BOOL
MESSAGE_ReassemblePacket
Message* MESSAGE_ReassemblePacket (Node* node, Message* fragMsg1, Message* fragMsg2, TraceProtocolType protocolType) Parameters:
Reassemble TWO fragments into one packet Note: (i) None of the fragments will be freed in this API. The caller of this API will itself have to free the fragments (ii) Overloaded MESSAGE_ReassemblePacket
node
- node which is assembling the packet - First fragment - Second fragment - Protocol type for packet tracing.
fragMsg1 fragMsg2
protocolType
Returns:
Message*
MESSAGE_SendAsEarlyAsPossible
This function is used primarily by external interfaces to inject events into the Simulator as soon as possible without causing problems for parallel execution.
node msg
- message to be delivered
Returns:
void
- NULL
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
MOBILITY
MOBILITY
This file describes data structures and functions used by mobility models. Constant / Data Structure Summary Type
CONSTANT
Name
DEFAULT_DISTANCE_GRANULARITY
MOBILITY
A structure that defines the next states of the elements of mobility model.
STRUCT MobilityData
This structure keeps the data related to mobility model. It also holds the variables which are static and variable during the simulation. Buffer caches future position updates as well.
Summary
MOBILITY_InsertEvent(MobilityHeap* heapPtr, Node* node)
Inserts an event.
void MOBILITY_DeleteEvent(MobilityHeap* heapPtr, Node* node)
Deletes an event.
void MOBILITY_HeapFixDownEvent(MobilityHeap* heapPtr, int i)
Allocates memory for nodePositions and mobilityData Note: This function is called before NODE_CreateNode(). It cannot access Node structure
void MOBILITY_PreInitialize(NodeAddress nodeId, MobilityData* mobilityData, NodeInput* nodeInput, int seedVal)
Initializes most variables in mobilityData. (Node positions are set in MOBILITY_SetNodePositions().) Note: This function is called before NODE_CreateNode(). It cannot access Node structure
void MOBILITY_PostInitialize(Node* node, NodeInput* nodeInput)
MOBILITY
Called at the end of simulation to collect the results of the simulation of the mobility data.
void MOBILITY_ProcessEvent(Node* node)
MOBILITY
Initialization of mobility models that most be done after partition is created; MOBILITY_SetNodePositions would be too early
void MOBILITY_NodePlacementFinalize(PartitionData* partitionData)
Constant
DEFAULT_DISTANCE_GRANULARITY 1
Constant
MOBILITY
Constant
NUM_MOBILITY_TYPES 5
Constant
Enumeration
Enumeration
Structure
Structure
Structure
Structure
A structure that defines the next states of the elements of mobility model. MobilityData
This structure keeps the data related to mobility model. It also holds the variables which are static and variable during the simulation. Buffer caches future position updates as well.
Function / Macro Detail Function / Macro MOBILITY_InsertEvent Format void MOBILITY_InsertEvent (MobilityHeap* heapPtr, Node* node) Parameters: Inserts an event.
heapPtr
MOBILITY
node
- A pointer to node.
Returns:
void
- None
MOBILITY_DeleteEvent
Deletes an event.
heapPtr node
- A pointer to node.
Returns:
void
- None
MOBILITY_HeapFixDownEvent
heapPtr i
- index
Returns:
void
- None
MOBILITY_AllocateNodePositions
void MOBILITY_AllocateNodePositions (int numNodes, NodeAddress* nodeIdArray, NodePositions** nodePositions, int** nodePlacementTypeCounts, NodeInput* nodeInput, int seedVal) Parameters:
Allocates memory for nodePositions and mobilityData Note: This function is called before NODE_CreateNode(). It cannot access Node structure
numNodes
- number of nodes - array of nodeId - pointer to the array - array of placement type counts
nodeIdArray
nodePositions
- configuration input
Returns:
void
- None
MOBILITY_PreInitialize
void MOBILITY_PreInitialize (NodeAddress nodeId, MobilityData* mobilityData, NodeInput* nodeInput, int seedVal) Parameters:
MOBILITY
Initializes most variables in mobilityData. (Node positions are set in MOBILITY_SetNodePositions().) Note: This function is called before NODE_CreateNode(). It cannot access Node structure
nodeId
- configuration input
Returns:
void
- None
MOBILITY_PostInitialize
node
nodeInput
Returns:
void
- None
MOBILITY_UpdatePathProfiles
- MobilityHeap structure.
upperBoundTime
Returns:
void
- None
MOBILITY_Finalize
Called at the end of simulation to collect the results of the simulation of the mobility data.
node
Returns:
void
- None
MOBILITY_ProcessEvent
node
MOBILITY
- None
MOBILITY_AddANewDestination
void MOBILITY_AddANewDestination (MobilityData* mobilityData, clocktype arrivalTime, Coordinates dest, Orientation orientation, double zValue) Parameters:
- Arrival time
- Destination - Orientation
orientation zValue
- original zValue
Returns:
void
- None
MOBILITY_NextPosition
node
element
Returns:
BOOL
- None
MOBILITY_NextMoveTime
node
- Pointer to node.
Returns:
clocktype
MOBILITY_ReturnMobilityElement
node
sequenceNum
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/MOBILITY.html[5/24/2011 12:37:41 PM]
MOBILITY
MobilityElement*
- None
MOBILITY_InsertANewEvent
void MOBILITY_InsertANewEvent (Node* node, clocktype nextMoveTime, Coordinates position, Orientation orientation, double speed) Parameters:
nextMoveTime position
orientation speed
Returns:
void
- None
MOBILITY_NodeIsIndoors
node
- Pointer to node.
Returns:
bool
MOBILITY_SetIndoors
node
indoors
Returns:
void
- None
MOBILITY_ReturnCoordinates
node
position
Returns:
void
- None
MOBILITY
MOBILITY_ReturnOrientation
node
orientation
Returns:
void
- None
MOBILITY_ReturnInstantaneousSpeed
node
speed
Returns:
void
- None
MOBILITY_ReturnSequenceNum
node
sequenceNum
Returns:
void
- None
MOBILITY_SetNodePositions
void MOBILITY_SetNodePositions (int numNodes, NodePositions* nodePositions, int* nodePlacementTypeCounts, TerrainData* terrainData, NodeInput* nodeInput, RandomSeed seed, clocktype maxSimTime) Parameters:
- Defines the number of nodes to be distributed. - Pointer to NodePositionInfo. States - Array of placement type counts
nodePositions
- Terrain data.
maxSimTime
MOBILITY
Returns:
void
- None
MOBILITY_PostInitializePartition
Initialization of mobility models that most be done after partition is created; MOBILITY_SetNodePositions would be too early MOBILITY_NodePlacementFinalize
partitionData
Returns:
void
- None
partitionData
Returns:
void
- None
MOBILITY_ChangeGroundNode
node
before after
Returns:
void
- None
MOBILITY_ChangePositionGranularity
node
Returns:
void
- None
MOBILITY
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
MUTEX
MUTEX
This file describes objects for use in creating critical regions (synchronized access) for global variables or data structures that have to be shared between threads. Function / Macro Summary Return Type
None
Summary
QNThreadLock(QNThreadMutex mutex)
Function / Macro Detail Function / Macro QNThreadLock Format None QNThreadLock (QNThreadMutex mutex) Parameters: This constructor is used to begin a critical region.
mutex
Returns:
None
- None
QNPartitionLock
mutex
Returns:
MUTEX
None
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
NETWORK LAYER
NETWORK LAYER
This file describes the data structures and functions used by the Network Layer. Constant / Data Structure Summary Type
CONSTANT
Name
DEFAULT_IP_QUEUE_COUNT
Default size in bytes of an input queue, if it's not specified in the input file with the IP-QUEUE-PRIORITY-INPUT-QUEUE-SIZE parameter.
CONSTANT DEFAULT_NETWORK_OUTPUT_QUEUE_SIZE
Default size in bytes of an output queue, if it's not specified in the input file with the IP-QUEUE-PRIORITY-QUEUE-SIZE parameter.
CONSTANT DEFAULT_ETHERNET_MTU
Default Ethernet MTU(Maximum transmission unit) in bytes. QualNet does not model Ethernet yet, but this value is used (in the init functions in network/fifoqueue.c and network/redqueue.c) to compute the initial number of Message * instances that are used to store packets in queues.Regardless, the buffer capacity of a queue is not the number of Message * instances, but a certain number of bytes, as expected.
CONSTANT IP_MAXPACKET
NETWORK LAYER
Summary
NETWORK_ManagementReport(Node* node, int interfaceIndex, ManagementReport* report, ManagementReportResponse* resp)
NETWORK LAYER
Returns interface information for a interface. Information means its address and type
void NetworkIpGetInterfaceAddressString(Node* node, int interfaceIndex, const char* ipAddrString)
Network-layer receives packets from MAC layer, now check Overloaded Function to support Mac Address type of IP and call proper function
void NETWORK_Reset(Node* node, int interfaceIndex)
Constant
DEFAULT_IP_QUEUE_COUNT 3
Constant
Constant
Constant
Default size in bytes of an input queue, if it's not specified in the input file with the IP-QUEUE-PRIORITY-INPUT-QUEUE-SIZE parameter. DEFAULT_NETWORK_OUTPUT_QUEUE_SIZE 150000
NETWORK LAYER
Constant
Default size in bytes of an output queue, if it's not specified in the input file with the IP-QUEUE-PRIORITY-QUEUE-SIZE parameter. DEFAULT_ETHERNET_MTU 1500
Constant
Default Ethernet MTU(Maximum transmission unit) in bytes. QualNet does not model Ethernet yet, but this value is used (in the init functions in network/fifoqueue.c and network/redqueue.c) to compute the initial number of Message * instances that are used to store packets in queues.Regardless, the buffer capacity of a queue is not the number of Message * instances, but a certain number of bytes, as expected. IP_MAXPACKET 65535
Constant
Enumeration
Enumeration
Enumeration
Enumeration
Enumeration
Structure
Structure
NETWORK LAYER
Structure
Function / Macro Detail Function / Macro NETWORK_ManagementReport Format void NETWORK_ManagementReport (Node* node, int interfaceIndex, ManagementReport* report, ManagementReportResponse* resp) Parameters: Deliver a MAC management request to the NETWORK layer
node
Returns:
void
- None
NetworkGetInterfaceInfo()
Returns interface information for a interface. Information means its address and type
node
interfaceIndex address
Returns:
void
- NULL
NetworkIpGetInterfaceAddressString
void NetworkIpGetInterfaceAddressString (Node* node, int interfaceIndex, const char* ipAddrString) Parameters:
node
interfaceIndex
NETWORK LAYER
ipAddrString
Returns:
void
- None
NetworkIpGetInterfaceType
node
interfaceIndex
Returns:
NetworkType
- None
NETWORK_ReceivePacketFromMacLayer
void NETWORK_ReceivePacketFromMacLayer (Node* node, Message* message, NodeAddress lastHopAddress, int interfaceIndex) Parameters:
Network-layer receives packets from MAC layer, now check Overloaded Function to support Mac Address type of IP and call proper function
node
message
lastHopAddress interfaceIndex
Returns:
void
- None
NETWORK_Reset
node
interfaceIndex
Returns:
void
- None
NETWORK_AddResetFunctionList
node
interfaceIndex
NETWORK LAYER
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
NODE
NODE
This file defines the Node data structure and some generic operations on nodes. Constant / Data Structure Summary Type
STRUCT
Name
Node
This struct includes all the information for a particular node. State information for each layer can be accessed from this structure.
STRUCT NodePositions
Summary
NODE_CreateNode(PartitionData* partitionData, NodeId nodeId, int index)
Function used to call the appropriate layer to execute instructions for the message
void NODE_PrintLocation(Node* node, int coordinateSystemType)
NODE
Structure
Node
Structure
This struct includes all the information for a particular node. State information for each layer can be accessed from this structure. NodePositions
Function / Macro Detail Function / Macro NODE_CreateNode Format void NODE_CreateNode (PartitionData* partitionData, NodeId nodeId, int index) Parameters: Function used to allocate and initialize a node.
partitionData nodeId index
- the node's ID
Returns:
void
- None
NODE_ProcessEvent
Function used to call the appropriate layer to execute instructions for the message
node msg
Returns:
void
- None
NODE_PrintLocation
node
- the node
NODE
coordinates.
coordinateSystemType
- Cartesian or LatLonAlt
Returns:
void
- None
NODE_GetTerrainPtr
node
- the node
Returns:
TerrainData*
- TerrainData pointer
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
PARALLEL
PARALLEL
This file describes data structures and functions used for parallel programming. Constant / Data Structure Summary Type
CONSTANT
Name
MAX_THREADS
The maximum number of processes that can be used in parallel QualNet. Customers do not receive parallel.cpp, so cannot effectively change this value.
ENUMERATION SynchronizationAlgorithm
This struct is allows us to be able to remove from the LookaheadCalculator's heap. This way lookahead handles can request they be removed. Internally, as the heap re-heapifies these locators are updated.
STRUCT EotHeapElement
Summary
PARALLEL_AllocateLookaheadHandle(Node* node)
PARALLEL
Obtains a new lookahead handle that allows a protocol to indicate minimum delay values for output. This minimum delay is called EOT - earliest output time.
void PARALLEL_AddLookaheadHandleToLookaheadCalculator(Node* node, LookaheadHandle lookaheadHandle, clocktype eotOfNode)
Protocols that use EOT will make use of this function more than any other to update the earliest output time as the simulation progresses. Use of EOT is an all-or-nothing option. If your protocol uses EOT, it _must_ use EOT pervasively.
void PARALLEL_RemoveLookaheadHandleFromLookaheadCalculator(Node* node, LookaheadHandle lookaheadHandle, clocktype* eotOfNode)
Sets a minimum delay for messages going out on this interface. This is typically set by the protocol running on that interface.
void PARALLEL_InitLookaheadCalculator(LookaheadCalculator lookaheadCalculator)
Using their positions or other information, assigns each node to a partition. For kernel use only.
int PARALLEL_GetPartitionForNode(NodeId nodeId)
Allows parallel code to determine to what partition a node is assigned. If a Node* is available, it's much quicker to just look it up directly
void PARALLEL_InitializeParallelRuntime(int numberOfThreads)
Creates the threads for parallel execution and starts them running. For kernel use only.
void PARALLEL_GetRemoteMessages(PartitionData* partitionData)
PARALLEL
Collects all the messages received from other partitions. For kernel use only.
void PARALLEL_GetRemoteMessagesAndBarrier(PartitionData* partitionData)
Collects all the messages received from other partitions. This function also acts as a barrier. For kernel use only.
PARALLEL_SendRemoteMessages(Message* msgList, PartitionData* partitionData, int partitionId)
Sends one or more messages to a remote partition. For kernel use only.
PARALLEL_DeliverRemoteMessages(PartitionData* partitionData)
Delivers cached messages to all remote partitions. For kernel use only.
void PARALLEL_SendRemoteMessagesOob(Message* msgList, PartitionData* partitionData, int partitionId, bool isResponse)
Sends one or more messages to a remote partition. These messages are oob messages and will be processed immediately. For kernel use only.
void PARALLEL_SendMessageToAllPartitions(Message* msg, PartitionData* partitionData, bool freeMsg)
Sends a message to all remote partitions, but not the current one. By default, duplicates will be sent to all remote partitions and the original freed, but if freeMsg is false, the original message will not be freed.
PARALLEL_SendRemoteLinkMessage(Node* node, Message* msg, LinkData* link, clocktype txDelay)
A generic function for calculating the window of safe events For kernel use only.
clocktype PARALLEL_ReturnEarliestGlobalEventTime(PartitionData* partitionData)
Returns the earliest global event time. Required for interfacing to time-sensitive external programs. For kernel use only.
void PARALLEL_Exit(PartitionData* partitionData)
Exits from the parallel system, killing threads, etc. For kernel use only.
void PARALLEL_SetProtocolIsNotEOTCapable(Node* node)
Currently, EOT can only be used if supported by all protocols running in the scenario. If any protocol is not capable, only the minimum lookahead is used.
void PARALLEL_EnableDynamicMobility()
PARALLEL
Forces the runtime to consider mobility events when calculating EOT/ECOT. Mobility events are ignored by default. This function should be called during the initialization of models where changes in position or direction of one node may affect the behavior of other nodes.
void PARALLEL_SetGreedy(bool greedy)
Tells the kernel to use spin locks on barriers if true, or to use blocking barriers otherwise. In greedy mode, the Simulator needs a dedicated CPU per partition.
bool PARALLEL_IsGreedy()
Takes a list of messages or an OOB message and schedules them for execution on the current partition. Typically these messages have arrived from a remote partition.
void PARALLEL_EndSimulation(PartitionData* partitionData)
Builds the final stat file when running in parallel node. Should only be called once from partition 0.
void PARALLEL_NumberOfSynchronizations()
Constant
MAX_THREADS 512
PARALLEL
Enumeration
The maximum number of processes that can be used in parallel QualNet. Customers do not receive parallel.cpp, so cannot effectively change this value. SynchronizationAlgorithm
Structure
Possible algorithms to use in the parallel runtime. Synchronous is used by default. LookaheadLocator
Structure
This struct is allows us to be able to remove from the LookaheadCalculator's heap. This way lookahead handles can request they be removed. Internally, as the heap re-heapifies these locators are updated. EotHeapElement
Structure
Function / Macro Detail Function / Macro PARALLEL_AllocateLookaheadHandle Format LookaheadHandle PARALLEL_AllocateLookaheadHandle (Node* node) Parameters: Obtains a new lookahead handle that allows a protocol to indicate minimum delay values for output. This minimum delay is called EOT earliest output time.
node
Returns:
LookaheadHandle
PARALLEL_AddLookaheadHandleToLookaheadCalculator
lookaheadHandle eotOfNode
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/PARALLEL.html[5/24/2011 12:38:24 PM]
PARALLEL
Returns:
void
- None
PARALLEL_SetLookaheadHandleEOT
Protocols that use EOT will make use of this function more than any other to update the earliest output time as the simulation progresses. Use of EOT is an all-or-nothing option. If your protocol uses EOT, it _must_ use EOT pervasively.
node
lookaheadHandle eot
Returns:
void
- None
PARALLEL_RemoveLookaheadHandleFromLookaheadCalculator
lookaheadHandle eotOfNode
Returns:
void
- None
PARALLEL_SetMinimumLookaheadForInterface
Sets a minimum delay for messages going out on this interface. This is typically set by the protocol running on that interface.
node
minLookahead
Returns:
void
- None
PARALLEL_InitLookaheadCalculator
lookaheadCalculator
Returns:
void
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/PARALLEL.html[5/24/2011 12:38:24 PM]
- None
PARALLEL
PARALLEL_AssignNodesToPartitions
int PARALLEL_AssignNodesToPartitions (int numNodes, int numberOfPartitions, NodeInput* nodeInput, NodePosition* nodePos, AddressMapType* map) Parameters:
Using their positions or other information, assigns each node to a partition. For kernel use only.
numNodes
Returns:
int
PARALLEL_GetPartitionForNode
Allows parallel code to determine to what partition a node is assigned. If a Node* is available, it's much quicker to just look it up directly
nodeId
- the node's ID
Returns:
int
PARALLEL_InitializeParallelRuntime
numberOfThreads
Returns:
void
- None
PARALLEL_CreatePartitionThreads
Creates the threads for parallel execution and starts them running. For kernel use only.
numberOfThreads nodeInput
partitionArray
Returns:
void
- None
PARALLEL
PARALLEL_GetRemoteMessages
Collects all the messages received from other partitions. For kernel use only.
partitionData
Returns:
void
- None
PARALLEL_GetRemoteMessagesAndBarrier
Collects all the messages received from other partitions. This function also acts as a barrier. For kernel use only.
partitionData
Returns:
void
- None
PARALLEL_SendRemoteMessages
Sends one or more messages to a remote partition. For kernel use only.
msgList
partitionData partitionId
- the partition's ID
Returns: - None PARALLEL_DeliverRemoteMessages PARALLEL_DeliverRemoteMessages (PartitionData* partitionData) Parameters: Delivers cached messages to all remote partitions. For kernel use only.
partitionData
Returns: - None PARALLEL_SendRemoteMessagesOob void PARALLEL_SendRemoteMessagesOob (Message* msgList, PartitionData* partitionData, int partitionId, bool isResponse) Parameters: Sends one or more messages to a remote partition. These messages are oob messages and will be processed immediately. For kernel use only.
msgList
partitionData partitionId
- the partition's ID
PARALLEL
isResponse
Returns:
void
- None
PARALLEL_SendMessageToAllPartitions
Sends a message to all remote partitions, but not the current one. By default, duplicates will be sent to all remote partitions and the original freed, but if freeMsg is false, the original message will not be freed.
msg
partitionData freeMsg
Returns:
void
- None
PARALLEL_SendRemoteLinkMessage
PARALLEL_SendRemoteLinkMessage (Node* node, Message* msg, LinkData* link, clocktype txDelay) Parameters:
- the message to be sent - info about the link - the transmission delay, not including propagation
link
txDelay
Returns: - None PARALLEL_UpdateSafeTime void PARALLEL_UpdateSafeTime (PartitionData* partitionData) Parameters: A generic function for calculating the window of safe events For kernel use only.
partitionData
Returns:
void
- None
PARALLEL_ReturnEarliestGlobalEventTime
Returns the earliest global event time. Required for interfacing to timesensitive external programs. For kernel use only.
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/PARALLEL.html[5/24/2011 12:38:24 PM]
partitionData
Returns:
PARALLEL
clocktype
PARALLEL_Exit
Exits from the parallel system, killing threads, etc. For kernel use only.
partitionData
Returns:
void
- None
PARALLEL_SetProtocolIsNotEOTCapable
Currently, EOT can only be used if supported by all protocols running in the scenario. If any protocol is not capable, only the minimum lookahead is used.
node
Returns:
void
- None
PARALLEL_EnableDynamicMobility
Forces the runtime to consider mobility events when calculating EOT/ECOT. Mobility events are ignored by default. This function should be called during the initialization of models where changes in position or direction of one node may affect the behavior of other nodes. PARALLEL_SetGreedy
Returns:
void
- None
Tells the kernel to use spin locks on barriers if true, or to use blocking barriers otherwise. In greedy mode, the Simulator needs a dedicated CPU per partition.
greedy
Returns:
void
- None
PARALLEL_IsGreedy
Returns:
bool
PARALLEL_PreFlight
PARALLEL
partitionData
Returns:
void
- None
PARALLEL_ScheduleMessagesOnPartition
void PARALLEL_ScheduleMessagesOnPartition (PartitionData* partitionData, Message* msgList, Message** oobMessage, bool* gotOobMessage, bool isMT) Parameters:
Takes a list of messages or an OOB message and schedules them for execution on the current partition. Typically these messages have arrived from a remote partition.
partitionData msgList
- the partition.
- a list of normal simulation messages. - an out of bounds message. - returns true if Oob response is received
oobMessage
gotOobMessage isMT
Returns:
void
- None
PARALLEL_EndSimulation
partitionData
Returns:
void
- None
PARALLEL_BuildStatFile
Builds the final stat file when running in parallel node. Should only be called once from partition 0.
numPartitions statFileName
- number of partitions
experimentPrefix
Returns:
void
- None
PARALLEL_NumberOfSynchronizations
Returns:
PARALLEL
void
- None
PARALLEL_StartRealTimeThread
partitionData
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
PARTITION
PARTITION
This file contains declarations of some functions for partition threads. Constant / Data Structure Summary Type
CONSTANT
Name
NUM_SIM_TIME_STATUS_PRINTS
Data structure containing interfaceIndex and Node* for a node in a single subnet
STRUCT PartitionSubnetMemberList
Data structure containing member data info for all nodes in a single subnet
STRUCT PartitionSubnetData
PARTITION
Summary
PARTITION_GetTerrainPtr(PartitionData* partitionData)
Function used to allocate and perform inititlaization of of an empty partition data structure.
void PARTITION_InitializePartition(PartitionData* partitionData, TerrainData* terrainData, clocktype maxSimClock, double startRealTime, int numNodes, BOOL traceEnabled, AddressMapType* addressMapPtr, NodePositions* nodePositions, NodeInput* nodeInput, int seedVal, int* nodePlacementTypeCounts, char* experimentPrefix, clocktype startSimClock)
Creates and initializes the nodes, then processes events on this partition.
void PARTITION_ProcessSendMT(PartitionData* partitionData)
Messages sent by worker threads outside of the main simulation event loop MUST call MESSAGE_SendMT (). This funciton then is the other half - where the multi-thread messages are properly added to the event list.
BOOL PARTITION_ReturnNodePointer(PartitionData* partitionData, Node** node, NodeId nodeId, BOOL remoteOK)
Returns a pointer to the node or NULL if the node is not on this partition. If remoteOK is TRUE, returns a pointer to this partition's proxy for a remote node if the node does not belong to this partition. This feature should be used with great care, as the proxy is incomplete. Returns TRUE if the node is local.
void PARTITION_NodeExists(PartitionData* partitionData, NodeId nodeId)
PARTITION
Determines whether the node ID exists in the scenario. Must follow node creation.
void PARTITION_PrintRunTimeStats(PartitionData* partitionData)
An empty function for protocols to use that need to schedule and handle partition-level events.
void PARTITION_ClientStateSet(PartitionData* partitionData, const char* stateName, void* clientState)
Sets or replaces a pointer to client-state, identifed by name, in the indicated partition. Allows client code, like external iterfaces, to store their own data in the partition. The client's state pointer is set and found by name. If the caller passes a name for client state that is already being stored, the state pointer replaces what was already there.
void* PARTITION_ClientStateFind(PartitionData* partitionData, const char* stateName)
Looks up the requested client-state by name. Returns NULL if the state isn't present.
CommunicatorId PARTITION_COMMUNICATION_RegisterCommunicator(PartitionData* partitionData, const char* name, PartitionCommunicationHandler handler)
Allocates a message id and registers the handler that will be invoked to receive callbacks when messages are with the id are sent.
CommunicatorId PARTITION_COMMUNICATION_FindCommunicator(PartitionData* partitionData, std name)
PARTITION
This will return in a string the current directory qualnet is executing from
boolean true/false if file exists IO_SourceFileExists()
This will return a boolean true if file exists, and false if not
std IO_CheckSourceLibrary()
This will return in a string the formatted yes/no line for whether the fingerprint file exists for given library
std IO_ReturnSourceAndCompiledLibraries()
This will return in a string a list of libraries currently compiled into product as well as those which have source code available.
std IO_ReturnExpirationDateFromLicenseFeature()
This will return in a string a list of libraries currently compiled into product as well as those which have source code available.
std IO_ReturnExpirationDateFromNumericalDate()
This will return in a string the status message for the library used with the -print_libraries option
std IO_ReturnStatusMessageFromLibraryInfo()
This will return in a string the library name from its index :: because flexlm won't allow std strucsts in main.cpp :: but main.cpp is the only place flex structs are allowed
PARTITION_ShowProgress()
PARTITION
Constant
NUM_SIM_TIME_STATUS_PRINTS 100
Constant
Constant
Structure
Structure
Data structure containing interfaceIndex and Node* for a node in a single subnet PartitionSubnetMemberList
Structure
Data structure containing member data info for all nodes in a single subnet PartitionSubnetData
Structure
Data structure containing subnet member data for all subnets PartitionData
Structure
Function / Macro Detail Function / Macro PARTITION_GetTerrainPtr Format void PARTITION_GetTerrainPtr (PartitionData* partitionData)
PARTITION
- pointer to partitionData
Returns:
void
- None
PARTITION_CreateEmptyPartition
Function used to allocate and perform inititlaization of of an empty partition data structure.
partitionId
numPartitions
Returns:
void
- None
PARTITION_InitializePartition
void PARTITION_InitializePartition (PartitionData* partitionData, TerrainData* terrainData, clocktype maxSimClock, double startRealTime, int numNodes, BOOL traceEnabled, AddressMapType* addressMapPtr, NodePositions* nodePositions, NodeInput* nodeInput, int seedVal, int* nodePlacementTypeCounts, char* experimentPrefix, clocktype startSimClock) Parameters:
partitionData terrainData maxSimClock
- dimensions, terrain database, etc. - length of the scenario - for synchronizing with the realtime
startRealTime numNodes
- number of nodes in the simulation - is packet tracing enabled? - contains Node ID <--> IP address mappings - initial node locations and partition assignments
traceEnabled
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/PARTITION.html[5/24/2011 12:38:41 PM]
PARTITION
void
- None
PARTITION_InitializeNodes
partitionData
Returns:
void
- None
PARTITION_Finalize
partitionData
Returns:
void
- None
PARTITION_ProcessPartition
Creates and initializes the nodes, then processes events on this partition.
partitionData
Returns:
void
- None
PARTITION_ProcessSendMT
Messages sent by worker threads outside of the main simulation event loop MUST call MESSAGE_SendMT (). This funciton then is the other half - where the multi-thread messages are properly added to the event list. PARTITION_ReturnNodePointer
partitionData
Returns:
void
- None
BOOL PARTITION_ReturnNodePointer (PartitionData* partitionData, Node** node, NodeId nodeId, BOOL remoteOK) Parameters:
Returns a pointer to the node or NULL if the node is not on this partition. If remoteOK is TRUE, returns a pointer to this partition's proxy for a remote node if the node does not belong to this partition. This feature should be used with great care, as the proxy is incomplete. Returns TRUE if the node is local.
partitionData node
- for returning the node pointer - the node's ID - is it ok to return a pointer to proxy node?
nodeId
remoteOK
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/PARTITION.html[5/24/2011 12:38:41 PM]
PARTITION
Returns:
BOOL
PARTITION_NodeExists
Determines whether the node ID exists in the scenario. Must follow node creation.
partitionData nodeId
- the node's ID
Returns:
void
- None
PARTITION_PrintRunTimeStats
partitionData
Returns:
void
- None
PARTITION_SchedulePartitionEvent
eventTime
Returns:
void
- None
PARTITION_HandlePartitionEvent
An empty function for protocols to use that need to schedule and handle partition-level events.
partitionData msg
- an event
Returns:
void
- None
PARTITION_ClientStateSet
PARTITION
Parameters: Sets or replaces a pointer to client-state, identifed by name, in the indicated partition. Allows client code, like external iterfaces, to store their own data in the partition. The client's state pointer is set and found by name. If the caller passes a name for client state that is already being stored, the state pointer replaces what was already there.
partitionData stateName
- Name used to locate this client state - Pointer to whatever data-structure the
clientState
Returns:
void
- None
PARTITION_ClientStateFind
Looks up the requested client-state by name. Returns NULL if the state isn't present.
partitionData stateName
Returns:
void*
PARTITION_COMMUNICATION_RegisterCommunicator
CommunicatorId PARTITION_COMMUNICATION_RegisterCommunicator (PartitionData* partitionData, const char* name, PartitionCommunicationHandler handler) Parameters:
Allocates a message id and registers the handler that will be invoked to receive callbacks when messages are with the id are sent.
partitionData name
handler
Returns:
CommunicatorId
PARTITION_COMMUNICATION_FindCommunicator
- string
Returns:
CommunicatorId
PARTITION_COMMUNICATION_SendToPartition
void PARTITION_COMMUNICATION_SendToPartition (PartitionData* partitionData, int partitionId, Message* msg, clocktype delay)
PARTITION
- Message to send. You are required to follow - When the message should execute. Special delay
delay
Returns:
void
- None
PARTITION_COMMUNICATION_SendToAllPartitions
- Message to send. You are required to follow - When the message should execute. Special delay
delay
Returns:
void
- None
IO_Return_Qualnet_Directory
This will return in a string the current directory qualnet is executing from IO_SourceFileExists
Returns:
std
This will return a boolean true if file exists, and false if not
Returns:
boolean true/false if file exists
- None
IO_CheckSourceLibrary
This will return in a string the formatted yes/no line for whether the fingerprint file exists for given library IO_ReturnSourceAndCompiledLibraries
Returns:
std
std IO_ReturnSourceAndCompiledLibraries ()
PARTITION
Parameters: This will return in a string a list of libraries currently compiled into product as well as those which have source code available. IO_ReturnExpirationDateFromLicenseFeature Returns:
std
This will return in a string a list of libraries currently compiled into product as well as those which have source code available. IO_ReturnExpirationDateFromNumericalDate
Returns:
std
Returns:
std
IO_ReturnExpirationDateFromNumericalDate
Returns:
std
IO_ParseFlexLMDate
Returns:
UInt64 containing the date
- None
IO_ReturnStatusMessageFromLibraryInfo
This will return in a string the status message for the library used with the -print_libraries option IO_ReturnStatusMessageFromLibraryInfo
Returns:
std
This will return in a string the library name from its index :: because flexlm won't allow std strucsts in main.cpp :: but main.cpp is the only place flex structs are allowed
Returns:
std
PARTITION
PARTITION_ShowProgress
PARTITION_ShowProgress () Parameters:
Returns: -
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
PHYSICAL LAYER
PHYSICAL LAYER
This file describes data structures and functions used by the Physical Layer. Most of this functionality is enabled/used in the Wireless library. Constant / Data Structure Summary Type
CONSTANT
Name
PHY_DEFAULT_NOISE_FACTORPHY_DEFAULT_NOISE_FACTOR
PHYSICAL LAYER
PHYSICAL LAYER
Summary
PHY_GlobalBerInit(const NodeInput* nodeInput)
PHYSICAL LAYER
Called at the end of simulation to collect the results of the simulation of the Phy Layer.
void PHY_ProcessEvent(Node* node, Message* msg)
Models the behaviour of the Phy Layer on receiving the message encapsulated in msgHdr
PhyStatusType PHY_GetStatus(Node * node, int phyNum)
For radios that support different Tx and Rx data rates, this will set the Rx Data Rate. For others, it will call PHY_SetDataRate.
void PHY_SetRxDataRate(Node * node, int phyIndex, int dataRate)
For radios that support different Tx and Rx data rates, this will set the Rx Data Rate. For others, it will call PHY_SetDataRate.
void PHY_GetTransmitPower(Node * node, int phyIndex, double* txPower_mW)
Get transmission delay based on the first (usually lowest) data rate WARNING: This function call is to be replaced with PHY_GetTransmissionDuration() with an appropriate data rate
clocktype PHY_GetTransmissionDuration(Node * node, int phyIndex, int dataRateIndex, int size)
PHYSICAL LAYER
PHYSICAL LAYER
Compute SINR
void PHY_SignalInterference(Node* node, int phyIndex, int channelIndex, Message * msg, double * signalPower_mW, double* interferencePower_mW)
Get BER
double PHY_SER(PhyData * phyData, int perTableIndex, double sinr)
Get SER
void PHY_StopListeningToChannel(Node* node, int phyIndex, int channelIndex)
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/PHYSICAL LAYER.html[5/24/2011 12:38:50 PM]
PHYSICAL LAYER
BOOL
PHYSICAL LAYER
Calculates an estimated radio range for the PHY. Supports only TWO-RAY and FREE-SPACE.
void ENERGY_Init(Node* node, const int phyIndex, NodeInput* nodeInput)
This function declares energy model variables and initializes them. Moreover, the function read energy model specifications and configures the parameters which are configurable.
void ENERGY_PrintStats(Node* node, const int phyIndex)
This function should be called whenever a state transition occurs in any place in PHY layer. As input parameters, the function reads the current state and the new state of PHY layer and based on the new sates calculates the cost of the load that should be taken off the battery. The function then interacts with battery model and updates the charge of battery.
void Generic_UpdateCurrentLoad(Node* node, const int phyIndex)
Gets the current steering angle for a directional antenna from PHY models that support this.
void PHY_CheckPacketPhyDrop(PartitionData* partition, PropChannel* propChannel, int numNodes, int channelIndex, Message* msg)
This function is for Stats DB. It is to check whether need to record a drop event.
Constant
PHY_DEFAULT_NOISE_FACTORPHY_DEFAULT_NOISE_FACTOR 10.0
PHYSICAL LAYER
Constant
Constant
Constant
Enumeration
Enumeration
Structure
Structure
Structure
Structure
Structure
PHYSICAL LAYER
Structure
Structure
Structure
Structure
Structure
Structure
Structure
Function / Macro Detail Function / Macro PHY_GlobalBerInit Format void PHY_GlobalBerInit (const NodeInput* nodeInput) Parameters: Pre-load all the BER files.
nodeInput
Returns:
void
- None
PHYSICAL LAYER
PHY_GetSnrBerTableByName
tableName
Returns:
void
- None
PHY_GetSnrBerTableIndex
node
phyIndex
Returns:
int
- None
PHY_SetSnrBerTableIndex
node
phyIndex
Returns:
int
- None
PHY_GlobalPerInit
nodeInput
Returns:
void
- None
PHY_GetSnrPerTableByName
tableName
Returns:
void
- None
PHY_GlobalSerInit
PHYSICAL LAYER
Returns:
void
- None
PHY_GetSnrSerTableByName
tableName
Returns:
void
- None
PHY_Init
node
nodeInput
Returns:
void
- None
PHY_CreateAPhyForMac
void PHY_CreateAPhyForMac (Node* node, const NodeInput* nodeInput, int interfaceIndex, int networkAddress, PhyModel phyModel, int* phyNumber) Parameters:
- node being initialized - structure containing contents of input file - interface being initialized. - address of the interface.
nodeInput
phyNumber
Returns:
void
- None
PHY_Finalize
PHYSICAL LAYER
Called at the end of simulation to collect the results of the simulation of the Phy Layer.
node
Returns:
void
- None
PHY_ProcessEvent
Models the behaviour of the Phy Layer on receiving the message encapsulated in msgHdr
node msg
Returns:
void
- None
PHY_GetStatus
node
- node for which stats are to be collected - interface for which stats are to be collected
phyNum
Returns:
PhyStatusType
- status of interface.
PHY_SetTransmitPower
node
- node for which transmit power is to be set - interface for which transmit power is to be set - transmit power(mW)
phyIndex
newTxPower_mW
Returns:
void
- None
PHY_SetRxSNRThreshold
node
- node for which transmit power is to be set - interface for which transmit power is to be set
phyIndex snr
PHYSICAL LAYER
Returns:
void
- None
PHY_SetDataRate
node
- node for which transmit power is to be set - interface for which transmit power is to be set - dataRate value to be set
phyIndex dataRate
Returns:
void
- None
PHY_SetTxDataRate
For radios that support different Tx and Rx data rates, this will set the Rx Data Rate. For others, it will call PHY_SetDataRate.
node
- node for which transmit power is to be set - interface for which transmit power is to be set - dataRate value to be set
phyIndex dataRate
Returns:
void
- None
PHY_SetRxDataRate
For radios that support different Tx and Rx data rates, this will set the Rx Data Rate. For others, it will call PHY_SetDataRate.
node
- node for which transmit power is to be set - interface for which transmit power is to be set - dataRate value to be set
phyIndex dataRate
Returns:
void
- None
PHY_GetTransmitPower
node
phyIndex
txPower_mW
PHYSICAL LAYER
Returns:
void
- None
PHY_GetTransmissionDelay
Get transmission delay based on the first (usually lowest) data rate WARNING: This function call is to be replaced with PHY_GetTransmissionDuration() with an appropriate data rate
node
phyIndex size
Returns:
clocktype
- transmission delay.
PHY_GetTransmissionDuration
clocktype PHY_GetTransmissionDuration (Node * node, int phyIndex, int dataRateIndex, int size) Parameters:
node
phyIndex
dataRateIndex size
Returns:
clocktype
- transmission duration
PHY_GetFrameModel
node
phyNum
Returns:
PhyModel
- Physical Model
PHY_GetAntennaModelType
node
phyNum
PHYSICAL LAYER
Returns:
PhyModel
- Physical Model
PHY_StartTransmittingSignal
void PHY_StartTransmittingSignal (Node * node, int phyNum, Message* msg, BOOL useMacLayerSpecifiedDelay, clocktype delayUntilAirborne) Parameters:
phyNum msg
useMacLayerSpecifiedDelay delayUntilAirborne
Returns:
void
- None
PHY_StartTransmittingSignal
void PHY_StartTransmittingSignal (Node * node, int phyNum, Message* msg, clocktype duration, BOOL useMacLayerSpecifiedDelay, clocktype delayUntilAirborne) Parameters:
node
phyNum msg
duration
useMacLayerSpecifiedDelay delayUntilAirborne
Returns:
void
- None
PHY_StartTransmittingSignal
void PHY_StartTransmittingSignal (Node * node, int phyNum, Message* msg, int bitSize, BOOL useMacLayerSpecifiedDelay, clocktype delayUntilAirborne) Parameters:
phyNum msg
- packet to be sent
PHYSICAL LAYER
bitSize
useMacLayerSpecifiedDelay delayUntilAirborne
Returns:
void
- None
PHY_SignalArrivalFromChannel
void PHY_SignalArrivalFromChannel (Node * node, int phyIndex, int channelIndex, PropRxInfo* propRxInfo) Parameters:
node
phyIndex
channelIndex propRxInfo
Returns:
void
- None
PHY_SignalEndFromChannel
void PHY_SignalEndFromChannel (Node * node, int phyIndex, int channelIndex, PropRxInfo* propRxInfo) Parameters:
node
phyIndex
channelIndex propRxInfo
Returns:
void
- None
PHY_GetTxDataRate
node
phyIndex
Returns:
int
- None
PHY_GetRxDataRate
PHYSICAL LAYER
phyIndex
Returns:
int
- None
PHY_GetTxDataRateType
node
phyIndex
Returns:
int
- None
PHY_GetRxDataRateType
node
phyIndex
Returns:
int
- None
PHY_SetTxDataRateType
node
phyIndex
dataRateType
Returns:
void
- None
PHY_GetLowestTxDataRateType
node
PHYSICAL LAYER
phyIndex
dataRateType
Returns:
void
- None
PHY_SetLowestTxDataRateType
node
phyIndex
Returns:
void
- None
PHY_GetHighestTxDataRateType
node
phyIndex
dataRateType
Returns:
void
- None
PHY_SetHighestTxDataRateType
node
phyIndex
Returns:
void
- None
PHY_GetHighestTxDataRateTypeForBC
node
phyIndex
dataRateType
PHYSICAL LAYER
Returns:
void
- None
PHY_SetHighestTxDataRateTypeForBC
node
phyIndex
Returns:
void
- None
PHY_ComputeSINR
double PHY_ComputeSINR (PhyData * phyData, double * signalPower_mW, double* interferencePower_mW, int bandwidth) Parameters:
Compute SINR
phyData
signalPower_mW
interferencePower_mW bandwidth
- Bandwidth
Returns:
double
PHY_SignalInterference
void PHY_SignalInterference (Node* node, int phyIndex, int channelIndex, Message * msg, double * signalPower_mW, double* interferencePower_mW) Parameters:
node
phyIndex
channelIndex msg
- message including desired signal - power from the desired signal - power from interfering signals
signalPower_mW
interferencePower_mW
Returns:
void
- None
PHY_BER
PHYSICAL LAYER
berTableIndex sinr
Returns:
double
PHY_SER
Get SER
phyData
perTableIndex sinr
Returns:
double
PHY_StopListeningToChannel
phyIndex
channelIndex
Returns:
void
- None
PHY_CanListenToChannel
node
phyIndex
channelIndex
Returns:
BOOL
- None
PHYSICAL LAYER
PHY_IsListeningToChannel
node
phyIndex
channelIndex
Returns:
BOOL
- None
PHY_SetTransmissionChannel
node
phyIndex
channelIndex
Returns:
void
- None
PHY_GetTransmissionChannel
node
phyIndex
channelIndex
Returns:
void
- None
PHY_MediumIsIdle
node
phyNum
Returns:
BOOL
- None
PHY_MediumIsIdleInDirection
PHYSICAL LAYER
phyNum
azimuth
Returns:
BOOL
- None
PHY_SetSensingDirection
node
phyNum
azimuth
Returns:
void
- None
PHY_StartTransmittingSignalDirectionally
void PHY_StartTransmittingSignalDirectionally (Node* node, int phyNum, Message* msg, BOOL useMacLayerSpecifiedDelay, clocktype delayUntilAirborne, double directionAzimuth) Parameters:
phyNum msg
Returns:
void
- None
PHY_LockAntennaDirection
node
phyNum
PHYSICAL LAYER
Returns:
void
- None
PHY_UnlockAntennaDirection
node
phyNum
Returns:
void
- None
PHY_GetLastSignalsAngleOfArrival
node
phyNum
Returns:
double
- AOA
PHY_TerminateCurrentReceive
void PHY_TerminateCurrentReceive (Node* node, int phyNum, const BOOL terminateOnlyOnReceiveError, BOOL* receiveError, clocktype* endSignalTime) Parameters:
phyNum
terminateOnlyOnReceiveError receiveError
endSignalTime
Returns:
void
- None
PHY_PropagationRange
double PHY_PropagationRange (Node* txnode, Node* node, int txInterfaceIndex, int interfaceIndex, int channnelIndex, BOOL printAll) Parameters:
Calculates an estimated radio range for the PHY. Supports only TWO-RAY and FREESPACE.
txnode
PHYSICAL LAYER
node
Returns:
double
ENERGY_Init
void ENERGY_Init (Node* node, const int phyIndex, NodeInput* nodeInput) Parameters:
This function declares energy model variables and initializes them. Moreover, the function read energy model specifications and configures the parameters which are configurable.
node
phyIndex
nodeInput
Returns:
void
- None
ENERGY_PrintStats
node
phyIndex
Returns:
void
- None
Phy_ReportStatusToEnergyModel
void Phy_ReportStatusToEnergyModel (Node* node, const int phyIndex, PhyStatusType prevStatus, PhyStatusType newStatus) Parameters:
This function should be called whenever a state transition occurs in any place in PHY layer. As input parameters, the function reads the current state and the new state of PHY layer and based on the new sates calculates the cost of the load that should be taken off the battery. The function then interacts with battery model and updates the charge of battery.
node
- the node of interest. - the PHY index. - the the previous status.
phyIndex
prevStatus newStatus
Returns:
void
- None
PHYSICAL LAYER
Generic_UpdateCurrentLoad
node
phyIndex
Returns:
void
- None
PHY_GetSteeringAngle
Gets the current steering angle for a directional antenna from PHY models that support this.
node
phyIndex
Returns:
void
- None
PHY_CheckPacketPhyDrop
void PHY_CheckPacketPhyDrop (PartitionData* partition, PropChannel* propChannel, int numNodes, int channelIndex, Message* msg) Parameters:
This function is for Stats DB. It is to check whether need to record a drop event.
partition
propChannel numNodes
channelIndex msg
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
PHYSICAL LAYER
PROPAGATION
PROPAGATION
This file describes data structures and functions used by propagation models. Constant / Data Structure Summary Type
CONSTANT
Name
BOLTZMANN_CONSTANT
Boltzmann constant
CONSTANT NEGATIVE_PATHLOSS_dB
PROPAGATION
structure of a channel.
STRUCT PropProfile
PROPAGATION
This structure is used for fields related to channel layer information that need to be sent with a message.
STRUCT PropRxInfo
This structure is used for fields related to channel layer information that need to be received with a message.
Summary
PROP_NumberChannels(node)
Initialization function for propagation This function is called from each partition, not from each node
void PROP_PartitionlInit(PartitionData* partitionData, NodeInput* nodeInput)
Initialize some partition specific data structures. This function is called from each partition, not from each node This function is only called for non-MPI
void PROP_Init(Node* node, int channelIndex, NodeInput* nodeInput)
Initialization function for propagation functions. This function is called from each node.
void PROP_ProcessEvent(Node* node, Message* msg)
To receive message.
void PROP_Finalize(Node* node)
PROPAGATION
This function will be called by QualNet wireless propagation code to calculate rxPower and prop delay for a specific signal from a specific tx node to a specific rx node.
BOOL PROP_CalculateRxPowerAndPropagationDelay(Message* msg, int channelIndex, PropChannel* propChannel, PropTxInfo* propTxInfo, Node* txNode, Node* rxNode, PropPathProfile* pathProfile)
This function will be called by QualNet wireless propagation code to calculate rxPower and prop delay for a specific signal from a specific tx node to a specific rx node.
void PROP_MotionObtainfadingStretchingFactor(PropTxInfo* propTxInfo, Node* receiver, int channelIndex)
UpdatePathProfiles
void PROP_ReleaseSignal(Node* node, Message* msg, int phyIndex, int channelIndex, float txPower_dBm, clocktype duration, clocktype delayUntilAirborne)
PROPAGATION
Calculate inter-node pathloss, distance values between all the nodes on a given channel
clocktype PROP_CalculatePropagationDelay(double distance, double propSpeed, PartitionData* partitionData, int channelIndex, int coordinateSystemType, Coordinates* fromPosition, Coordinates* toPosition)
Calculate the wireless propagation delay for the given distance and propagation speed.
void PROP_Reset(Node* node, int phyIndex, char* newChannelListenable)
Reset previous channel remove/add node to propChannel for signal delivery, in propagation_private.
void PROP_AddNodeToList(Node* node, int channelIndex)
add node to propChannel nodeList need to make sure that node is not already exists in list before adding.
void PROP_RemoveNodeFromList(Node* node, int channelIndex)
remove node from propChannel nodeList need to make sure that all the interface from that node is not listing on that channel before removing.
double PROP_GetChannelFrequency(Node* node, int channelIndex)
PROPAGATION
double
Constant
BOLTZMANN_CONSTANT 1.379e-23
Constant
Constant
Constant
Constant
Constant
Enumeration
Enumeration
PROPAGATION
Enumeration
Enumeration
Enumeration
Enumeration
Enumeration
Enumeration
Structure
Structure
Structure
Structure
PROPAGATION
Structure
Structure
This structure is used for fields related to channel layer information that need to be sent with a message. PropRxInfo
This structure is used for fields related to channel layer information that need to be received with a message.
Function / Macro Detail Function / Macro PROP_NumberChannels(node) Format Get the number of channel.
PROP_ChannelWavelength(node, channelIndex)
PROP_GlobalInit
Initialization function for propagation This function is called from each partition, not from each node
partitionData nodeInput
Returns:
void
- None
PROP_PartitionlInit
Initialize some partition specific data structures. This function is called from each partition, not from each node This function is only called for non-MPI
partitionData nodeInput
Returns:
void
- None
PROP_Init
node
PROPAGATION
Returns:
void
- None
PROP_ProcessEvent
To receive message.
node msg
- Node that is
Returns:
void
- None
PROP_Finalize
node
Returns:
void
- None
PROP_PathlossFreeSpace
distance
wavelength
Returns:
double
- pathloss in db
PROP_PathlossTwoRay
double PROP_PathlossTwoRay (double distance, double wavelength, float txAntennaHeight, float rxAntennaHeight) Parameters:
distance
- distance (meters) between two nodes - wavelength used for propagation. - tranmitting antenna hight. - receiving antenna hight.
wavelength
txAntennaHeight rxAntennaHeight
PROPAGATION
Returns:
double
- pathloss in db
PROP_PathlossOpar
double PROP_PathlossOpar (double distance, double OverlappingDistance, double frequency, ObstructionType obstructiontype) Parameters:
OverlappingDistance frequency
obstructiontype
Returns:
double
PROP_CalculatePathloss
void PROP_CalculatePathloss (Node* node, NodeId txNodeId, NodeId rxNodeId, int channelIndex, double wavelength, float txAntennaHeight, float rxAntennaHeight, PropPathProfile* pathProfile, bool forBinning) Parameters:
- Node that is - including for debugging - including for debugging - channel number.
txNodeId rxNodeId
channelIndex wavelength
- wavelength used for propagation. - tranmitting antenna hight. - receiving antenna hight.
- characteristics of path.
Returns:
void
- None
PROP_CalculateFading
void PROP_CalculateFading (PropTxInfo* propTxInfo, Node* node2, int channelIndex, clocktype currentTime, float* fading_dB, double* channelReal, double* channelImag) Parameters:
PROPAGATION
node2
- calculated fading store here. - for cooperative comm - for cooperative comm
channelReal channelImag
Returns:
void
- None
PROP_CalculateRxPowerAndPropagationDelay
BOOL PROP_CalculateRxPowerAndPropagationDelay (Message* msg, int channelIndex, PropChannel* propChannel, PropTxInfo* propTxInfo, Node* txNode, Node* rxNode, PropPathProfile* pathProfile) Parameters:
This function will be called by QualNet wireless propagation code to calculate rxPower and prop delay for a specific signal from a specific tx node to a specific rx node.
msg
pathProfile
Returns:
BOOL
- If FALSE, indicate the two nodes cannot comm TRUE means two nodes can communicate
PROP_CalculateRxPowerAndPropagationDelay
BOOL PROP_CalculateRxPowerAndPropagationDelay (Message* msg, int channelIndex, PropChannel* propChannel, PropTxInfo* propTxInfo, Node* txNode, Node* rxNode, PropPathProfile* pathProfile) Parameters:
This function will be called by QualNet wireless propagation code to calculate rxPower and prop delay for a specific signal from a specific tx node to a specific rx node.
msg
PROPAGATION
pathProfile
Returns:
BOOL
- If FALSE, indicate the two nodes cannot comm TRUE means two nodes can communicate
PROP_MotionObtainfadingStretchingFactor
propTxInfo receiver
- Transmitter information
channelIndex
Returns:
void
- None
PROP_UpdatePathProfiles
UpdatePathProfiles
node
- Node that is
Returns:
void
- None
PROP_ReleaseSignal
void PROP_ReleaseSignal (Node* node, Message* msg, int phyIndex, int channelIndex, float txPower_dBm, clocktype duration, clocktype delayUntilAirborne) Parameters:
- Node that is
phyIndex
- transmitting power
delayUntilAirborne
Returns:
void
- None
PROP_SubscribeChannel
PROPAGATION
phyIndex
channelIndex
Returns:
void
- None
PROP_UnsubscribeChannel
node
phyIndex
channelIndex
Returns:
void
- None
PROP_UnreferenceSignal
node msg
- Node that is
- Signal to be unreferenced
Returns:
void
- None
PROP_CalculateInterNodePathLossOnChannel
void PROP_CalculateInterNodePathLossOnChannel (Node* node, int channelIndex, int* numNodesOnChannel, NodeAddress* nodeIdList, float** pathloss_dB, float** distance) Parameters:
Calculate inter-node pathloss, distance values between all the nodes on a given channel
node
- any valid node - selected channel instance - number of nodes using this channel
channelIndex
numNodesOnChannel nodeIdList
pathloss_dB distance
PROPAGATION
Returns:
void
- None
PROP_CalculatePropagationDelay
clocktype PROP_CalculatePropagationDelay (double distance, double propSpeed, PartitionData* partitionData, int channelIndex, int coordinateSystemType, Coordinates* fromPosition, Coordinates* toPosition) Parameters:
Calculate the wireless propagation delay for the given distance and propagation speed.
distance
propSpeed
partitionData channelIndex
- Source position
- Destination position
Returns:
clocktype
- Calculated propagation delay COMMENTS :: + partitionData can be used to get the simulation time or terrain data + channelIndex indicates the channel for scenarios with multiple channels Wireless p2p link or microwave links don't use propagation channels. -1 will be passed in which indicate p2p/microwave links. + fromPosition and toPosition are not used right now. They can be used to calculate location specific delay.
PROP_Reset
Reset previous channel remove/add node to propChannel for signal delivery, in propagation_private.
node
phyIndex
newChannelListenable
Returns:
void
- None
PROP_AddNodeToList
add node to propChannel nodeList need to make sure that node is not already exists in list before adding.
node
channelIndex
Returns:
void
- None
PROPAGATION
PROP_RemoveNodeFromList
remove node from propChannel nodeList need to make sure that all the interface from that node is not listing on that channel before removing.
node
channelIndex
Returns:
void
- None
PROP_GetChannelFrequency
node
channelIndex
Returns:
double
- channel frequency
PROP_SetChannelFrequency
node
channelIndex
channelFrequency
Returns:
void
- None
PROP_GetChannelWavelength
node
channelIndex
Returns:
double
- channel wavelength
PROP_SetChannelWavelength
PROPAGATION
node
channelIndex
channelWavelength
Returns:
void
- None
PROP_GetChannelDopplerFrequency
node
channelIndex
Returns:
double
PROP_SetChannelDopplerFrequency
node
channelIndex
channelDopplerFrequency
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
QUEUES
QUEUES
This file describes the member functions of the queue base class. Constant / Data Structure Summary Type
CONSTANT
Name
DEQUEUE_NEXT_PACKET
This macro is used to specify that queue and scheduler operations not consider priority value of queue or packet
CONSTANT QOS_DEFAULT_INTERFACE_OBSERVATION_INTERVAL
This macro is used to specify the interface observation interval for Qos Routing. Ref.(Qospf.h see QOSPF_DEFAULT_INTERFACE_OBSERVATION_INTERVAL)
CONSTANT STATISTICS_RESOLUTION
This macro is used to support overflow issue to account for long delay network such as in space applications, or simply very very long simulations, divide delays by STATISTICS_RESOLUTION during runtime, and multiply by STATISTICS_RESOLUTION at the end of the simulation when IO_PrintStat'ing
CONSTANT DEFAULT_QUEUE_DELAY_WEIGHT_FACTOR
This macro is used to define the weight to assign to the most recent delay in calculating an exponential moving average. The value is fairly large because the queue delay is used for QoS routing decisions.
CONSTANT PACKET_ARRAY_INFO_FIELD_SIZE
The Queue structure will store a field of data in addition to the Message itself, with a maximum size of this value
ENUMERATION QueueBehavior
QUEUES
This enumeration is used by both queues and schedulers to determine the queue behavior.
ENUMERATION QueueOperation
This enumeration is used by both queues and schedulers to determine the operation of the retrieve functions.
STRUCT PacketArrayEntry
This structure represents an entry in the array of stored messages. The infoField (perhaps this should be renamed to prevent confusion) will store a queue algorithm dependent amount of data about each Message, as well as the simulation time that Message was inserted.
STRUCT QueueAgeInfo
This structure contains information for each packet inserted into the queue to uniquely identify it so that it can be removed from the queue due to age.
Summary
Queue(Message* msg, const void* infoField, BOOL* QueueIsFull, const clocktype currentTime, const double serviceTag)
This function prototype determines the arguments that need to be passed to a queue data structure in order to insert a message into it. The infoField parameter has a specified size infoFieldSize, which is set at Initialization, and points to the structure that should be stored along with the Message.
BOOL Queue(Message** msg, const int index, const QueueOperation operation, const clocktype currentTime, double* serviceTag)
This function prototype determines the arguments that need to be passed to a queue data structure in order to dequeue, peek at, or drop a message in its array of stored messages. It now includes the "DropFunction" functionality as well.
BOOL Queue()
This function prototype returns a Boolean value of true if the array of stored messages is empty, false otherwise.
int Queue()
This function prototype returns the number of bytes stored in the array.
int Queue()
This function prototype returns free space in number of bytes in the queue.
int Queue()
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/QUEUES.html[5/24/2011 12:39:19 PM]
QUEUES
This function prototype returns the number of Messages stored in the packetArray.
int Queue()
This function is proposed to replicate the state of the queue, as if it had been the operative queue all along. If there are packets in the existing queue, they are transferred one-by-one into the new queue. This can result in additional drops of packets that had previously been stored. This function returns the number of additional drops.
void Queue(BOOL suspend)
This function is proposed to identify and tag misbehaved queue at the interface, so that they can be punished.
void Queue(int* qDelayVal, int* totalTransmissionVal, const clocktype currentTime, BOOL isResetTotalTransmissionVal)
This function is proposed for qos information update for Qos Routings like Qospf.
int Queue()
This function prototype returns the number of bytes dequeued, not dropped, during a given period. This period starts at the beginning of the simulation, and restarts whenever the Queue resetPeriod function is called.
clocktype Queue()
This function prototype returns the queue utilization, or the amount of time that the queue is nonempty, during a given period. This period starts at the beginning of the simulation, and restarts whenever the queue resetPeriod function is called.
clocktype Queue()
This function prototype returns the average time a packet spends in the queue, during a given period. This period starts at the beginning of the simulation, and restarts whenever the QueueResetPeriodFunctionType function is called.
void Queue(clocktype currentTime)
This function prototype resets the current period statistics variables, and sets the currentPeriodStartTime to the currentTime.
clocktype Queue()
QUEUES
This function prototype outputs the final statistics for this queue. The layer, protocol, interfaceAddress, and instanceId parameters are given to IO_PrintStat with each of the queue's statistics.
void Queue(Node* node, const char queueTypeString[], const int queueSize, const int interfaceIndex, const int queueNumber, const int infoFieldSize, const BOOL enableQueueStat, const BOOL showQueueInGui, const clocktype currentTime, const void* configInfo)
This function runs queue initialization routine. Any algorithm specific configurable parameters will be kept in a structure and after feeding that structure the structure pointer will be sent to this function via that void pointer configInfo. Some parameters includes default values, to prevent breaking existing models. [Uses: vide Pseudo code]
Constant
DEQUEUE_NEXT_PACKET 0
Constant
Constant
This macro is used to specify that queue and scheduler operations not consider priority value of queue or packet QOS_DEFAULT_INTERFACE_OBSERVATION_INTERVAL 2 * SECOND
Constant
This macro is used to specify the interface observation interval for Qos Routing. Ref.(Qospf.h see QOSPF_DEFAULT_INTERFACE_OBSERVATION_INTERVAL) STATISTICS_RESOLUTION 1 * MICRO_SECOND
Constant
This macro is used to support overflow issue to account for long delay network such as in space applications, or simply very very long simulations, divide delays by STATISTICS_RESOLUTION during runtime, and multiply by STATISTICS_RESOLUTION at the end of the simulation when IO_PrintStat'ing DEFAULT_QUEUE_DELAY_WEIGHT_FACTOR 0.1
This macro is used to define the weight to assign to the most recent delay in calculating an exponential moving average. The value is
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/QUEUES.html[5/24/2011 12:39:19 PM]
QUEUES
Constant
fairly large because the queue delay is used for QoS routing decisions. PACKET_ARRAY_INFO_FIELD_SIZE 32
Enumeration
The Queue structure will store a field of data in addition to the Message itself, with a maximum size of this value QueueBehavior
Enumeration
This enumeration is used by both queues and schedulers to determine the queue behavior. QueueOperation
Structure
This enumeration is used by both queues and schedulers to determine the operation of the retrieve functions. PacketArrayEntry
Structure
This structure represents an entry in the array of stored messages. The infoField (perhaps this should be renamed to prevent confusion) will store a queue algorithm dependent amount of data about each Message, as well as the simulation time that Message was inserted. QueueAgeInfo
This structure contains information for each packet inserted into the queue to uniquely identify it so that it can be removed from the queue due to age.
Function / Macro Detail Function / Macro Queue Format void Queue (Message* msg, const void* infoField, BOOL* QueueIsFull, const clocktype currentTime, const double serviceTag) Parameters: This function prototype determines the arguments that need to be passed to a queue data structure in order to insert a message into it. The infoField parameter has a specified size infoFieldSize, which is set at Initialization, and points to the structure that should be stored along with the Message.
msg
- Pointer to Message structure - The infoField parameter - returns Queue occupancy status - Current Simulation time
infoField
- ServiceTag
Returns:
void
- Null
QUEUES
Queue
BOOL Queue (Message** msg, const int index, const QueueOperation operation, const clocktype currentTime, double* serviceTag) Parameters:
This function prototype determines the arguments that need to be passed to a queue data structure in order to dequeue, peek at, or drop a message in its array of stored messages. It now includes the "DropFunction" functionality as well.
msg
- The retrieved msg - The position of the packet in the queue - The retrieval mode - Current Simulation time
index
operation
currentTime serviceTag
- ServiceTag = NULL
Returns:
BOOL
- TRUE or FALSE
Queue
This function prototype returns a Boolean value of true if the array of stored messages is empty, false otherwise. Queue
Returns:
BOOL
- TRUE or FALSE
This function prototype returns the number of bytes stored in the array. Queue
Returns:
int
- Integer
This function prototype returns free space in number of bytes in the queue. Queue
Returns:
int
This function prototype returns the number of Messages stored in the packetArray. Queue
Returns:
int
- Integer
QUEUES
Returns:
int
- Integer
serviceTag
Returns:
void
- NULL
Queue
This function is proposed to replicate the state of the queue, as if it had been the operative queue all along. If there are packets in the existing queue, they are transferred one-by-one into the new queue. This can result in additional drops of packets that had previously been stored. This function returns the number of additional drops. Queue
oldQueue
Returns:
int
- Old packetArray
This function is proposed to identify and tag misbehaved queue at the interface, so that they can be punished.
suspend
Returns:
void
- Null
Queue
void Queue (int* qDelayVal, int* totalTransmissionVal, const clocktype currentTime, BOOL isResetTotalTransmissionVal) Parameters:
This function is proposed for qos information update for Qos Routings like Qospf.
qDelayVal
totalTransmissionVal currentTime
isResetTotalTransmissionVal
Returns:
void
- Null
Queue
int Queue ()
QUEUES
Parameters: This function prototype returns the number of bytes dequeued, not dropped, during a given period. This period starts at the beginning of the simulation, and restarts whenever the Queue resetPeriod function is called. Queue Returns:
int
- Integer
This function prototype returns the queue utilization, or the amount of time that the queue is nonempty, during a given period. This period starts at the beginning of the simulation, and restarts whenever the queue resetPeriod function is called. Queue
Returns:
clocktype
- Utilize Time.
This function prototype returns the average time a packet spends in the queue, during a given period. This period starts at the beginning of the simulation, and restarts whenever the QueueResetPeriodFunctionType function is called. Queue
Returns:
clocktype
- Queue Delays.
This function prototype resets the current period statistics variables, and sets the currentPeriodStartTime to the currentTime.
currentTime
Returns:
void
- Null
Queue
Returns:
clocktype
void Queue (Node* node, const char* layer, const int interfaceIndex, const int instanceId, const char* invokingProtocol, const char* splStatStr) Parameters:
This function prototype outputs the final statistics for this queue. The layer, protocol, interfaceAddress, and instanceId parameters
node
QUEUES
layer
interfaceIndex instanceId
invokingProtocol splStatStr
Returns:
void
- Null
Queue
void Queue (Node* node, const char queueTypeString[], const int queueSize, const int interfaceIndex, const int queueNumber, const int infoFieldSize, const BOOL enableQueueStat, const BOOL showQueueInGui, const clocktype currentTime, const void* configInfo) Parameters:
node
This function runs queue initialization routine. Any algorithm specific configurable parameters will be kept in a structure and after feeding that structure the structure pointer will be sent to this function via that void pointer configInfo. Some parameters includes default values, to prevent breaking existing models. [Uses: vide Pseudo code]
queueTypeString[] queueSize
interfaceIndex queueNumber
infoFieldSize
Returns:
void
- Null
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
QUEUES
RANDOM NUMBERS
RANDOM NUMBERS
This file describes functions to generate pseudo-random number streams. Constant / Data Structure Summary Type
ENUMERATION
Name
RandomDistributionType
Summary
RANDOM_SetSeed(RandomSeed seed, UInt32 globalSeed, UInt32 nodeId, UInt32 protocolId, UInt32 instanceId)
Chooses from a set of pre-defined independent random seeds. The parameter names here are recommend invariants for use in selecting seeds, but other values could be used instead.
double RANDOM_erand(RandomSeed seed)
RANDOM NUMBERS
Int32
RANDOM_jrand(RandomSeed seed)
Sets the distribution to uniform. With this function, even integer types return values between [min, max), meaning to get a boolean distribution, use 0, 2.
void RandomDistribution.setDistributionUniformInteger(T min, T max)
RANDOM NUMBERS
void
These two functions return the next random number from the defined distribution.
void RandomDistribution.setSeed(UInt32 globalSeed, UInt32 nodeId, UInt32 protocolId, UInt32 instanceId)
Enumeration
RandomDistributionType
Enumeration
RANDOM NUMBERS
Structure
Structure
Function / Macro Detail Function / Macro RANDOM_SetSeed Format void RANDOM_SetSeed (RandomSeed seed, UInt32 globalSeed, UInt32 nodeId, UInt32 protocolId, UInt32 instanceId) Parameters: Chooses from a set of pre-defined independent random seeds. The parameter names here are recommend invariants for use in selecting seeds, but other values could be used instead.
seed
- the seed to be set. - the scenario's global seed, i.e. SEED in the
globalSeed nodeId
- the node's ID - the protocol number, as defined in the layer - the instance of this protocol, often the
protocolId instanceId
Returns:
void
- None
RANDOM_erand
seed
Returns:
double
- a random number
RANDOM_jrand
seed
Returns:
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/RANDOM NUMBERS.html[5/24/2011 12:39:43 PM]
RANDOM NUMBERS
Int32
- a random number
RANDOM_nrand
seed
Returns:
Int32
- a random number
RANDOM_LoadUserDistributions
nodeInput
Returns:
void
- None
RandomDistribution.init
Returns:
void
- None
RandomDistribution.setDistributionUniform
Sets the distribution to uniform. With this function, even integer types return values between [min, max), meaning to get a boolean distribution, use 0, 2.
min max
- the low end of the range - the high end of the range
Returns:
void
- None
RandomDistribution.setDistributionUniformInteger
min max
- the low end of the range - the high end of the range
Returns:
void
- None
RANDOM NUMBERS
RandomDistribution.setDistributionExponential
mean
Returns:
void
- None
RandomDistribution.setDistributionGaussian
sigma
Returns:
void
- None
RandomDistribution.setDistributionGaussianInt
sigma
Returns:
void
- None
RandomDistribution.setDistributionPareto
val1 val2
- the low end of the range - the high end of the range - the alpha value
alpha
Returns:
void
- None
RandomDistribution.setDistributionPareto4
- the minimum value of Pareto distribution - the low end of the range - the high end of the range - the alpha value
alpha
RANDOM NUMBERS
Returns:
void
- None
RandomDistribution.setDistributionGeneralPareto
val1 val2
- the low end of the range - the high end of the range - the alpha value
alpha
Returns:
void
- None
RandomDistribution.setDistributionParetoUntruncated
alpha
Returns:
void
- None
RandomDistribution.setDistributionDeterministic
val
Returns:
void
- None
RandomDistribution.setDistributionNull
Returns:
void
- None
inputString printStr
RANDOM NUMBERS
dataType
Returns:
int
RandomDistribution.getRandomNumber
These two functions return the next random number from the defined distribution.
seed node
- when the seed parameter is present, it is used in - the node parameter is required to look up user
Returns:
T
RandomDistribution.setSeed
void RandomDistribution.setSeed (UInt32 globalSeed, UInt32 nodeId, UInt32 protocolId, UInt32 instanceId) Parameters:
globalSeed nodeId
- the node's ID - the protocol number, as defined in the layer - the instance of this protocol, often the
protocolId instanceId
Returns:
void
- None
RandomDistribution.setSeed
seed
Returns:
void
- None
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
RANDOM NUMBERS
SCHEDULERS
SCHEDULERS
This file describes the member functions of the scheduler base class. Constant / Data Structure Summary Type
CONSTANT
Name
DEFAULT_QUEUE_COUNT
This structure contains pointers to queue structures, default function behaviors, and statistics for the scheduler
Summary
Scheduler(int priority)
Returns a Boolean value of TRUE if the array of stored messages in each queue that the scheduler controls are empty, and FALSE otherwise
file:///Z|/EXata%20Documentation/EXata%202.2/API%20Reference/API/SCHEDULERS.html[5/24/2011 12:39:53 PM]
SCHEDULERS
BOOL
This function prototype returns the total number of bytes stored in the array of either a specific queue, or all queues that the scheduler controls.
int Scheduler(const int priority)
This function prototype returns the number of messages stored in the array of either a specific queue, or all queues that the scheduler controls.
void Scheduler(int queueIndex, int* qDelayVal, int* totalTransmissionVal, const clocktype currentTime, BOOL isResetTotalTransmissionVal)
This function enable Qos monitoring for all queues that the scheduler controls.
void Scheduler(int priority, int packetSize, const clocktype currentTime)
This function runs the generic and then algorithm-specific scheduler initialization routine.
int GenericPacketClassifier(Scheduler* scheduler, int pktPriority)
Constant
DEFAULT_QUEUE_COUNT 3
Structure
SCHEDULERS
This structure contains pointers to queue structures, default function behaviors, and statistics for the scheduler
Function / Macro Detail Function / Macro Scheduler Format QueueData* Scheduler (int priority) Parameters: Returns pointer to QueueData associated with the queue. this is a Private
priority
- Queue priority
Returns:
QueueData*
- Pointer of queue
Scheduler
Returns:
int
- Number of queue.
queueIndex
- Queue index
Returns:
int
Scheduler
Returns a Boolean value of TRUE if the array of stored messages in each queue that the scheduler controls are empty, and FALSE otherwise Scheduler
priority
- Priority of a queue
Returns:
BOOL
- TRUE or FALSE
This function prototype returns the total number of bytes stored in the array of either a specific queue, or all queues that the scheduler controls.
priority
- Priority of a queue
Returns:
BOOL
SCHEDULERS
- TRUE or FALSE Scheduler int Scheduler (const int priority) Parameters: This function prototype returns the number of messages stored in the array of either a specific queue, or all queues that the scheduler controls. Scheduler
priority
- Priority of a queue
Returns:
int
void Scheduler (int queueIndex, int* qDelayVal, int* totalTransmissionVal, const clocktype currentTime, BOOL isResetTotalTransmissionVal) Parameters:
This function enable Qos monitoring for all queues that the scheduler controls.
queueIndex qDelayVal
- Queue index
totalTransmissionVal currentTime
isResetTotalTransmissionVal
Returns:
void
- Null
Scheduler
void Scheduler (int priority, int packetSize, const clocktype currentTime) Parameters:
priority
packetSize
currentTime
Returns:
void
- Null
Scheduler
void Scheduler (Node* node, const char* layer, const int interfaceIndex, const int instanceId, const char* invokingProtocol, const char* splStatStr) Parameters:
layer
interfaceIndex
SCHEDULERS
instanceId
invokingProtocol splStatStr
Returns:
void
- Null
SCHEDULER_Setup
void SCHEDULER_Setup (Scheduler** scheduler, const char schedulerTypeString[], BOOL enableSchedulerStat, const char* graphDataStr) Parameters:
This function runs the generic and then algorithm-specific scheduler initialization routine.
scheduler
Returns:
void
- Null
GenericPacketClassifier
scheduler
pktPriority
Returns:
int
- Integer.
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
SCHEDULERS
SLIDING-WINDOW
SLIDING-WINDOW
This file describes data structures and functions to implement a sliding window. Constant / Data Structure Summary Type
STRUCT
Name
MsTmWin
Summary
MsTmWinInit(MsTmWin* pWin, clocktype sSize, int nSlot, double weight, clocktype theTime)
SLIDING-WINDOW
Structure
MsTmWin
Function / Macro Detail Function / Macro MsTmWinInit Format void MsTmWinInit (MsTmWin* pWin, clocktype sSize, int nSlot, double weight, clocktype theTime) Parameters: initialize time sliding window with the given parameters
pWin
- pointer to the time sliding window - sliding window slot size - sliding window number of slots - weight for average computation - the current time
sSize nSlot
weight
theTime
Returns:
void
- None
MsTmWinInit
void MsTmWinInit (MsTmWin* pWin, clocktype sSize, int nSlot, double weight, clocktype theTime) Parameters:
SLIDING-WINDOW
pWin
- pointer to the time sliding window - sliding window slot size - sliding window number of slots - weight for average computation - the current time
sSize nSlot
weight
theTime
Returns:
void
- None
MsTmWinNewData
pWin data
- pointer to the time sliding window - new data - the current time
theTime
Returns:
void
- None
MsTmWinWinSize
pWin
theTime
Returns:
clocktype
MsTmWinSum
pWin
theTime
Returns:
double
MsTmWinAvg
SLIDING-WINDOW
pWin
theTime
Returns:
double
MsTmWinTotalSum
pWin
theTime
Returns:
double
MsTmWinTotalAvg
pWin
theTime
Returns:
double
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
TRACE
TRACE
This file describes data structures and functions used for packet tracing. Constant / Data Structure Summary Type
CONSTANT
Name
MAX_TRACE_LENGTH
Generic maximum length of a string. The maximum length of any line in the input file is 3x this value.
ENUMERATION TraceDirectionType
TRACE
Summary
TRACE_Initialize(Node* node, const NodeInput* nodeInput)
TRACE
void
TRACE_EnableTraceXML(Node* node, TraceProtocolType protocol, char* protocolName, TracePrintXMLFn xmlPrintFn, BOOL writeMap)
Constant
MAX_TRACE_LENGTH (4090)
Constant
Enumeration
Generic maximum length of a string. The maximum length of any line in the input file is 3x this value. TraceDirectionType
Enumeration
Enumeration
TRACE
Enumeration
Enumeration
Enumeration
Enumeration
Gives specific comments on the packet action here packet drop. TraceProtocolType
Structure
Structure
Structure
Function / Macro Detail Function / Macro TRACE_Initialize Format void TRACE_Initialize (Node* node, const NodeInput* nodeInput) Parameters: Initialize necessary trace information before simulation starts.
node
nodeInput
TRACE
Returns:
void
- NULL
TRACE_IsTraceAll
node
- this node
Returns:
BOOL
TRACE_PrintTrace
void TRACE_PrintTrace (Node* node, Message* message, TraceLayerType layerType, PacketDirection pktDirection, ActionData* actionData) Parameters:
node
- this node - Packet to print trace info from. - Layer that is calling this function. - If the packet is coming out of
message
layerType
pktDirection actionData
Returns:
void
- NULL
TRACE_PrintTrace
void TRACE_PrintTrace (Node* node, Message* message, TraceLayerType layerType, PacketDirection pktDirection, ActionData* actionData, NetworkType netType) Parameters:
node
- this node - Packet to print trace info from. - Layer that is calling this function. - If the packet is coming out of
message
layerType
Returns:
void
- NULL
TRACE_EnableTraceXML
TRACE
TracePrintXMLFn xmlPrintFn, BOOL writeMap) Parameters: Enable XML trace for a particular protocol.
node
protocol
- callback function
Returns:
void
- NULL
TRACE_EnableTraceXML
void TRACE_EnableTraceXML (Node* node, TraceProtocolType protocol, char* protocolName, TracePrintXMLFn xmlPrintFn, BOOL writeMap) Parameters:
protocol
- callback function
Returns:
void
- NULL
TRACE_DisableTraceXML
void TRACE_DisableTraceXML (Node* node, TraceProtocolType protocol, char* protocolName, BOOL writeMap) Parameters:
node
protocol
protocolName writeMap
Returns:
void
- NULL
TRACE_WriteToBufferXML
TRACE
Parameters: Write trace information to a buffer, which will then be printed to a file.
node buf
- This node.
Returns:
void
- NULL
TRACE_WriteTraceHeader
fp
Returns:
void
- NULL
TRACE_WriteXMLTraceTail
fp
Returns:
void
- NULL
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
TRANSPORT LAYER
TRANSPORT LAYER
This file describes data structures and functions used by the Tansport Layer. Constant / Data Structure Summary Type
CONSTANT
Name
TRANSPORT_DELAY
Constant
TRANSPORT_DELAY (1 * MICRO_SECOND)
Enumeration
Structure
TRANSPORT LAYER
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
USER
USER
This file describes data structures and functions used by the User Layer. Constant / Data Structure Summary Type
CONSTANT
Name
USER_PHONE_STARTUP_DELAY
The step value that the user dissatisfaction degree is increased each time.
CONSTANT USER_CECREASE_DISSATISFACTION
The step value that the user dissatisfaction degree is decreased each time.
ENUMERATION UserApplicationStatus
USER
Summary
USER_HandleCallUpdate(Node* node, UserApplicationStatus appStatus)
Constant
USER_PHONE_STARTUP_DELAY 5S
Constant
Delay from a cellphone is powered on until it can start working. USER_INCREASE_DISSATISFACTION 0.1
Constant
The step value that the user dissatisfaction degree is increased each time. USER_CECREASE_DISSATISFACTION -0.1
Enumeration
The step value that the user dissatisfaction degree is decreased each time. UserApplicationStatus
Structure
USER
Structure
Structure
Function / Macro Detail Function / Macro USER_HandleCallUpdate Format void USER_HandleCallUpdate (Node* node, UserApplicationStatus appStatus) Parameters: Reaction to the status change of an application session
node
appStatus
Returns:
void
- NULL
USER_HandleUserLayerEvent
node msg
- Pointer to node.
- The event
Returns:
void
- NULL
USER_SetTrafficPattern
node
- Pointer to node.
Returns:
void
- NULL
USER_SetApplicationArrival
USER
- Pointer to node.
Returns:
void
- NULL
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.
WALLCLOCK
WALLCLOCK
This file describes methods of the WallClock class whose primary use is to keep track of the amount of real time that has passed during the simulation. Function / Macro Summary Return Type
BOOL
Summary
WallClock( void)
This method returns true if the WallClock is currently in the paused state.
double WallClock()
Pausing of the WallClock can be disabled by any external interface ambassador. Permission to pause is all or nothing, so if any external interface disables pause, no pausing is allowed. As an example, a simulation using IPNE and HLA is run. If the IPNE code disables pausing, then HLA won't be able to pause the WallClock or in other words the wall clock's value for time just keeps running.
void WallClock( void)
Function / Macro Detail Function / Macro WallClock Format BOOL WallClock ( void)
WALLCLOCK
Parameters: This method returns true if the WallClock is currently in the paused state.
void
- None
Returns:
BOOL
- TRUE or FALSE
WallClock
Returns:
double
- None
WallClock
Pausing of the WallClock can be disabled by any external interface ambassador. Permission to pause is all or nothing, so if any external interface disables pause, no pausing is allowed. As an example, a simulation using IPNE and HLA is run. If the IPNE code disables pausing, then HLA won't be able to pause the WallClock or in other words the wall clock's value for time just keeps running. WallClock
void
- None
Returns:
void
- None
void
- None
Returns:
void
- None
WallClock
void
- None
Returns:
double
WALLCLOCK
Contact EXATA Support for questions pertaining to the EXATA API Reference. This document is confidential and proprietary. It may not be reproduced or distributed without the expressed written consent of Scalable Network Technologies.