JezK
Edit File: interfacesformat.html
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>What it looks like</title><link rel="stylesheet" type="text/css" href="userguide.css" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="home" href="index.html" title="FreeTDS User Guide" /><link rel="up" href="interfacesfile.html" title="Appendix B. The interfaces File" /><link rel="prev" href="interfacespurpose.html" title="What it does" /><link rel="next" href="AboutUnicode.html" title="Appendix C. About Unicode, UCS-2, and UTF-8" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">What it looks like</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="interfacespurpose.html">Prev</a> </td><th width="60%" align="center">Appendix B. The <code class="filename">interfaces</code> File</th><td width="20%" align="right"> <a accesskey="n" href="AboutUnicode.html">Next</a></td></tr></table><hr /></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="interfacesformat"></a>What it looks like</h2></div></div></div><p>The format of the <code class="filename">interfaces</code> file is borrowed directly from that used by Sybase on Unix platforms (<span class="productname">Windows</span> has a different format). Additionally, we have overloaded one of the fields to add the ability to set the protocol version. An example <code class="filename">interfaces</code> file looks like this.</p><div class="example"><a id="e.g.interfacesfile"></a><p class="title"><strong>Example B.1. An <code class="filename">interfaces</code> file example</strong></p><div class="example-contents"><pre class="programlisting"> myserver query tcp 4.2 127.0.0.1 4000 master tcp ether 127.0.0.1 4000 </pre></div></div><p><br class="example-break" /></p><p>The entry starts with the servername beginning in the first column (no whitespace preceding it). Following the servername are one or more services lines which <span class="emphasis"><em>must</em></span> be indented with whitespace. <span class="productname">FreeTDS</span> uses only the query line, although others may be present to retain compatibility with Sybase. </p><p>The fields in the services lines are as follows. </p><div class="table"><a id="tab.Services.Line"></a><p class="title"><strong>Table B.1. Services Line</strong></p><div class="table-contents"><table class="table" summary="Services Line" border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Name</th><th>Example</th><th>Meaning</th></tr></thead><tbody><tr><td>service</td><td>query</td><td>The only supported service</td></tr><tr><td>transport</td><td>tcp</td><td>The transport protocol to use. Only tcp is supported by <span class="productname">FreeTDS</span>.</td></tr><tr><td>physical</td><td>4.2</td><td>Historically this field referred the physical/datalink layer, however it appears to simply a comment field. Therefore, <span class="productname">FreeTDS</span> optionally uses it to specify the protocol version to connect with.</td></tr><tr><td>hostname/IP</td><td>127.0.0.1</td><td>The hostname or IP address where the <span class="productname">SQL Server</span> resides.</td></tr><tr><td>port</td><td>4000</td><td>The TCP port where the <span class="productname">SQL Server</span> is listening.</td></tr></tbody></table></div></div><p><br class="table-break" /></p><p>In the example above, the <code class="literal">hostname</code> was entered as an IP address. It needn't be; it could just as well be a name. <span class="productname">FreeTDS</span> can use a name rather than an address; it will just let the network (specifically, the <span class="application">resolver</span> get the address.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="interfacespurpose.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="interfacesfile.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="AboutUnicode.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">What it does </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Appendix C. About Unicode, UCS-2, and UTF-8</td></tr></table></div></body></html>