te(7) [osf1 man page]
te(7) Miscellaneous Information Manual te(7) NAME
te - TGEC Ethernet interface SYNOPSIS
config_driver te DESCRIPTION
The te interface provides access to a 10 Mb/s Ethernet network through the TGEC controller. The host's Internet address is specified at boot time with an SIOCSIFADDR ioctl. The te interface employs the address resolution protocol described in arp(7) to map dynamically between Internet and Ethernet addresses on the local network. The SIOCSPHYSADDR ioctl can be used to change the physical address of the TGEC. The SIOCRPHYSADDR ioctl can be used to read the physical address of the TGEC. The SIOCADDMULTI and SIOCDELMULTI ioctls can be used to add or delete multicast addresses. The TGEC recognizes a maximum of 12 multicast addresses. The SIOCRDCTRS and SIOCRDZCTRS ioctls can be used to read or ``read and clear'' the Ethernet driver counters. The argument to these two ioctls is a pointer to a counter structure, ctrreq, found in <net/if.h>. The SIOCENABLBACK and SIOCDISABLBACK ioctls can be used to enable and disable the interface loopback mode respectively. 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; struct ifdevea devea; /* Get a socket */ s = socket(AF_INET,SOCK_DGRAM,0); if (s < 0) { perror("socket"); exit(1); } strcpy(devea.ifr_name,"te0"); 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(" "); close(s); } To enable external loopback, use the SIOCENABLEBACK 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,"te0"); if (ioctl(s,SIOCENABLEBACK,&data) < 0) { perror("SIOCENABLEBACK:"); exit(1); } close(s); } ERRORS
The diagnostic error messages contain relevant information provided by the TGEC. The interface was handed a message with addresses format- ted in an unsuitable address family, and the packet was dropped. The TGEC hardware failed to reset itself properly. The driver's attempt to allocate a buffer failed. The driver's attempt to allocate a buffer failed. Too many multicast requests have been made. The shared memory block for the TGEC's local RAM buffer is missing from the CMOS configuration data. RELATED INFORMATION
arp(7), inet(7), netintro(7) delim off te(7)
Check Out this Related Man Page
tra(7) Miscellaneous Information Manual tra(7) NAME
tra - DETRA 4 Mb/s or 16 Mb/s Token Ring interface SYNOPSIS
config_driver tra 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: Reads the counters Reads the characteristics Reads the RFC 1231 mib 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(" "); 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: The driver received an adapter check interrupt. The reason for the interrupt is displayed. 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.) The Bring Up Diagnostics (BUD) failed. The value of the command/status register and the reason for the failure are displayed. The driver received an unknown interrupt. 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. The MAC_CLOSE command returned an unknown status to the driver. A request to close the MAC was previously issued to the adapter. A request to open the MAC was previously issued to the adapter. The command to open the MAC was rejected. The reason is displayed. The driver opened the adapter into the ring at the speed indicated. Only two speeds are supported - 4 Mb/s and 16 Mb/s. 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. The status of the ring. The driver has taken the adapter off the ring. A timeout occurred while waiting for the MAC_READ_ERROR_LOG command to complete. A timeout occurred while trying to close the MAC; the interface is down. A timeout occurred while waiting for the MAC_OPEN command to complete. RELATED INFORMATION
netstat(1), ifconfig(8), srconfig(8) Network Programmer's Guide delim off tra(7)