grpc 1.23.1 → 1.24.0.pre1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

Files changed (245) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +757 -477
  3. data/include/grpc/grpc.h +3 -1
  4. data/include/grpc/grpc_security.h +20 -4
  5. data/include/grpc/impl/codegen/grpc_types.h +6 -5
  6. data/include/grpc/impl/codegen/port_platform.h +25 -0
  7. data/src/core/ext/filters/client_channel/backend_metric.cc +78 -0
  8. data/src/core/ext/filters/client_channel/backend_metric.h +36 -0
  9. data/src/core/ext/filters/client_channel/channel_connectivity.cc +16 -2
  10. data/src/core/ext/filters/client_channel/client_channel.cc +325 -267
  11. data/src/core/ext/filters/client_channel/client_channel_factory.h +0 -4
  12. data/src/core/ext/filters/client_channel/health/health_check_client.cc +23 -32
  13. data/src/core/ext/filters/client_channel/http_proxy.cc +7 -3
  14. data/src/core/ext/filters/client_channel/lb_policy.cc +1 -1
  15. data/src/core/ext/filters/client_channel/lb_policy.h +58 -34
  16. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +46 -50
  17. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +9 -2
  18. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +35 -17
  19. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +130 -215
  20. data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +34 -21
  21. data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +1120 -802
  22. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel.h +8 -2
  23. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_secure.cc +33 -12
  24. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.cc +151 -40
  25. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_client_stats.h +184 -26
  26. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.cc +389 -245
  27. data/src/core/ext/filters/client_channel/lb_policy/xds/xds_load_balancer_api.h +98 -60
  28. data/src/core/ext/filters/client_channel/lb_policy_registry.cc +6 -1
  29. data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +89 -0
  30. data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +3 -8
  31. data/src/core/ext/filters/client_channel/server_address.cc +1 -3
  32. data/src/core/ext/filters/client_channel/server_address.h +1 -1
  33. data/src/core/ext/filters/client_channel/subchannel.h +2 -1
  34. data/src/core/ext/filters/client_idle/client_idle_filter.cc +207 -29
  35. data/src/core/ext/filters/http/client/http_client_filter.cc +10 -8
  36. data/src/core/ext/filters/http/client_authority_filter.cc +1 -1
  37. data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +10 -7
  38. data/src/core/ext/filters/http/server/http_server_filter.cc +52 -26
  39. data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +23 -20
  40. data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +24 -21
  41. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +1 -1
  42. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +37 -24
  43. data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +1 -0
  44. data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +237 -191
  45. data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +29 -27
  46. data/src/core/ext/transport/chttp2/transport/hpack_parser.h +1 -1
  47. data/src/core/ext/transport/chttp2/transport/hpack_table.cc +19 -4
  48. data/src/core/ext/transport/chttp2/transport/hpack_table.h +13 -4
  49. data/src/core/ext/transport/chttp2/transport/incoming_metadata.cc +2 -1
  50. data/src/core/ext/transport/chttp2/transport/internal.h +0 -2
  51. data/src/core/ext/transport/chttp2/transport/parsing.cc +99 -71
  52. data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +222 -0
  53. data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +818 -0
  54. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +314 -0
  55. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +1142 -0
  56. data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +53 -0
  57. data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +158 -0
  58. data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +34 -0
  59. data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h +69 -0
  60. data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +49 -0
  61. data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +240 -0
  62. data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +110 -0
  63. data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +324 -0
  64. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +235 -0
  65. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +661 -0
  66. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +84 -0
  67. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +274 -0
  68. data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +175 -0
  69. data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +572 -0
  70. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +150 -0
  71. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +596 -0
  72. data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +35 -0
  73. data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +80 -0
  74. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +95 -0
  75. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +308 -0
  76. data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +128 -0
  77. data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h +392 -0
  78. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +91 -0
  79. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +236 -0
  80. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +88 -0
  81. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +258 -0
  82. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +111 -0
  83. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h +324 -0
  84. data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c +23 -0
  85. data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h +50 -0
  86. data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c +52 -0
  87. data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h +130 -0
  88. data/src/core/ext/upb-generated/envoy/type/percent.upb.c +39 -0
  89. data/src/core/ext/upb-generated/envoy/type/percent.upb.h +87 -0
  90. data/src/core/ext/upb-generated/envoy/type/range.upb.c +39 -0
  91. data/src/core/ext/upb-generated/envoy/type/range.upb.h +85 -0
  92. data/src/core/ext/upb-generated/gogoproto/gogo.upb.c +17 -0
  93. data/src/core/ext/upb-generated/gogoproto/gogo.upb.h +30 -0
  94. data/src/core/ext/upb-generated/google/api/annotations.upb.c +18 -0
  95. data/src/core/ext/upb-generated/google/api/annotations.upb.h +30 -0
  96. data/src/core/ext/upb-generated/google/api/http.upb.c +66 -0
  97. data/src/core/ext/upb-generated/google/api/http.upb.h +190 -0
  98. data/src/core/ext/upb-generated/google/protobuf/any.upb.c +27 -0
  99. data/src/core/ext/upb-generated/google/protobuf/any.upb.h +58 -0
  100. data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +485 -0
  101. data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +1690 -0
  102. data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +27 -0
  103. data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +58 -0
  104. data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +22 -0
  105. data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +50 -0
  106. data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +79 -0
  107. data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +215 -0
  108. data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +27 -0
  109. data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +58 -0
  110. data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +106 -0
  111. data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +238 -0
  112. data/src/core/ext/upb-generated/google/rpc/status.upb.c +33 -0
  113. data/src/core/ext/upb-generated/google/rpc/status.upb.h +74 -0
  114. data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +49 -0
  115. data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +126 -0
  116. data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +209 -0
  117. data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +681 -0
  118. data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +42 -0
  119. data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +109 -0
  120. data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +36 -0
  121. data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +84 -0
  122. data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +133 -0
  123. data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +359 -0
  124. data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +58 -0
  125. data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h +144 -0
  126. data/src/core/ext/upb-generated/validate/validate.upb.c +443 -0
  127. data/src/core/ext/upb-generated/validate/validate.upb.h +2037 -0
  128. data/src/core/lib/channel/channel_args.cc +21 -0
  129. data/src/core/lib/channel/channel_args.h +16 -2
  130. data/src/core/lib/channel/channel_stack.h +2 -1
  131. data/src/core/lib/channel/channelz.cc +54 -56
  132. data/src/core/lib/channel/channelz.h +29 -12
  133. data/src/core/lib/compression/compression.cc +2 -1
  134. data/src/core/lib/compression/compression_internal.h +8 -0
  135. data/src/core/lib/gpr/log_linux.cc +2 -2
  136. data/src/core/lib/gpr/log_posix.cc +2 -2
  137. data/src/core/lib/gpr/time_precise.cc +123 -36
  138. data/src/core/lib/gpr/time_precise.h +37 -0
  139. data/src/core/lib/gprpp/abstract.h +10 -0
  140. data/src/core/lib/gprpp/atomic.h +4 -0
  141. data/src/core/lib/gprpp/inlined_vector.h +20 -4
  142. data/src/core/lib/gprpp/map.h +109 -6
  143. data/src/core/lib/gprpp/memory.h +6 -0
  144. data/src/core/lib/gprpp/ref_counted_ptr.h +2 -0
  145. data/src/core/lib/iomgr/ev_epollex_linux.cc +29 -54
  146. data/src/core/lib/iomgr/exec_ctx.cc +27 -17
  147. data/src/core/lib/iomgr/exec_ctx.h +3 -0
  148. data/src/core/lib/iomgr/sockaddr_utils.cc +1 -3
  149. data/src/core/lib/iomgr/tcp_posix.cc +16 -25
  150. data/src/core/lib/iomgr/tcp_server_custom.cc +1 -1
  151. data/src/core/lib/iomgr/timer_manager.cc +8 -1
  152. data/src/core/lib/iomgr/timer_manager.h +2 -0
  153. data/src/core/lib/security/credentials/credentials.h +8 -2
  154. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +23 -0
  155. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +3 -0
  156. data/src/core/lib/security/credentials/tls/spiffe_credentials.cc +3 -3
  157. data/src/core/lib/security/security_connector/ssl_utils.cc +1 -12
  158. data/src/core/lib/security/security_connector/ssl_utils.h +10 -6
  159. data/src/core/lib/security/security_connector/ssl_utils_config.cc +32 -0
  160. data/src/core/lib/security/security_connector/ssl_utils_config.h +30 -0
  161. data/src/core/lib/security/security_connector/tls/spiffe_security_connector.cc +161 -49
  162. data/src/core/lib/security/security_connector/tls/spiffe_security_connector.h +34 -1
  163. data/src/core/lib/slice/slice_intern.cc +17 -9
  164. data/src/core/lib/slice/slice_internal.h +34 -7
  165. data/src/core/lib/slice/slice_utils.h +7 -3
  166. data/src/core/lib/surface/call.cc +97 -57
  167. data/src/core/lib/surface/channel.cc +2 -2
  168. data/src/core/lib/surface/completion_queue.cc +10 -16
  169. data/src/core/lib/surface/init.cc +3 -0
  170. data/src/core/lib/surface/server.cc +11 -14
  171. data/src/core/lib/surface/validate_metadata.cc +4 -0
  172. data/src/core/lib/surface/version.cc +2 -2
  173. data/src/core/lib/transport/metadata.cc +4 -4
  174. data/src/core/lib/transport/metadata_batch.cc +72 -16
  175. data/src/core/lib/transport/metadata_batch.h +38 -0
  176. data/src/core/lib/transport/static_metadata.cc +814 -1023
  177. data/src/core/lib/transport/static_metadata.h +271 -213
  178. data/src/core/lib/transport/transport.h +12 -0
  179. data/src/core/plugin_registry/grpc_plugin_registry.cc +4 -0
  180. data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +104 -76
  181. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +34 -16
  182. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +2 -2
  183. data/src/core/tsi/alts/handshaker/alts_tsi_utils.cc +10 -6
  184. data/src/core/tsi/alts/handshaker/alts_tsi_utils.h +4 -3
  185. data/src/core/tsi/alts/handshaker/transport_security_common_api.cc +74 -48
  186. data/src/core/tsi/alts/handshaker/transport_security_common_api.h +34 -26
  187. data/src/core/tsi/ssl_transport_security.cc +14 -6
  188. data/src/core/tsi/ssl_transport_security.h +4 -0
  189. data/src/ruby/ext/grpc/ext-export.clang +1 -0
  190. data/src/ruby/ext/grpc/ext-export.gcc +6 -0
  191. data/src/ruby/ext/grpc/extconf.rb +5 -0
  192. data/src/ruby/ext/grpc/rb_enable_cpp.cc +22 -0
  193. data/src/ruby/ext/grpc/rb_grpc.c +1 -42
  194. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +4 -0
  195. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +6 -0
  196. data/src/ruby/lib/grpc.rb +2 -0
  197. data/src/ruby/lib/grpc/core/status_codes.rb +135 -0
  198. data/src/ruby/lib/grpc/errors.rb +4 -7
  199. data/src/ruby/lib/grpc/google_rpc_status_utils.rb +9 -4
  200. data/src/ruby/lib/grpc/structs.rb +15 -0
  201. data/src/ruby/lib/grpc/version.rb +1 -1
  202. data/src/ruby/spec/errors_spec.rb +1 -0
  203. data/src/ruby/spec/pb/codegen/grpc/testing/package_options_import.proto +22 -0
  204. data/src/ruby/spec/pb/codegen/grpc/testing/package_options_ruby_style.proto +34 -0
  205. data/src/ruby/spec/pb/codegen/package_option_spec.rb +53 -29
  206. data/third_party/upb/upb/decode.c +604 -0
  207. data/third_party/upb/upb/decode.h +21 -0
  208. data/third_party/upb/upb/encode.c +378 -0
  209. data/third_party/upb/upb/encode.h +21 -0
  210. data/third_party/upb/upb/generated_util.h +105 -0
  211. data/third_party/upb/upb/msg.c +111 -0
  212. data/third_party/upb/upb/msg.h +69 -0
  213. data/third_party/upb/upb/port.c +27 -0
  214. data/third_party/upb/upb/port_def.inc +152 -0
  215. data/third_party/upb/upb/port_undef.inc +21 -0
  216. data/third_party/upb/upb/table.c +911 -0
  217. data/third_party/upb/upb/table.int.h +507 -0
  218. data/third_party/upb/upb/upb.c +261 -0
  219. data/third_party/upb/upb/upb.h +364 -0
  220. metadata +134 -55
  221. data/src/core/ext/filters/client_channel/health/health.pb.c +0 -23
  222. data/src/core/ext/filters/client_channel/health/health.pb.h +0 -73
  223. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.c +0 -19
  224. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/duration.pb.h +0 -54
  225. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.c +0 -19
  226. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/google/protobuf/timestamp.pb.h +0 -54
  227. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c +0 -89
  228. data/src/core/ext/filters/client_channel/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h +0 -164
  229. data/src/core/tsi/alts/handshaker/alts_handshaker_service_api.cc +0 -520
  230. data/src/core/tsi/alts/handshaker/alts_handshaker_service_api.h +0 -323
  231. data/src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.cc +0 -145
  232. data/src/core/tsi/alts/handshaker/alts_handshaker_service_api_util.h +0 -149
  233. data/src/core/tsi/alts/handshaker/altscontext.pb.c +0 -47
  234. data/src/core/tsi/alts/handshaker/altscontext.pb.h +0 -63
  235. data/src/core/tsi/alts/handshaker/handshaker.pb.c +0 -122
  236. data/src/core/tsi/alts/handshaker/handshaker.pb.h +0 -254
  237. data/src/core/tsi/alts/handshaker/transport_security_common.pb.c +0 -49
  238. data/src/core/tsi/alts/handshaker/transport_security_common.pb.h +0 -78
  239. data/third_party/nanopb/pb.h +0 -579
  240. data/third_party/nanopb/pb_common.c +0 -97
  241. data/third_party/nanopb/pb_common.h +0 -42
  242. data/third_party/nanopb/pb_decode.c +0 -1347
  243. data/third_party/nanopb/pb_decode.h +0 -149
  244. data/third_party/nanopb/pb_encode.c +0 -696
  245. data/third_party/nanopb/pb_encode.h +0 -154
@@ -0,0 +1,110 @@
1
+ /* This file was generated by upbc (the upb compiler) from the input
2
+ * file:
3
+ *
4
+ * envoy/api/v2/core/address.proto
5
+ *
6
+ * Do not edit -- your changes will be discarded when the file is
7
+ * regenerated. */
8
+
9
+ #include <stddef.h>
10
+ #include "upb/msg.h"
11
+ #include "envoy/api/v2/core/address.upb.h"
12
+ #include "envoy/api/v2/core/base.upb.h"
13
+ #include "google/protobuf/wrappers.upb.h"
14
+ #include "validate/validate.upb.h"
15
+ #include "gogoproto/gogo.upb.h"
16
+
17
+ #include "upb/port_def.inc"
18
+
19
+ static const upb_msglayout_field envoy_api_v2_core_Pipe__fields[1] = {
20
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
21
+ };
22
+
23
+ const upb_msglayout envoy_api_v2_core_Pipe_msginit = {
24
+ NULL,
25
+ &envoy_api_v2_core_Pipe__fields[0],
26
+ UPB_SIZE(8, 16), 1, false,
27
+ };
28
+
29
+ static const upb_msglayout_field envoy_api_v2_core_SocketAddress__fields[6] = {
30
+ {1, UPB_SIZE(0, 0), 0, 0, 14, 1},
31
+ {2, UPB_SIZE(12, 16), 0, 0, 9, 1},
32
+ {3, UPB_SIZE(28, 48), UPB_SIZE(-37, -65), 0, 13, 1},
33
+ {4, UPB_SIZE(28, 48), UPB_SIZE(-37, -65), 0, 9, 1},
34
+ {5, UPB_SIZE(20, 32), 0, 0, 9, 1},
35
+ {6, UPB_SIZE(8, 8), 0, 0, 8, 1},
36
+ };
37
+
38
+ const upb_msglayout envoy_api_v2_core_SocketAddress_msginit = {
39
+ NULL,
40
+ &envoy_api_v2_core_SocketAddress__fields[0],
41
+ UPB_SIZE(40, 80), 6, false,
42
+ };
43
+
44
+ static const upb_msglayout *const envoy_api_v2_core_TcpKeepalive_submsgs[3] = {
45
+ &google_protobuf_UInt32Value_msginit,
46
+ };
47
+
48
+ static const upb_msglayout_field envoy_api_v2_core_TcpKeepalive__fields[3] = {
49
+ {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
50
+ {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
51
+ {3, UPB_SIZE(8, 16), 0, 0, 11, 1},
52
+ };
53
+
54
+ const upb_msglayout envoy_api_v2_core_TcpKeepalive_msginit = {
55
+ &envoy_api_v2_core_TcpKeepalive_submsgs[0],
56
+ &envoy_api_v2_core_TcpKeepalive__fields[0],
57
+ UPB_SIZE(12, 24), 3, false,
58
+ };
59
+
60
+ static const upb_msglayout *const envoy_api_v2_core_BindConfig_submsgs[3] = {
61
+ &envoy_api_v2_core_SocketAddress_msginit,
62
+ &envoy_api_v2_core_SocketOption_msginit,
63
+ &google_protobuf_BoolValue_msginit,
64
+ };
65
+
66
+ static const upb_msglayout_field envoy_api_v2_core_BindConfig__fields[3] = {
67
+ {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
68
+ {2, UPB_SIZE(4, 8), 0, 2, 11, 1},
69
+ {3, UPB_SIZE(8, 16), 0, 1, 11, 3},
70
+ };
71
+
72
+ const upb_msglayout envoy_api_v2_core_BindConfig_msginit = {
73
+ &envoy_api_v2_core_BindConfig_submsgs[0],
74
+ &envoy_api_v2_core_BindConfig__fields[0],
75
+ UPB_SIZE(12, 24), 3, false,
76
+ };
77
+
78
+ static const upb_msglayout *const envoy_api_v2_core_Address_submsgs[2] = {
79
+ &envoy_api_v2_core_Pipe_msginit,
80
+ &envoy_api_v2_core_SocketAddress_msginit,
81
+ };
82
+
83
+ static const upb_msglayout_field envoy_api_v2_core_Address__fields[2] = {
84
+ {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1},
85
+ {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
86
+ };
87
+
88
+ const upb_msglayout envoy_api_v2_core_Address_msginit = {
89
+ &envoy_api_v2_core_Address_submsgs[0],
90
+ &envoy_api_v2_core_Address__fields[0],
91
+ UPB_SIZE(8, 16), 2, false,
92
+ };
93
+
94
+ static const upb_msglayout *const envoy_api_v2_core_CidrRange_submsgs[1] = {
95
+ &google_protobuf_UInt32Value_msginit,
96
+ };
97
+
98
+ static const upb_msglayout_field envoy_api_v2_core_CidrRange__fields[2] = {
99
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
100
+ {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
101
+ };
102
+
103
+ const upb_msglayout envoy_api_v2_core_CidrRange_msginit = {
104
+ &envoy_api_v2_core_CidrRange_submsgs[0],
105
+ &envoy_api_v2_core_CidrRange__fields[0],
106
+ UPB_SIZE(16, 32), 2, false,
107
+ };
108
+
109
+ #include "upb/port_undef.inc"
110
+
@@ -0,0 +1,324 @@
1
+ /* This file was generated by upbc (the upb compiler) from the input
2
+ * file:
3
+ *
4
+ * envoy/api/v2/core/address.proto
5
+ *
6
+ * Do not edit -- your changes will be discarded when the file is
7
+ * regenerated. */
8
+
9
+ #ifndef ENVOY_API_V2_CORE_ADDRESS_PROTO_UPB_H_
10
+ #define ENVOY_API_V2_CORE_ADDRESS_PROTO_UPB_H_
11
+
12
+ #include "upb/generated_util.h"
13
+ #include "upb/msg.h"
14
+ #include "upb/decode.h"
15
+ #include "upb/encode.h"
16
+
17
+ #include "upb/port_def.inc"
18
+
19
+ #ifdef __cplusplus
20
+ extern "C" {
21
+ #endif
22
+
23
+ struct envoy_api_v2_core_Pipe;
24
+ struct envoy_api_v2_core_SocketAddress;
25
+ struct envoy_api_v2_core_TcpKeepalive;
26
+ struct envoy_api_v2_core_BindConfig;
27
+ struct envoy_api_v2_core_Address;
28
+ struct envoy_api_v2_core_CidrRange;
29
+ typedef struct envoy_api_v2_core_Pipe envoy_api_v2_core_Pipe;
30
+ typedef struct envoy_api_v2_core_SocketAddress envoy_api_v2_core_SocketAddress;
31
+ typedef struct envoy_api_v2_core_TcpKeepalive envoy_api_v2_core_TcpKeepalive;
32
+ typedef struct envoy_api_v2_core_BindConfig envoy_api_v2_core_BindConfig;
33
+ typedef struct envoy_api_v2_core_Address envoy_api_v2_core_Address;
34
+ typedef struct envoy_api_v2_core_CidrRange envoy_api_v2_core_CidrRange;
35
+ extern const upb_msglayout envoy_api_v2_core_Pipe_msginit;
36
+ extern const upb_msglayout envoy_api_v2_core_SocketAddress_msginit;
37
+ extern const upb_msglayout envoy_api_v2_core_TcpKeepalive_msginit;
38
+ extern const upb_msglayout envoy_api_v2_core_BindConfig_msginit;
39
+ extern const upb_msglayout envoy_api_v2_core_Address_msginit;
40
+ extern const upb_msglayout envoy_api_v2_core_CidrRange_msginit;
41
+ struct envoy_api_v2_core_SocketOption;
42
+ struct google_protobuf_BoolValue;
43
+ struct google_protobuf_UInt32Value;
44
+ extern const upb_msglayout envoy_api_v2_core_SocketOption_msginit;
45
+ extern const upb_msglayout google_protobuf_BoolValue_msginit;
46
+ extern const upb_msglayout google_protobuf_UInt32Value_msginit;
47
+
48
+ typedef enum {
49
+ envoy_api_v2_core_SocketAddress_TCP = 0,
50
+ envoy_api_v2_core_SocketAddress_UDP = 1
51
+ } envoy_api_v2_core_SocketAddress_Protocol;
52
+
53
+
54
+ /* envoy.api.v2.core.Pipe */
55
+
56
+ UPB_INLINE envoy_api_v2_core_Pipe *envoy_api_v2_core_Pipe_new(upb_arena *arena) {
57
+ return (envoy_api_v2_core_Pipe *)upb_msg_new(&envoy_api_v2_core_Pipe_msginit, arena);
58
+ }
59
+ UPB_INLINE envoy_api_v2_core_Pipe *envoy_api_v2_core_Pipe_parse(const char *buf, size_t size,
60
+ upb_arena *arena) {
61
+ envoy_api_v2_core_Pipe *ret = envoy_api_v2_core_Pipe_new(arena);
62
+ return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_Pipe_msginit, arena)) ? ret : NULL;
63
+ }
64
+ UPB_INLINE char *envoy_api_v2_core_Pipe_serialize(const envoy_api_v2_core_Pipe *msg, upb_arena *arena, size_t *len) {
65
+ return upb_encode(msg, &envoy_api_v2_core_Pipe_msginit, arena, len);
66
+ }
67
+
68
+ UPB_INLINE upb_strview envoy_api_v2_core_Pipe_path(const envoy_api_v2_core_Pipe *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
69
+
70
+ UPB_INLINE void envoy_api_v2_core_Pipe_set_path(envoy_api_v2_core_Pipe *msg, upb_strview value) {
71
+ UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
72
+ }
73
+
74
+ /* envoy.api.v2.core.SocketAddress */
75
+
76
+ UPB_INLINE envoy_api_v2_core_SocketAddress *envoy_api_v2_core_SocketAddress_new(upb_arena *arena) {
77
+ return (envoy_api_v2_core_SocketAddress *)upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena);
78
+ }
79
+ UPB_INLINE envoy_api_v2_core_SocketAddress *envoy_api_v2_core_SocketAddress_parse(const char *buf, size_t size,
80
+ upb_arena *arena) {
81
+ envoy_api_v2_core_SocketAddress *ret = envoy_api_v2_core_SocketAddress_new(arena);
82
+ return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_SocketAddress_msginit, arena)) ? ret : NULL;
83
+ }
84
+ UPB_INLINE char *envoy_api_v2_core_SocketAddress_serialize(const envoy_api_v2_core_SocketAddress *msg, upb_arena *arena, size_t *len) {
85
+ return upb_encode(msg, &envoy_api_v2_core_SocketAddress_msginit, arena, len);
86
+ }
87
+
88
+ typedef enum {
89
+ envoy_api_v2_core_SocketAddress_port_specifier_port_value = 3,
90
+ envoy_api_v2_core_SocketAddress_port_specifier_named_port = 4,
91
+ envoy_api_v2_core_SocketAddress_port_specifier_NOT_SET = 0
92
+ } envoy_api_v2_core_SocketAddress_port_specifier_oneofcases;
93
+ UPB_INLINE envoy_api_v2_core_SocketAddress_port_specifier_oneofcases envoy_api_v2_core_SocketAddress_port_specifier_case(const envoy_api_v2_core_SocketAddress* msg) { return (envoy_api_v2_core_SocketAddress_port_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(36, 64)); }
94
+
95
+ UPB_INLINE int32_t envoy_api_v2_core_SocketAddress_protocol(const envoy_api_v2_core_SocketAddress *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); }
96
+ UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_address(const envoy_api_v2_core_SocketAddress *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)); }
97
+ UPB_INLINE bool envoy_api_v2_core_SocketAddress_has_port_value(const envoy_api_v2_core_SocketAddress *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 64), 3); }
98
+ UPB_INLINE uint32_t envoy_api_v2_core_SocketAddress_port_value(const envoy_api_v2_core_SocketAddress *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(28, 48), UPB_SIZE(36, 64), 3, 0); }
99
+ UPB_INLINE bool envoy_api_v2_core_SocketAddress_has_named_port(const envoy_api_v2_core_SocketAddress *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 64), 4); }
100
+ UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_named_port(const envoy_api_v2_core_SocketAddress *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 48), UPB_SIZE(36, 64), 4, upb_strview_make("", strlen(""))); }
101
+ UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_resolver_name(const envoy_api_v2_core_SocketAddress *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 32)); }
102
+ UPB_INLINE bool envoy_api_v2_core_SocketAddress_ipv4_compat(const envoy_api_v2_core_SocketAddress *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); }
103
+
104
+ UPB_INLINE void envoy_api_v2_core_SocketAddress_set_protocol(envoy_api_v2_core_SocketAddress *msg, int32_t value) {
105
+ UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value;
106
+ }
107
+ UPB_INLINE void envoy_api_v2_core_SocketAddress_set_address(envoy_api_v2_core_SocketAddress *msg, upb_strview value) {
108
+ UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value;
109
+ }
110
+ UPB_INLINE void envoy_api_v2_core_SocketAddress_set_port_value(envoy_api_v2_core_SocketAddress *msg, uint32_t value) {
111
+ UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(28, 48), value, UPB_SIZE(36, 64), 3);
112
+ }
113
+ UPB_INLINE void envoy_api_v2_core_SocketAddress_set_named_port(envoy_api_v2_core_SocketAddress *msg, upb_strview value) {
114
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 48), value, UPB_SIZE(36, 64), 4);
115
+ }
116
+ UPB_INLINE void envoy_api_v2_core_SocketAddress_set_resolver_name(envoy_api_v2_core_SocketAddress *msg, upb_strview value) {
117
+ UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 32)) = value;
118
+ }
119
+ UPB_INLINE void envoy_api_v2_core_SocketAddress_set_ipv4_compat(envoy_api_v2_core_SocketAddress *msg, bool value) {
120
+ UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value;
121
+ }
122
+
123
+ /* envoy.api.v2.core.TcpKeepalive */
124
+
125
+ UPB_INLINE envoy_api_v2_core_TcpKeepalive *envoy_api_v2_core_TcpKeepalive_new(upb_arena *arena) {
126
+ return (envoy_api_v2_core_TcpKeepalive *)upb_msg_new(&envoy_api_v2_core_TcpKeepalive_msginit, arena);
127
+ }
128
+ UPB_INLINE envoy_api_v2_core_TcpKeepalive *envoy_api_v2_core_TcpKeepalive_parse(const char *buf, size_t size,
129
+ upb_arena *arena) {
130
+ envoy_api_v2_core_TcpKeepalive *ret = envoy_api_v2_core_TcpKeepalive_new(arena);
131
+ return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_TcpKeepalive_msginit, arena)) ? ret : NULL;
132
+ }
133
+ UPB_INLINE char *envoy_api_v2_core_TcpKeepalive_serialize(const envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena, size_t *len) {
134
+ return upb_encode(msg, &envoy_api_v2_core_TcpKeepalive_msginit, arena, len);
135
+ }
136
+
137
+ UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_probes(const envoy_api_v2_core_TcpKeepalive *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)); }
138
+ UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_time(const envoy_api_v2_core_TcpKeepalive *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)); }
139
+ UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_interval(const envoy_api_v2_core_TcpKeepalive *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)); }
140
+
141
+ UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_probes(envoy_api_v2_core_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
142
+ UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)) = value;
143
+ }
144
+ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_probes(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) {
145
+ struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_probes(msg);
146
+ if (sub == NULL) {
147
+ sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
148
+ if (!sub) return NULL;
149
+ envoy_api_v2_core_TcpKeepalive_set_keepalive_probes(msg, sub);
150
+ }
151
+ return sub;
152
+ }
153
+ UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_time(envoy_api_v2_core_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
154
+ UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value;
155
+ }
156
+ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_time(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) {
157
+ struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_time(msg);
158
+ if (sub == NULL) {
159
+ sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
160
+ if (!sub) return NULL;
161
+ envoy_api_v2_core_TcpKeepalive_set_keepalive_time(msg, sub);
162
+ }
163
+ return sub;
164
+ }
165
+ UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_interval(envoy_api_v2_core_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
166
+ UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)) = value;
167
+ }
168
+ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_interval(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) {
169
+ struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_interval(msg);
170
+ if (sub == NULL) {
171
+ sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
172
+ if (!sub) return NULL;
173
+ envoy_api_v2_core_TcpKeepalive_set_keepalive_interval(msg, sub);
174
+ }
175
+ return sub;
176
+ }
177
+
178
+ /* envoy.api.v2.core.BindConfig */
179
+
180
+ UPB_INLINE envoy_api_v2_core_BindConfig *envoy_api_v2_core_BindConfig_new(upb_arena *arena) {
181
+ return (envoy_api_v2_core_BindConfig *)upb_msg_new(&envoy_api_v2_core_BindConfig_msginit, arena);
182
+ }
183
+ UPB_INLINE envoy_api_v2_core_BindConfig *envoy_api_v2_core_BindConfig_parse(const char *buf, size_t size,
184
+ upb_arena *arena) {
185
+ envoy_api_v2_core_BindConfig *ret = envoy_api_v2_core_BindConfig_new(arena);
186
+ return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_BindConfig_msginit, arena)) ? ret : NULL;
187
+ }
188
+ UPB_INLINE char *envoy_api_v2_core_BindConfig_serialize(const envoy_api_v2_core_BindConfig *msg, upb_arena *arena, size_t *len) {
189
+ return upb_encode(msg, &envoy_api_v2_core_BindConfig_msginit, arena, len);
190
+ }
191
+
192
+ UPB_INLINE const envoy_api_v2_core_SocketAddress* envoy_api_v2_core_BindConfig_source_address(const envoy_api_v2_core_BindConfig *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0)); }
193
+ UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_BindConfig_freebind(const envoy_api_v2_core_BindConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)); }
194
+ UPB_INLINE const struct envoy_api_v2_core_SocketOption* const* envoy_api_v2_core_BindConfig_socket_options(const envoy_api_v2_core_BindConfig *msg, size_t *len) { return (const struct envoy_api_v2_core_SocketOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
195
+
196
+ UPB_INLINE void envoy_api_v2_core_BindConfig_set_source_address(envoy_api_v2_core_BindConfig *msg, envoy_api_v2_core_SocketAddress* value) {
197
+ UPB_FIELD_AT(msg, envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0)) = value;
198
+ }
199
+ UPB_INLINE struct envoy_api_v2_core_SocketAddress* envoy_api_v2_core_BindConfig_mutable_source_address(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) {
200
+ struct envoy_api_v2_core_SocketAddress* sub = (struct envoy_api_v2_core_SocketAddress*)envoy_api_v2_core_BindConfig_source_address(msg);
201
+ if (sub == NULL) {
202
+ sub = (struct envoy_api_v2_core_SocketAddress*)upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena);
203
+ if (!sub) return NULL;
204
+ envoy_api_v2_core_BindConfig_set_source_address(msg, sub);
205
+ }
206
+ return sub;
207
+ }
208
+ UPB_INLINE void envoy_api_v2_core_BindConfig_set_freebind(envoy_api_v2_core_BindConfig *msg, struct google_protobuf_BoolValue* value) {
209
+ UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)) = value;
210
+ }
211
+ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_BindConfig_mutable_freebind(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) {
212
+ struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_BindConfig_freebind(msg);
213
+ if (sub == NULL) {
214
+ sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
215
+ if (!sub) return NULL;
216
+ envoy_api_v2_core_BindConfig_set_freebind(msg, sub);
217
+ }
218
+ return sub;
219
+ }
220
+ UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_core_BindConfig_mutable_socket_options(envoy_api_v2_core_BindConfig *msg, size_t *len) {
221
+ return (struct envoy_api_v2_core_SocketOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
222
+ }
223
+ UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_core_BindConfig_resize_socket_options(envoy_api_v2_core_BindConfig *msg, size_t len, upb_arena *arena) {
224
+ return (struct envoy_api_v2_core_SocketOption**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena);
225
+ }
226
+ UPB_INLINE struct envoy_api_v2_core_SocketOption* envoy_api_v2_core_BindConfig_add_socket_options(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) {
227
+ struct envoy_api_v2_core_SocketOption* sub = (struct envoy_api_v2_core_SocketOption*)upb_msg_new(&envoy_api_v2_core_SocketOption_msginit, arena);
228
+ bool ok = _upb_array_append_accessor(
229
+ msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
230
+ if (!ok) return NULL;
231
+ return sub;
232
+ }
233
+
234
+ /* envoy.api.v2.core.Address */
235
+
236
+ UPB_INLINE envoy_api_v2_core_Address *envoy_api_v2_core_Address_new(upb_arena *arena) {
237
+ return (envoy_api_v2_core_Address *)upb_msg_new(&envoy_api_v2_core_Address_msginit, arena);
238
+ }
239
+ UPB_INLINE envoy_api_v2_core_Address *envoy_api_v2_core_Address_parse(const char *buf, size_t size,
240
+ upb_arena *arena) {
241
+ envoy_api_v2_core_Address *ret = envoy_api_v2_core_Address_new(arena);
242
+ return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_Address_msginit, arena)) ? ret : NULL;
243
+ }
244
+ UPB_INLINE char *envoy_api_v2_core_Address_serialize(const envoy_api_v2_core_Address *msg, upb_arena *arena, size_t *len) {
245
+ return upb_encode(msg, &envoy_api_v2_core_Address_msginit, arena, len);
246
+ }
247
+
248
+ typedef enum {
249
+ envoy_api_v2_core_Address_address_socket_address = 1,
250
+ envoy_api_v2_core_Address_address_pipe = 2,
251
+ envoy_api_v2_core_Address_address_NOT_SET = 0
252
+ } envoy_api_v2_core_Address_address_oneofcases;
253
+ UPB_INLINE envoy_api_v2_core_Address_address_oneofcases envoy_api_v2_core_Address_address_case(const envoy_api_v2_core_Address* msg) { return (envoy_api_v2_core_Address_address_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); }
254
+
255
+ UPB_INLINE bool envoy_api_v2_core_Address_has_socket_address(const envoy_api_v2_core_Address *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); }
256
+ UPB_INLINE const envoy_api_v2_core_SocketAddress* envoy_api_v2_core_Address_socket_address(const envoy_api_v2_core_Address *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
257
+ UPB_INLINE bool envoy_api_v2_core_Address_has_pipe(const envoy_api_v2_core_Address *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); }
258
+ UPB_INLINE const envoy_api_v2_core_Pipe* envoy_api_v2_core_Address_pipe(const envoy_api_v2_core_Address *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_Pipe*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
259
+
260
+ UPB_INLINE void envoy_api_v2_core_Address_set_socket_address(envoy_api_v2_core_Address *msg, envoy_api_v2_core_SocketAddress* value) {
261
+ UPB_WRITE_ONEOF(msg, envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
262
+ }
263
+ UPB_INLINE struct envoy_api_v2_core_SocketAddress* envoy_api_v2_core_Address_mutable_socket_address(envoy_api_v2_core_Address *msg, upb_arena *arena) {
264
+ struct envoy_api_v2_core_SocketAddress* sub = (struct envoy_api_v2_core_SocketAddress*)envoy_api_v2_core_Address_socket_address(msg);
265
+ if (sub == NULL) {
266
+ sub = (struct envoy_api_v2_core_SocketAddress*)upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena);
267
+ if (!sub) return NULL;
268
+ envoy_api_v2_core_Address_set_socket_address(msg, sub);
269
+ }
270
+ return sub;
271
+ }
272
+ UPB_INLINE void envoy_api_v2_core_Address_set_pipe(envoy_api_v2_core_Address *msg, envoy_api_v2_core_Pipe* value) {
273
+ UPB_WRITE_ONEOF(msg, envoy_api_v2_core_Pipe*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
274
+ }
275
+ UPB_INLINE struct envoy_api_v2_core_Pipe* envoy_api_v2_core_Address_mutable_pipe(envoy_api_v2_core_Address *msg, upb_arena *arena) {
276
+ struct envoy_api_v2_core_Pipe* sub = (struct envoy_api_v2_core_Pipe*)envoy_api_v2_core_Address_pipe(msg);
277
+ if (sub == NULL) {
278
+ sub = (struct envoy_api_v2_core_Pipe*)upb_msg_new(&envoy_api_v2_core_Pipe_msginit, arena);
279
+ if (!sub) return NULL;
280
+ envoy_api_v2_core_Address_set_pipe(msg, sub);
281
+ }
282
+ return sub;
283
+ }
284
+
285
+ /* envoy.api.v2.core.CidrRange */
286
+
287
+ UPB_INLINE envoy_api_v2_core_CidrRange *envoy_api_v2_core_CidrRange_new(upb_arena *arena) {
288
+ return (envoy_api_v2_core_CidrRange *)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena);
289
+ }
290
+ UPB_INLINE envoy_api_v2_core_CidrRange *envoy_api_v2_core_CidrRange_parse(const char *buf, size_t size,
291
+ upb_arena *arena) {
292
+ envoy_api_v2_core_CidrRange *ret = envoy_api_v2_core_CidrRange_new(arena);
293
+ return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_CidrRange_msginit, arena)) ? ret : NULL;
294
+ }
295
+ UPB_INLINE char *envoy_api_v2_core_CidrRange_serialize(const envoy_api_v2_core_CidrRange *msg, upb_arena *arena, size_t *len) {
296
+ return upb_encode(msg, &envoy_api_v2_core_CidrRange_msginit, arena, len);
297
+ }
298
+
299
+ UPB_INLINE upb_strview envoy_api_v2_core_CidrRange_address_prefix(const envoy_api_v2_core_CidrRange *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); }
300
+ UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_CidrRange_prefix_len(const envoy_api_v2_core_CidrRange *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)); }
301
+
302
+ UPB_INLINE void envoy_api_v2_core_CidrRange_set_address_prefix(envoy_api_v2_core_CidrRange *msg, upb_strview value) {
303
+ UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value;
304
+ }
305
+ UPB_INLINE void envoy_api_v2_core_CidrRange_set_prefix_len(envoy_api_v2_core_CidrRange *msg, struct google_protobuf_UInt32Value* value) {
306
+ UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)) = value;
307
+ }
308
+ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_CidrRange_mutable_prefix_len(envoy_api_v2_core_CidrRange *msg, upb_arena *arena) {
309
+ struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_CidrRange_prefix_len(msg);
310
+ if (sub == NULL) {
311
+ sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
312
+ if (!sub) return NULL;
313
+ envoy_api_v2_core_CidrRange_set_prefix_len(msg, sub);
314
+ }
315
+ return sub;
316
+ }
317
+
318
+ #ifdef __cplusplus
319
+ } /* extern "C" */
320
+ #endif
321
+
322
+ #include "upb/port_undef.inc"
323
+
324
+ #endif /* ENVOY_API_V2_CORE_ADDRESS_PROTO_UPB_H_ */
@@ -0,0 +1,235 @@
1
+ /* This file was generated by upbc (the upb compiler) from the input
2
+ * file:
3
+ *
4
+ * envoy/api/v2/core/base.proto
5
+ *
6
+ * Do not edit -- your changes will be discarded when the file is
7
+ * regenerated. */
8
+
9
+ #include <stddef.h>
10
+ #include "upb/msg.h"
11
+ #include "envoy/api/v2/core/base.upb.h"
12
+ #include "envoy/api/v2/core/http_uri.upb.h"
13
+ #include "google/protobuf/any.upb.h"
14
+ #include "google/protobuf/struct.upb.h"
15
+ #include "google/protobuf/wrappers.upb.h"
16
+ #include "validate/validate.upb.h"
17
+ #include "gogoproto/gogo.upb.h"
18
+ #include "envoy/type/percent.upb.h"
19
+
20
+ #include "upb/port_def.inc"
21
+
22
+ static const upb_msglayout_field envoy_api_v2_core_Locality__fields[3] = {
23
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
24
+ {2, UPB_SIZE(8, 16), 0, 0, 9, 1},
25
+ {3, UPB_SIZE(16, 32), 0, 0, 9, 1},
26
+ };
27
+
28
+ const upb_msglayout envoy_api_v2_core_Locality_msginit = {
29
+ NULL,
30
+ &envoy_api_v2_core_Locality__fields[0],
31
+ UPB_SIZE(24, 48), 3, false,
32
+ };
33
+
34
+ static const upb_msglayout *const envoy_api_v2_core_Node_submsgs[2] = {
35
+ &envoy_api_v2_core_Locality_msginit,
36
+ &google_protobuf_Struct_msginit,
37
+ };
38
+
39
+ static const upb_msglayout_field envoy_api_v2_core_Node__fields[5] = {
40
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
41
+ {2, UPB_SIZE(8, 16), 0, 0, 9, 1},
42
+ {3, UPB_SIZE(24, 48), 0, 1, 11, 1},
43
+ {4, UPB_SIZE(28, 56), 0, 0, 11, 1},
44
+ {5, UPB_SIZE(16, 32), 0, 0, 9, 1},
45
+ };
46
+
47
+ const upb_msglayout envoy_api_v2_core_Node_msginit = {
48
+ &envoy_api_v2_core_Node_submsgs[0],
49
+ &envoy_api_v2_core_Node__fields[0],
50
+ UPB_SIZE(32, 64), 5, false,
51
+ };
52
+
53
+ static const upb_msglayout *const envoy_api_v2_core_Metadata_submsgs[1] = {
54
+ &envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit,
55
+ };
56
+
57
+ static const upb_msglayout_field envoy_api_v2_core_Metadata__fields[1] = {
58
+ {1, UPB_SIZE(0, 0), 0, 0, 11, 3},
59
+ };
60
+
61
+ const upb_msglayout envoy_api_v2_core_Metadata_msginit = {
62
+ &envoy_api_v2_core_Metadata_submsgs[0],
63
+ &envoy_api_v2_core_Metadata__fields[0],
64
+ UPB_SIZE(4, 8), 1, false,
65
+ };
66
+
67
+ static const upb_msglayout *const envoy_api_v2_core_Metadata_FilterMetadataEntry_submsgs[1] = {
68
+ &google_protobuf_Struct_msginit,
69
+ };
70
+
71
+ static const upb_msglayout_field envoy_api_v2_core_Metadata_FilterMetadataEntry__fields[2] = {
72
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
73
+ {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
74
+ };
75
+
76
+ const upb_msglayout envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit = {
77
+ &envoy_api_v2_core_Metadata_FilterMetadataEntry_submsgs[0],
78
+ &envoy_api_v2_core_Metadata_FilterMetadataEntry__fields[0],
79
+ UPB_SIZE(16, 32), 2, false,
80
+ };
81
+
82
+ static const upb_msglayout_field envoy_api_v2_core_RuntimeUInt32__fields[2] = {
83
+ {2, UPB_SIZE(0, 0), 0, 0, 13, 1},
84
+ {3, UPB_SIZE(4, 8), 0, 0, 9, 1},
85
+ };
86
+
87
+ const upb_msglayout envoy_api_v2_core_RuntimeUInt32_msginit = {
88
+ NULL,
89
+ &envoy_api_v2_core_RuntimeUInt32__fields[0],
90
+ UPB_SIZE(16, 32), 2, false,
91
+ };
92
+
93
+ static const upb_msglayout_field envoy_api_v2_core_HeaderValue__fields[2] = {
94
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
95
+ {2, UPB_SIZE(8, 16), 0, 0, 9, 1},
96
+ };
97
+
98
+ const upb_msglayout envoy_api_v2_core_HeaderValue_msginit = {
99
+ NULL,
100
+ &envoy_api_v2_core_HeaderValue__fields[0],
101
+ UPB_SIZE(16, 32), 2, false,
102
+ };
103
+
104
+ static const upb_msglayout *const envoy_api_v2_core_HeaderValueOption_submsgs[2] = {
105
+ &envoy_api_v2_core_HeaderValue_msginit,
106
+ &google_protobuf_BoolValue_msginit,
107
+ };
108
+
109
+ static const upb_msglayout_field envoy_api_v2_core_HeaderValueOption__fields[2] = {
110
+ {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
111
+ {2, UPB_SIZE(4, 8), 0, 1, 11, 1},
112
+ };
113
+
114
+ const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit = {
115
+ &envoy_api_v2_core_HeaderValueOption_submsgs[0],
116
+ &envoy_api_v2_core_HeaderValueOption__fields[0],
117
+ UPB_SIZE(8, 16), 2, false,
118
+ };
119
+
120
+ static const upb_msglayout *const envoy_api_v2_core_HeaderMap_submsgs[1] = {
121
+ &envoy_api_v2_core_HeaderValue_msginit,
122
+ };
123
+
124
+ static const upb_msglayout_field envoy_api_v2_core_HeaderMap__fields[1] = {
125
+ {1, UPB_SIZE(0, 0), 0, 0, 11, 3},
126
+ };
127
+
128
+ const upb_msglayout envoy_api_v2_core_HeaderMap_msginit = {
129
+ &envoy_api_v2_core_HeaderMap_submsgs[0],
130
+ &envoy_api_v2_core_HeaderMap__fields[0],
131
+ UPB_SIZE(4, 8), 1, false,
132
+ };
133
+
134
+ static const upb_msglayout_field envoy_api_v2_core_DataSource__fields[3] = {
135
+ {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1},
136
+ {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 12, 1},
137
+ {3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1},
138
+ };
139
+
140
+ const upb_msglayout envoy_api_v2_core_DataSource_msginit = {
141
+ NULL,
142
+ &envoy_api_v2_core_DataSource__fields[0],
143
+ UPB_SIZE(16, 32), 3, false,
144
+ };
145
+
146
+ static const upb_msglayout *const envoy_api_v2_core_RemoteDataSource_submsgs[1] = {
147
+ &envoy_api_v2_core_HttpUri_msginit,
148
+ };
149
+
150
+ static const upb_msglayout_field envoy_api_v2_core_RemoteDataSource__fields[2] = {
151
+ {1, UPB_SIZE(8, 16), 0, 0, 11, 1},
152
+ {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
153
+ };
154
+
155
+ const upb_msglayout envoy_api_v2_core_RemoteDataSource_msginit = {
156
+ &envoy_api_v2_core_RemoteDataSource_submsgs[0],
157
+ &envoy_api_v2_core_RemoteDataSource__fields[0],
158
+ UPB_SIZE(16, 32), 2, false,
159
+ };
160
+
161
+ static const upb_msglayout *const envoy_api_v2_core_AsyncDataSource_submsgs[2] = {
162
+ &envoy_api_v2_core_DataSource_msginit,
163
+ &envoy_api_v2_core_RemoteDataSource_msginit,
164
+ };
165
+
166
+ static const upb_msglayout_field envoy_api_v2_core_AsyncDataSource__fields[2] = {
167
+ {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
168
+ {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1},
169
+ };
170
+
171
+ const upb_msglayout envoy_api_v2_core_AsyncDataSource_msginit = {
172
+ &envoy_api_v2_core_AsyncDataSource_submsgs[0],
173
+ &envoy_api_v2_core_AsyncDataSource__fields[0],
174
+ UPB_SIZE(8, 16), 2, false,
175
+ };
176
+
177
+ static const upb_msglayout *const envoy_api_v2_core_TransportSocket_submsgs[2] = {
178
+ &google_protobuf_Any_msginit,
179
+ &google_protobuf_Struct_msginit,
180
+ };
181
+
182
+ static const upb_msglayout_field envoy_api_v2_core_TransportSocket__fields[3] = {
183
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
184
+ {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
185
+ {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
186
+ };
187
+
188
+ const upb_msglayout envoy_api_v2_core_TransportSocket_msginit = {
189
+ &envoy_api_v2_core_TransportSocket_submsgs[0],
190
+ &envoy_api_v2_core_TransportSocket__fields[0],
191
+ UPB_SIZE(16, 32), 3, false,
192
+ };
193
+
194
+ static const upb_msglayout_field envoy_api_v2_core_SocketOption__fields[6] = {
195
+ {1, UPB_SIZE(24, 24), 0, 0, 9, 1},
196
+ {2, UPB_SIZE(0, 0), 0, 0, 3, 1},
197
+ {3, UPB_SIZE(8, 8), 0, 0, 3, 1},
198
+ {4, UPB_SIZE(32, 40), UPB_SIZE(-41, -57), 0, 3, 1},
199
+ {5, UPB_SIZE(32, 40), UPB_SIZE(-41, -57), 0, 12, 1},
200
+ {6, UPB_SIZE(16, 16), 0, 0, 14, 1},
201
+ };
202
+
203
+ const upb_msglayout envoy_api_v2_core_SocketOption_msginit = {
204
+ NULL,
205
+ &envoy_api_v2_core_SocketOption__fields[0],
206
+ UPB_SIZE(48, 64), 6, false,
207
+ };
208
+
209
+ static const upb_msglayout *const envoy_api_v2_core_RuntimeFractionalPercent_submsgs[1] = {
210
+ &envoy_type_FractionalPercent_msginit,
211
+ };
212
+
213
+ static const upb_msglayout_field envoy_api_v2_core_RuntimeFractionalPercent__fields[2] = {
214
+ {1, UPB_SIZE(8, 16), 0, 0, 11, 1},
215
+ {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
216
+ };
217
+
218
+ const upb_msglayout envoy_api_v2_core_RuntimeFractionalPercent_msginit = {
219
+ &envoy_api_v2_core_RuntimeFractionalPercent_submsgs[0],
220
+ &envoy_api_v2_core_RuntimeFractionalPercent__fields[0],
221
+ UPB_SIZE(16, 32), 2, false,
222
+ };
223
+
224
+ static const upb_msglayout_field envoy_api_v2_core_ControlPlane__fields[1] = {
225
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
226
+ };
227
+
228
+ const upb_msglayout envoy_api_v2_core_ControlPlane_msginit = {
229
+ NULL,
230
+ &envoy_api_v2_core_ControlPlane__fields[0],
231
+ UPB_SIZE(8, 16), 1, false,
232
+ };
233
+
234
+ #include "upb/port_undef.inc"
235
+