NetworkPkg: Support print help information using -? command.
[mirror_edk2.git] / NetworkPkg / Application / IfConfig6 / IfConfig6.h
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 //
20 // String token ID of ifconfig6 command help message text.
21 //
22 GLOBAL_REMOVE_IF_UNREFERENCED EFI_STRING_ID mStringIfconfig6HelpTokenId = STRING_TOKEN (STR_IFCONFIG6_HELP);
23
24 enum {
25 IfConfig6OpList = 1,
26 IfConfig6OpSet = 2,
27 IfConfig6OpClear = 3
28 };
29
30 typedef enum {
31 VarCheckReserved = -1,
32 VarCheckOk = 0,
33 VarCheckDuplicate,
34 VarCheckConflict,
35 VarCheckUnknown,
36 VarCheckLackValue,
37 VarCheckOutOfMem
38 } VAR_CHECK_CODE;
39
40 typedef enum {
41 FlagTypeSingle = 0,
42 FlagTypeNeedVar,
43 FlagTypeNeedSet,
44 FlagTypeSkipUnknown
45 } VAR_CHECK_FLAG_TYPE;
46
47 #define MACADDRMAXSIZE 32
48 #define PREFIXMAXLEN 16
49
50 typedef struct _IFCONFIG6_INTERFACE_CB {
51 EFI_HANDLE NicHandle;
52 LIST_ENTRY Link;
53 EFI_IP6_CONFIG_PROTOCOL *IfCfg;
54 EFI_IP6_CONFIG_INTERFACE_INFO *IfInfo;
55 EFI_IP6_CONFIG_INTERFACE_ID *IfId;
56 EFI_IP6_CONFIG_POLICY Policy;
57 EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS Xmits;
58 UINT32 DnsCnt;
59 EFI_IPv6_ADDRESS DnsAddr[1];
60 } IFCONFIG6_INTERFACE_CB;
61
62 typedef struct _ARG_LIST ARG_LIST;
63
64 struct _ARG_LIST {
65 ARG_LIST *Next;
66 CHAR16 *Arg;
67 };
68
69 typedef struct _IFCONFIG6_PRIVATE_DATA {
70 EFI_HANDLE ImageHandle;
71 LIST_ENTRY IfList;
72
73 UINT32 OpCode;
74 CHAR16 *IfName;
75 ARG_LIST *VarArg;
76 } IFCONFIG6_PRIVATE_DATA;
77
78 typedef struct _VAR_CHECK_ITEM{
79 CHAR16 *FlagStr;
80 UINT32 FlagID;
81 UINT32 ConflictMask;
82 VAR_CHECK_FLAG_TYPE FlagType;
83 } VAR_CHECK_ITEM;
84 #endif