[ Previous | Next | Contents | Search ]
AIXLink/X.25 1.1 for AIX: Guide and Reference

X25_ADD_ROUTER_ID (Add Router ID) x25sioctl X.25 Device Handler Operation

Purpose

Registers a new routing name and routing specification.

Description

Note: Only a process that has opened the router special file can call the X25_ADD_ROUTER_ID operation.

The X25_ADD_ROUTER_ID operation registers a new route name and routing specification in the router table. For this operation, the arg parameter points to an x25_router_add structure. This structure contains the following fields:

router_id Specifies the unique identifier for the entry.
listen_name Specifies the nickname identifier for the entry. The nickname need not be unique.
priority Identifies the integer priority to attach to the routing request. A priority of 1 is high; 3 indicates a low priority.
action Specifies the action to take if the name is not being listened to. This field takes the following values:
0 Forwards the incoming call so that it can match other listening specifications.
1 Rejects the incoming call with cause 0, diagnostic 0.
uid Identifies the user ID allowed to receive these incoming calls. This field can be the user ID number. A value of -1 indicates that any user ID can receive the calls. Any attempt by a user with insufficient authority to listen on a name is rejected with the EACCES return value.
call_user_data Contains the call user data to match with an incoming call. The last character can be an * (asterisk). The format of this data is a string of hexadecimal characters and an optional * (asterisk); for example, C3* . The call user data is null-terminated if it is less than the maximum length.

Additionally, the x25_router_add structure contains the following address fields which are defined in the glossary:

These addresses are set to match with an incoming call. The last character of an address can be an * (asterisk). The addresses are null-terminated if less than the maximum length.

Execution Environment

The X25_ADD_ROUTER_ID operation can be called from the process environment only.

Return Values

A return code of -1 indicates an unsuccessful operation. If -1 is returned, the kernel sets the errno global variable to one of the following values:

EACCES Indicates the ioctl operation was issued on an channel that was not opened in Router mode.
EFAULT Indicates a specified address was not valid.
EINVAL Indicates one of the following occurred:
  • The specified router ID already exists. (Router IDs must be unique.)
  • The action field passed was neither 0 nor 1.
ENOMEM Indicates the operation ran out of memory.

Implementation Specifics

The X25_ADD_ROUTER_ID operation functions with an X.25 Interface Co-Processor/2 that has been correctly configured for use on a qualified network. Consult adapter specifications for more information on configuring the adapter and network qualifications.

Related Information

The x25sioctl handler entry point.


[ Previous | Next | Contents | Search ]