-
Notifications
You must be signed in to change notification settings - Fork 14
/
show.constants.ts
107 lines (105 loc) · 3.46 KB
/
show.constants.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/**
* Route routing tables.
* @category Constants
*/
export enum RouteRoutingTables {
/**
* The `local` table is a special routing table containing high priority control routes for local
* and broadcast addresses.
*/
Local = 'local',
/** The `main` table is the normal routing table containing all non-policy routes. */
Main = 'main',
/**
* The `default` table is empty.
* It is reserved for some post-processing if no previous default rules selected the packet.
*/
Default = 'default',
All = 'all',
Cache = 'cache'
}
/**
* Routing table protocols.
* @category Constants
*/
export enum RoutingTableProtocols {
/** The route was installed by the kernel during autoconfiguration. */
Kernel = 'kernel',
/**
* The route was installed during the bootup sequence.
* If a routing daemon starts, it will purge all of them.
*/
Boot = 'boot',
/**
* The route was installed by the administrator to override dynamic routing.
* Routing daemon will respect them and, probably, even advertise them to its peers.
*/
Static = 'static',
/** The route was installed due to an ICMP redirect. */
Redirect = 'redirect',
/** The route was installed by Router Discovery protocol. */
Ra = 'ra'
}
/**
* Route types.
* @category Constants
*/
export enum RouteTypes {
/** The route entry describes real paths to the destinations covered by the route prefix. */
Unicast = 'unicast',
/**
* Not implemented the destinations are anycast addresses assigned to this host.
* They are mainly equivalent to local with one difference: such addresses are invalid
* when used as the source address of any packet.
*/
Anycast = 'anycast',
/**
* The destinations are assigned to this host.
* The packets are looped back and delivered locally.
*/
Local = 'local',
/**
* The destinations are broadcast addresses.
* The packets are sent as link broadcasts.
*/
Broadcast = 'broadcast',
/**
* A special type used for multicast routing.
* It is not present in normal routing tables.
*/
Multicast = 'multicast',
/**
* A special control route used together with policy rules.
* If such a route is selected, lookup in this table is terminated pretending that no route was found.
* Without policy routing it is equivalent to the absence of the route in the routing table.
* The packets are dropped and the ICMP message net unreachable is generated.
* The local senders get an ENETUNREACH error.
*/
Throw = 'throw',
/**
* These destinations are unreachable.
* Packets are discarded and the ICMP message host unreachable is generated.
* The local senders get an EHOSTUNREACH error.
*/
Unreachable = 'unreachable',
/**
* These destinations are unreachable.
* Packets are discarded and the ICMP message communication administratively prohibited is generated.
* The local senders get an EACCES error.
*/
Prohibit = 'prohibit',
/**
* These destinations are unreachable.
* Packets are discarded silently.
* The local senders get an EINVAL error.
*/
Blackhole = 'blackhole',
/**
* A special NAT route.
* Destinations covered by the prefix are considered to be dummy (or external) addresses which require translation
* to real (or internal) ones before forwarding.
* The addresses to translate to are selected with the attribute via.
* Warning: Route NAT is no longer supported in Linux 2.6.
*/
Nat = 'nat'
}