From 177f1ceba557262b3f1c3aba4df93a29199fb4eb Mon Sep 17 00:00:00 2001 From: Trevor Rosen Date: Fri, 15 Sep 2017 15:12:01 -0500 Subject: [PATCH] Move consts to Linux-specific file Fixes #243 --- filter.go | 10 ---------- filter_linux.go | 8 ++++++++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/filter.go b/filter.go index 938b28b..1120c79 100644 --- a/filter.go +++ b/filter.go @@ -2,8 +2,6 @@ package netlink import ( "fmt" - - "github.com/vishvananda/netlink/nl" ) type Filter interface { @@ -184,14 +182,6 @@ func NewMirredAction(redirIndex int) *MirredAction { } } -// Constants used in TcU32Sel.Flags. -const ( - TC_U32_TERMINAL = nl.TC_U32_TERMINAL - TC_U32_OFFSET = nl.TC_U32_OFFSET - TC_U32_VAROFFSET = nl.TC_U32_VAROFFSET - TC_U32_EAT = nl.TC_U32_EAT -) - // Sel of the U32 filters that contains multiple TcU32Key. This is the copy // and the frontend representation of nl.TcU32Sel. It is serialized into canonical // nl.TcU32Sel with the appropriate endianness. diff --git a/filter_linux.go b/filter_linux.go index 8531122..5025bd5 100644 --- a/filter_linux.go +++ b/filter_linux.go @@ -11,6 +11,14 @@ import ( "github.com/vishvananda/netlink/nl" ) +// Constants used in TcU32Sel.Flags. +const ( + TC_U32_TERMINAL = nl.TC_U32_TERMINAL + TC_U32_OFFSET = nl.TC_U32_OFFSET + TC_U32_VAROFFSET = nl.TC_U32_VAROFFSET + TC_U32_EAT = nl.TC_U32_EAT +) + // Fw filter filters on firewall marks // NOTE: this is in filter_linux because it refers to nl.TcPolice which // is defined in nl/tc_linux.go