OpenSS7
SS7 for the
Common Man
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.
Last modified: Mon, 28 Apr 2008 12:53:41 GMT
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manual Page
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

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


SC

Section: The OpenSS7 Project Modules (4)
Updated: Mon, 21 Aug 2017 17:11:11 GMT
Index Return to Main Contents

NAME

sc - STREAMS configuration module

SYNOPSIS

#include <sys/stropts.h>
#include <sys/sc.h>

t = open(/dev/nuls, 0);
ioctl(t, I_PUSH, ``sc'');

DESCRIPTION

sc
is a STREAMS configuration module for Linux Fast-STREAMS. It interprets a set of sc ioctl(2s) commands and provides information about the streams configuration. sc does not interpret any M_DATA, M_PROTO or M_PCPROTO messages either from above or below the module. sc can be pushed on the the null stream nuls(4) or any other suitable stream available to the caller (e.g. sad(4)).

USAGE

The sc module is not intended to be used directly by application program developers. It is used by the scls(8) utility an other utilities needing to enquire about the configuration of Linux Fast-STREAMS.

IOCTLS

This subsection details the ioctl(2s) commands that are made available by pushing the sc module. For general information on input-output controls for STREAMS drivers, see streamio(7).

SC_IOC_LIST

arg is a pointer to a sc_list structure in the user's address space.

The sc_list structure contains the following members:

struct sc_list {
    int sc_nmods;
    struct sc_mlist *sc_mlist;
};

sc_nmods
On call, specifies the number of sc_mlist structures that are provided in the caller's buffer pointed to by sc_mlist. On return, specifies the number of sc_mlist structures that are available to be written to the caller's buffer pointed to by sc_mlist, regardless of the space provided by the caller.
sc_mlist
Provides a pointer to a user buffer that contains at least sc_nmods number of sc_mlist structures in an array. The module will return no more than the number of modules available, or the number of modules requested, whichever is less. However, sc_nmods will always return the number of modules available.

By calling with a sc_nmods of zero and a sc_mlist of NULL, the caller can determine the number of modules that are available to be returned in sc_mlist so that the buffer may be appropriately sized for a subsequent call.

The sc_mlist structure contains the following members:

struct sc_mlist {
    int major;
    struct sc_module_info mi[4];
    struct sc_module_stat ms[4];
};

major
Specifies the major device number for the driver whose information is contained in this entry.
mi
Contains the module_info structures associated with the driver with the major device number specified; or with the module if the major device number is zero. The four mi structures correspond to those associated with the qi_minfo field of the st_rdinit, st_wrinit, st_muxrinit and st_muxwinit qinit(9) structures referenced by the driver or module's streamtab(9) structure. For details of the module_info structure, see module_info(9).
ms
Contains the module_stats structures associated with the driver with the major device number specified; or with the module if the major device number is zero. The four ms structures correspond to those associated with the qi_mstat field of the st_rdinit, st_wrinit, st_muxrinit and st_muxwinit qinit(9) structures referenced by the driver or module's streamtab(9) structure. For details of the module_stat structure, see module_stat(9).

SC_IOC_TUNE

arg is a pointer to an sc_tlist structure in the user's address space.

The sc_tlist structure contains the following members:

struct sc_tlist {
    int sc_ntune;
    struct sc_tune *sc_list;
};
sc_ntune
On call, specifies the number of sc_tune structures that are provided in the caller's buffer pointed to by sc_list. On return, specifies the number of sc_tune structures that are available to be written to the caller's buffer pointed to by sc_list, regardless of the space provided by the caller.
sc_list
Provides a pointer to a user buffer that contains at least sc_ntune number of sc_tune structures in an array. The module will return no more than the number of tunable objects available, or the number of tunable objects requested, whichever is less. However, sc_ntune will always return the number of modules available.

By calling with a sc_ntune of zero and a sc_list of NULL, the caller can determine the number of modules that are available to be returned in sc_list so that the buffer may be appropriately sized for a subsequent call.

The sc_tune structure contains the following members:

struct sc_tune {
    long sc_major;
    char sc_name[FMNAMSZ + 1];
    int sc_flags;
    ssize_t sc_minpsz;
    ssize_t sc_maxpsz;
    size_t sc_hiwat;
    size_t sc_lowat;
    int sc_trclevel;
};

sc_major
On call, specifies the major device number for the driver whose information is to be tuned or zero for a module. When unused, this member is set to zero. This member is always set on return to the major device number of the STREAMS driver or zero for a STREAMS module.
sc_name
On call, provides the name of the STREAMS module or driver to which tunables are to be applied. When unused, the first character of this field is set to null (0). This member is always set on return to the name of the STREAMS driver or module to which the tunable object applies.
sc_flags
Flags that indicate which of the folllowing tunables are to be applied an to which queues they are to be applied. sc_flags can be a bitwize OR of zero or more of the following values:

SC_SET_MINPSZ
When set, the value in sc_minpsz will be applied.
SC_SET_MAXPSZ
When set, the value in sc_maxpsz will be applied.
SC_SET_HIWAT
When set, the value in sc_hiwat will be applied.
SC_SET_LOWAT
When set, the value in sc_lowat will be applied.
SC_SET_TRCLEVEL
When set, the value in sc_trclevel will be applied.
SC_SET_RDQUEUE
When set, tunables will apply to the read queue.
SC_SET_WRQUEUE
When set, tunables will apply to the write queue.
SC_SET_LOWERMUX
When set, tunables will apply to the lower multiplex.
sc_minpsz
Provides the minimum packet size accepted by the queue. This field is only significant if SC_SET_MINPSZ is set in sc_flags.
sc_maxpsz
Provides the maximum packet size accepted by the queue. This field is only significant if SC_SET_MAXPSZ is set in sc_flags.
sc_hiwat
Provides the high water mark for the queue. This field is only significant if SC_SET_HIWAT is set in sc_flags.
sc_lowat
Provides the low water mark for the queue. This field is only significant if SC_SET_LOWAT is set in sc_flags.
sc_trclevel
Provides the trace level for the queue. This field is only significant if SC_SET_TRCLEVEL is set in sc_flags.

SC_IOC_STATS

arg is a pointer to an sc_slist structures in the user's address space.

The sc_slist structure contains the following members:

struct sc_slist {
    int sc_nstat;
    struct sc_stat *sc_list;
};
sc_nstat
On call, specifies the number of sc_stat structures that are provided in the caller's buffer point to be sc_list. On return, specifies the number of sc_stat structure that are available to be written to the caller's buffer pointed to by sc_list, regardless of the spaced provided by the caller.
sc_list
Provides a pointer to a user buffer that contains at least sc_nstat mber of sc_stat structures in an array. The module will return no more than the number of statistics objects available, or the number of statistics objects requested, whichever is less. However, sc_nstat will always return the number of objects available.

By calling with a sc_nstat of zero and a sc_list of NULL, the caller can determine the number of objects that are available to be returned in sc_list so that the buffer may be appropriately sized for a subsequent call.

The sc_stat structure contains the following members:

struct sc_stat {
    unsigned long sc_alloc;
    unsigned long sc_hiwat;
};

sc_alloc
On return, this member is set to the current number of allocated objects of the type indicated by the index into the array.
sc_hiwat
On return, this member is set to the high water mark of allocations of objects of the type indicated by the index into the array since the last system reboot.

Each index in the array pointed to by sc_list corresponds to a different dynamically allocated object as follows (in order of index):

SC_DYN_STREAM
The number of shinfo structures allocated, which corresponds to the number of Stream heads allocated.
SC_DYN_QUEUE
The nunber of queinfo structures allocated, which corresponds to the number of queue pairs allocated.
SC_DYN_MSGBLOCK
The number of mbinfo structure allocated separately, which corresponds to the number of message, mblk_t(9), blocks allocated. Linux Fast-STREAMS does not separately allocate message blocks, but allocates a message block, data block and fast buffer simultaneously, and this number is always zero.
SC_DYN_MDBBLOCK
The number of dbinfo structures allocated separately, which corresponds to the number of data, dblk_t(9) blocks allocated. Linux Fast-STREAMS does not separately allocate data blocks, but allocates a message block, data block and fast buffer simultaneously, and this number represents the number of combined message-data-fast-buffer allocations.
SC_DYN_LINKBLK
The number of linkinfo structures allocated, which corresponds to the number of link, linkblk(9) blocks allocated. Link blocks are used when performing temporary or permanent linkage of a Stream under a multiplexing driver. See I_LINK(9) and I_PLINK(9).
SC_DYN_STREVENT
The number of seinfo structures allocated, which corresponds to the number of STREAMS event, strevent(9), blocks allocated. STREAMS event blocks are used for timers, bufcalls, and welds.
SC_DYN_QBAND
The number of bandinfo structures allocated, which corresponds to the number of queue band, qband(9), structures allocated. Queue band structures are allocated for every message band from 1 to the highest referenced queue band for a queue in a queue pair.
SC_DYN_STRAPUSH
The number of apinfo structures allocated, which corresponds to the number of autopush structures allocated. An autopush structure is allocated for each autopush specification for a driver.
SC_DYN_DEVINFO
The number of devinfo structures allocated, which corresponds to the number of device information structures allocated for Solaris compatibility.
SC_DYN_MODINFO
The number of mdlinfo structures allocated, which corresponds to the number of module information structures allocated for Solaris compatibility.
SC_DYN_SYNQ
The number of syncq structures allocated, which corresponds to the number of syncrhonization barriers associated with STREAMS modules and drivers requiring synchronization.

SIGNALS

When a configuration change is detected by the sc module that would result in a different response to the SC_IOC_LIST input-output control (that is, the addition, removal or alteration of the characteristics of a STREAMS module or driver), the module will issue a M_PCSIG(9) message, containing the {SIGPOLL} signal, to all open Stream heads (except not necessarily the Stream head which effected the change). This results in the immediate generation of a {SIGPOLL} signal to processes registered for the S_MSG event using the I_SETSIG(7) input-output control, or to the process group leader. See M_PCSIG(9).

This feature was added to permit the STREAMS SNMP agent to cache configuration information and hold open a Stream with the sc module pushed and receive a {SIGPOLL} signal whenever the agent cache is invalidated.

NOTICES

Note that the sc module is not yet capable of copying and providing access to the private statistics area indicated by the ms_xprt and ms_xsize members of the module_stat(9) structure. This is an unnecessary limitation. At some point it would make sense to add a SC_IOC_STATS command that would retrieve both the module_stat(9) structure and the private statistics for a single module or driver.

EXAMPLES

See the source code for scls(8) and strtune(8).

MODULES

sc is a STREAMS module named ``sc''.

SEE ALSO

ioctl(2s), nuls(4), sad(4)), scls(8), strtune(8), streamio(7), autopush(8), streamtab(9), module_info(9), module_stat(9).

BUGS

The sc module has no known bugs.

COMPATIBILITY

Many implementations of STREAMS have some mechanism for augmenting the functionality of the sad(4) driver. Some implementations, such as AIX®[1], HP-UX®[2], provide an sc module for this purpose.

---
AIX®[1] provides an sc module for the purpose of allowing autopush(8) to use device names instead of major device numbers, and to support the scls(8) utility.
---
AIX®[1] requires the use of the sc modules with the nuls(4) driver.
---
HP-UX®[2] describes the sc module as a core STREAMS module used by autopush(8) and provides support for device names instead of device numbers, and providing supplemental functions for the sad(4) driver.
---
sc can be pushed over any stream, unlike the AIX® or HP-UX® documentation. The user must have sufficient privilege to push the sc module.
---
Internals of the sc module is implementation dependent, not subject to standardization, and not documented. This manual page documents the Linux Fast-STREAMS implementation of the sc module. Compatibility with other implementations is not guaranteed.
---
The SC_IOC_TUNE input-output control is specific to Linux Fast-STREAMS and should not be used by portable programs.
---
The SC_IOC_STAT input-output control is specific to Linux Fast-STREAMS and should not be used by portable programs.
---
The generation of {SIGPOLL} signals on configuration changes is specific to Linux Fast-STREAMS and should not be expected by portable programs.

CONFORMANCE

None. (This manual page.) Conformance is verified using the test-sc(8) verification test suite.

HISTORY

An sc module for extending the capabilities of the sad(4) driver appear in AIX®[1] and HP-UX®[2] documentation.

The SC_IOC_TUNE and SC_IOC_STATS capabilities, and {SIGPOLL} feature, are specific to Linux Fast-STREAMS and were first added in release 0.9.2.4 of the streams package.

REFERENCES

[1]
AIX® 5L Version 5.1, AIX STREAMS Programmers Guide, 2001, (Boulder, Colorado), Internatonal Business Machines Corp., IBM. <http://publibn.boulder.ibm.com/>
[2]
HP-UX STREAMS, STREAMS Programmer's Guide -- HP 9000 and Integrity Server Computer Systems, October 2005, (Palo Alto, California), Hewlett-Packard Development Company L.P., HP. <http://docs.hp.com/>

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

The OpenSS7 Project: Package OpenSS7 version 0.9.2 released Mon, 21 Aug 2017 17:11:11 GMT.

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



Index

NAME
SYNOPSIS
DESCRIPTION
USAGE
IOCTLS
SC_IOC_LIST
SC_IOC_TUNE
SC_IOC_STATS
SIGNALS
NOTICES
EXAMPLES
MODULES
SEE ALSO
BUGS
COMPATIBILITY
CONFORMANCE
HISTORY
REFERENCES
TRADEMARKS
IDENTIFICATION

This document was created by man2html, using the manual pages.
Time: 17:11:11 GMT, August 21, 2017
OpenSS7
SS7 for the
Common Man
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manual Page
Last modified: Mon, 28 Apr 2008 12:53:41 GMT
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.