func (m *Monitor) createQdisc() error {
	// Create a Qdisc for the provided interface
	m.qdisc = &tc.Object{
		tc.Msg{
			Family:  unix.AF_UNSPEC,
			Ifindex: uint32(m.Ifindex),
			Handle:  tc.BuildHandle(0xFFFF, 0x0000),
			Parent:  0xFFFFFFF1,
			Info:    0,
		},
		tc.Attribute{
			Kind: "clsact",
		},
	}
	// Add the Qdisc
	if err := m.rtNetlink.Qdisc().Add(m.qdisc); err != nil {
		baseLogger.Errorf("couldn't add a \"clsact\" qdisc to interface %v: %v", m.Ifindex, err)
		return err
	}
	return nil
}
// createQdisc - Sets up a qdisc on the provided interface
Sets up a qdisc on the provided interface
// createQdisc - Sets up a qdisc on the provided interface
func (m *Monitor) createQdisc() error {
	m.qdisc = &tc.Object{
		tc.Msg{
			Family:  unix.AF_UNSPEC,
			Ifindex: uint32(m.Ifindex),
			Handle:  tc.BuildHandle(0xFFFF, 0x0000),
			Parent:  0xFFFFFFF1,
			Info:    0,
		},
		tc.Attribute{
			Kind: "clsact",
		},
	}
	if err := m.rtNetlink.Qdisc().Add(m.qdisc); err != nil {
		baseLogger.Errorf("couldn't add a \"clsact\" qdisc to interface %v: %v", m.Ifindex, err)
		return err
	}
	return nil
}
func ( m * Monitor ) createQdisc ( ) error { m . qdisc = & tc . Object { tc . Msg { Family : unix . AF_UNSPEC , Ifindex : uint32 ( m . Ifindex ) , Handle : tc . BuildHandle ( 0xFFFF , 0x0000 ) , Parent : 0xFFFFFFF1 , Info : 0 , } , tc . Attribute { Kind : " " , } , } if err := m . rtNetlink . Qdisc ( ) . Add ( m . qdisc ) ; err != nil { baseLogger . Errorf ( " \" \" " , m . Ifindex , err ) return err } return nil }
Sets up a qdisc on the provided interface
Sets up a qdisc on the provided interface
// Create a Qdisc for the provided interface // Add the Qdisc