[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Files Reference

mpcn Special File

Purpose

Provides access to the HDLC network device driver by way of the SDLC COMIO device driver emulator. This special file only applies to AIX 4.2.1 and later.

Description

The /dev/mpcn character special file provides access to the HDLC network device driver via the SDLC COMIO device driver emulator in order to provide access to a synchronous network. The SDLC COMIO emulator device handler supports multiple HDLC network devices.

Usage Considerations

When accessing the SDLC COMIO emulator device handler, consider the following information.

Driver Initialization and Termination

The device handler can be loaded and unloaded. The handler supports the configuration calls to initialize and terminate itself.

Special File Support

The SDLC COMIO emulator device handler uses the t_start_dev and t_chg_parms structures defined in the /usr/include/sys/mpqp.h file to preserve compatibility with the existing GDLC, MPQP API, and SNA Services interface. However, only a subset of the #define values are supported for the following t_start_dev structure fields:

phys_link Indicates the physical link protocol. Only one type of physical link is valid at a time. The SDLC COMIO emulator device handler supports PL_232D (EIA-232D), PL_422A (EIA-422A/v.36), PL_V35 (V.35), PL_X21 (X.21 leased only), and PL_V25 (V.25bis EIA-422A autodial).
data_proto Identifies the data protocol. The SDLC COMIO emulator device handler supports only the SDLC DATA_PRO_SDLC_HDX (half duplex) and the DATA_PRO_SDLC_FDX (full duplex) values.
baud_rate Specifies the baud rate for transmit and receive clocks. The SDLC COMIO emulator device handler supports only external clocking where the DCE supplies the clock, and this field should be set to zero.

Subroutine Support

The SDLC COMIO emulator device handler supports the open, close, read, write, and ioctl subroutines in the following manner:

open and close Subroutines

The device handler supports the /dev/mpcn special file as a character-multiplex special file. The special file must be opened for both reading and writing (O_RDWR). No special considerations exist for closing the special file.

read Subroutine

Can take the form of a read, readx, readv, or readvx subroutine call. For this call, the device handler copies the user data in to the buffer specified by the caller.

write Subroutine

Can take the form of a write, writex, writev, or writevx subroutine call. For this call, the device handler copies the user data into a buffer and transmits the data on the wide area network using the HDLC network device driver.

ioctl Subroutine

The ioctl subroutine supports the following flags:

CIO_START Starts a session and registers a network ID.
CIO_HALT Halts a session and removes a network ID.
CIO_QUERY Returns the current reliability, availability, and serviceability (RAS) counter values. These values are defined in the /usr/include/sys/comio.h file.
MP_CHG_PARMS Permits the data link control (DLC) to change certain profile parameters after the SDLC COMIO device driver emulator is started.

Error Codes

The following error codes can be returned when gaining access to the device handler through the /dev/mpcn special file:

ECHRNG Indicates that the channel number is out of range.
EAGAIN Indicates that the device handler cannot transmit data because of a lack of system resources, or, because an error returned from the HDLC network device driver's transmit routine.
EBUSY Indicates that the device handler is already in use (opened/started) by another user.
EIO Indicates that the handler cannot queue the request to the adapter.
EFAULT Indicates that the cross-memory copy service failed.
EINTR Indicates that a signal has interrupted the sleep.
EINVAL Indicates one of the following:
  • The port is not set up properly.
  • The handler cannot set up structures for write.
  • The port is not valid.
  • A kernel process called a select operation.
  • The specified physical-link parameter is not valid for that port.
  • A kernel process called a read operation.
ENOMEM Indicates one of the following:
  • No mbuf or mbuf clusters are available.
  • The total data length is more than one page.
  • There is no memory for internal structures.
ENOMSG Indicates that the status-queue pointer is null, and there are no entries.
ENOTREADY Indicates that the port state in the define device structure (DDS) is not in Data Transfer mode or that the implicit halt of port failed.
ENXIO Indicates one of the following:
  • The port was not started successfully.
  • The channel number is illegal.
  • The driver control block pointer is null or does not exist.

This file functions with the SDLC COMIO emulator device handler over the HDLC network device driver. It emulates the SDLC API (full and half duplex) of the Multiprotocol Quad Port (MPQP) device handler.

Related Information

The close subroutine, open subroutine, read or readx subroutine, write or writex subroutine.

Special Files Overview

2-Port Multiprotocol HDLC Network Device Driver Overview in AIX 5L Version 5.2 System Management Guide: Communications and Networks

MPQP Device Handler Interface Overview in AIX 5L Version 5.2 Kernel Extensions and Device Support Programming Concepts

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]