Пример #1
0
func (bpf *BpfModule) TableIter() <-chan map[string]interface{} {
	ch := make(chan map[string]interface{})
	go func() {
		size := C.bpf_num_tables(bpf.p)
		for i := C.size_t(0); i < size; i++ {
			ch <- bpf.TableDesc(uint64(i))
		}
		close(ch)
	}()
	return ch
}
Пример #2
0
func (bpf *BpfModule) TableSize() uint64 {
	size := C.bpf_num_tables(bpf.p)
	return uint64(size)
}