summaryrefslogtreecommitdiffhomepage
path: root/table/policy.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/policy.go')
-rw-r--r--table/policy.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/table/policy.go b/table/policy.go
index 7ac8a6c3..1d055b57 100644
--- a/table/policy.go
+++ b/table/policy.go
@@ -56,6 +56,18 @@ const (
ROUTE_TYPE_REJECT
)
+func (t RouteType) String() string {
+ switch t {
+ case ROUTE_TYPE_NONE:
+ return "continue"
+ case ROUTE_TYPE_ACCEPT:
+ return "accept"
+ case ROUTE_TYPE_REJECT:
+ return "reject"
+ }
+ return fmt.Sprintf("unknown(%d)", t)
+}
+
type PolicyDirection int
const (