Merge commit 'ad3ad82ad2fb99c424a8482bd1908d08b990ccea'
[unleashed.git] / share / man / man7d / gld.7d
blobdd0e016540c06e418ae9670673f715f2da7cf1f9
1 '\" te
2 .\"  Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH GLD 7D "Nov 10, 2005"
7 .SH NAME
8 gld \- Generic \fBLAN\fR Driver
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB#include\fR \fB<sys/stropts.h>\fR
13 .fi
15 .LP
16 .nf
17 \fB#include\fR \fB<sys/stream.h>\fR
18 .fi
20 .LP
21 .nf
22 \fB#include\fR \fB<sys/dlpi.h>\fR
23 .fi
25 .LP
26 .nf
27 \fB#include\fR \fB<sys/gld.h>\fR
28 .fi
30 .SH INTERFACE LEVEL
31 .sp
32 .LP
33 Solaris architecture specific (Solaris DDI).
34 .SH DESCRIPTION
35 .sp
36 .LP
37 GLD is a multi-threaded, clonable, loadable kernel module providing support for
38 Solaris local area network  (\fBLAN\fR) device drivers. \fBLAN\fR drivers in
39 Solaris are \fBSTREAMS\fR-based drivers that use the Data Link Provider
40 Interface (\fBDLPI\fR) to communicate with network protocol stacks. These
41 protocol stacks use the network drivers to send and receive packets on a local
42 area network. A network device driver must implement and adhere to the
43 requirements imposed by the DDI/DKI specification, \fBSTREAMS\fR specification,
44 DLPI specification, and programmatic interface of the device itself.
45 .sp
46 .LP
47 GLD implements most \fBSTREAMS\fR and DLPI functionality required of a Solaris
48 LAN driver. Several Solaris network drivers are implemented using GLD.
49 .sp
50 .LP
51 A Solaris network driver implemented using GLD comprises two distinct parts: a
52 generic component that deals with \fBSTREAMS\fR and DLPI interfaces, and a
53 device-specific component that deals with the particular hardware device. The
54 device-specific module indicates its dependency on the GLD module and registers
55 itself with GLD from within the driver's \fBattach\fR(9E) function. Once it is
56 successfully loaded, the driver is \fBDLPI\fR-compliant. The device-specific
57 part of the driver calls \fBgld\fR(9F) functions when it receives data or needs
58 some service from GLD. GLD makes calls into the \fBgld\fR(9E) entry points of
59 the device-specific driver through pointers provided to GLD by the
60 device-specific driver when it registered itself with GLD. The
61 \fBgld_mac_info\fR(9S) structure is the main data interface between GLD and the
62 device-specific driver.
63 .sp
64 .LP
65 The GLD facility currently supports devices of type \fBDL_ETHER\fR,
66 \fBDL_TPR\fR, and \fBDL_FDDI\fR. GLD drivers are expected to process
67 fully-formed MAC-layer packets and should not perform logical link control
68 (LLC) handling.
69 .LP
70 Note -
71 .sp
72 .RS 2
73 Support for the DL_TPR and DL_FDDI media types in GLD is obsolete and may be
74 removed in a future release of Solaris.
75 .RE
76 .sp
77 .LP
78 In some cases, it may be necessary or desirable to implement a full
79 DLPI-compliant driver without using the GLD facility. This is true for devices
80 that are not IEEE 802-style LAN devices, or where a device type or DLPI service
81 not supported by GLD is required.
82 .SS "Device Naming Constraints"
83 .sp
84 .LP
85 The name of the device-specific driver module must adhere to the naming
86 constraints outlined in the NOTES section of \fBdlpi\fR(7P).
87 .SS "Type DL_ETHER: Ethernet V2 and ISO 8802-3 (IEEE 802.3)"
88 .sp
89 .LP
90 For devices designated type \fBDL_ETHER\fR, GLD provides support for both
91 Ethernet V2 and ISO 8802-3 (IEEE 802.3) packet processing. Ethernet V2 enables
92 a data link service user to access and use any of a variety of conforming data
93 link service providers without special knowledge of the provider's protocol. A
94 service access point (\fBSAP\fR) is the point through which the user
95 communicates with the service provider.
96 .sp
97 .LP
98 SAP 0 denotes  that the  user  wishes to use \fI802.3\fR mode. In transmission,
99 GLD checks the destination SAP value of the DL_UNITDATA_REQ and the SAP value
100 to which the stream is bound. If both  are 0, the GLD computes the length of
101 the packet payload and transmits \fI802.3\fR frames having that length in the
102 MAC frame header type field. Such lengths will never exceed 1500.
105 All frames received from the media that have a type field in the range [0-1500]
106 are assumed to be \fI802.3\fR frames and are routed up all open streams that
107 are in \fI802.3\fR mode,  (those streams  bound to a SAP value in of 0. If more
108 than one stream is in \fI802.3\fR mode, the incoming frame is duplicated and
109 routed up each such stream.
112 Streams  bound to  a  SAP  value of  1536 or greater receive incoming packets
113 whose Ethernet MAC header type value exactly matches the value of the SAP to
114 which the stream is bound. SAP values in the range [1-1535] are undefined and
115 should not be used.
116 .SS "Types DL_TPR and DL_FDDI: SNAP Processing"
118 Note -
120 .RS 2
121 Support for the DL_TPR and DL_FDDI media types in GLD is obsolete and may be
122 removed in a future release of Solaris.
126 For media types DL_TPR and DL_FDDI, GLD implements  minimal SNAP (Sub-Net
127 Access Protocol)  processing for SAP values of 1536  or greater. A SAP value of
128 0 denotes that the user wishes to use LLC mode. SAP values in  the range
129 [1-1535] have undefined semantics and should not be used.
132 \fBSNAP\fR headers are carried under LLC headers with destination SAP 0xAA. For
133 outgoing packets with SAP values greater than 1535, GLD creates an LLC+SNAP
134 header that always looks like:
137 ``AA AA 03 00 00 00 XX XX''
140 where ``XX XX'' represents the 16-bit SAP, corresponding  to the  Ethernet V2
141 style ``type.'' This is the only class of SNAP header that is processed -
142 non-zero OUI fields, and LLC control fields  other than 03 are considered to be
143 LLC packets with SAP 0xAA.
146 A DL_UNITDATA_REQ  message specifying  a destination  SAP value of 0, passed
147 down a stream bound to SAP 0, is assumed     to  contain  an  LLC  packet and
148 will not undergo  SNAP processing.
151 Incoming packets are examined to ascertain whether they fall into  the format
152 specified above. Packets that do will be passed to streams bound to the
153 packet's 16-bit SNAP type, as well as being passed to any stream in LLC mode
154 (those bound to a SAP value of 0).
155 .SS "Type DL_TPR: Source Routing"
157 Note -
159 .RS 2
160 Support for the DL_TPR media type in GLD is obsolete and may be removed in a
161 future release of Solaris.
165 For type \fBDL_TPR\fR devices, GLD implements minimal support for source
166 routing. Source routing enables a station that is sending a packet across a
167 bridged medium to specify (in the packet MAC header) routing information that
168 determines the route that the packet will take through the network.
171 Functionally, the source routing support provided by GLD learns routes,
172 solicits and responds to requests for information about possible multiple
173 routes and selects among the multiple routes that are available. It adds
174 \fIRouting Information Fields\fR to the MAC headers of outgoing packets and
175 recognizes such fields in incoming packets.
178 GLD's source routing support does not implement the full \fIRoute Determination
179 Entity\fR \fB(RDE)\fR specified in \fIISO 8802-2 (IEEE 802.2)\fR Section 9.
180 However, it is designed to interoperate with any such implementations that may
181 exist in the same (or a bridged) network.
182 .SS "Style 1 and 2 Providers"
185 GLD implements both Style 1 and Style 2 providers. A physical point of
186 attachment (\fBPPA\fR) is the point at which a system attaches itself to a
187 physical communication medium. All communication on that physical medium
188 funnels through the \fBPPA\fR. The Style 1 provider attaches the stream to a
189 particular \fBPPA\fR based on the major/minor device that has been opened. The
190 Style 2 provider requires the DLS user to explicitly identify the desired
191 \fBPPA\fR using \fBDL_ATTACH_REQ.\fR In this case, \fBopen\fR(9E) creates a
192 stream between the user and GLD and \fBDL_ATTACH_REQ\fR subsequently associates
193 a particular \fBPPA\fR with that stream. Style 2 is denoted by a minor number
194 of zero. If a device node whose minor number is not zero is opened, Style 1 is
195 indicated and the associated \fBPPA\fR is the minor number minus 1. In both
196 Style 1 and Style 2 opens, the device is cloned.
197 .SS "Implemented DLPI Primitives"
200 GLD implements the following DLPI primitives:
203 The \fBDL_INFO_REQ\fR primitive requests information about the DLPI stream. The
204 message consists of one \fBM_PROTO\fR message block. GLD returns
205 device-dependent values in the \fBDL_INFO_ACK\fR response to this request,
206 based on information the GLD-based driver specified in the
207 \fBgld_mac_info\fR(9S) structure passed to \fBgld_register()\fR. However GLD
208 returns the following values on behalf of all GLD-based drivers:
209 .RS +4
211 .ie t \(bu
212 .el o
213 The version is \fBDL_VERSION_2\fR.
215 .RS +4
217 .ie t \(bu
218 .el o
219 The service mode is \fBDL_CLDLS\fR \(em GLD implements connectionless-mode
220 service.
222 .RS +4
224 .ie t \(bu
225 .el o
226 The provider style is \fBDL_STYLE1\fR or \fBDL_STYLE2,\fR depending on how the
227 stream was opened.
231 The \fBDL_ATTACH_REQ\fR primitive is called to associate a \fBPPA\fR with a
232 stream. This request is needed for Style 2 DLS providers to identify the
233 physical medium over which the communication will transpire. Upon completion,
234 the state changes from \fBDL_UNATTACHED\fR to \fBDL_UNBOUND.\fR The message
235 consists of one \fBM_PROTO\fR message block. This request may not be issued
236 when using the driver in Style 1 mode; streams opened using Style 1 are already
237 attached to a \fBPPA\fR by the time the open completes.
240 The \fBDL_DETACH_REQ\fR primitive requests to detach the \fBPPA\fR from the
241 stream. This is only allowed if the stream was opened using Style 2.
244 The \fBDL_BIND_REQ\fR and \fBDL_UNBIND_REQ\fR primitives bind and unbind a
245 \fBDLSAP\fR to the stream. The \fBPPA\fR associated with each stream will have
246 been initialized upon completion of the processing of the \fBDL_BIND_REQ.\fR
247 Multiple streams may be bound to the same \fBSAP\fR; each such stream receives
248 a copy of any packets received for that SAP.
251 The \fBDL_ENABMULTI_REQ\fR and \fBDL_DISABMULTI_REQ\fR primitives enable and
252 disable reception of individual multicast group addresses. A set of multicast
253 addresses may be iteratively created and modified on a per-stream basis using
254 these primitives. The stream must be attached to a \fBPPA\fR for these
255 primitives to be accepted.
258 The \fBDL_PROMISCON_REQ\fR and \fBDL_PROMISCOFF_REQ\fR primitives enable and
259 disable promiscuous mode on a per-stream basis, either at a physical level or
260 at the \fBSAP\fR level. The DL Provider will route all received messages on the
261 media to the DLS user until either a \fBDL_DETACH_REQ\fR or a
262 \fBDL_PROMISCOFF_REQ\fR is received or the stream is closed. Physical level
263 promiscuous mode may be specified for all packets on the medium or for
264 multicast packets only. The stream must be attached to a \fBPPA\fR for these
265 primitives to be accepted.
268 The \fBDL_UNITDATA_REQ\fR primitive is used to send data in a connectionless
269 transfer. Because this is an unacknowledged service, there is no guarantee of
270 delivery. The message consists of one \fBM_PROTO\fR message block followed by
271 one or more \fBM_DATA\fR blocks containing at least one byte of data.
274 The \fBDL_UNITDATA_IND\fR type is used when a packet is received and is to be
275 passed upstream. The packet is put into an \fBM_PROTO\fR message with the
276 primitive set to \fBDL_UNITDATA_IND\fR.
279 The \fBDL_PHYS_ADDR_REQ\fR primitive returns the MAC address currently
280 associated with the \fBPPA\fR attached to the stream, in the
281 \fBDL_PHYS_ADDR_ACK\fR primitive. When using style 2, this primitive is only
282 valid following a successful \fBDL_ATTACH_REQ\fR.
285 The \fBDL_SET_PHYS_ADDR_REQ\fR primitive changes the MAC address currently
286 associated with the \fBPPA\fR attached to the stream. This primitive affects
287 all other current and future streams attached to this device. Once changed, all
288 streams currently or subsequently opened and attached to this device will
289 obtain this new physical address. The new physical address will remain in
290 effect until this primitive is used to change the physical address again or the
291 driver is reloaded.
294 The \fBDL_GET_STATISTICS_REQ\fR primitive requests a
295 \fBDL_GET_STATISTICS_ACK\fR response containing statistics information
296 associated with the PPA attached to the stream. Style 2 streams must be
297 attached to a particular \fBPPA\fR using \fBDL_ATTACH_REQ\fR before this
298 primitive will be successful.
301 GLD supports the DL_NOTE_LINK_UP, DL_NOTE_LINK_DOWN and DL_NOTE_SPEED
302 notifications using the DL_NOTIFY_IND primitive. See \fBdlpi\fR(7P).
303 .SS "Implemented ioctl Functions"
306 GLD implements the \fBDLIOCRAW\fR ioctl described in \fBdlpi\fR(7P).  For any
307 other ioctl command, GLD passes it to the device-specific driver's
308 \fBgldm_ioctl()\fR function as described in \fBgld\fR(9E).
309 .SS "Requirements on GLD Drivers"
312 GLD-based drivers must include the header file \fB<sys/gld.h>\fR\&.
315 GLD-based  drivers  must also specify  a link dependency on "misc/gld". (See
316 the -N option in \fBld\fR(1)).
319 GLD implements the \fBopen\fR(9E) and \fBclose\fR(9E) functions and the
320 required \fBSTREAMS\fR \fBput\fR(9E) and \fBsrv\fR(9E) functions on behalf of
321 the device-specific driver. GLD also implements the \fBgetinfo\fR(9E) function
322 for the driver.
325 The \fBmi_idname\fR element of the \fBmodule_info\fR(9S) structure is a string
326 specifying the name of the driver. This must exactly match the name of the
327 driver module as it exists in the file system.
330 The read-side \fBqinit\fR(9S) structure should specify the following elements
331 as shown below:
333 .ne 2
335 \fB\fBqi_putp\fR \fR
337 .RS 14n
338 \fINULL\fR
342 .ne 2
344 \fB\fBqi_srvp\fR \fR
346 .RS 14n
347 \fBgld_rsrv\fR
351 .ne 2
353 \fB\fBqi_qopen\fR \fR
355 .RS 14n
356 \fBgld_open\fR
360 .ne 2
362 \fB\fBqi_qclose\fR \fR
364 .RS 14n
365 \fBgld_close\fR
370 The write-side \fBqinit\fR(9S) structure should specify the following elements
371 as shown below:
373 .ne 2
375 \fB\fBqi_putp\fR \fR
377 .RS 14n
378 \fBgld_wput\fR
382 .ne 2
384 \fB\fBqi_srvp\fR \fR
386 .RS 14n
387 \fBgld_wsrv\fR
391 .ne 2
393 \fB\fBqi_qopen\fR \fR
395 .RS 14n
396 \fINULL\fR
400 .ne 2
402 \fB\fBqi_qclose\fR \fR
404 .RS 14n
405 \fINULL\fR
410 The \fBdevo_getinfo\fR element of the \fBdev_ops\fR(9S) structure should
411 specify \fBgld_getinfo\fR as the \fBgetinfo\fR(9E) routine.
414 The driver's \fBattach\fR(9E) function does all the work of associating the
415 hardware-specific device driver with the GLD facility and preparing the device
416 and driver for use.
419 The \fBattach\fR(9E) function allocates a \fBgld_mac_info\fR(9S) (``macinfo'')
420 structure using \fBgld_mac_alloc()\fR. The driver usually needs to save more
421 information per device than is defined in the macinfo structure; it should
422 allocate the additional required data structure and save a pointer to it in the
423 \fBgldm_private\fR member of the \fBgld_mac_info\fR(9S) structure.
426 The \fBattach\fR(9E) routine must initialize the macinfo structure as described
427 in \fBgld_mac_info\fR(9S) and then call \fBgld_register()\fR to link the driver
428 with the GLD module. The driver should map registers if necessary and be fully
429 initialized and prepared to accept interrupts before calling
430 \fBgld_register()\fR. The \fBattach\fR(9E) function should add interrupts but
431 not enable the device to generate them. The driver should reset the hardware
432 before calling \fBgld_register()\fR to ensure it is quiescent; the device must
433 not be started or put into a state where it may generate an interrupt before
434 \fBgld_register()\fR is called. That will be done later when GLD calls the
435 driver's \fBgldm_start()\fR entry point described in \fBgld\fR(9E). Once
436 \fBgld_register()\fR succeeds, the \fBgld\fR(9E) entry points may be called by
437 GLD at any time.
440 The \fBattach\fR(9E) routine should return \fBDDI_SUCCESS\fR if
441 \fBgld_register()\fR succeeds. If \fBgld_register()\fR fails, it returns
442 \fBDDI_FAILURE\fR and the \fBattach\fR(9E) routine should deallocate any
443 resources it allocated before calling \fBgld_register()\fR and then also return
444 \fBDDI_FAILURE\fR. Under no circumstances should a failed macinfo structure be
445 reused; it should be deallocated using \fBgld_mac_free\fR().
448 The \fBdetach\fR(9E) function should attempt to unregister the driver from GLD.
449 This is done by calling \fBgld_unregister()\fR described in \fBgld\fR(9F). The
450 \fBdetach\fR(9E) routine can get a pointer to the needed \fBgld_mac_info\fR(9S)
451 structure from the device's private data using
452 \fBddi_get_driver_private\fR(9F). \fBgld_unregister\fR() checks certain
453 conditions that could require that the driver not be detached. If the checks
454 fail, \fBgld_unregister()\fR returns \fBDDI_FAILURE\fR, in which case the
455 driver's \fBdetach\fR(9E) routine must leave the device operational and return
456 \fBDDI_FAILURE\fR. If the checks succeed, \fBgld_unregister()\fR ensures that
457 the device interrupts are stopped, calling the driver's \fBgldm_stop()\fR
458 routine if necessary, unlinks the driver from the GLD framework, and returns
459 \fBDDI_SUCCESS\fR. In this case, the \fBdetach\fR(9E) routine should remove
460 interrupts, deallocate any data structures allocated in the \fBattach\fR(9E)
461 routine, using \fBgld_mac_free()\fR to deallocate the macinfo structure, and
462 return \fBDDI_SUCCESS\fR. It is important to remove the interrupt \fIbefore\fR
463 calling \fBgld_mac_free()\fR.
464 .SS "Network Statistics"
467 Solaris network drivers must implement statistics variables. GLD itself tallies
468 some network statistics, but other statistics must be counted by each GLD-based
469 driver. GLD provides support for GLD-based drivers to report a standard set of
470 network driver statistics. Statistics are reported by GLD using the
471 \fBkstat\fR(7D) and \fBkstat\fR(9S) mechanism. The \fBDL_GET_STATISTICS_REQ\fR
472 DLPI command may also be used to retrieve the current statistics counters. All
473 statistics are maintained as unsigned, and all are 32 bits unless otherwise
474 noted.
477 GLD maintains and reports the following statistics.
479 .ne 2
481 \fB\fBrbytes64\fR \fR
483 .RS 15n
484 Total bytes successfully received on the interface (64 bits).
488 .ne 2
490 \fB\fBrbytes\fR \fR
492 .RS 15n
493 Total bytes successfully received on the interface.
497 .ne 2
499 \fB\fBobytes64\fR \fR
501 .RS 15n
502 Total bytes requested to be transmitted on the interface (64 bits).
506 .ne 2
508 \fB\fBobytes\fR \fR
510 .RS 15n
511 Total bytes requested to be transmitted on the interface.
515 .ne 2
517 \fB\fBipackets64\fR \fR
519 .RS 15n
520 Total packets successfully received on the interface (64 bits).
524 .ne 2
526 \fB\fBipackets\fR \fR
528 .RS 15n
529 Total packets successfully received on the interface.
533 .ne 2
535 \fB\fBopackets64\fR \fR
537 .RS 15n
538 Total packets requested to be transmitted on the interface (64 bits).
542 .ne 2
544 \fB\fBopackets\fR \fR
546 .RS 15n
547 Total packets requested to be transmitted on the interface.
551 .ne 2
553 \fB\fBmultircv\fR \fR
555 .RS 15n
556 Multicast packets successfully received, including group and functional
557 addresses (long).
561 .ne 2
563 \fB\fBmultixmt\fR \fR
565 .RS 15n
566 Multicast packets requested to be transmitted, including group and functional
567 addresses (long).
571 .ne 2
573 \fB\fBbrdcstrcv\fR \fR
575 .RS 15n
576 Broadcast packets successfully received (long).
580 .ne 2
582 \fB\fBbrdcstxmt\fR \fR
584 .RS 15n
585 Broadcast packets requested to be transmitted (long).
589 .ne 2
591 \fB\fBunknowns\fR \fR
593 .RS 15n
594 Valid received packets not accepted by any stream (long).
598 .ne 2
600 \fB\fBnoxmtbuf\fR \fR
602 .RS 15n
603 Packets discarded on output because transmit buffer was busy, or no buffer
604 could be allocated for transmit (long).
608 .ne 2
610 \fB\fBblocked\fR \fR
612 .RS 15n
613 Times a received packet could not be put up a stream because the queue was flow
614 controlled (long).
618 .ne 2
620 \fB\fBxmtretry\fR \fR
622 .RS 15n
623 Times transmit was retried after having been delayed due to lack of resources
624 (long).
628 .ne 2
630 \fB\fBpromisc\fR \fR
632 .RS 15n
633 Current ``promiscuous'' state of the interface (string).
638 The device dependent driver counts the following statistics, keeping track of
639 them in a private per-instance structure. When GLD is asked to report
640 statistics, it calls the driver's \fBgldm_get_stats()\fR entry point, as
641 described in \fBgld\fR(9E), to update the device-specific statistics in the
642 \fBgld_stats\fR(9S) structure. GLD then reports the updated statistics using
643 the named statistics variables below.
645 .ne 2
647 \fB\fBifspeed\fR \fR
649 .RS 13n
650 Current estimated bandwidth of the interface in bits per second (64 bits).
654 .ne 2
656 \fB\fBmedia\fR \fR
658 .RS 13n
659 Current media type in use by the device (string).
663 .ne 2
665 \fB\fBintr\fR \fR
667 .RS 13n
668 Times interrupt handler was called and claimed the interrupt (long).
672 .ne 2
674 \fB\fBnorcvbuf\fR \fR
676 .RS 13n
677 Times a valid incoming packet was known to have been discarded because no
678 buffer could be allocated for receive (long).
682 .ne 2
684 \fB\fBierrors\fR \fR
686 .RS 13n
687 Total packets received that couldn't be processed because they contained errors
688 (long).
692 .ne 2
694 \fB\fBoerrors\fR \fR
696 .RS 13n
697 Total packets that weren't successfully transmitted because of errors (long).
701 .ne 2
703 \fB\fBmissed\fR \fR
705 .RS 13n
706 Packets known to have been dropped by the hardware on receive (long).
710 .ne 2
712 \fB\fBuflo\fR \fR
714 .RS 13n
715 Times FIFO underflowed on transmit (long).
719 .ne 2
721 \fB\fBoflo\fR \fR
723 .RS 13n
724 Times receiver overflowed during receive (long).
729 The following group of statistics applies to networks of type \fBDL_ETHER\fR;
730 these are maintained by device-specific drivers of that type, as above.
732 .ne 2
734 \fB\fBalign_errors\fR \fR
736 .RS 23n
737 Packets received with framing errors (not an integral number of octets) (long).
741 .ne 2
743 \fB\fBfcs_errors\fR \fR
745 .RS 23n
746 Packets received with CRC errors (long).
750 .ne 2
752 \fB\fBduplex\fR \fR
754 .RS 23n
755 Current duplex mode of the interface (string).
759 .ne 2
761 \fB\fBcarrier_errors\fR \fR
763 .RS 23n
764 Times carrier was lost or never detected on a transmission attempt (long).
768 .ne 2
770 \fB\fBcollisions\fR \fR
772 .RS 23n
773 Ethernet collisions during transmit (long).
777 .ne 2
779 \fB\fBex_collisions\fR \fR
781 .RS 23n
782 Frames where excess collisions occurred on transmit, causing transmit failure
783 (long).
787 .ne 2
789 \fB\fBtx_late_collisions\fR \fR
791 .RS 23n
792 Times a transmit collision occurred late (after 512 bit times) (long).
796 .ne 2
798 \fB\fBdefer_xmts\fR \fR
800 .RS 23n
801 Packets without collisions where first transmit attempt was delayed because the
802 medium was busy (long).
806 .ne 2
808 \fB\fBfirst_collisions\fR \fR
810 .RS 23n
811 Packets successfully transmitted with exactly one collision.
815 .ne 2
817 \fB\fBmulti_collisions\fR \fR
819 .RS 23n
820 Packets successfully transmitted with multiple collisions.
824 .ne 2
826 \fB\fBsqe_errors\fR \fR
828 .RS 23n
829 Times SQE test error was reported.
833 .ne 2
835 \fB\fBmacxmt_errors\fR \fR
837 .RS 23n
838 Packets encountering transmit MAC failures, except carrier and collision
839 failures.
843 .ne 2
845 \fB\fBmacrcv_errors\fR \fR
847 .RS 23n
848 Packets received with MAC errors, except align, fcs, and toolong errors.
852 .ne 2
854 \fB\fBtoolong_errors\fR \fR
856 .RS 23n
857 Packets received larger than the maximum permitted length.
861 .ne 2
863 \fB\fBrunt_errors\fR \fR
865 .RS 23n
866 Packets received smaller than the minimum permitted length (long).
871 The following group of statistics applies to networks of type \fBDL_TPR\fR;
872 these are maintained by device-specific drivers of that type, as above.
874 .ne 2
876 \fB\fBline_errors\fR \fR
878 .RS 24n
879 Packets received with non-data bits or FCS errors.
883 .ne 2
885 \fB\fBburst_errors\fR \fR
887 .RS 24n
888 Times an absence of transitions for five half-bit timers was detected.
892 .ne 2
894 \fB\fBsignal_losses\fR \fR
896 .RS 24n
897 Times loss of signal condition on the ring was detected.
901 .ne 2
903 \fB\fBace_errors\fR \fR
905 .RS 24n
906 Times an AMP or SMP frame in which A is equal to C is equal to 0, was followed
907 by another such SMP frame without an intervening AMP frame.
911 .ne 2
913 \fB\fBinternal_errors\fR \fR
915 .RS 24n
916 Times the station recognized an internal error.
920 .ne 2
922 \fB\fBlost_frame_errors\fR \fR
924 .RS 24n
925 Times the TRR timer expired during transmit.
929 .ne 2
931 \fB\fBframe_copied_errors\fR \fR
933 .RS 24n
934 Times a frame addressed to this station was received with the FS field A bit
935 set to 1.
939 .ne 2
941 \fB\fBtoken_errors\fR \fR
943 .RS 24n
944 Times the station acting as the active monitor recognized an error condition
945 that needed a token transmitted.
949 .ne 2
951 \fB\fBfreq_errors\fR \fR
953 .RS 24n
954 Times the frequency of the incoming signal differed from the expected
955 frequency.
960 The following group of statistics applies to networks of type \fBDL_FDDI\fR;
961 these are maintained by device-specific drivers of that type, as above.
963 .ne 2
965 \fB\fBmac_errors\fR \fR
967 .RS 20n
968 Frames detected in error by this MAC that had not been detected in error by
969 another MAC.
973 .ne 2
975 \fB\fBmac_lost_errors\fR \fR
977 .RS 20n
978 Frames received with format errors such that the frame was stripped.
982 .ne 2
984 \fB\fBmac_tokens\fR \fR
986 .RS 20n
987 Number of tokens received (total of non-restricted and restricted).
991 .ne 2
993 \fB\fBmac_tvx_expired\fR \fR
995 .RS 20n
996 Number of times that TVX has expired.
1000 .ne 2
1002 \fB\fBmac_late\fR \fR
1004 .RS 20n
1005 Number of TRT expirations since this MAC was reset or a token was received.
1009 .ne 2
1011 \fB\fBmac_ring_ops\fR \fR
1013 .RS 20n
1014 Number of times the ring has entered the ``Ring_Operational'' state from the
1015 ``Ring Not Operational'' state.
1018 .SH FILES
1020 .ne 2
1022 \fB\fB/kernel/misc/gld\fR \fR
1024 .RS 21n
1025 loadable kernel module
1028 .SH SEE ALSO
1031 \fBld\fR(1), \fBkstat\fR(7D), \fBdlpi\fR(7P), \fBattach\fR(9E), \fBgld\fR(9E),
1032 \fBopen\fR(9E), \fBgld\fR(9F), \fBgld_mac_info\fR(9S), \fBgld_stats\fR(9S),
1033 \fBkstat\fR(9S)
1036 \fIWriting Device Drivers\fR
1037 .SH WARNINGS
1040 Contrary to the DLPI specification, GLD returns the device's correct address
1041 length and broadcast address in \fBDL_INFO_ACK\fR even before the stream has
1042 been attached to a \fBPPA\fR.
1045 Promiscuous mode may only be entered by streams that are attached to a
1046 \fBPPA\fR.
1049 The physical address of a \fBPPA\fR may be changed by the superuser while other
1050 streams are bound to the same PPA.