github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/pkg/tcpip/network/internal/fragmentation/BUILD (about) 1 load("//tools:defs.bzl", "go_library", "go_test") 2 load("//tools/go_generics:defs.bzl", "go_template_instance") 3 4 package(licenses = ["notice"]) 5 6 go_template_instance( 7 name = "reassembler_list", 8 out = "reassembler_list.go", 9 package = "fragmentation", 10 prefix = "reassembler", 11 template = "//pkg/ilist:generic_list", 12 types = { 13 "Element": "*reassembler", 14 "Linker": "*reassembler", 15 }, 16 ) 17 18 go_library( 19 name = "fragmentation", 20 srcs = [ 21 "fragmentation.go", 22 "reassembler.go", 23 "reassembler_list.go", 24 ], 25 visibility = [ 26 "//pkg/tcpip/network/ipv4:__pkg__", 27 "//pkg/tcpip/network/ipv6:__pkg__", 28 ], 29 deps = [ 30 "//pkg/log", 31 "//pkg/sync", 32 "//pkg/tcpip", 33 "//pkg/tcpip/buffer", 34 "//pkg/tcpip/header", 35 "//pkg/tcpip/stack", 36 ], 37 ) 38 39 go_test( 40 name = "fragmentation_test", 41 size = "small", 42 srcs = [ 43 "fragmentation_test.go", 44 "reassembler_test.go", 45 ], 46 library = ":fragmentation", 47 deps = [ 48 "//pkg/tcpip/buffer", 49 "//pkg/tcpip/faketime", 50 "//pkg/tcpip/network/internal/testutil", 51 "//pkg/tcpip/stack", 52 "@com_github_google_go_cmp//cmp:go_default_library", 53 ], 54 )