XenevaOS
Loading...
Searching...
No Matches
macaddress.h
Go to the documentation of this file.
1//
2// macaddress.h
3//
4// USPi - An USB driver for Raspberry Pi written in C
5// Copyright (C) 2014 R. Stange <rsta2@o2online.de>
6//
7// This program is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19//
20#ifndef _uspi_macaddress_h
21#define _uspi_macaddress_h
22
23#include "uspi/string.h"
24#include "uspi/types.h"
25
26#define MAC_ADDRESS_SIZE 6
27
28typedef struct TMACAddress
29{
30 boolean m_bValid;
31
33}
35
36void MACAddress (TMACAddress *pThis);
37void MACAddress2 (TMACAddress *pThis, const u8 *pAddress);
38void _MACAddress (TMACAddress *pThis);
39
40boolean MACAddressIsEqual (TMACAddress *pThis, TMACAddress *pAddress2);
41
42void MACAddressSet (TMACAddress *pThis, const u8 *pAddress);
44const u8 *MACAddressGet (TMACAddress *pThis);
45void MACAddressCopyTo (TMACAddress *pThis, u8 *pBuffer);
46
47boolean MACAddressIsBroadcast (TMACAddress *pThis);
48unsigned MACAddressGetSize (TMACAddress *pThis);
49
50void MACAddressFormat (TMACAddress *pThis, TString *pString);
51
52#endif
uint8_t u8
Definition kernel.h:20
void MACAddressSet(TMACAddress *pThis, const u8 *pAddress)
Definition macaddress.c:53
void MACAddress(TMACAddress *pThis)
Definition macaddress.c:24
const u8 * MACAddressGet(TMACAddress *pThis)
Definition macaddress.c:70
void _MACAddress(TMACAddress *pThis)
Definition macaddress.c:38
void MACAddressCopyTo(TMACAddress *pThis, u8 *pBuffer)
Definition macaddress.c:78
unsigned MACAddressGetSize(TMACAddress *pThis)
Definition macaddress.c:103
void MACAddressSetBroadcast(TMACAddress *pThis)
Definition macaddress.c:62
boolean MACAddressIsBroadcast(TMACAddress *pThis)
Definition macaddress.c:87
#define MAC_ADDRESS_SIZE
Definition macaddress.h:26
boolean MACAddressIsEqual(TMACAddress *pThis, TMACAddress *pAddress2)
Definition macaddress.c:45
void MACAddress2(TMACAddress *pThis, const u8 *pAddress)
Definition macaddress.c:31
void MACAddressFormat(TMACAddress *pThis, TString *pString)
Definition macaddress.c:108
Definition macaddress.h:29
boolean m_bValid
Definition macaddress.h:30
u8 m_Address[MAC_ADDRESS_SIZE]
Definition macaddress.h:32
Definition string.h:32