(Page 1 of 1 in this chapter)


Appendix C

Common Management
Structures and Parameters


Common Management API Parameters

The following parameters may be used in Common Management API functions.

TXAPIHNDL

The TX API handle (TXAPIHNDL) structure is returned on a successful TxApiOpen and is used as an input to other TX Management API function calls.

The TX API handle includes the following fields:
Field

Description

id

Value identifying structure as a TX API handle.

cpihndl

Handle returned from CPI Library. Use this value to access CPI Library directly.

cp

TX board communications processor number associated with handle. Used as test communications processor for TxApiPktInit. May be set by application if TxApiOpen is called with cp = 0.

rmt_cp

CP number of remote TX board communications processor when managing remote node (UDP access from local communications processor).

rmt_node

IP address of remote TX board communications processor when managing remote node.

TXMNGPKT

A TX API management packet (TXMNGPKT) is used as both the request and response structure for all dual port RAM packets sent/received by the TX Common Management API. These packets must be allocated by the application and should be initialized (at least once) by calling TxApiPktInit.

The following fields make up the TX API management packet:
Field

Description

dprhdr

Dual port RAM header: source and destination communications processor number's (0 = host) and DPR packet size.

rproto

Reserved for future use.

srcaddr

Source address used for remote node management (all zeroes = host system).

dstaddr

Remote destination address: remote TX board communications processor number and IP address.

iopkt

Image of IO packet to be issued on communications processor on behalf of application. See cpkuser.h for a complete description.

notif

Field available for notification processing.

key

General purpose key used by NETMGR task on communications processor.

flags

General control flags: indication of request (IO request) or response (IODONE)

datablk

Area for holding all other data associated with IO request/response. Holds destination entity name and all other passed structures.

Show Summary Control

The common portion of the TX Common Management API does not use this structure. It is provided in txapi.h so that it is available to all TX management extension APIs (TPX, Ds0 Over IP, and X.25 API).

The method for APIs returning lists of items in response to a show summary request is to return as many instances of the requested structure as are able to fit in the provided response buffer. Tasks return a count of the number of items returned as well as the next index to use to obtain more entries. The Show Summary Control structure is provided to assist applications in extracting this information.
Field

Description

summrec

Pointer to next summary record.

nxtindex

Index value to pass to TxxxxShSumm function to obtain next set of responses.

repeatflag

Determines whether it is time to repeat the send of the actual show summary request to the communications processor.

TPX API Structures

The following structures are used to pass information between the application and the TPX API.

IP Address Information

There are several commands to the TPX task which require the specification of an IP address. Certain of these commands also require a subnet mask / broadcast address.

The structure TXTPXIPADDR is defined by the TPX API to allow this information to be specified. Each time the structure is used by an API function, the documentation lists which of the IP address structure sub-fields are used.

Whenever subnet mask is expected, the application may specify a mask of all zeroes to indicate that the API should select the mask identified by the class of the IP address. The following choices apply:
Mask

IP Address Class

<127 or less>.*.*.*

Class A address (mask = 255.0.0.0)

<128-191>.*.*.*

Class B address (mask = 255.255.0.0)

<192 or higher>.*.*.*

Class C address (mask = 255.255.255.0)

Whenever a broadcast mask is expected, the application may specify all 0's to indicate that the API should select the broadcast address based on the IP address and subnet mask portions of the IP address. In this case, the API generates the broadcast address by combining the IP address masked off to the subnet mask significant bits with all bits set beyond the subnet mask bits. For example, IP address 1.2.3.4 with subnet mask 255.255.255.0 defines in a broadcast address of 1.2.3.255.



(Page 1 of 1 in this chapter)


tech_support@nmss.com
Copyright © 1998, Natural MicroSystems, Inc. All rights reserved.