HPlogo NetIPC 3000/XL Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 3 NetIPC Intrinsics

IPCDEST

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Creates a destination descriptor.

Syntax

IPCDEST  (socketkind[,location][,locationlen],protocol,
protoaddr,protolen[,flags][,opt],destdesc[,result])

Parameters

socketkind (input)

32-bit integer, by value. Defines the type of socket. The only type user processes can create is: 3 = call socket.

location (input)

Character array, by reference. The name of the node (either node or node.domain.organization) on which the destination socket is to be created. If this parameter is omitted, the local node is assumed.

locationlen (input)

32-bit integer, by value. The length in bytes of the destination node name. Zero indicates that no location was given (that is, the node is local). Maximum (for a fully qualified name) is 50.

protocol (input)

32-bit integer, by value. Defines the Transport Layer protocol to be used. The protocols currently available to user processes are:

  • 2 = X.25 protocol

  • 4 = TCP

protoaddr (input)

Byte array, by reference. Protocol relative address (remote address) with which the socket will be associated. The format of this address, defined by the protocol, is a 2-byte array (16 bits). Nonprivileged programs must use addresses in the range 30767 to 32767 decimal (%74057 to %77777). For X.25 access to level 3, this address is included in the CUD field of an X.25 call packet. (See the discussion of IPCCONNECT for the parameters providing access to the CUD).

protolen (input)

32-bit integer, by value. The length in bytes of the protocol address.

flags

32 bits, by reference. A bit representation of various options. No flags are currently defined.

opt (input)

Record or byte array, by reference. A list of options, with associated information.

  • destination network address (code = 16, length=n, n byte buffer) (input). (X.25 only.)This option allows a user to bypass the use of the network directory and associated IP address by specifying the destination node network address.

    The first two bytes of the option data field contain the "protocol" value of the module. For X.25, the protocol value is 2. The rest of the option data field is relative to that protocol. For X.25, two subformats are defined: one for the PVC numbers and one for SVC addresses. The third and fourth bytes of the data field contain a format identifier, where 1 indicates a PVC number and 0 indicates a SVC address. The PVC number is a 4 byte field. For a PVC, the total length of the option field is 8 bytes.

    The SVC field is composed of up to 16 nibbles where the first nibble is the nibble length of the remaining address. An odd number of nibbles can be passed since the length indicates the significance of the remaining field. This implies that the option data length for an SVC is between 5 and 12 bytes inclusive.

destdesc (output)

32-bit integer, by reference. Destination descriptor. Describes the location of the named call socket. May be used in subsequent NetIPC calls to IPCCONNECT.

result (output)

32-bit integer, by reference. The error code returned; zero if no error.

Description

The IPCDEST intrinsic creates a destination descriptor that contains routing information for sending data to another process.

This intrinsic is option variable. The required parameters are: socketkind, protocol, protoaddr, protolen, and destdesc.

Condition codes returned by this intrinsic are:

  • CCE — Succeeded.

  • CCL — Failed.

  • CCG — Not returned by this intrinsic.

This intrinsic cannot be called in split stack mode.

Protocol-Specific Considerations

The following Table 3-6 “IPCDEST Protocol Specific Parameters” outlines parameters that are specific to the particular protocol you are accessing.

Table 3-6 IPCDEST Protocol Specific Parameters

Parameters

TCP

X.25

opt

16

n/a

destination network address

 

X.25 Considerations

IPCDEST is used to create a destination descriptor for X.25 direct access. The protoaddr parameter is only used with switched virtual circuits (SVCs).

Using the destination network address (opt 16) to directly specify an X.25 address of an SVC or a PVC number allows the user to bypass the use of the network directory and the associated IP address.

Cross-System Considerations For TCP

The following are HP 3000 to HP 1000, HP 3000 to HP 9000, and HP 3000 to PC programming considerations for this intrinsic.

TCP protocol address — Although the ranges of protocol addresses for each computer system are different, the recommended range of TCP addresses for user applications is from 30767 to 32767 decimal (%74057 to %77777).

IPCERRMSG

Returns the NetIPC error message corresponding to a given error code.

Syntax

IPCERRMSG   (ipcerr,msg,len,result) 

Parameters

ipcerr (input)

32-bit integer, by value. A valid NetIPC error code.

msg (output)

Character array, by reference. The NetIPC error message corresponding to the given error code.

len (output)

32-bit integer, by reference. The length (in bytes) of the error message. The maximum is 80 bytes.

result (output)

32-bit integer, by reference. The error code returned for this intrinsic call; zero if no error.

Description

The IPCERRMSG intrinsic returns the NetIPC error message corresponding to a given error code. It also gives the length of the message. All parameters are required.

Condition codes returned by this intrinsic are:

  • CCE — Succeeded.

  • CCL — Failed because of a user error.

  • CCG — Failed because of an internal error (for example, unable to open the message catalog, a GENMESSAGE failure, etc.).

This intrinsic cannot be called in split stack mode.

Feedback to webmaster