OpenSS7
SS7 for the
Common Man
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.
Last modified: Sat, 01 Nov 2008 10:42:52 GMT
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manpage of GETNSAPBYNAME
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 GETNSAPBYNAME

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


GETNSAPBYNAME

Section: OpenSS7 ISO Stack Library Calls (3)
Updated: 2008-10-31
Index Return to Main Contents

NAME

getnsapbyname - get the NSAP that corresponds to a host name

SYNOPSIS

#include <tiuser.h>
#include <osi.h>

int getnsapbynam(int nsap_maxlen, char *hostname, char *nsap);

ARGUMENTS

nsap_maxlen

the maximum length of the buffer pointed to by nsap.
hostname
the (null terminated) host name to translate to an NSAP.
nsap
a pointer to a buffer of maximum length nsap_maxlen that is to receive the NSAP corresponding to hostname.

DESCRIPTION

The libosi user library provides a mechanism for setting local and remote addresses using the host name of the machine. This avoids the need for users of applications to deal with NSAPs and TSAPs. The library usese the file /etc/net/oclt/host for host name to NSAP conversion, and the fie /etc/net/oclt/services for hostname to TSEL conversion.

getnsapbyname () translates a host name in the string pointed to by the hostname
argumentintoanNSAPthatistransferredintothebufferpointedtobythe nsap argument of maximum length nsap_maxlen.

RETURN

When successful, getnsapbyname() returns the positive length of the NSAP in octets; when unsuccessful, minus one (-1).

ERRORS

When unsuccessful, getnsapbyname() returns minus one, (-1) and sets errno(3) to an appropriate error number.

EXAMPLES

The following example demonstrates placing the NSAP in a netbuf and using it to connect a /dev/otpi Stream:

FILES

/etc/net/oclt/host
configuration file for host name to NSAP conversion.
/etc/net/oclt/services
configuration file for Service Name to TSEL conversion.
/usr/lib/libosi.a, /usr/lib/libosi.so
the OSI library containing the getnsapbyname() function.

SEE ALSO

libosi(3).

COMPATIBILITY

getnsapbyname() is compatible with SunLink OSI with the following portability considerations:

---
This function is a Solaris®-specific function that is implemented by OpenSS7 ISO Stack to assist with porting SunLink OSI applications programs to OpenSS7 ISO Stack.
getnsapbyname() will not be used by portable programs.
---
Although not POSIX, the Sun TI-RPC function netdir_getbyname(3) with only a host name is probably more portable.
getnsapbyname() will not be used by portable programs.

See libosi(3), for additional compatibility information.

CONFORMANCE

SunLink OSI documentation[1].

HISTORY

getnsapbyname() first appeared in SunLink OSI[1].

REFERENCES

[1]
Solaris® SunLink OSI, SunLink® OSI 8.1 TLI Programmer's Reference, Revision A, March 1995, (Mountain View, California), Sun Microsystems, Inc., Sun. [Part No: 801-7170-12] <http://docs.sun.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


OpenSS7 ISO Stack: Package striso 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
DESCRIPTION
RETURN
ERRORS
EXAMPLES
FILES
SEE ALSO
COMPATIBILITY
CONFORMANCE
HISTORY
REFERENCES
TRADEMARKS
IDENTIFICATION

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