• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   The interface function declaration of shell application IfConfig6.
3 
4   Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
5 
6   This program and the accompanying materials
7   are licensed and made available under the terms and conditions of the BSD License
8   which accompanies this distribution.  The full text of the license may be found at
9   http://opensource.org/licenses/bsd-license.php.
10 
11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 
14 **/
15 
16 #ifndef _IFCONFIG6_H_
17 #define _IFCONFIG6_H_
18 
19 enum {
20   IfConfig6OpList     = 1,
21   IfConfig6OpSet      = 2,
22   IfConfig6OpClear    = 3
23 };
24 
25 typedef enum {
26   VarCheckReserved      = -1,
27   VarCheckOk            = 0,
28   VarCheckDuplicate,
29   VarCheckConflict,
30   VarCheckUnknown,
31   VarCheckLackValue,
32   VarCheckOutOfMem
33 } VAR_CHECK_CODE;
34 
35 typedef enum {
36   FlagTypeSingle         = 0,
37   FlagTypeNeedVar,
38   FlagTypeNeedSet,
39   FlagTypeSkipUnknown
40 } VAR_CHECK_FLAG_TYPE;
41 
42 #define MACADDRMAXSIZE    32
43 #define PREFIXMAXLEN      16
44 
45 typedef struct _IFCONFIG6_INTERFACE_CB {
46   EFI_HANDLE                                  NicHandle;
47   LIST_ENTRY                                  Link;
48   EFI_IP6_CONFIG_PROTOCOL                     *IfCfg;
49   EFI_IP6_CONFIG_INTERFACE_INFO               *IfInfo;
50   EFI_IP6_CONFIG_INTERFACE_ID                 *IfId;
51   EFI_IP6_CONFIG_POLICY                       Policy;
52   EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS    Xmits;
53   UINT32                                      DnsCnt;
54   EFI_IPv6_ADDRESS                            DnsAddr[1];
55 } IFCONFIG6_INTERFACE_CB;
56 
57 typedef struct _ARG_LIST ARG_LIST;
58 
59 struct _ARG_LIST {
60   ARG_LIST    *Next;
61   CHAR16      *Arg;
62 };
63 
64 typedef struct _IFCONFIG6_PRIVATE_DATA {
65   EFI_HANDLE  ImageHandle;
66   LIST_ENTRY  IfList;
67 
68   UINT32      OpCode;
69   CHAR16      *IfName;
70   ARG_LIST    *VarArg;
71 } IFCONFIG6_PRIVATE_DATA;
72 
73 typedef struct _VAR_CHECK_ITEM{
74   CHAR16                 *FlagStr;
75   UINT32                 FlagID;
76   UINT32                 ConflictMask;
77   VAR_CHECK_FLAG_TYPE    FlagType;
78 } VAR_CHECK_ITEM;
79 #endif
80