2330 mac_get_passive_primary_client(mac_impl_t *mip)
2331 {
2332 mac_client_impl_t *mcip;
2333
2334 for (mcip = mip->mi_clients_list; mcip != NULL;
2335 mcip = mcip->mci_client_next) {
2336 if (mac_is_primary_client(mcip) &&
2337 (mcip->mci_flags & MAC_CLIENT_FLAGS_PASSIVE_PRIMARY) != 0) {
2338 return (mcip);
2339 }
2340 }
2341 return (NULL);
2342 }
2343
2344 /*
2345 * Add a new unicast address to the MAC client.
2346 *
2347 * The MAC address can be specified either by value, or the MAC client
2348 * can specify that it wants to use the primary MAC address of the
2349 * underlying MAC. See the introductory comments at the beginning
2350 * of this file for more more information on primary MAC addresses.
2351 *
2352 * Note also the tuple (MAC address, VID) must be unique
2353 * for the MAC clients defined on top of the same underlying MAC
2354 * instance, unless the MAC_UNICAST_NODUPCHECK is specified.
2355 *
2356 * In no case can a client use the PVID for the MAC, if the MAC has one set.
2357 */
2358 int
2359 i_mac_unicast_add(mac_client_handle_t mch, uint8_t *mac_addr, uint16_t flags,
2360 mac_unicast_handle_t *mah, uint16_t vid, mac_diag_t *diag)
2361 {
2362 mac_client_impl_t *mcip = (mac_client_impl_t *)mch;
2363 mac_impl_t *mip = mcip->mci_mip;
2364 int err;
2365 uint_t mac_len = mip->mi_type->mt_addr_length;
2366 boolean_t check_dups = !(flags & MAC_UNICAST_NODUPCHECK);
2367 boolean_t fastpath_disabled = B_FALSE;
2368 boolean_t is_primary = (flags & MAC_UNICAST_PRIMARY);
2369 boolean_t is_unicast_hw = (flags & MAC_UNICAST_HW);
2370 mac_resource_props_t *mrp;
|
2330 mac_get_passive_primary_client(mac_impl_t *mip)
2331 {
2332 mac_client_impl_t *mcip;
2333
2334 for (mcip = mip->mi_clients_list; mcip != NULL;
2335 mcip = mcip->mci_client_next) {
2336 if (mac_is_primary_client(mcip) &&
2337 (mcip->mci_flags & MAC_CLIENT_FLAGS_PASSIVE_PRIMARY) != 0) {
2338 return (mcip);
2339 }
2340 }
2341 return (NULL);
2342 }
2343
2344 /*
2345 * Add a new unicast address to the MAC client.
2346 *
2347 * The MAC address can be specified either by value, or the MAC client
2348 * can specify that it wants to use the primary MAC address of the
2349 * underlying MAC. See the introductory comments at the beginning
2350 * of this file for more information on primary MAC addresses.
2351 *
2352 * Note also the tuple (MAC address, VID) must be unique
2353 * for the MAC clients defined on top of the same underlying MAC
2354 * instance, unless the MAC_UNICAST_NODUPCHECK is specified.
2355 *
2356 * In no case can a client use the PVID for the MAC, if the MAC has one set.
2357 */
2358 int
2359 i_mac_unicast_add(mac_client_handle_t mch, uint8_t *mac_addr, uint16_t flags,
2360 mac_unicast_handle_t *mah, uint16_t vid, mac_diag_t *diag)
2361 {
2362 mac_client_impl_t *mcip = (mac_client_impl_t *)mch;
2363 mac_impl_t *mip = mcip->mci_mip;
2364 int err;
2365 uint_t mac_len = mip->mi_type->mt_addr_length;
2366 boolean_t check_dups = !(flags & MAC_UNICAST_NODUPCHECK);
2367 boolean_t fastpath_disabled = B_FALSE;
2368 boolean_t is_primary = (flags & MAC_UNICAST_PRIMARY);
2369 boolean_t is_unicast_hw = (flags & MAC_UNICAST_HW);
2370 mac_resource_props_t *mrp;
|