github.com/aporeto-inc/trireme-lib@v10.358.0+incompatible/utils/cgnetcls/cgnetcls_windows.go (about) 1 // +build windows 2 3 package cgnetcls 4 5 import ( 6 "sync/atomic" 7 8 "go.aporeto.io/enforcerd/trireme-lib/utils/constants" 9 ) 10 11 type netCls struct { 12 } 13 14 var markval uint64 = constants.Initialmarkval 15 16 // MarkVal returns a new Mark Value 17 func MarkVal() uint64 { 18 return atomic.AddUint64(&markval, 1) 19 } 20 21 //Creategroup creates a cgroup/net_cls structure and writes the allocated classid to the file. 22 //To add a new process to this cgroup we need to write to the cgroup file 23 func (s *netCls) Creategroup(cgroupname string) error { 24 return nil 25 } 26 27 //AssignMark writes the mark value to net_cls.classid file. 28 func (s *netCls) AssignMark(cgroupname string, mark uint64) error { 29 return nil 30 } 31 32 // AssignRootMark assings the value at the root. 33 func (s *netCls) AssignRootMark(mark uint64) error { 34 return nil 35 } 36 37 //AddProcess adds the process to the net_cls group 38 func (s *netCls) AddProcess(cgroupname string, pid int) error { 39 return nil 40 } 41 42 //RemoveProcess removes the process from the cgroup by writing the pid to the 43 //top of net_cls cgroup cgroup.procs 44 func (s *netCls) RemoveProcess(cgroupname string, pid int) error { 45 return nil 46 } 47 48 // DeleteCgroup removes the cgroup 49 func (s *netCls) DeleteCgroup(cgroupname string) error { 50 return nil 51 } 52 53 func (s *netCls) Deletebasepath(contextID string) bool { 54 return true 55 } 56 57 func (s *netCls) GetCgroupList() { 58 59 } 60 61 // ListCgroupProcesses lists the processes of the cgroup 62 func (s *netCls) ListCgroupProcesses(cgroupname string) ([]string, error) { 63 return []string{}, nil 64 } 65 66 // ListAllCgroups returns a list of the cgroups that are managed in the Trireme path 67 func (s *netCls) ListAllCgroups(path string) []string { 68 return []string{} 69 } 70 71 //NewCgroupNetController returns a handle to call functions on the cgroup net_cls controller 72 func NewCgroupNetController(triremepath string, releasePath string) Cgroupnetcls { 73 return &netCls{} 74 } 75 76 //NewDockerCgroupNetController returns a handle to call functions on the cgroup net_cls controller 77 func NewDockerCgroupNetController() Cgroupnetcls { 78 return &netCls{} 79 } 80 81 // ConfigureNetClsPath does nothing for windows 82 func ConfigureNetClsPath(path string) { 83 }