1*84659b24SMichael Zeller /*- 2*84659b24SMichael Zeller * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3*84659b24SMichael Zeller * 4*84659b24SMichael Zeller * Copyright (c) 2019 Vincenzo Maffione <v.maffione@gmail.com> 5*84659b24SMichael Zeller * 6*84659b24SMichael Zeller * Redistribution and use in source and binary forms, with or without 7*84659b24SMichael Zeller * modification, are permitted provided that the following conditions 8*84659b24SMichael Zeller * are met: 9*84659b24SMichael Zeller * 1. Redistributions of source code must retain the above copyright 10*84659b24SMichael Zeller * notice, this list of conditions and the following disclaimer. 11*84659b24SMichael Zeller * 2. Redistributions in binary form must reproduce the above copyright 12*84659b24SMichael Zeller * notice, this list of conditions and the following disclaimer in the 13*84659b24SMichael Zeller * documentation and/or other materials provided with the distribution. 14*84659b24SMichael Zeller * 15*84659b24SMichael Zeller * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS``AS IS'' AND 16*84659b24SMichael Zeller * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17*84659b24SMichael Zeller * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 18*84659b24SMichael Zeller * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS 19*84659b24SMichael Zeller * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 20*84659b24SMichael Zeller * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 21*84659b24SMichael Zeller * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 22*84659b24SMichael Zeller * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23*84659b24SMichael Zeller * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 24*84659b24SMichael Zeller * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 25*84659b24SMichael Zeller * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26*84659b24SMichael Zeller * 27*84659b24SMichael Zeller * $FreeBSD$ 28*84659b24SMichael Zeller */ 29*84659b24SMichael Zeller 30*84659b24SMichael Zeller #ifndef _NET_UTILS_H_ 31*84659b24SMichael Zeller #define _NET_UTILS_H_ 32*84659b24SMichael Zeller 33*84659b24SMichael Zeller #include <stdint.h> 34*84659b24SMichael Zeller #include "pci_emul.h" 35*84659b24SMichael Zeller 36*84659b24SMichael Zeller void net_genmac(struct pci_devinst *pi, uint8_t *macaddr); 37*84659b24SMichael Zeller int net_parsemac(char *mac_str, uint8_t *mac_addr); 38*84659b24SMichael Zeller 39*84659b24SMichael Zeller #endif /* _NET_UTILS_H_ */ 40