2020-01-27 18:04:07 +00:00
|
|
|
load("//tools:defs.bzl", "go_library", "go_test")
|
2019-10-16 23:27:55 +00:00
|
|
|
|
2019-06-27 21:23:29 +00:00
|
|
|
# Package linux contains the constants and types needed to interface with a
|
2018-04-27 17:37:02 +00:00
|
|
|
# Linux kernel. It should be used instead of syscall or golang.org/x/sys/unix
|
|
|
|
# when the host OS may not be Linux.
|
|
|
|
|
2019-01-31 19:11:44 +00:00
|
|
|
package(licenses = ["notice"])
|
2018-04-27 17:37:02 +00:00
|
|
|
|
|
|
|
go_library(
|
|
|
|
name = "linux",
|
|
|
|
srcs = [
|
|
|
|
"aio.go",
|
2018-12-04 20:22:48 +00:00
|
|
|
"audit.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"bpf.go",
|
|
|
|
"capability.go",
|
2019-07-09 23:16:46 +00:00
|
|
|
"clone.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"dev.go",
|
|
|
|
"elf.go",
|
2019-07-09 23:16:46 +00:00
|
|
|
"epoll.go",
|
2020-02-15 00:19:00 +00:00
|
|
|
"epoll_amd64.go",
|
|
|
|
"epoll_arm64.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"errors.go",
|
2018-07-16 19:19:02 +00:00
|
|
|
"eventfd.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"exec.go",
|
2018-06-21 17:52:33 +00:00
|
|
|
"fcntl.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"file.go",
|
2019-10-24 09:15:21 +00:00
|
|
|
"file_amd64.go",
|
|
|
|
"file_arm64.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"fs.go",
|
|
|
|
"futex.go",
|
|
|
|
"inotify.go",
|
|
|
|
"ioctl.go",
|
2020-02-21 23:41:56 +00:00
|
|
|
"ioctl_tun.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"ip.go",
|
|
|
|
"ipc.go",
|
|
|
|
"limits.go",
|
|
|
|
"linux.go",
|
|
|
|
"mm.go",
|
|
|
|
"netdevice.go",
|
2019-05-03 20:04:46 +00:00
|
|
|
"netfilter.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"netlink.go",
|
|
|
|
"netlink_route.go",
|
|
|
|
"poll.go",
|
|
|
|
"prctl.go",
|
2018-07-11 21:23:17 +00:00
|
|
|
"ptrace.go",
|
2020-01-06 19:41:13 +00:00
|
|
|
"rseq.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"rusage.go",
|
|
|
|
"sched.go",
|
|
|
|
"seccomp.go",
|
|
|
|
"sem.go",
|
2018-05-17 22:05:15 +00:00
|
|
|
"shm.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"signal.go",
|
2019-09-18 22:15:16 +00:00
|
|
|
"signalfd.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"socket.go",
|
2019-05-21 22:17:05 +00:00
|
|
|
"splice.go",
|
2018-11-19 23:25:00 +00:00
|
|
|
"tcp.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"time.go",
|
2018-10-01 21:15:52 +00:00
|
|
|
"timer.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"tty.go",
|
|
|
|
"uio.go",
|
|
|
|
"utsname.go",
|
2019-05-22 18:14:29 +00:00
|
|
|
"wait.go",
|
2019-12-16 21:18:36 +00:00
|
|
|
"xattr.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
],
|
2020-02-14 20:07:08 +00:00
|
|
|
marshal = True,
|
2018-04-27 17:37:02 +00:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
"//pkg/abi",
|
|
|
|
"//pkg/binary",
|
|
|
|
"//pkg/bits",
|
|
|
|
],
|
|
|
|
)
|
2019-07-23 00:05:02 +00:00
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "linux_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["netfilter_test.go"],
|
2020-01-27 18:04:07 +00:00
|
|
|
library = ":linux",
|
2019-07-23 00:05:02 +00:00
|
|
|
deps = [
|
|
|
|
"//pkg/binary",
|
|
|
|
],
|
|
|
|
)
|