What it looks like
Prev? | Appendix?B.?The `interfaces` File | ?Next

## What it looks like

The format of the `interfaces` file is borrowed directly from that used by Sybase on Unix platforms (Windows has a different format). Additionally, we have overloaded one of the fields to add the ability to set the protocol version. An example `interfaces` file looks like this.

Example?B.1.?An `interfaces` file example

    					myserver
    					query tcp 4.2 127.0.0.1 4000
    					master tcp ether 127.0.0.1 4000

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 must be indented with whitespace. FreeTDS uses only the query line, although others may be present to retain compatibility with Sybase.

The fields in the services lines are as follows.

Table?B.1.?Services Line

Name | Example | Meaning
--- | --- | ---
service | query | The only supported service
transport | tcp | The transport protocol to use. Only tcp is supported by FreeTDS.
physical | 4.2 | Historically this field referred the physical/datalink layer, however it appears to simply a comment field. Therefore, FreeTDS optionally uses it to specify the protocol version to connect with.
hostname/IP | 127.0.0.1 | The hostname or IP address where the SQL Server resides.
port | 4000 | The TCP port where the SQL Server is listening.

In the example above, the `hostname` was entered as an IP address. It needn't be; it could just as well be a name. FreeTDS can use a name rather than an address; it will just let the network (specifically, the resolver get the address.

Prev? | Up | ?Next
What it does? | Home | ?Appendix?C.?About Unicode, UCS-2, and UTF-8