int gld_register(dev_info_t *dip, char *name, gld_mac_info_t *macinfo);
gld_register() is called from the device driver's attach(9E) routine. gld_register() links the GLDv2-based device driver with the GLDv2 framework. Before calling gld_register(), the device driver's attach(9E) routine uses gld_mac_alloc() to allocate a gld_mac_info(9S) structure, and then initializes several structure elements. See gld_mac_info(9S) for more information. A successful call to gld_register() performs the following actions:
Links the device-specific driver with the GLDv2 system
Sets the device-specific driver's private data pointer, using ddi_set_driver_private(9F) to point to the macinfo structure
Creates the minor device node
The device interface name passed to gld_register() must exactly match the name of the driver module as that name exists in the file system.
The driver's attach(9E) routine should return DDI_SUCCESS if gld_register() succeeds. If gld_register() does not return DDI_SUCCESS, the attach(9E) routine should deallocate any allocated resources before calling gld_register(), and then return DDI_FAILURE.