libsua/sualibrary/docs/en/index-3.html

198 lines
7.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>The Sualibrary Handbook: Usage </TITLE>
<LINK HREF="index-4.html" REL=next>
<LINK HREF="index-2.html" REL=previous>
<LINK HREF="index.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="index-4.html">Next</A>
<A HREF="index-2.html">Previous</A>
<A HREF="index.html#toc3">Contents</A>
<HR>
<H2><A NAME="s3">3. Usage </A></H2>
<P>
<H2><A NAME="ss3.1">3.1 General usage of the SUA library</A>
</H2>
<P>
If you compile the entire project, and install the files sua.h in the directory /usr/local/includeand libsua.ain /usr/local/lib(by simply copying these from the libsua/sua/ subdirectory to their repective destinations: this is done automatically by the the make during installation), it is trivial to compile an application.
Lets assume, your application is named app and consists of the file app.c. If you use gccas compiler,
it is sufficient to issue the command
host:˜> gcc -o app app.c -lsctp lglib -lsua
in order to compile your application. Note though, that FreeBSD calls the glib-library by default
libglib12, since it exists both in several versions (i.e. glib version 1.0 would be called libglib10
under FreeBSD (and possibly other BSD unixes). So under this platform, you would use
BSDhost:˜> gcc -o app app.c -lsctp -lglib12 lsua
Some features are selectable, see sua_debug.h for a overview of the switches.
Switches include the displaying debug msg on the screen,
Dumping SUA msg and debug info into a file, optional use of SUA ASP management, etc…
<P>
<P>
<P>
<H2><A NAME="ss3.2">3.2 Features of the implementation</A>
</H2>
<P>
<P>
The implementation is able to do the following:
<P>
Statically and dynamically setup of SCTP association for the transport of the SUA messages
<P>
Connectionless : CLDT message transfer
<P>
Connectionoriented: CORE, COAK, RELRE, RELCO, COREF & CODT message transfer
<P>
Adressing options: use of Ipv4 and Ipv6 addresses, SS7 pointcodes, hostname, Global titles
<P>
SUA ASP management(optional)
<P><P>
It has been tested with implementations of 4 companies in the first SUA bakeoff.
<P><P>
The following flags are recognized when running SUA:
<P>
-s : source address<P>
-l: source portnumber (optional, default is set at 14001)<P>
-d : destination address(optional)<P>
-r : destination portnumber(optional, default is set at 14001)<P>
-n : subsystem number to be used<P>
-a : Application server number(optional)<P>
-t : number of streams in & out(optional, default is set at 1)<P>
-7d : SS7 destination pointcode(optional)<P>
-7s : SS7 source pointcode(optional)<P>
-sn: Source hostname<P>
-dn: Destination hostname<P>
<P>
example of a association<P>
./testup -s 10.0.1.1 -7s 1 -d 10.0.3.1 -7d 66051 -r 14001 -n 255 -a 1 -t 16<P>
example of a local listener<P>
./testup -s 10.0.1.1 -n 255 -a 1 -t 2 <P>
<P>
<P>
<P>
<H2><A NAME="ss3.3">3.3 What is missing.</A>
</H2>
<P>
<P>
Features to be included in future version:
<P><P>
- SUA management: ASP , AS management, etc<P>
<P>
Features not to be included:
<P>
- NIF/interworking with classical SS7 SCCP<P>
- Routing keys<P>
- Registration of Applications<P>
<P>
Probably there is some more. Additions, comments, bug-reports and bug-fixes as welll as patches,
patches, and patches are always welcome !
<P>
<P>
<P>
Features not to be included:
<P>
- NIF/interworking with classical SS7 SCCP<P>
- Routing keys<P>
- Registration of Applications<P>
<P>
<P>
<P>
<H2><A NAME="ss3.4">3.4 SUA configuration file commands.</A>
</H2>
<P>
<P>
The following Commands can be used in the SUA configuration file:
<P>
REMARK: Spaces are used to clarify the commands only. They are not allowed or not recognized correctly in the actual configuration file!!!! See example configuration file in the package under sualibrary/testup/pcg729.sua</P>
<P><P>
<P>
- cr host:host_id = j, org_ip= t.t.t.t, org_port= yyyyy \n;</P>
<P>Provides the IP address(ses)(v4/v6) and portnumber of your own host. In most cases only one host entry will be needed, so host_id = 1</P>
<P>
- cr assoc:assoc_id= i, init= false, host_id = j, dest_ip = x.x.x.x, dest_port= yyyy;</P>
<P>Provides the IP addres(ses) and portnumber of the destination to which to set up a association. Each association requires a different association_id. The init flag indicates if the implementation should setup the association immediatly(active assoc setup) or wait for a incomming association from remote node with those particular parameters(passive assoc setup or listening mode).</P>
<P>
- cr orgpc: pc = cccc, host_id = j;</P>
<P>Provides the originating SS7 pointcode for the own node with host_id j.</P>
<P>
- cr orggt: host_id=j,tt=tt,na=nn,np=ppp,digits= 123456789abcdef; </P>
<P>Provides the originating Global title(=Calling party Address) for the own node with host_id j.</P>
<P>
- cr orgname: host_id=j,name=www.xxx.zzz; </P>
<P>Provides the originating Hostname for the own node with host_id j.</P>
<P>
- cr destpc: dest_id = i,pc = cccc;</P>
<P>Provides the Destination Pointcode for the remote node with dest_id i.</P>
<P>
- cr destip: dest_id = i,ip = cccc;</P>
<P>Provides the Destination IP address(es)(v4/v6) for the remote node with dest_id i.</P>
<P>If a destname is provided, then a cr destip must be done as the translation of the hostname or global title will yield a IP address , which is subsequently used to find the correct association to send the msg out on. The IP address of the cr destip and the ip address of one of the cr assoc's must be the same. Do not forget to do a cr route also for the IP address.</P>
<P>A node can have both a PC or/and a IP address. If both are present then the dest_id must be the same for that particular node.</P>
<P>
- cr destname: dname_id = i,name = www.sctp.be;</P>
<P>Provides the Destination Hostname for the remote node with dname_id i. (Do not forget to do a cr destip.)</P>
<P>
- cr destname: dname_id=k,tt=tt,na=nn,np=ppp,digits= 123456789abcdef;</p>
<P>Provides the Destination Global Title for the remote node with dname_id i. tt = translation identifier, na = Nature of address, np= Numbering plan, digits= digits of the Global Title(Do not forget to do a cr destip)</P>
<P>
- cr route: dest_id = j, assoc_id = i;</P>
<P>Make the link between a Destination(PC/IP addr) and a association. Destination dest_id j(created via cr destpc or destip) can be reached via the association assoc_id i(created via cr assoc).</P>
<P>
- cr route: dname_id = j, assoc_id = i;</P>
<P>Make the link between a Destination(GT/Name) and a association. Destination dname_id j(created via cr destname) can be reached via the association assoc_id i(created via cr assoc).</P>
<P>
<P>The Format of the IP address can be provided as an</P>
<P>- IPv4: xxx.yyy.zzz.uuu = decimal (example: 1.1.1.1)</P>
<P>- IPv6: aaa:zzz:eeee = hex (example: 20df::0001)</P>
<P>The translation type, numbering plan and Nature of address must be provided as a decimal value(example: 10)</P>
<P>
<HR>
<A HREF="index-4.html">Next</A>
<A HREF="index-2.html">Previous</A>
<A HREF="index.html#toc3">Contents</A>
</BODY>
</HTML>