1 /*
2  * Project    : ipv6calc
3  * File       : ipv6calccommands.h
4  * Version    : $Id: 1c13437c8bbbe2f721df70a077ccd32f38a406b6 $
5  * Copyright  : 2002-2019 by Peter Bieringer <pb (at) bieringer.de>
6  * License    : GPLv2
7  *
8  * Information:
9  *  Header file containing commands for ipv6calc
10  */
11 
12 #ifndef _ipv6calccommands_h_
13 
14 #define _ipv6calccommands_h_
15 
16 /* verbose levels */
17 #define LEVEL_VERBOSE			0x1
18 #define LEVEL_VERBOSE2			0x2
19 
20 /* command values */
21 #define CMD_printhelp			0x0000001
22 #define CMD_printversion		0x0000002
23 #define CMD_printversion_verbose	0x0000020
24 #define CMD_printversion_verbose2	0x0000040
25 
26 #define CMD_printexamples		0x0000004
27 #define CMD_printoldoptions		0x0000008	// EOL 2014-04-02
28 
29 /* new style options */
30 #define CMD_inputtype			0x0200000
31 #define CMD_outputtype			0x0400000
32 #define CMD_actiontype			0x0800000
33 
34 
35 /* shortcut commands */
36 #define CMD_shortcut_start		0x0001010
37 #define CMD_addr_to_ip6int		0x0001010
38 #define CMD_addr_to_compressed		0x0001020
39 #define CMD_addr_to_uncompressed	0x0001030
40 #define CMD_addr_to_fulluncompressed	0x0001040
41 #define CMD_addr_to_ifinet6		0x0001050
42 #define CMD_addr_to_base85		0x0001060
43 #define CMD_addr_to_ip6arpa		0x0001070
44 #define CMD_addr_to_bitstring		0x0001080
45 #define CMD_ipv4_to_6to4addr		0x0001090
46 #define CMD_base85_to_addr		0x00010a0
47 #define CMD_mac_to_eui64		0x00010b0
48 #define CMD_eui64_to_privacy		0x00010c0
49 #define CMD_ifinet6_to_compressed	0x00010d0
50 #define CMD_addr_to_countrycode		0x00010e0
51 #define CMD_shortcut_end		0x00010e0
52 
53 #define CMD_showinfo			0x0010010
54 #define CMD_showinfotypes		0x0010020
55 
56 /* database options (old), EOS since 3.0.0 */
57 #define DB_EOS_ip2location_ipv4		0x0020010
58 #define DB_EOS_ip2location_ipv6		0x0020020
59 #define DB_EOS_ip2location_ipv4_default	0x0020030
60 #define DB_EOS_ip2location_ipv6_default	0x0020040
61 
62 // EOS since 3.0.0
63 #define DB_EOS_geoip_disable		0x0021000
64 #define DB_EOS_geoip_ipv4			0x0021010
65 #define DB_EOS_geoip_ipv6			0x0021020
66 #define DB_EOS_geoip_ipv4_default		0x0021030
67 #define DB_EOS_geoip_ipv6_default		0x0021040
68 #define DB_EOS_geoip_dir			0x0021050
69 #define DB_EOS_geoip_lib			0x0021060
70 
71 /* database options (new) */
72 #define DB_ip2location_disable		0x0020000
73 #define DB_ip2location_dir		0x0020050
74 #define DB_ip2location_lib		0x0020060
75 #define DB_ip2location_lite_to_sample_autoswitch_max_delta_months	0x0020100
76 #define DB_ip2location_comm_to_lite_switch_min_delta_months		0x0020110
77 #define DB_ip2location_only_type	0x0020120
78 #define DB_ip2location_allow_softlinks	0x0020130
79 
80 // EOS since 3.0.0
81 #define DB_EOS_dbip_disable			0x0022000
82 #define DB_EOS_dbip_dir			0x0022050
83 #define DB_EOS_dbip_comm_to_free_switch_min_delta_months		0x0022110
84 #define DB_EOS_dbip_only_type		0x0022120
85 
86 #define DB_external_disable		0x0023000
87 #define DB_external_dir			0x0023050
88 
89 #define DB_builtin_disable		0x0024000
90 
91 #define DB_mmdb_disable			0x0025000
92 #define DB_mmdb_lib			0x0025060
93 
94 #define DB_geoip2_disable		0x0026000
95 #define DB_geoip2_dir			0x0026050
96 
97 #define DB_dbip2_disable		0x0027000
98 #define DB_dbip2_dir			0x0027050
99 #define DB_dbip2_comm_to_free_switch_min_delta_months		0x0027110
100 #define DB_dbip2_only_type		0x0027120
101 
102 #define DB_common_priorization		0x002fff0
103 
104 
105 /* address anonymizer options */
106 #define CMD_ANON_PRESET_STANDARD	0x0030010
107 #define CMD_ANON_PRESET_CAREFUL		0x0030020
108 #define CMD_ANON_PRESET_PARANOID	0x0030030
109 #define CMD_ANON_METHOD_OPTION		0x00300e0
110 #define CMD_ANON_PRESET_OPTION		0x00300f0
111 #define CMD_ANON_MASK_IPV4		0x0030100
112 #define CMD_ANON_MASK_IPV6		0x0030110
113 #define CMD_ANON_MASK_EUI64		0x0030120
114 #define CMD_ANON_MASK_MAC		0x0030130
115 #define CMD_ANON_MASK_AUTOADJUST	0x0030180
116 #define CMD_ANON_MASK_IID		0x0030190	// deprecated
117 
118 /* 6rd options */
119 #define CMD_6rd_prefix			0x0040010
120 #define CMD_6rd_relay_prefix		0x0040020
121 #define CMD_6rd_prefixlength		0x0040030
122 
123 /* address test options */
124 #define CMD_test_prefix			0x0050010	// prefix
125 #define CMD_test_gt			0x0050020	// greater than
126 #define CMD_test_ge			0x0050030	// greater equal
127 #define CMD_test_lt			0x0050040	// less than
128 #define CMD_test_le			0x0050050	// less equal
129 
130 /* no operations (dummy) */
131 #define OPTION_NOOP			0xfffffff
132 
133 #endif
134