| OpenSS7 SS7 for the Common Man | © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. Last modified: Sat, 01 Nov 2008 10:41:55 GMT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Manpage of GETMINORDescription: Manual PageKeywords: 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 compactpciGETMINORSection: Linux Fast-STREAMS DDI/DKI (9)Updated: 2008-10-31 Index Return to Main Contents NAMEgetminor, minor, minor_t - get the extended minor device number for a device.SYNOPSIS#include <sys/streams.h>
ARGUMENTS
INTERFACEDESCRIPTIONgetmajor(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:
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). USAGEgetminor() 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. RETURNgetminor() always returns the minor device number. ERRORSCONTEXTgetminor() can be called from any context, including user context, module procedures, callouts, callbacks, soft interrupts (tasklets and bottom halves), and interrupt service routines. MP-STREAMSNOTICESDepending 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. IMPLEMENTATIONgetminor() 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 ALSOgetminor(9), makedevice(9), geteminor(9), ddi_getiminor(9), dev_t(9), STREAMS(9), BUGSCOMPATIBILITYgetminor() 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:
See STREAMS(9) for additional compatibility information. CONFORMANCESVR 4.2 MP DDI/DKI[3]; AIX®, HP-UX®, OSF/1®, Solaris®, SUPER-UX®, UnixWare® and UXP/V® documentation. HISTORYgetminor() first appeared in SVR 4[1]. minor(9) first appeared as in SVR 3[2]. REFERENCES
TRADEMARKS
Other trademarks are the property of their respective owners. IDENTIFICATION
Copyright©1997-2008OpenSS7 Corp.
All Rights Reserved.
Index
This document was created by man2html, using the manual pages. Time: 20:17:21 GMT, May 21, 2013 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OpenSS7 SS7 for the Common Man |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Last modified: Sat, 01 Nov 2008 10:41:55 GMT © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||