DEFINE_CN

DEFINE_CN defines a connection network (also known as a virtual routing node or VRN). The verb provides the network-qualified name of the connection network along with its transmission group (TG) characteristics. It also provides a list of the names of the local ports that can access this connection network.

DEFINE_CN can be used to redefine an existing connection network. In particular, new ports can be added to the list of ports that access the connection network by issuing another DEFINE_CN. (Ports can be removed in the same way by issuing the DELETE_CN verb.)

VCB Structure

typedef struct define_cn
{
        unsigned short  opcode;          /* verb operation code        */
        unsigned char   attributes;      /* verb attributes            */
        unsigned char   reserv2;         /* reserved                   */
        unsigned char   format;          /* format                     */
        unsigned short  primary_rc;      /* primary return code        */
        unsigned long   secondary_rc;    /* secondary return code      */
        unsigned char   fqcn_name[17];   /* name of connection network */
        CN_DEF_DATA     def_data;        /* CN defined data            */
        unsigned char   port_name[8][8];
                                         /* port names                 */
} DEFINE_CN;
typedef struct cn_def_data
{
        unsigned char   description[RD_LEN];
                                         /* resource description       */
        unsigned char   num_ports;       /* number of ports on CN      */
        unsigned char   reserv1[16];     /* reserved                   */
        TG_DEFINED_CHARS tg_chars;       /* TG characteristics         */
} CN_DEF_DATA;
typedef struct tg_defined_chars
{
        unsigned char   effect_cap;      /* effective capacity         */
        unsigned char   reserve1[5];     /* reserved                   */
        unsigned char   connect_cost;    /* connection cost            */
        unsigned char   byte_cost;       /* byte cost                  */
        unsigned char   reserve2;        /* reserved                   */
        unsigned char   security;        /* security                   */
        unsigned char   prop_delay;      /* propagation delay          */
        unsigned char   modem_class;     /* modem class                */
        unsigned char   user_def_parm_1; /* user-defined parameter 1   */
        unsigned char   user_def_parm_2; /* user-defined parameter 2   */
        unsigned char   user_def_parm_3; /* user-defined parameter 3   */
} TG_DEFINED_CHARS;

Supplied Parameters

The application supplies the following parameters:
opcode
AP_DEFINE_CN
attributes
The attributes of the verb. This field is a bit field. The first bit contains the visibility of the resource to be defined and corresponds to one of the following:

AP_EXTERNALLY_VISIBLE
AP_INTERNALLY_VISIBLE

format
Identifies the format of the VCB. Set this field to zero to specify the version of the VCB listed above.
fqcn_name
Fully qualified name (17 bytes long) of connection network being defined. This name is composed of two type-A EBCDIC character strings concatenated by an EBCDIC dot, and is right-padded with EBCDIC spaces. (Each name can have a maximum length of 8 bytes with no embedded spaces.)
def_data.description
Resource description (returned on QUERY_CN). This is a 16-byte string in a locally displayable character set. All 16 bytes are significant.
def_data.num_ports
Number of ports associated with this connection network. There can be as many as eight ports per DEFINE_CN verb, and up to and including 239 ports in total per CN.
def_data.tg_chars.effect_cap
Actual units of effective capacity. The value is encoded as a 1-byte floating-point number, represented by the formula 0.1mmm * 2 eeeee, where the bit representation of the byte is eeeeemmm. Each unit of effective capacity is equal to 300 bits per second.
def_data.tg_chars.connect_cost
Cost per connect time. Valid values are integer values in the range 0–255, where 0 is the lowest cost per connect time and 255 is the highest.
def_data.tg_chars.byte_cost
Cost per byte. Valid values are integer values in the range 0–255, where 0 is the lowest cost per byte and 255 is the highest.
def_data.tg_chars.security
Security values as described in the list below:
AP_SEC_NONSECURE
No security exists.
AP_SEC_PUBLIC_SWITCHED_NETWORK
Data transmitted over this connection network will flow over a public switched network.
AP_SEC_UNDERGROUND_CABLE
Data transmitted over secure underground cable.
AP_SEC_SECURE_CONDUIT
The line is a secure conduit that is not guarded.
AP_SEC_GUARDED_CONDUIT
Conduit is protected against physical tapping.
AP_SEC_ENCRYPTED
Encryption over the line.
AP_SEC_GUARDED_RADIATION
Line is protected against physical and radiation tapping.
def_data.tg_chars.prop_delay
Propagation delay representing the time it takes for a signal to travel the length of the link, in microseconds. The value is encoded as a 1-byte floating-point number, represented by the formula 0.1mmm * 2 eeeee, where the bit representation of the byte is eeeeemmm. Default values are listed below:
AP_PROP_DELAY_MINIMUM
No propagation delay.
AP_PROP_DELAY_LAN
Less than 480 microseconds delay.
AP_PROP_DELAY_TELEPHONE
Between 480 and 49␠512 microseconds delay.
AP_PROP_DELAY_PKT_SWITCHED_NET
Between 49␠512 and 245␠760 microseconds delay.
AP_PROP_DELAY_SATELLITE
Longer than 245␠760 microseconds delay.
AP_PROP_DELAY_MAXIMUM
Maximum propagation delay.
def_data.tg_chars.modem_class
Reserved. This field should always be set to zero.
def_data.tg_chars.user_def_parm_1
User defined parameter in the range 0–255.
def_data.tg_chars.user_def_parm_2
User defined parameter in the range 0–255.
def_data.tg_chars.user_def_parm_3
User defined parameter in the range 0–255.
port_name
Array of up to eight port names defined on the connection network. Each named port must have already been defined by a DEFINE_PORT verb. Each port name is an 8-byte string in a locally displayable character set and must match that on the associated DEFINE_PORT verb. Additional ports can be defined on the connection network by issuing another DEFINE_CN specifying the new port names.

Returned Parameters

If the verb executes successfully, the Program returns the following parameter:
primary_rc
AP_OK
If the verb does not execute because of a parameter error, the Program returns the following parameters:
primary_rc
AP_PARAMETER_CHECK
secondary_rc
AP_INVALID_CN_NAME

AP_INVALID_NUM_PORTS_SPECIFIED
AP_INVALID_PORT_NAME
AP_INVALID_PORT_TYPE
AP_DEF_LINK_INVALID_SECURITY
AP_EXCEEDS_MAX_ALLOWED

If the verb does not execute because of a state error, the Program returns the following parameters:
primary_rc
AP_STATE_CHECK
secondary_rc
AP_PORT_ACTIVE

AP_CANT_MODIFY_VISIBILITY

If the verb does not execute because the node has not yet been started, the Program returns the following parameter:
primary_rc
AP_NODE_NOT_STARTED
If the verb does not execute because the node is stopping, the Program returns the following parameter:
primary_rc
AP_NODE_STOPPING
If the verb does not execute because of a system error, the Program returns the following parameter:
primary_rc
AP_UNEXPECTED_SYSTEM_ERROR