Debian Codegraph @

nft/schema/chain.go

raw symbols SCIP
1 /*
2 * This file is part of the go-nft project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * Copyright 2021 Red Hat, Inc.
17 *
18 */
19
20 package schema
21
22 // Chain Types
23 const (
24 TypeFilter = "filter"
25 TypeNAT = "nat"
26 TypeRoute = "route"
27 )
28
29 // Chain Hooks
30 const (
31 HookPreRouting = "prerouting"
32 HookInput = "input"
33 HookOutput = "output"
34 HookForward = "forward"
35 HookPostRouting = "postrouting"
36 HookIngress = "ingress"
37 )
38
39 // Chain Policies
40 const (
41 PolicyAccept = "accept"
42 PolicyDrop = "drop"
43 )
44
45 type Chain struct {
46 Family string `json:"family"`
47 Table string `json:"table"`
48 Name string `json:"name"`
49 Type string `json:"type,omitempty"`
50 Hook string `json:"hook,omitempty"`
51 Prio *int `json:"prio,omitempty"`
52 Policy string `json:"policy,omitempty"`
53 }