OpenSS7
SS7 for the
Common Man
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.
Last modified: Sat, 01 Nov 2008 10:41:55 GMT
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manpage of GETMINOR
Quick Links

Download

SCTP

SIGTRAN

SS7

Hardware

STREAMS

Asterisk

Related

Package

Manual

FAQ

Man Pages

Applications

SS7 Stack

ISDN Stack

SIGTRAN Stack

VoIP Stack

MG Stack

SS7/ISDN Devices

IP Transport

Embedded Systems

OS

Documentation

FAQ

SIGTRAN

Design

Conformance

Performance

References

Man Pages

Manuals

Papers

Home

Overview

Status

Documentation

Resources

About

News

Manpage of GETMINOR

Description: Manual Page

Keywords: ss7 ss7/ip ss7 over ip ss7 mtp ss7 sccp ss7 tcap sigtran mtp sccp tcap openss7 acb56 linux telephony pstn linux telephony linux nebs linux compactpci


GETMINOR

Section: Linux Fast-STREAMS DDI/DKI (9)
Updated: 2008-10-31
Index Return to Main Contents

NAME

getminor, minor, minor_t - get the extended minor device number for a device.

SYNOPSIS

#include <sys/streams.h>
#include <sys/ddi.h>

minor_t getminor(dev_t dev);

ARGUMENTS

dev

the device number from which to extract the internal minor device number.

INTERFACE

DDI/DKI.

DESCRIPTION

getmajor(9), getminor(9) and makedevice(9) are the device handling functions defined in SVR 4[1] that are normally used by STREAMS device drivers in the qi_qopen(9) procedure.

getminor() gets the internal (extended) device minor number associated with the external dev_t device number, dev. getminor() is the normal architecture independent function call providing newer internal and extended device numbering replacing older SVR 4[1] behaviour using a function of the same name.

getminor() is an architecture independent function that obtains the internal (extended) minor device number associated with device dev. geteminor(9), on the other hand, will return the external (real) minor device number associated with the device dev. minor(9) was the SVR 3[2] name for this function. minor(3) also exists as a user subroutine in <sys/sysmacros.h>.

getminor() supports the concept of extended device numbering. Under extended device numbering, a device has a single internal (base) major device number and an internal (extended) range of minor device numbers (exceeding 0 to 255). Real device number consist of a number of major device numbers visible to user applications, and a range of minor device numbers associated with each major device limited by the architecture (0 to 255 on Linux 2.4).

Following is an example contrasting the mapping of external major and minor device numbers to internal base major and extended minor device numbers:


getmajor(9)getminor(9)getemajor(9)geteminor(9)

320320
:255:255
:256350
:511:255
:512370
:766:255

getminor() is compatible with all device numbering schemes provided by Linux Fast-STREAMS. For additional information on device numbering, see section DeviceNumbering , in dev_t(9).

USAGE

getminor() is used by drivers and modules that do not required knowledge of external major device numbers and that wish to use a simplified approach to assignment of minor device numbers for clone(4) operations.

RETURN

getminor() always returns the minor device number.

ERRORS

getminor() always succeeds.

CONTEXT

getminor() can be called from any context, including user context, module procedures, callouts, callbacks, soft interrupts (tasklets and bottom halves), and interrupt service routines.

MP-STREAMS

getminor() is MP-safe.

NOTICES

Depending on the architecture, the internal extended minor device number may or may not be equal to one of the external (real) minor device numbers assigned to the driver.

Portable STREAMS drivers should neither rely upon the specific value returned by getminor(), nor should it hard code the range of minor device numbers available to the major device number returned by getmajor(9).

minor_t is unsigned short.

The current maximum range of extended minor device numbers is the range of minor_t which is unsigned short or a range from 0 to 65535.

Although the extended minor device range is currently from 0 to 65535, only the first 1024 minor device numbers can be represented as external (real) device numbers.

IMPLEMENTATION

getminor() extracts the internal (base) major device number from dev using getmajor(9) and the external (real) major and minor device numbers from dev using getemajor(9) and geteminor(9). It then uses itoeminor(9) using the internal (base) major device number return by getmajor(9) to establish which ordinal belongs to the external major device number returned by getemajor(9) and adds an offset of 256 for each ordinal that the external major device number is offset from the external base major device number.

SEE ALSO

getminor(9), makedevice(9), geteminor(9), ddi_getiminor(9), dev_t(9), STREAMS(9),

BUGS

getminor() has no known bugs.

COMPATIBILITY

getminor() is compatible with SVR 4.2 MP DDI/DKI[3], and implementations based on SVR 4[1] including AIX®, HP-UX®, LiS, OSF/1®, Solaris®, SUPER-UX®, UnixWare® and UXP/V® with the following portability considerations:

---
Solaris® provides a somewhat different mechanism. See ddi_driver_major(9), ddi_getiminor(9), ddi_create_minor_node(9) and ddi_remove_minor_node(9).
---
UnixWare® DDI8 provides a different mechanism with registered driver resources and channel numbers.
---
LiS[4] does not support extended device numbering, and getminor() on LiS reduces to geteminor(9). LiS version 2.17 is supposed to have some enhancements in this regard.
---
getminor() is provided for source level compatibility with SVR 4.2 MP and implementations based on SVR 4.2 for the purpose of porting drivers to Linux. Because the dev_t structure for Linux differs from that of other implementations, binaries are incompatible.
---
getminor() only provide functionality comparable to SVR 4.2 MP DDI/DKI for use by STREAMS drivers and modules. Any and all functionality provided by getminor() in support of non-STREAMS devices is not supported.

See STREAMS(9) for additional compatibility information.

CONFORMANCE

SVR 4.2 MP DDI/DKI[3]; AIX®, HP-UX®, OSF/1®, Solaris®, SUPER-UX®, UnixWare® and UXP/V® documentation.

HISTORY

getminor() first appeared in SVR 4[1]. minor(9) first appeared as in SVR 3[2].

REFERENCES

[1]
SVR 4, UNIX® System V Release 4 Programmer's Manual, 1990, (Englewood Cliffs, New Jersey), AT&T UNIX System Laboratories, Inc., Prentice Hall.
[2]
SVR 3, UNIX® System V Release 3 Programmer's Manual, (Englewood Cliffs, New Jersey), AT&T UNIX System Laboratories, Inc., Prentice Hall.
[3]
USL DDI/DKI, Device Driver Interface/Driver-Kernel Interface (DDI/DKI) Reference Manual for Intel Processors, 1992, (Englewood Cliffs, New Jersey), AT&T UNIX System Laboratories, Inc., Prentice Hall.
[4]
LIS 2.18, Linux STREAMS (LiS) 2.18.6 Source Code, Brian Bidulock, ed., OpenSS7 Corporation. <http://www.openss7.org/>

TRADEMARKS

OpenSS7tm
is a trademark of OpenSS7 Corporation.
Linux®
is a registered trademark of Linus Torvalds.
UNIX®
is a registered trademark of The Open Group.
Solaris®
is a registered trademark of Sun Microsystems.

Other trademarks are the property of their respective owners.

IDENTIFICATION


Linux Fast-STREAMS: Package streams version 0.9.2.4 released 2008-10-31.

Copyright©1997-2008OpenSS7 Corp. All Rights Reserved.
(See roff source for permission notice.)



Index

NAME
SYNOPSIS
ARGUMENTS
INTERFACE
DESCRIPTION
USAGE
RETURN
ERRORS
CONTEXT
MP-STREAMS
NOTICES
IMPLEMENTATION
SEE ALSO
BUGS
COMPATIBILITY
CONFORMANCE
HISTORY
REFERENCES
TRADEMARKS
IDENTIFICATION

This document was created by man2html, using the manual pages.
Time: 20:17:21 GMT, May 21, 2013
OpenSS7
SS7 for the
Common Man
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manpage of GETMINOR
Last modified: Sat, 01 Nov 2008 10:41:55 GMT
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.