iptables_windows.go 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright 2015 flannel authors
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package network
  15. import (
  16. "github.com/flannel-io/flannel/pkg/ip"
  17. "github.com/flannel-io/flannel/subnet"
  18. )
  19. type IPTables interface {
  20. AppendUnique(table string, chain string, rulespec ...string) error
  21. Delete(table string, chain string, rulespec ...string) error
  22. Exists(table string, chain string, rulespec ...string) (bool, error)
  23. }
  24. type IPTablesRule struct {
  25. table string
  26. chain string
  27. rulespec []string
  28. }
  29. func MasqRules(ipn ip.IP4Net, lease *subnet.Lease) []IPTablesRule { return nil }
  30. func ForwardRules(flannelNetwork string) []IPTablesRule { return nil }
  31. func SetupAndEnsureIPTables(rules []IPTablesRule, resyncPeriod int) {}
  32. func DeleteIPTables(rules []IPTablesRule) error { return nil }
  33. func teardownIPTables(ipt IPTables, rules []IPTablesRule) {}
  34. func SetupAndEnsureIP6Tables(rules []IPTablesRule, resyncPeriod int) {}
  35. func MasqIP6Rules(ipn ip.IP6Net, lease *subnet.Lease) []IPTablesRule { return nil }
  36. func DeleteIP6Tables(rules []IPTablesRule) error { return nil }