2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2016 Joyent, Inc.
19 .Nd set device unicast address
21 .In sys/mac_provider.h
25 .Fa "const uint8_t *mac"
32 A pointer to the driver's private data that was passed in via the
40 A pointer to an array of bytes that contains the new unicast address of
42 It is guaranteed to be at least a number of bytes long equal to the length of
43 the MAC plugin's address length.
44 For Ethernet devices that length is six bytes,
50 entry point is used by the GLDv3 to indicate that the device driver
51 should update the primary MAC address of the device.
52 In the basic mode of operation, this entry point is required and the device has
53 a single primary MAC address.
54 If multiple MAC addresses are required, the device will be placed into
56 This call should overwrite the existing MAC address that is programmed into the
63 array is guaranteed to be at least as many bytes as is required to
64 specify an address; however, it should be assumed to be no longer than
67 The device driver can optionally assert that the address is in the
68 valid form for a unicast address and then program the device.
69 The device driver can access its device soft state by casting the
71 pointer to the appropriate structure.
72 As this may be called while other operations are ongoing, the device driver
73 should employ the appropriate locking while updating the data.
75 It is recommended that device drivers always maintain a copy of the
76 current unicast address in its soft state so that way it can recover
77 from various device reset and errors or handle requests to suspend and
78 resume the device that may result in device registers being cleared.
80 Some devices support multiple MAC address filters.
83 entry point only supports a single MAC address.
84 In this case, devices should only use a single MAC address and replace that MAC
86 Support for using more than a single MAC address filter will be provided
89 Upon successful completion, the device driver should have updated its
90 unicast filter and return
92 Otherwise, the MAC address should remain unchanged and the driver should
93 return an appropriate error number.
95 The device driver may return one of the following errors.
96 While this list is not intended to be exhaustive, it is recommended to use one
102 is not a valid unicast address.
104 The driver encountered a device or transport error while trying to
105 update the device's state.
109 .Xr mac_register 9F ,