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