<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- #BeginTemplate "../../../openslp.dwt" --> <!-- Pristine 1.0 Design copyright Matt Dibb 2006 www.mdibb.net Please feel free to use and modify this template for use on your site. I dont mind if you use it for your personal site or a commercial site, but I do insist that it is not sold or given away in some "50,000 Templates!" package or something like that. --> <head profile="http://www.w3.org/2005/10/profile"> <meta http-equiv="Content-Language" content="en-gb" /> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252" /> <link rel="stylesheet" type="text/css" href="../../../site.css" /> <link rel="stylesheet" type="text/css" href="../../../print.css" media="print" /> <link rel="alternate" type="application/rss+xml" title="OpenSLP…Recent Activity" href="http://www.sourceforge.net/export/rss2_keepsake.php?group_id=1730" /> <link rel="alternate" type="application/rss+xml" title="OpenSLP…News" href="http://www.sourceforge.net/export/rss2_projnews.php?group_id=1730" /> <link rel="alternate" type="application/rss+xml" title="OpenSLP…File Releases" href="http://www.sourceforge.net/api/file/index/project-id/1730/mtime/desc/limit/20/rss" /> <link rel="alternate" type="application/rss+xml" title="OpenSLP…Reviews" href="http://www.sourceforge.net/projects/openslp/reviews_feed.rss" /> <link rel="shortcut icon" href="../../../images/openslp_favicon_256color_48px.ico" /> <!-- #BeginEditable "Page%20Style%20and%20Scripts" --> <!-- #EndEditable --> <!-- #BeginEditable "Page%20Title" --> <title>OpenSLP - Static Registration File</title> <!-- #EndEditable --> </head> <body> <div id="content"> <div id="header"> <a href="http://openslp.org/"> <img src="../../../images/openslp_logo_web_color_150px.jpg" alt="" /></a> </div> <div id="body"> <!-- #BeginEditable "Left%20Navigation%20-%20Context%20Specific" --> <!-- #EndEditable --> <div id="links"> <p><a href="../../../index.html">About</a><br/> what is openslp</p> <p><a href="../../../download.html">Download</a><br/> how to get openslp</p> <p><a href="../../../contribute.html">Contribute</a><br/> how to help out</p> <p><a href="../../../documentation.html">Documentation</a><br/> how to find out more</p> <p><a href="../../../credits.html">Credits</a><br/> who to blame</p> <p><a href="http://sourceforge.net/projects/openslp"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=1730&type=2" alt="Get OpenSLP at SourceForge.net. Fast, secure and Free Open Source software downloads"/></a></p> </div> <div id="main"> <!-- #BeginEditable "Page%20Content" --> <h2>The Static Registration File<br /> <span id="breadcrumbs"><a href="index.html">OpenSLP User's Guide</a> » Configuration » <a href="SlpReg.html">The Static Registration File</a></span></h2> <p>Often it will be very useful for OpenSLP users to be able to statically register legacy services (applications that were not compiled to use the SLP library). To accommodate this need <a href="../../rfc/rfc2614.txt">RFC 2614</a> specifies a syntax for a registration file that is read by the OpenSLP daemon (slpd). All of the registrations from the registration file are maintained by slpd and will remain registered as long as slpd is alive. The default location for the registration can be changed from <tt>/etc/slp.reg </tt>to another location using the <a href="CommandLine.html">-r command line option</a><tt>. slpd reads the slp.reg </tt>file on startup and re-reads it when ever the SIGHUP signal is received.</p> <h3><tt>Syntax</tt></h3> <p>The registration file format is pretty easy to understand. It can get complicated so if you have any questions after reading this please consult <a href="../../rfc/rfc2614.txt"> RFC 2614.</a> Each registration consists of several lines with the following format:</p> <blockquote><b><tt>#comment</tt></b> <br /> <b><tt>;comment</tt></b> <br /> <b><tt>service-url,language-tag,lifetime,[service-type]<newline></tt></b> <br /> <b><tt>"scopes="[scope-list]<newline></tt></b> <br /> <b><tt>[attrid]"="val1<newline></tt></b> <br /> <b><tt>[attrid]"="val1,val2,val3<newline></tt></b> <br /> <b><tt><newline></tt></b><br /> </blockquote> <p><b><tt>service-url</tt></b> </p> <blockquote>(Required) The service-url which must follow the Service URL syntax explained <a href="#Service%20URL%20Syntax">below</a>.</blockquote> <b><tt>language-tag</tt></b> <blockquote>(Required) The language-tag uses the (two character) language tags as specified by <a href="../../rfc/rfc1766.txt">RFC 1766</a> ("en" "fr", "de", etc...)</blockquote> <b><tt>lifetime</tt></b> <blockquote>(Required) The lifetime of the registration in seconds. Value must be between 0 and 65535. Use 65535 if you want the registration to be maintained for the life of slpd.</blockquote> <b><tt>service-type</tt></b> <blockquote>(Optional) The type of service being registered. Ignored by OpenSLP because service-url must conform to the SLP Service URL format.</blockquote> <b><tt>scope-list</tt></b> <blockquote>(Optional) List of comma delimited scopes to register the service in. If omitted then service is registered in all scopes specified by the <tt><a href="SlpConf.html"> slp.conf</a></tt> file.</blockquote> <b><tt>attrs</tt></b> <blockquote>(Optional) The attributes to register along with the service. Any string but "scopes" or "SCOPES" can be used as an attrid. Note that the '"' character has no real significance. Strings should not be quoted!</blockquote> <h3>Examples</h3> <p>Several examples of registration entries are provided below:</p> <blockquote><tt>#Register a OpenSLP testing service</tt> <br /> <tt>service:test.openslp://192.168.100.1,en,65535</tt> <br /> <tt>scopes=test1,test2</tt> <br /> <tt>description=OpenSLP Testing Service</tt> <br /> <tt>authors=mpeterson,jcarey</tt> <p><tt>#Register ssh service</tt> <br /> <tt>service:ssh.openslp://192.168.100.1,en,65535</tt> <br /> <tt>#use default scopes</tt> <br /> <tt>description=Secure Shell</tt> </p> <p><tt>#Register telnet service with no attributes</tt> <br /> <tt>service:telnet.myorg://192.168.100.1,en,65535</tt> <br /> <tt>#use default scopes</tt></p> </blockquote> <h3><a name="Service URL Syntax"></a>Service URL Syntax</h3> <p>If you decide to use Service URLs extensively, you should probably read <a href="../../rfc/rfc2609.txt">RFC 2609</a>, but if you just want to know what they look like, the following explanation should be good enough:</p> <blockquote><tt>service-url = "service:"<service-type>"://"<addrspec></tt></blockquote> <p>The service-type is a service type as explained <a href="#SLP%20Service%20Type%20Syntax">below</a>. addrspec can be just about anything you want that fits URL syntax (see <a href="../../rfc/rfc2396.txt">RFC 2396</a>) and can be translated as a network location. The "<tt>service:</tt>" and "<tt>://</tt>" strings are required.</p> <p><b>Service URL Examples</b> </p> <tt><> service:weather.nasa:wtp://weather.nasa.com:12000<br /> service:weather.nasa:swtp://weather.nasa.com:12001<br /> service:chat.superchat://chat.superchat.com;auth=ldap<br /> </></tt> <h3><a name="SLP Service Type Syntax"></a>SLP Service Type Syntax</h3> <p>The official definition of Service Type strings can be found in <a href="../../rfc/rfc2609.txt">RFC 2609</a>, "Service Templates and Service Schemes". If you will be working with "well known" (IANA) service types, you should read it. If you are developing applications for "proprietary" services then you will probably be satisfied with the following explanation:</p> <pre> <tt>service-type = <abstract-type.naming-authority>":"<concrete-type></tt></pre> <p>The abstract-type is simple (hopefully short) descriptive string that describes the type of service. The naming-authority is the name (hopefully unique) name of the organization that named the service. The naming-authority is optional, but if it is omitted then IANA is assumed to be the naming authority and IANA requires service-types to be registered (see <a href="../../rfc/rfc2609.txt">RFC 2609</a>). The concrete-type is also optional. Think of a concrete-type as a kind of sub-type of the abstract-type. For example, "printer" is an abstract type (owned by IANA) and "printer:lpr" is a concrete type (owned by IANA).</p> <p><b>Service Type Examples</b></p> <p><tt>weather.nasa:wtp</tt> - A (fictitious) weather service type owned by NASA that uses Weather Transfer protocol <br> <tt>weather.nasa:swtp</tt> - A (fictitious) weather service type owned by NASA that uses Simple Weather Transfer protocol. <br /> <tt>chat.superchat</tt> - A chat service type owned by SuperChat <br /> <tt>printer.samba</tt> - A samba printer service type <br /> <tt>ftp</tt> - An IANA ftp service type <br /> <tt>telnet</tt> - An IANA telnet service type<br /> </p> <p id="breadcrumbs0">Prepared by: <a href="http://www.calderasystems.com">Caldera Systems Inc</a><br /> Maintained by: <a href="http://www.openslp.org/">openslp.org</a></p> <!-- #EndEditable --> </div> </div> <div id="footer"> Copyright © 2011 <a href="http://www.openslp.org/">openslp.org</a>. All Rights Reserved.<br/> Design by <a href="http://www.mdibb.net" title="Website of Matt Dibb">Matt Dibb</a> 2006. <a href="http://jigsaw.w3.org/css-validator/check/referer" title="Validate CSS">CSS</a> <a href="http://validator.w3.org/check/referer" title="Validate XHTML">XHTML</a> <br/>Courtesy of <a href="http://www.openwebdesign.org">Open Web Design</a> & <a href="http://seo-services.us">seo</a> </div> </div> </body> <!-- #EndTemplate --> </html>