/* -1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2013 The FreeBSD Foundation4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions7* are met:8* 1. Redistributions of source code must retain the above copyright9* notice, this list of conditions and the following disclaimer.10* 2. Redistributions in binary form must reproduce the above11* copyright notice, this list of conditions and the following12* disclaimer in the documentation and/or other materials provided13* with the distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''16* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED17* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A18* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR19* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,20* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT21* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF22* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,24* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT25* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF26* SUCH DAMAGE.27*28* Author: George V. Neville-Neil29*30*/3132/* Organizationally Unique Identifier assigned by IEEE 14 Nov 2013 */33#define OUI_FREEBSD_BASE 0x589cfc00000034#define OUI_FREEBSD(nic) (OUI_FREEBSD_BASE | (nic))3536/*37* OUIs are most often used to uniquely identify network interfaces38* and occupy the first 3 bytes of both destination and source MAC39* addresses. The following allocations exist so that various40* software systems associated with FreeBSD can have unique IDs in the41* absence of hardware. The use of OUIs for this purpose is not fully42* fleshed out but is now in common use in virtualization technology.43*44* Allocations from this range are expected to be made using COMMON45* SENSE by developers. Do NOT take a large range just because46* they're currently wide open. Take the smallest useful range for47* your system. We have (2^24 - 2) available addresses (see Reserved48* Values below) but that is far from infinite.49*50* In the event of a conflict arbitration of allocation in this file51* is subject to core@ approval.52*53* Applications are differentiated based on the high order bit(s) of54* the remaining three bytes. Our first allocation has all 0s, the55* next allocation has the highest bit set. Allocating in this way56* gives us 254 allocations of 64K addresses. Address blocks can be57* concatenated if necessary.58*59* Reserved Values: 0x000000 and 0xffffff are reserved and MUST NOT BE60* allocated for any reason.61*/6263/* Allocate 20 bits to bhyve */64#define OUI_FREEBSD_BHYVE_LOW OUI_FREEBSD(0x000001)65#define OUI_FREEBSD_BHYVE_HIGH OUI_FREEBSD(0x0fffff)6667/*68* Allocate 16 bits for a pool to give to various interfaces that need a69* generated address, but don't quite need to slice off a whole section of70* the OUI (e.g. cloned interfaces, one-off NICs of various vendors).71*72* ether_gen_addr should be used to generate an address from this pool.73*/74#define OUI_FREEBSD_GENERATED_MASK 0x10ffff75#define OUI_FREEBSD_GENERATED_LOW OUI_FREEBSD(0x100000)76#define OUI_FREEBSD_GENERATED_HIGH OUI_FREEBSD(OUI_FREEBSD_GENERATED_MASK)7778/* Allocate 16 bits for emulated NVMe devices */79#define OUI_FREEBSD_NVME_MASK 0x20ffff80#define OUI_FREEBSD_NVME_LOW OUI_FREEBSD(0x200000)81#define OUI_FREEBSD_NVME_HIGH OUI_FREEBSD(OUI_FREEBSD_NVME_MASK)828384