 |
Index for Section 7 |
|
 |
Alphabetical listing for T |
|
 |
Bottom of page |
|
tra(7)
NAME
tra - DETRA 4 Mb/s or 16 Mb/s Token Ring interface
SYNOPSIS
controller tra0 at *
Entry in the system configuration file
DESCRIPTION
The tra interface is a Token Ring TURBOchannel adapter that can operate at
4 Mb/s or 16 Mb/s. The adapter uses a TMS380 chip to implement the Token
Ring protocol.
The host's Internet address is specified at boot time with a SIOCSIFADDR
ioctl. Also the speed at which the interface should operate can be
specified using the SIOCSMACSPEED ioctl. The default speed at which the
interface will try and enter the ring is at 16 Mb/s. The other supported
speed is 4 Mb/s. ifconfig(8) describes how to set the speed of the
interface by using the speed option.
The maximum MAC frame size supported by the driver on a 4 Mb/s Token Ring
network is 4136 and for a 16 Mb/s network it is 8232.
The SIOCRPHYSADDR ioctl can be used to read the physical address of the
DETRA adapter.
The SIOCADDMULTI and SIOCDELMULTI ioctls can be used to add or delete
functional addresses.
The SIOCRDCTRS ioctl can be used to read the Token Ring driver counters.
The DETRA adapter status and characteristics can also be read through this
ioctl by providing one of the following options:
CTR_TRN
Reads the counters
TRN_CHAR
Reads the characteristics
TRN_MIB_ENTRY
Reads the RFC 1231 mib entry
TRN_MIB_STAT_ENTRY
Reads the RFC 1231 status entry
The driver does not support reporting information on the timer statistics
as defined in RFC 1239.
The argument to this ioctl is a pointer to a counter or status structure,
ctrreq, found in <net/if.h>. The structures defining the Token Ring
counters and status maintained can be found in <netinet/if_trnstat.h>.
The SIOCENABLBACK and SIOCDISABLBACK ioctls can be used to enable and
disable the interface loopback mode, respectively. The driver enables
internal loopback only.
The SIOCIFRESET ioctl can be used to reset the adapter.
EXAMPLES
To obtain the physical address of the adapter, use the SIOCRPHYSADDR ioctl
as in the following program example:
#include <stdio.h> /* standard I/O */
#include <errno.h> /* error numbers */
#include <sys/socket.h> /* socket definitions */
#include <sys/ioctl.h> /* ioctls */
#include <net/if.h> /* generic interface structures */
main()
{
int s,i;
static struct ifdevea devea;
/* Get a socket */
s = socket(AF_INET,SOCK_DGRAM,0);
if (s < 0) {
perror("socket");
exit(1);
}
strcpy(devea.ifr_name,"tra0");
if (ioctl(s,SIOCRPHYSADDR,&devea) < 0) {
perror(&devea.ifr_name[0]);
exit(1);
}
printf("Address is ");
for (i = 0; i < 6; i++)
printf("%X ", devea.default_pa[i] & 0xff);
printf("\n");
close(s);
}
To reset the adapter, use the SIOCIFRESET ioctl as in the following program
example:
#include <stdio.h> /* standard I/O */
#include <errno.h> /* error numbers */
#include <sys/socket.h> /* socket definitions */
#include <sys/ioctl.h> /* ioctls */
#include <net/if.h> /* generic interface structures */
main()
{
int s;
struct ifreq data;
/* Get a socket */
s = socket(AF_INET,SOCK_DGRAM,0);
if (s < 0) {
perror("socket");
exit(1);
}
strcpy(data.ifr_name,"tra0");
if (ioctl(s,SIOCIFRESET,&data) < 0) {
perror("SIOCIFRESET:");
exit(1);
}
close(s);
}
ERRORS
Diagnostic messages contain information provided by the tra driver and the
adapter. The following messages contain information about the adapter's
state, and are printed on the console. Each message begins with the
adapter identification, including the number of the adapter:
Adapter check interrupt: <reason>
The driver received an adapter check interrupt. The reason for the
interrupt is displayed.
Cannot get aligned address for System Status Block (SSB)
The driver could not get an aligned address for the System Status Block
(SSB). (See Texas Instruments, TMS380 Second-Generation Token Ring
User's Guide for an explanation of SSB.)
Bring Up Diagnostic Tests failed, SIFCMD/SIFSTS = <hex value>
Failure reason: reason
The Bring Up Diagnostics (BUD) failed. The value of the command/status
register and the reason for the failure are displayed.
Driver received an unknown interrupt
The driver received an unknown interrupt.
Error writing initialization block: SIFCMD/SIFSTS = <value>
An error while trying to write out the initialization block to the
TMS380 Token Ring chip. The value of the command/status register is
displayed in hexadecimal.
MAC_CLOSE command returned an unknown status: <value>
The MAC_CLOSE command returned an unknown status to the driver.
MAC_CLOSE request pending
A request to close the MAC was previously issued to the adapter.
MAC_OPEN request pending
A request to open the MAC was previously issued to the adapter.
MAC_OPEN command rejected: <reason>
The command to open the MAC was rejected. The reason is displayed.
Opening the adapter into the ring at <value> Mb/s
The driver opened the adapter into the ring at the speed indicated.
Only two speeds are supported - 4 Mb/s and 16 Mb/s.
Receive suspended
Transmit suspended
If either message is displayed, reset the adapter by issuing the
following commands:
% ifconfig tra0 down
% ifconfig tra0 up
If the message persists, an error is occurring while transmitting and
receiving packets. You will need to investigate the error.
Ring status: <status>
The status of the ring.
Taking adapter off the ring
The driver has taken the adapter off the ring.
Time out occurred during MAC_READ_ERROR_LOG command
A timeout occurred while waiting for the MAC_READ_ERROR_LOG command to
complete.
Time out occurred during MAC_CLOSE command
A timeout occurred while trying to close the MAC; the interface is
down.
Time out occurred during MAC_OPEN command
A timeout occurred while waiting for the MAC_OPEN command to complete.
RELATED INFORMATION
netstat(1), ifconfig(8), srconfig(8)
Network Programmer's Guide
 |
Index for Section 7 |
|
 |
Alphabetical listing for T |
|
 |
Top of page |
|