summaryrefslogtreecommitdiff
path: root/doc/s6-getservbyname.html
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-12-15 23:08:59 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-12-15 23:08:59 +0000
commite0fc82203d677a6f1e808e9a1a46176c109d89be (patch)
treee9609209b755e3f7a8480aea86601ffe9d4ca540 /doc/s6-getservbyname.html
downloads6-networking-e0fc82203d677a6f1e808e9a1a46176c109d89be.tar.xz
Initial commit
Diffstat (limited to 'doc/s6-getservbyname.html')
-rw-r--r--doc/s6-getservbyname.html48
1 files changed, 48 insertions, 0 deletions
diff --git a/doc/s6-getservbyname.html b/doc/s6-getservbyname.html
new file mode 100644
index 0000000..29a8235
--- /dev/null
+++ b/doc/s6-getservbyname.html
@@ -0,0 +1,48 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>s6-networking: the s6-getservbyname program</title>
+ <meta name="Description" content="s6-networking: the s6-getservbyname program" />
+ <meta name="Keywords" content="s6-networking s6-getservbyname getservbyname" />
+ <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> -->
+ </head>
+<body>
+
+<p>
+<a href="index.html">s6-networking</a><br />
+<a href="http://skarnet.org/software/">Software</a><br />
+<a href="http://skarnet.org/">skarnet.org</a>
+</p>
+
+<h1> The <tt>s6-getservbyname</tt> program </h1>
+
+<p>
+<tt>s6-getservbyname</tt> is a simple command-line interface to the
+<a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/getservbyname.html">getservbyname()</a>
+function, converting a service name and protocole into a port number.
+</p>
+
+<h2> Interface </h2>
+
+<pre>
+ s6-getservbyname <em>name</em> <em>proto</em>
+</pre>
+
+<ul>
+ <li> <tt>s6-getservbyname</tt> looks up the network services database
+for an entry containing name <em>name</em> and protocol <em>proto</em>. </li>
+ <li> It prints the corresponding port number to stdout, then exits 0. </li>
+ <li> If it cannot find a related entry, it exits 1. </li>
+</ul>
+
+<h2> Example </h2>
+
+<p>
+ On a standard machine with a correct <tt>/etc/services</tt> file and
+a non-garbled NSS configuration:
+ <tt>s6-getservbyname smtp tcp</tt> prints 25.
+</p>
+
+</body>
+</html>