-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtc_mac_and_win.go
More file actions
34 lines (25 loc) · 932 Bytes
/
Copy pathtc_mac_and_win.go
File metadata and controls
34 lines (25 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//go:build darwin || windows
// +build darwin windows
package tc_program
import (
"fmt"
"github.com/vishvananda/netlink"
)
func InitializeTCProgram() (*tc_programObjects, error) {
return nil, errNotSupportOnMac("InitializeTCProgram")
}
func AddClsactQdisc(attachTo string) (*netlink.GenericQdisc, error) {
return nil, errNotSupportOnMac("AddClsactQdisc")
}
func PrepareDropingRSTPacket(nwInterface string, objs *tc_programObjects) (*netlink.BpfFilter, error) {
return nil, errNotSupportOnMac("PrepareDropingRSTPacket")
}
func PrepareAnalyzingIngressPackets(nwInterface string, objs *tc_programObjects) (*netlink.BpfFilter, error) {
return nil, errNotSupportOnMac("PrepareAnalyzingIngressPackets")
}
func Close(ebpfProg *tc_programObjects, qdisc *netlink.GenericQdisc, filters ...*netlink.BpfFilter) error {
return nil
}
func errNotSupportOnMac(msg string) error {
return fmt.Errorf("not support on mac: %s", msg)
}