github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/pkg/tcpip/transport/icmp/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 = "icmp_packet_list", 8 out = "icmp_packet_list.go", 9 package = "icmp", 10 prefix = "icmpPacket", 11 template = "//pkg/ilist:generic_list", 12 types = { 13 "Element": "*icmpPacket", 14 "Linker": "*icmpPacket", 15 }, 16 ) 17 18 go_library( 19 name = "icmp", 20 srcs = [ 21 "endpoint.go", 22 "endpoint_state.go", 23 "icmp_packet_list.go", 24 "protocol.go", 25 ], 26 imports = ["gvisor.dev/gvisor/pkg/tcpip/buffer"], 27 visibility = ["//visibility:public"], 28 deps = [ 29 "//pkg/sleep", 30 "//pkg/sync", 31 "//pkg/tcpip", 32 "//pkg/tcpip/buffer", 33 "//pkg/tcpip/header", 34 "//pkg/tcpip/ports", 35 "//pkg/tcpip/stack", 36 "//pkg/tcpip/transport/raw", 37 "//pkg/tcpip/transport/tcp", 38 "//pkg/waiter", 39 ], 40 ) 41 42 go_test( 43 name = "icmp_x_test", 44 size = "small", 45 srcs = ["icmp_test.go"], 46 deps = [ 47 ":icmp", 48 "//pkg/tcpip", 49 "//pkg/tcpip/buffer", 50 "//pkg/tcpip/checker", 51 "//pkg/tcpip/header", 52 "//pkg/tcpip/link/channel", 53 "//pkg/tcpip/link/sniffer", 54 "//pkg/tcpip/network/ipv4", 55 "//pkg/tcpip/stack", 56 "//pkg/tcpip/testutil", 57 "//pkg/waiter", 58 ], 59 )