// Copyright 2021 Canonical Ltd.
// Licensed under the LGPLv3 with static-linking exception.
// See LICENCE file for details.

package uefi

import (
	"encoding/binary"
)

type EFI_GUID [16]byte

func New_EFI_GUID(a uint32, b, c, d uint16, e [6]uint8) (out EFI_GUID) {
	binary.LittleEndian.PutUint32(out[0:4], a)
	binary.LittleEndian.PutUint16(out[4:6], b)
	binary.LittleEndian.PutUint16(out[6:8], c)
	binary.BigEndian.PutUint16(out[8:10], d)
	copy(out[10:], e[:])
	return
}

type EFI_LBA uint64

type EFI_TABLE_HEADER struct {
	Signature  uint64
	Revision   uint32
	HeaderSize uint32
	CRC        uint32
	Reserved   uint32
}

type EFI_MAC_ADDRESS struct {
	Addr [32]uint8
}

type EFI_IPv4_ADDRESS struct {
	Addr [4]uint8
}

type EFI_IPv6_ADDRESS struct {
	Addr [16]uint8
}
