conntrack_unspecified.go 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // +build !linux
  2. package netlink
  3. // ConntrackTableType Conntrack table for the netlink operation
  4. type ConntrackTableType uint8
  5. // InetFamily Family type
  6. type InetFamily uint8
  7. // ConntrackFlow placeholder
  8. type ConntrackFlow struct{}
  9. // CustomConntrackFilter placeholder
  10. type CustomConntrackFilter struct{}
  11. // ConntrackFilter placeholder
  12. type ConntrackFilter struct{}
  13. // ConntrackTableList returns the flow list of a table of a specific family
  14. // conntrack -L [table] [options] List conntrack or expectation table
  15. func ConntrackTableList(table ConntrackTableType, family InetFamily) ([]*ConntrackFlow, error) {
  16. return nil, ErrNotImplemented
  17. }
  18. // ConntrackTableFlush flushes all the flows of a specified table
  19. // conntrack -F [table] Flush table
  20. // The flush operation applies to all the family types
  21. func ConntrackTableFlush(table ConntrackTableType) error {
  22. return ErrNotImplemented
  23. }
  24. // ConntrackDeleteFilter deletes entries on the specified table on the base of the filter
  25. // conntrack -D [table] parameters Delete conntrack or expectation
  26. //
  27. // Deprecated: use [ConntrackDeleteFilters] instead.
  28. func ConntrackDeleteFilter(table ConntrackTableType, family InetFamily, filter *ConntrackFilter) (uint, error) {
  29. return 0, ErrNotImplemented
  30. }
  31. // ConntrackDeleteFilters deletes entries on the specified table matching any of the specified filters
  32. // conntrack -D [table] parameters Delete conntrack or expectation
  33. func ConntrackDeleteFilters(table ConntrackTableType, family InetFamily, filters ...CustomConntrackFilter) (uint, error) {
  34. return 0, ErrNotImplemented
  35. }
  36. // ConntrackTableList returns the flow list of a table of a specific family using the netlink handle passed
  37. // conntrack -L [table] [options] List conntrack or expectation table
  38. func (h *Handle) ConntrackTableList(table ConntrackTableType, family InetFamily) ([]*ConntrackFlow, error) {
  39. return nil, ErrNotImplemented
  40. }
  41. // ConntrackTableFlush flushes all the flows of a specified table using the netlink handle passed
  42. // conntrack -F [table] Flush table
  43. // The flush operation applies to all the family types
  44. func (h *Handle) ConntrackTableFlush(table ConntrackTableType) error {
  45. return ErrNotImplemented
  46. }
  47. // ConntrackDeleteFilter deletes entries on the specified table on the base of the filter using the netlink handle passed
  48. // conntrack -D [table] parameters Delete conntrack or expectation
  49. //
  50. // Deprecated: use [Handle.ConntrackDeleteFilters] instead.
  51. func (h *Handle) ConntrackDeleteFilter(table ConntrackTableType, family InetFamily, filter *ConntrackFilter) (uint, error) {
  52. return 0, ErrNotImplemented
  53. }
  54. // ConntrackDeleteFilters deletes entries on the specified table matching any of the specified filters using the netlink handle passed
  55. // conntrack -D [table] parameters Delete conntrack or expectation
  56. func (h *Handle) ConntrackDeleteFilters(table ConntrackTableType, family InetFamily, filters ...CustomConntrackFilter) (uint, error) {
  57. return 0, ErrNotImplemented
  58. }