gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/tcpip/transport/tcp/BUILD (about) 1 load("//tools:defs.bzl", "go_library", "go_test") 2 load("//tools/go_generics:defs.bzl", "go_template_instance") 3 4 package( 5 default_applicable_licenses = ["//:license"], 6 licenses = ["notice"], 7 ) 8 9 go_template_instance( 10 name = "tcp_segment_list", 11 out = "tcp_segment_list.go", 12 package = "tcp", 13 prefix = "segment", 14 template = "//pkg/ilist:generic_list", 15 types = { 16 "Element": "*segment", 17 "Linker": "*segment", 18 }, 19 ) 20 21 go_template_instance( 22 name = "tcp_segment_refs", 23 out = "tcp_segment_refs.go", 24 package = "tcp", 25 prefix = "segment", 26 template = "//pkg/refs:refs_template", 27 types = { 28 "T": "segment", 29 }, 30 ) 31 32 go_template_instance( 33 name = "tcp_endpoint_list", 34 out = "tcp_endpoint_list.go", 35 package = "tcp", 36 prefix = "endpoint", 37 template = "//pkg/ilist:generic_list", 38 types = { 39 "Element": "*Endpoint", 40 "Linker": "*Endpoint", 41 }, 42 ) 43 44 go_library( 45 name = "tcp", 46 srcs = [ 47 "accept.go", 48 "connect.go", 49 "connect_unsafe.go", 50 "cubic.go", 51 "dispatcher.go", 52 "endpoint.go", 53 "endpoint_state.go", 54 "forwarder.go", 55 "protocol.go", 56 "rack.go", 57 "rcv.go", 58 "reno.go", 59 "reno_recovery.go", 60 "sack.go", 61 "sack_recovery.go", 62 "sack_scoreboard.go", 63 "segment.go", 64 "segment_heap.go", 65 "segment_queue.go", 66 "segment_state.go", 67 "segment_unsafe.go", 68 "snd.go", 69 "tcp_endpoint_list.go", 70 "tcp_segment_list.go", 71 "tcp_segment_refs.go", 72 "timer.go", 73 ], 74 visibility = ["//visibility:public"], 75 deps = [ 76 "//pkg/atomicbitops", 77 "//pkg/buffer", 78 "//pkg/log", 79 "//pkg/rand", 80 "//pkg/refs", 81 "//pkg/sleep", 82 "//pkg/sync", 83 "//pkg/tcpip", 84 "//pkg/tcpip/checksum", 85 "//pkg/tcpip/hash/jenkins", 86 "//pkg/tcpip/header", 87 "//pkg/tcpip/header/parse", 88 "//pkg/tcpip/internal/tcp", 89 "//pkg/tcpip/ports", 90 "//pkg/tcpip/seqnum", 91 "//pkg/tcpip/stack", 92 "//pkg/tcpip/transport/raw", 93 "//pkg/waiter", 94 "@com_github_google_btree//:go_default_library", 95 ], 96 ) 97 98 go_test( 99 name = "tcp_test", 100 size = "small", 101 srcs = [ 102 "cubic_test.go", 103 "main_test.go", 104 "segment_test.go", 105 "timer_test.go", 106 ], 107 library = ":tcp", 108 deps = [ 109 "//pkg/buffer", 110 "//pkg/refs", 111 "//pkg/sleep", 112 "//pkg/tcpip", 113 "//pkg/tcpip/faketime", 114 "//pkg/tcpip/seqnum", 115 "//pkg/tcpip/stack", 116 "@com_github_google_go_cmp//cmp:go_default_library", 117 ], 118 )