LLCQuery

Type

SwitchKit API message

Purpose

Use the LLCQuery message to query the LLC for information. Currently, only information about configured nodes is available.

Description

The message is for querying the LLC for node related information. Supported queries include the following:

• Logical Node IDs

• IP address of the active CSP Matrix Series 3 Card

• IP address of the standby CSP Matrix Series 3 Card

Sent by

Application

How to use

To use LLCQuery, construct the message and set the TLV information.

SKC_LLCQuerylq;

lq.setDataSize(DataSize);

lq.setTLVCount(TLVCount);

lq.setData(data);

Arguments

The following table shows the arguments you can change in LLCQuery:

Argument

Description

DataSize

Number of bytes of the data.

TLVCount

Number of TLVs in the data.

data

Data bytes.

Status

These values can be returned in the Status argument of SK_LLCQueryAck.

• SK_BAD_PARAM if unknown, query TLV.

• SK_INVALID_NODE if unknown node ID is given.

TLVs

You can use several TLVs with LLCQuery. See TLV Syntax:

Queries

• PopulationQueryTLV (0x0002)

• NodeInfoQueryTLV (0x0003)

• LLC_REDUNDANCY_QUERY_TLV (0x0005)

Responses

• NodeInfoTLV (0x8010)

• RequestedMatrixInfoTLV (0x8011)

• RequestedDeviceServerTLV (0x8012)

• RequestedKnownNodeInfoTLV (0x8013)

• GenericLLCReport messages

PopulationQuery TLV

The PopulationQuery TLV is used to query the LLC about any nodes it has detected. This TLV can request information on controlled nodes, known nodes, or both controlled and known nodes. A controlled node is any node directly under this LLC’s control, while a known node is under another LLC’s control.

The valid values for this option are:

ControlledNode (0x01)
KnownNode (0x02)
ControlledAndKnownNode (0x03)

The LLC will respond with an LLCQueryAck with zero or more NodeInfo TLVs; one for each node that matches the criteria: known or controlled. These TLVs reveal the Logical Node ID, the Node Type, and whether the link is up, down, or unknown. If the node is not controlled by this LLC, then the link status will not be known.

If no nodes match the criteria, then an LLCQueryAck will be returned with as a positive ACK with no TLVs.

NodeInfoQuery TLV

The NodeInfoQuery TLV is used to query the LLC about a specific node ID. It has one TLV field: Logical Node ID.

The LLC responds to NodeInfoQuery TLVs with an LLCQueryAck with various TLVs depending on what type of device the node is. These TLVs would be one of the following:

• RequestedMatrixInfoTLV

• RequestedDeviceServer LV

• RequestedKnownNodeInfoTLV

The above TLVs contain all the information the LLC knows about the node. For example, if the device is a standard CSP with two Matrix cards, then the ACK will contain two RequestedMatrixInfo TLVs; one for each card. However, if the node type is a device server, for example, the IP Signaling Series 3 card, the ACK will contain one RequestedDeviceServerTLV. If the node is merely a "known node", then the RequestedKnownNodeInfoTLV will be returned regardless of what type of node it is.

SK_LLC_REDUNDANCY_QUERY_TLV (0x0005)

The SK_LLC_REDUNDANCY_QUERY_TLV is used to query the redundancy status of the primary and redundant LLCs.The LLC will respond with a GenericLLCReport message of type SK_LLC_REDUNDANCY for each LLC. See the GenericLLCReport section for details on message behavior and format.

Description

Byte (Value)

Tag

Data[0, 1] = 0x0005 (SK_LLC_REDUNDANCY_QUERY_TLV)

Length

Data[2, 3] = 0x0000

Value

There are no values for this option.

 

C Structure

typedef struct {

unsigned short DataSize;

UBYTE TLVCount;

UBYTE Data[250];

} SK_LLCQuery;

C Structure Response

typedef struct {

unsigned short DataSize;

int Status;

UBYTE TLVCount;

UBYTE Data[246];

} SK_LLCQueryAck;

C++ Class

class SKC_LLCQuery : public SKC_ToolkitMessage {

public:

unsigned short getDataSize() const;

void setDataSize(unsigned short x);

UBYTE getTLVCount() const;

void setTLVCount(UBYTE x);

const UBYTE *getData() const;

UBYTE *getData();

void setData(UBYTE *x);

};

C++ Class Response

class SKC_LLCQueryAck : public SKC_ToolkitAck {

public:

unsigned short getDataSize() const;

void setDataSize(unsigned short x);

int getStatus() const;

void setStatus(int x);

UBYTE getTLVCount() const;

void setTLVCount(UBYTE x);

const UBYTE *getData() const;

UBYTE *getData();

void setData(UBYTE *x);

};

TLV Syntax

Below is the definition of all TLVs used in the LLC Query message and the LLC Query Acknowledgement (ACK) message.

PopulationQueryTypeTLV (0x0002)

Description

Byte (Value)

Tag

Data[0, 1] = 0x0002 (PopulationQueryTypeTLV)

Length

Data[2, 3] = 0x0001 (LLCPopulationQuery)

Value

Data[4] = Known Controlled/Both

NodeInfoQueryTLV (0x0003)

Description

Byte (Value)

Tag

Data[0, 1] = 0x0003 (NODEINFOQueryTLV)

Length

Data[2, 3] = 0x0002

Value

Data[4, 5] = Logical Node ID

NodeInfoTLV (0x8010)

Description

Byte (Value)

Tag

Data[0, 1] = 0x8001 (NodeInfoTLV)

Length

Data[2, 3] = 0x0003

Value

Data[4, 5] = Logical Node ID
Data[6] = Node Type
Data[7] = SK_LINK_UP/DOWN/NA

RequestedMatrixInfoTLV (0x8011)

Description

Byte (Value)

Tag

Data[0, 1] = 0x8011 (RequestedMatrixInfoTLV)

Length

Data[2, 3] = 0x000D

Value

Data[4, 5] = Logical Node ID
Data[6, 9] = Matrix IP
Data[10] = SystemType
Data[11] = MatrixSide
Data[12] = MatrixState
Data[13] = AdjMatrixState
Data[14] = StatusBits
Data[15, 16] = ExcelPort

RequestedDeviceServerInfoTLV (0x8012)

Description

Byte (Value)

Tag

Data[0, 1] = 0x8012 (RequestedDeviceServerInfoTLV)

Length

Data[2, 3] = 0x000D

Value

Data[4, 5] = Logical Node ID
Data[6, 9] = Matrix IP
Data[10, 11] = IP Signaling Series 3 status
Data[12] = SystemType
Data[13] = IP Signaling Series 3 Card Type
Data[14] = State
Data[15] = Adjacent State
Data[16] = StatusBits
Data[17] = Reserved

.

RequestedKnownNodeInfoTLV (0x8013)

Description

Byte (Value)

Tag

Data[0, 1] = 0x8013 (RequestedKnownNodeInfoTLV)

Length

Data[2, 3] = 0x0000

Value

Data[4, 5] = Logical Node ID
Data[6, 9] = IP Address