summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/luasocket/doc/dns.html
blob: f4c3b07d2b74219f7d3dcec7c175c02b44c78199 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
    "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<meta name="description" content="LuaSocket: DNS support">
<meta name="keywords" content="Lua, LuaSocket, DNS, Network, Library, Support">
<title>LuaSocket: DNS support</title>
<link rel="stylesheet" href="reference.css" type="text/css">
</head>

<body>

<!-- header +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<div class=header>
<hr>
<center>
<table summary="LuaSocket logo">
<tr><td align=center><a href="http://www.lua.org">
<img width=128 height=128 border=0 alt="LuaSocket" src="luasocket.png">
</a></td></tr>
<tr><td align=center valign=top>Network support for the Lua language
</td></tr>
</table>
<p class=bar>
<a href="home.html">home</a> &middot;
<a href="home.html#download">download</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a> 
</p>
</center>
<hr>
</div>

<!-- dns ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<h2 id=dns>DNS</h2> 

<p>
Name resolution functions return <em>all</em> information obtained from the
resolver in a table of the form:
</p>

<blockquote><tt>
resolved = {<br>
&nbsp;&nbsp;name = <i>canonic-name</i>,<br>
&nbsp;&nbsp;alias = <i>alias-list</i>,<br>
&nbsp;&nbsp;ip = <i>ip-address-list</i><br>
}
</tt> </blockquote>

<p>
Note that the <tt>alias</tt> list can be empty.
</p>

<!-- gethostname ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<p class=name id=gethostname> 
socket.dns.<b>gethostname()</b>
</p>

<p class=description>
Returns the standard host name for the machine as a string. 
</p>

<!-- tohostname +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<p class=name id=tohostname> 
socket.dns.<b>tohostname(</b>address<b>)</b>
</p>

<p class=description>
Converts from IP address to host name.
</p>

<p class=parameters>
<tt>Address</tt> can  be an IP address  or host name. 
</p>

<p class=return>
The function returns a string  with the canonic host name of the given
<tt>address</tt>, followed  by a  table with  all  information returned  by
the  resolver.  In  case of error, the function returns <b><tt>nil</tt></b>
followed by an error message.  
</p>

<!-- toip +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<p class=name id=toip> 
socket.dns.<b>toip(</b>address<b>)</b>
</p>

<p class=description>
Converts from host name to IP address.
</p>

<p class=parameters>
<tt>Address</tt> can  be an IP address  or host name. 
</p>

<p class=return> 
Returns a string  with the first IP address  found for <tt>address</tt>,
followed  by a  table with  all  information returned  by the  resolver.
In  case of error, the function returns <b><tt>nil</tt></b> followed by an error
message. 
</p>

<!-- footer +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<div class=footer>
<hr>
<center>
<p class=bar>
<a href="home.html">home</a> &middot;
<a href="home.html#down">download</a> &middot;
<a href="installation.html">installation</a> &middot;
<a href="introduction.html">introduction</a> &middot;
<a href="reference.html">reference</a>
</p>
<p>
<small>
Last modified by Diego Nehab on <br>
Thu Apr 20 00:25:07 EDT 2006
</small>
</p>
</center>
</div>

</body>
</html>