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

					query tcp 4.2 4000
					master tcp ether 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

servicequeryThe only supported service
transporttcpThe transport protocol to use. Only tcp is supported by FreeTDS.
physical4.2Historically 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/IP127.0.0.1The hostname or IP address where the SQL Server resides.
port4000The 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.