Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
16.  Drivers for Network Devices Declarations and Data Structures gld_mac_info Structure  Previous   Contents   Next 
   
 
gldm_reset

Pointer to driver entry point; see the gld(9E) man page.

gldm_start

Pointer to driver entry point; see the gld(9E) man page.

gldm_stop

Pointer to driver entry point; see the gld(9E) man page.

gldm_set_mac_addr

Pointer to driver entry point; see the gld(9E) man page.

gldm_set_multicast

Pointer to driver entry point; see the gld(9E) man page.

gldm_set_promiscuous

Pointer to driver entry point; see the gld(9E) man page.

gldm_send

Pointer to driver entry point; see the gld(9E) man page.

gldm_intr

Pointer to driver entry point; see the gld(9E) man page.

gldm_get_stats

Pointer to driver entry point; see the gld(9E) man page.

gldm_ioctl

Pointer to driver entry point; is allowed to be NULL; see the gld(9E) man page.

gldm_ident

Pointer to a string containing a short description of the device. It is used to identify the device in system messages.

gldm_type

Type of device the driver handles. The values currently supported by GLD are DL_ETHER (ISO 8802-3 (IEEE 802.3) and Ethernet Bus), DL_TPR (IEEE 802.5 Token Passing Ring), and DL_FDDI (ISO 9314-2 Fibre Distributed Data Interface). This structure member must be correctly set for GLD to function properly.

gldm_minpkt

Minimum Service Data Unit size--the minimum packet size, not including the MAC header, that the device will transmit. This size is allowed to be zero if the device-specific driver handles any required padding.

gldm_maxpkt

Maximum Service Data Unit size -- the maximum size of packet, not including the MAC header, that can be transmitted by the device. For Ethernet, this number is 1500.

gldm_addrlen

The length in bytes of physical addresses handled by the device. For Ethernet, Token Ring, and FDDI, the value of this structure member should be 6.

gldm_saplen

The length in bytes of the SAP address used by the driver. For GLD-based drivers, this should always be set to -2, to indicate that 2-byte SAP values are supported and that the SAP appears after the physical address in a DLSAP address. See Appendix A.2, "Message DL_INFO_ACK," in the DLPI specification for more details.

gldm_broadcast_addr

Pointer to an array of bytes of length gldm_addrlen containing the broadcast address to be used for transmit. The driver must provide space to hold the broadcast address, fill it in with the appropriate value, and set gldm_broadcast_addr to point to it. For Ethernet, Token Ring, and FDDI, the broadcast address is normally 0xFF-FF-FF-FF-FF-FF.

gldm_vendor_addr

Pointer to an array of bytes of length gldm_addrlen containing the vendor-provided network physical address of the device. The driver must provide space to hold the address, fill it in with information read from the device, and set gldm_vendor_addr to point to it.

gldm_ppa

PPA number for this instance of the device. This should always be set to the instance number returned from ddi_get_instance(9F).

gldm_devinfo

Pointer to the dev_info node for this device.

gldm_cookie

Interrupt block cookie returned by ddi_get_iblock_cookie(9F), ddi_add_intr(9F), ddi_get_soft_iblock_cookie(9F), or ddi_add_softintr(9F). This must correspond to the device's receive-interrupt, from which gld_recv() is called.

gld_stats Structure

The GLD statistics (gld_stats) structure communicates statistics and state information from a GLD-based driver to GLD when returning from a driver's gldm_get_stats() routine, as discussed in the gld(9E) and gld(7D) man pages. The members of this structure, filled in by the GLD-based driver, are used when GLD reports the statistics. In the tables below, the name of the statistics variable reported by GLD is noted in the comments. See the gld(7D) man page for a more detailed description of the meaning of each statistic.

Drivers must not make any assumptions about the length of this structure, which might vary in different releases of the Solaris operating environment, GLD, or both. Structure members private to GLD, not documented here, should not be set or read by the device-specific driver.

The following structure members are defined for all media types:

uint64_t        glds_speed;                         /* ifspeed */
uint32_t        glds_media;                         /* media */
uint32_t        glds_intr;                          /* intr */
uint32_t        glds_norcvbuf;                      /* norcvbuf */
uint32_t        glds_errrcv;                        /* ierrors */
uint32_t        glds_errxmt;                        /* oerrors */
uint32_t        glds_missed;                        /* missed */
uint32_t        glds_underflow;                     /* uflo */
uint32_t        glds_overflow;                      /* oflo */

The following structure members are defined for media type DL_ETHER:

uint32_t        glds_frame;                         /* align_errors */
uint32_t        glds_crc;                           /* fcs_errors */
uint32_t        glds_duplex;                        /* duplex */
uint32_t        glds_nocarrier;                     /* carrier_errors */
uint32_t        glds_collisions;                    /* collisions */
uint32_t        glds_excoll;                        /* ex_collisions */
uint32_t        glds_xmtlatecoll;                   /* tx_late_collisions */
uint32_t        glds_defer;                         /* defer_xmts */
uint32_t        glds_dot3_first_coll;               /* first_collisions */
uint32_t        glds_dot3_multi_coll;               /* multi_collisions */
uint32_t        glds_dot3_sqe_error;                /* sqe_errors */
uint32_t        glds_dot3_mac_xmt_error;            /* macxmt_errors */
uint32_t        glds_dot3_mac_rcv_error;            /* macrcv_errors */
uint32_t        glds_dot3_frame_too_long;           /* toolong_errors */
uint32_t        glds_short;                         /* runt_errors */

The following structure members are defined for media type DL_TPR:

uint32_t        glds_dot5_line_error                /* line_errors */
uint32_t        glds_dot5_burst_error            /* burst_errors */
uint32_t        glds_dot5_signal_loss            /* signal_losses */
uint32_t        glds_dot5_ace_error              /* ace_errors */
uint32_t        glds_dot5_internal_error         /* internal_errors */
uint32_t        glds_dot5_lost_frame_error       /* lost_frame_errors */
uint32_t        glds_dot5_frame_copied_error     /* frame_copied_errors */
uint32_t        glds_dot5_token_error            /* token_errors */
uint32_t        glds_dot5_freq_error             /* freq_errors */

The following structure members are defined for media type DL_FDDI:

uint32_t        glds_fddi_mac_error;                /* mac_errors */
uint32_t        glds_fddi_mac_lost;                 /* mac_lost_errors */
uint32_t        glds_fddi_mac_token;                /* mac_tokens */
uint32_t        glds_fddi_mac_tvx_expired;          /* mac_tvx_expired */
uint32_t        glds_fddi_mac_late;                 /* mac_late */
uint32_t        glds_fddi_mac_ring_op;              /* mac_ring_ops */

Most of the above statistics variables are counters denoting the number of times the particular event was observed. Exceptions are:

glds_speed

Estimate of the interface's current bandwidth in bits per second. For interfaces that do not vary in bandwidth or for those where no accurate estimation can be made, this object should contain the nominal bandwidth.

glds_media

Type of media (wiring) or connector used by the hardware. Currently supported media names include GLDM_AUI, GLDM_BNC, GLDM_TP, GLDM_10BT, GLDM_100BT, GLDM_100BTX, GLDM_100BT4, GLDM_RING4, GLDM_RING16, GLDM_FIBER, and GLDM_PHYMII. GLDM_UNKNOWN is also permitted.

glds_duplex

Current duplex state of the interface. Supported values are GLD_DUPLEX_HALF and GLD_DUPLEX_FULL. GLD_DUPLEX_UNKNOWN is also permitted.

GLD Arguments

The following arguments are used by the GLD routines.

 
 
 
  Previous   Contents   Next