]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Network/Ip4ConfigDxe/NicIp4Variable.h
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Routines used to operate the Ip4 configure variable
23 #ifndef _NIC_IP4_VARIABLE_H_
24 #define _NIC_IP4_VARIABLE_H_
27 #include <Protocol/NicIp4Config.h>
30 // Return the size of NIC_IP4_CONFIG_INFO and EFI_IP4_IPCONFIG_DATA.
31 // They are of variable size
33 #define SIZEOF_IP4_CONFIG_INFO(Ip4Config) \
34 (sizeof (EFI_IP4_IPCONFIG_DATA) + \
35 sizeof (EFI_IP4_ROUTE_TABLE) * (NET_MAX (1, (Ip4Config)->RouteTableSize) - 1))
37 #define SIZEOF_NIC_IP4_CONFIG_INFO(NicConfig) \
38 (sizeof (NIC_IP4_CONFIG_INFO) + \
39 sizeof (EFI_IP4_ROUTE_TABLE) * (NET_MAX (1, (NicConfig)->Ip4Info.RouteTableSize) - 1))
42 // Compare whether two NIC address are equal includes their type and length.
44 #define NIC_ADDR_EQUAL(Nic1, Nic2) \
45 (((Nic1)->Type == (Nic2)->Type) && ((Nic1)->Len == (Nic2)->Len) && \
46 NET_MAC_EQUAL (&(Nic1)->MacAddr, &(Nic2)->MacAddr, (Nic1)->Len))
50 IN NIC_IP4_CONFIG_INFO
*NicConfig
54 Ip4ConfigReadVariable (
59 Ip4ConfigWriteVariable (
60 IN IP4_CONFIG_VARIABLE
*Config OPTIONAL
64 Ip4ConfigFindNicVariable (
65 IN IP4_CONFIG_VARIABLE
*Variable
,
70 Ip4ConfigModifyVariable (
71 IN IP4_CONFIG_VARIABLE
*Variable
, OPTIONAL
73 IN NIC_IP4_CONFIG_INFO
*Config OPTIONAL