Writing Device Drivers

Summary of GLDv3 Interfaces

The following table lists entry points, other DDI functions, and data structures that are part of the GLDv3 network device driver framework.

Table 19–1 GLDv3 Interfaces

Interface Name 

Description 

Required Entry Points

mc_getstat(9E)

Retrieve network statistics from the driver. See GLDv3 Network Statistics.

mc_start(9E)

Start a driver instance. The GLDv3 framework invokes the start entry point before any operation is attempted. 

mc_stop(9E)

Stop a driver instance. The MAC layer invokes the stop entry point before the device is detached. 

mc_setpromisc(9E)

Change the promiscuous mode of the device driver instance. 

mc_multicst(9E)

Add or remove a multicast address. 

mc_unicst(9E)

Set the primary unicast address. The device must start passing back through mac_rx() the packets with a destination MAC address that matches the new unicast address. See Receive Data Path for information about mac_rx().

mc_tx(9E)

Send one or more packets. See Transmit Data Path.

Optional Entry Points

mc_ioctl(9E)

Optional ioctl driver interface. This facility is intended to be used only for debugging purposes. 

mc_getcapab(9E)

Retrieve capabilities. See GLDv3 Capabilities.

mc_setprop(9E)

Set a property value. See GLDv3 Properties.

mc_getprop(9E)

Get a property value. See GLDv3 Properties.

mc_propinfo(9E)

Get information about a property. See GLDv3 Properties.

Data Structures

mac_register(9S)

Registration information. See GLDv3 MAC Registration Data Structures.

mac_callbacks(9S)

Driver callbacks. See GLDv3 MAC Registration Data Structures.

mac_capab_lso(9S)

LSO metadata. See Large Segment (or Send) Offload.

lso_basic_tcp_ipv4(9S)

LSO metadata for TCP/IPv4. See Large Segment (or Send) Offload.

MAC Registration Functions

mac_alloc(9F)

Allocate a new mac_register structure. See GLDv3 MAC Registration.

mac_free(9F)

Free a mac_register structure.

mac_register(9F)

Register with the MAC layer. 

mac_unregister(9F)

Unregister from the MAC layer. 

mac_init_ops(9F)

Initialize the driver's dev_ops(9S) structure.

mac_fini_ops(9F)

Release the driver's dev_ops structure.

Data Transfer Functions

mac_rx(9F)

Pass up received packets. See Receive Data Path.

mac_tx_update(9F)

TX resources are available. See GLDv3 State Change Notifications.

mac_link_update(9F)

Link state has changed. 

mac_hcksum_get(9F)

Retrieve hardware checksum information. See Hardware Checksum Offload and Transmit Data Path.

mac_hcksum_set(9F)

Attach hardware checksum information. See Hardware Checksum Offload and Receive Data Path.

mac_lso_get(9F)

Retrieve LSO information. See Large Segment (or Send) Offload.

Properties Functions

mac_prop_info_set_perm(9F)

Set the permission of a property. See GLDv3 Properties.

mac_prop_info_set_default_uint8(9F), mac_prop_info_set_default_str(9F), mac_prop_info_set_default_link_flowctrl(9F)

Set a property value. 

mac_prop_info_set_range_uint32(9F)

Set a property values range.