grpc 1.23.0 → 1.24.0

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 +765 -485
  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 +129 -50
  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
@@ -1,149 +0,0 @@
1
- /*
2
- *
3
- * Copyright 2018 gRPC authors.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- *
17
- */
18
-
19
- #ifndef GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_HANDSHAKER_SERVICE_API_UTIL_H
20
- #define GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_HANDSHAKER_SERVICE_API_UTIL_H
21
-
22
- #include <grpc/support/port_platform.h>
23
-
24
- #include "pb_decode.h"
25
- #include "pb_encode.h"
26
-
27
- #include <grpc/slice.h>
28
- #include <grpc/slice_buffer.h>
29
- #include <grpc/support/alloc.h>
30
- #include <grpc/support/log.h>
31
-
32
- #include "src/core/tsi/alts/handshaker/handshaker.pb.h"
33
-
34
- /**
35
- * An implementation of utility functions used to serialize/
36
- * de-serialize ALTS handshake requests/responses. All APIs in the header
37
- * are thread-compatible.
38
- */
39
-
40
- /* Renaming of message/field structs generated by nanopb compiler. */
41
- typedef grpc_gcp_HandshakeProtocol grpc_gcp_handshake_protocol;
42
- typedef grpc_gcp_NetworkProtocol grpc_gcp_network_protocol;
43
- typedef grpc_gcp_Identity grpc_gcp_identity;
44
- typedef grpc_gcp_NextHandshakeMessageReq grpc_gcp_next_handshake_message_req;
45
- typedef grpc_gcp_ServerHandshakeParameters grpc_gcp_server_handshake_parameters;
46
- typedef grpc_gcp_Endpoint grpc_gcp_endpoint;
47
- typedef grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry
48
- grpc_gcp_handshake_parameters_entry;
49
- typedef grpc_gcp_StartClientHandshakeReq grpc_gcp_start_client_handshake_req;
50
- typedef grpc_gcp_StartServerHandshakeReq grpc_gcp_start_server_handshake_req;
51
- typedef grpc_gcp_HandshakerReq grpc_gcp_handshaker_req;
52
- typedef grpc_gcp_HandshakerResult grpc_gcp_handshaker_result;
53
- typedef grpc_gcp_HandshakerStatus grpc_gcp_handshaker_status;
54
- typedef grpc_gcp_HandshakerResp grpc_gcp_handshaker_resp;
55
-
56
- typedef enum {
57
- CLIENT_START_REQ = 0, /* StartClientHandshakeReq. */
58
- SERVER_START_REQ = 1, /* StartServerHandshakeReq. */
59
- NEXT_REQ = 2, /* NextHandshakeMessageReq. */
60
- } grpc_gcp_handshaker_req_type;
61
-
62
- /**
63
- * A struct representing a repeated field. The struct is used to organize all
64
- * instances of a specific repeated field into a linked list, which then will
65
- * be used at encode/decode phase. For instance at the encode phase, the encode
66
- * function will iterate through the list, encode each field, and then output
67
- * the result to the stream.
68
- */
69
- typedef struct repeated_field_ {
70
- struct repeated_field_* next;
71
- const void* data;
72
- } repeated_field;
73
-
74
- /**
75
- * This method adds a repeated field to the head of repeated field list.
76
- *
77
- * - head: a head of repeated field list.
78
- * - field: a repeated field to be added to the list.
79
- */
80
- void add_repeated_field(repeated_field** head, const void* field);
81
-
82
- /**
83
- * This method destroys a repeated field list that consists of string type
84
- * fields.
85
- *
86
- * - head: a head of repeated field list.
87
- */
88
- void destroy_repeated_field_list_string(repeated_field* head);
89
-
90
- /**
91
- * This method destroys a repeated field list that consists of
92
- * grpc_gcp_identity type fields.
93
- *
94
- * - head: a head of repeated field list.
95
- */
96
- void destroy_repeated_field_list_identity(repeated_field* head);
97
-
98
- /**
99
- * This method creates a grpc_slice instance by copying a data buffer. It is
100
- * similar to grpc_slice_from_copied_buffer() except that it returns an instance
101
- * allocated from the heap.
102
- *
103
- * - data: a data buffer to be copied to grpc_slice instance.
104
- * - size: size of data buffer.
105
- */
106
- grpc_slice* create_slice(const char* data, size_t size);
107
-
108
- /* This method destroys a grpc_slice instance. */
109
- void destroy_slice(grpc_slice* slice);
110
-
111
- /**
112
- * The following encode/decode functions will be assigned to encode/decode
113
- * function pointers of pb_callback_t struct (defined in
114
- * //third_party/nanopb/pb.h), that represent a repeated field with a dynamic
115
- * length (e.g., a string type or repeated field).
116
- */
117
-
118
- /* This method is an encode callback function for a string or byte array. */
119
- bool encode_string_or_bytes_cb(pb_ostream_t* stream, const pb_field_t* field,
120
- void* const* arg);
121
-
122
- /**
123
- * This method is an encode callback function for a repeated grpc_gcp_identity
124
- * field.
125
- */
126
- bool encode_repeated_identity_cb(pb_ostream_t* stream, const pb_field_t* field,
127
- void* const* arg);
128
-
129
- /* This method is an encode callback function for a repeated string field. */
130
- bool encode_repeated_string_cb(pb_ostream_t* stream, const pb_field_t* field,
131
- void* const* arg);
132
-
133
- /**
134
- * This method is a decode callback function for a string or byte array field.
135
- */
136
- bool decode_string_or_bytes_cb(pb_istream_t* stream, const pb_field_t* field,
137
- void** arg);
138
- /**
139
- * This method is a decode callback function for a repeated grpc_gcp_identity
140
- * field.
141
- */
142
- bool decode_repeated_identity_cb(pb_istream_t* stream, const pb_field_t* field,
143
- void** arg);
144
-
145
- /* This method is a decode callback function for a repeated string field. */
146
- bool decode_repeated_string_cb(pb_istream_t* stream, const pb_field_t* field,
147
- void** arg);
148
-
149
- #endif /* GRPC_CORE_TSI_ALTS_HANDSHAKER_ALTS_HANDSHAKER_SERVICE_API_UTIL_H */
@@ -1,47 +0,0 @@
1
- /* Automatically generated nanopb constant definitions */
2
- /* Generated by nanopb-0.3.7-dev */
3
-
4
- #include "src/core/tsi/alts/handshaker/altscontext.pb.h"
5
- /* @@protoc_insertion_point(includes) */
6
- #if PB_PROTO_HEADER_VERSION != 30
7
- #error Regenerate this file with the current version of nanopb generator.
8
- #endif
9
-
10
-
11
-
12
- const pb_field_t grpc_gcp_AltsContext_fields[7] = {
13
- PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, grpc_gcp_AltsContext, application_protocol, application_protocol, 0),
14
- PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, grpc_gcp_AltsContext, record_protocol, application_protocol, 0),
15
- PB_FIELD( 3, UENUM , OPTIONAL, STATIC , OTHER, grpc_gcp_AltsContext, security_level, record_protocol, 0),
16
- PB_FIELD( 4, STRING , OPTIONAL, CALLBACK, OTHER, grpc_gcp_AltsContext, peer_service_account, security_level, 0),
17
- PB_FIELD( 5, STRING , OPTIONAL, CALLBACK, OTHER, grpc_gcp_AltsContext, local_service_account, peer_service_account, 0),
18
- PB_FIELD( 6, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_AltsContext, peer_rpc_versions, local_service_account, &grpc_gcp_RpcProtocolVersions_fields),
19
- PB_LAST_FIELD
20
- };
21
-
22
-
23
- /* Check that field information fits in pb_field_t */
24
- #if !defined(PB_FIELD_32BIT)
25
- /* If you get an error here, it means that you need to define PB_FIELD_32BIT
26
- * compile-time option. You can do that in pb.h or on compiler command line.
27
- *
28
- * The reason you need to do this is that some of your messages contain tag
29
- * numbers or field sizes that are larger than what can fit in 8 or 16 bit
30
- * field descriptors.
31
- */
32
- PB_STATIC_ASSERT((pb_membersize(grpc_gcp_AltsContext, peer_rpc_versions) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_grpc_gcp_AltsContext)
33
- #endif
34
-
35
- #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
36
- /* If you get an error here, it means that you need to define PB_FIELD_16BIT
37
- * compile-time option. You can do that in pb.h or on compiler command line.
38
- *
39
- * The reason you need to do this is that some of your messages contain tag
40
- * numbers or field sizes that are larger than what can fit in the default
41
- * 8 bit descriptors.
42
- */
43
- PB_STATIC_ASSERT((pb_membersize(grpc_gcp_AltsContext, peer_rpc_versions) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grpc_gcp_AltsContext)
44
- #endif
45
-
46
-
47
- /* @@protoc_insertion_point(eof) */
@@ -1,63 +0,0 @@
1
- /* Automatically generated nanopb header */
2
- /* Generated by nanopb-0.3.7-dev */
3
-
4
- #ifndef PB_GRPC_GCP_ALTSCONTEXT_PB_H_INCLUDED
5
- #define PB_GRPC_GCP_ALTSCONTEXT_PB_H_INCLUDED
6
- #include "pb.h"
7
- #include "src/core/tsi/alts/handshaker/transport_security_common.pb.h"
8
- /* @@protoc_insertion_point(includes) */
9
- #if PB_PROTO_HEADER_VERSION != 30
10
- #error Regenerate this file with the current version of nanopb generator.
11
- #endif
12
-
13
- #ifdef __cplusplus
14
- extern "C" {
15
- #endif
16
-
17
- /* Struct definitions */
18
- typedef struct _grpc_gcp_AltsContext {
19
- pb_callback_t application_protocol;
20
- pb_callback_t record_protocol;
21
- bool has_security_level;
22
- grpc_gcp_SecurityLevel security_level;
23
- pb_callback_t peer_service_account;
24
- pb_callback_t local_service_account;
25
- bool has_peer_rpc_versions;
26
- grpc_gcp_RpcProtocolVersions peer_rpc_versions;
27
- /* @@protoc_insertion_point(struct:grpc_gcp_AltsContext) */
28
- } grpc_gcp_AltsContext;
29
-
30
- /* Default values for struct fields */
31
-
32
- /* Initializer values for message structs */
33
- #define grpc_gcp_AltsContext_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, (grpc_gcp_SecurityLevel)0, {{NULL}, NULL}, {{NULL}, NULL}, false, grpc_gcp_RpcProtocolVersions_init_default}
34
- #define grpc_gcp_AltsContext_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, (grpc_gcp_SecurityLevel)0, {{NULL}, NULL}, {{NULL}, NULL}, false, grpc_gcp_RpcProtocolVersions_init_zero}
35
-
36
- /* Field tags (for use in manual encoding/decoding) */
37
- #define grpc_gcp_AltsContext_application_protocol_tag 1
38
- #define grpc_gcp_AltsContext_record_protocol_tag 2
39
- #define grpc_gcp_AltsContext_security_level_tag 3
40
- #define grpc_gcp_AltsContext_peer_service_account_tag 4
41
- #define grpc_gcp_AltsContext_local_service_account_tag 5
42
- #define grpc_gcp_AltsContext_peer_rpc_versions_tag 6
43
-
44
- /* Struct field encoding specification for nanopb */
45
- extern const pb_field_t grpc_gcp_AltsContext_fields[7];
46
-
47
- /* Maximum encoded size of messages (where known) */
48
- /* grpc_gcp_AltsContext_size depends on runtime parameters */
49
-
50
- /* Message IDs (where set with "msgid" option) */
51
- #ifdef PB_MSGID
52
-
53
- #define ALTSCONTEXT_MESSAGES \
54
-
55
-
56
- #endif
57
-
58
- #ifdef __cplusplus
59
- } /* extern "C" */
60
- #endif
61
- /* @@protoc_insertion_point(eof) */
62
-
63
- #endif
@@ -1,122 +0,0 @@
1
- /* Automatically generated nanopb constant definitions */
2
- /* Generated by nanopb-0.3.7-dev */
3
-
4
- #include "src/core/tsi/alts/handshaker/handshaker.pb.h"
5
- /* @@protoc_insertion_point(includes) */
6
- #if PB_PROTO_HEADER_VERSION != 30
7
- #error Regenerate this file with the current version of nanopb generator.
8
- #endif
9
-
10
-
11
-
12
- const pb_field_t grpc_gcp_Endpoint_fields[4] = {
13
- PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, grpc_gcp_Endpoint, ip_address, ip_address, 0),
14
- PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, grpc_gcp_Endpoint, port, ip_address, 0),
15
- PB_FIELD( 3, UENUM , OPTIONAL, STATIC , OTHER, grpc_gcp_Endpoint, protocol, port, 0),
16
- PB_LAST_FIELD
17
- };
18
-
19
- const pb_field_t grpc_gcp_Identity_fields[3] = {
20
- PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, grpc_gcp_Identity, service_account, service_account, 0),
21
- PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, grpc_gcp_Identity, hostname, service_account, 0),
22
- PB_LAST_FIELD
23
- };
24
-
25
- const pb_field_t grpc_gcp_StartClientHandshakeReq_fields[10] = {
26
- PB_FIELD( 1, UENUM , OPTIONAL, STATIC , FIRST, grpc_gcp_StartClientHandshakeReq, handshake_security_protocol, handshake_security_protocol, 0),
27
- PB_FIELD( 2, STRING , REPEATED, CALLBACK, OTHER, grpc_gcp_StartClientHandshakeReq, application_protocols, handshake_security_protocol, 0),
28
- PB_FIELD( 3, STRING , REPEATED, CALLBACK, OTHER, grpc_gcp_StartClientHandshakeReq, record_protocols, application_protocols, 0),
29
- PB_FIELD( 4, MESSAGE , REPEATED, CALLBACK, OTHER, grpc_gcp_StartClientHandshakeReq, target_identities, record_protocols, &grpc_gcp_Identity_fields),
30
- PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_StartClientHandshakeReq, local_identity, target_identities, &grpc_gcp_Identity_fields),
31
- PB_FIELD( 6, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_StartClientHandshakeReq, local_endpoint, local_identity, &grpc_gcp_Endpoint_fields),
32
- PB_FIELD( 7, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_StartClientHandshakeReq, remote_endpoint, local_endpoint, &grpc_gcp_Endpoint_fields),
33
- PB_FIELD( 8, STRING , OPTIONAL, CALLBACK, OTHER, grpc_gcp_StartClientHandshakeReq, target_name, remote_endpoint, 0),
34
- PB_FIELD( 9, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_StartClientHandshakeReq, rpc_versions, target_name, &grpc_gcp_RpcProtocolVersions_fields),
35
- PB_LAST_FIELD
36
- };
37
-
38
- const pb_field_t grpc_gcp_ServerHandshakeParameters_fields[3] = {
39
- PB_FIELD( 1, STRING , REPEATED, CALLBACK, FIRST, grpc_gcp_ServerHandshakeParameters, record_protocols, record_protocols, 0),
40
- PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, grpc_gcp_ServerHandshakeParameters, local_identities, record_protocols, &grpc_gcp_Identity_fields),
41
- PB_LAST_FIELD
42
- };
43
-
44
- const pb_field_t grpc_gcp_StartServerHandshakeReq_fields[7] = {
45
- PB_FIELD( 1, STRING , REPEATED, CALLBACK, FIRST, grpc_gcp_StartServerHandshakeReq, application_protocols, application_protocols, 0),
46
- PB_FIELD( 2, MESSAGE , REPEATED, STATIC , OTHER, grpc_gcp_StartServerHandshakeReq, handshake_parameters, application_protocols, &grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_fields),
47
- PB_FIELD( 3, BYTES , OPTIONAL, CALLBACK, OTHER, grpc_gcp_StartServerHandshakeReq, in_bytes, handshake_parameters, 0),
48
- PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_StartServerHandshakeReq, local_endpoint, in_bytes, &grpc_gcp_Endpoint_fields),
49
- PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_StartServerHandshakeReq, remote_endpoint, local_endpoint, &grpc_gcp_Endpoint_fields),
50
- PB_FIELD( 6, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_StartServerHandshakeReq, rpc_versions, remote_endpoint, &grpc_gcp_RpcProtocolVersions_fields),
51
- PB_LAST_FIELD
52
- };
53
-
54
- const pb_field_t grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_fields[3] = {
55
- PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry, key, key, 0),
56
- PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry, value, key, &grpc_gcp_ServerHandshakeParameters_fields),
57
- PB_LAST_FIELD
58
- };
59
-
60
- const pb_field_t grpc_gcp_NextHandshakeMessageReq_fields[2] = {
61
- PB_FIELD( 1, BYTES , OPTIONAL, CALLBACK, FIRST, grpc_gcp_NextHandshakeMessageReq, in_bytes, in_bytes, 0),
62
- PB_LAST_FIELD
63
- };
64
-
65
- const pb_field_t grpc_gcp_HandshakerReq_fields[4] = {
66
- PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_gcp_HandshakerReq, client_start, client_start, &grpc_gcp_StartClientHandshakeReq_fields),
67
- PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_HandshakerReq, server_start, client_start, &grpc_gcp_StartServerHandshakeReq_fields),
68
- PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_HandshakerReq, next, server_start, &grpc_gcp_NextHandshakeMessageReq_fields),
69
- PB_LAST_FIELD
70
- };
71
-
72
- const pb_field_t grpc_gcp_HandshakerResult_fields[8] = {
73
- PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, grpc_gcp_HandshakerResult, application_protocol, application_protocol, 0),
74
- PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, grpc_gcp_HandshakerResult, record_protocol, application_protocol, 0),
75
- PB_FIELD( 3, BYTES , OPTIONAL, CALLBACK, OTHER, grpc_gcp_HandshakerResult, key_data, record_protocol, 0),
76
- PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_HandshakerResult, peer_identity, key_data, &grpc_gcp_Identity_fields),
77
- PB_FIELD( 5, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_HandshakerResult, local_identity, peer_identity, &grpc_gcp_Identity_fields),
78
- PB_FIELD( 6, BOOL , OPTIONAL, STATIC , OTHER, grpc_gcp_HandshakerResult, keep_channel_open, local_identity, 0),
79
- PB_FIELD( 7, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_HandshakerResult, peer_rpc_versions, keep_channel_open, &grpc_gcp_RpcProtocolVersions_fields),
80
- PB_LAST_FIELD
81
- };
82
-
83
- const pb_field_t grpc_gcp_HandshakerStatus_fields[3] = {
84
- PB_FIELD( 1, UINT32 , OPTIONAL, STATIC , FIRST, grpc_gcp_HandshakerStatus, code, code, 0),
85
- PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, grpc_gcp_HandshakerStatus, details, code, 0),
86
- PB_LAST_FIELD
87
- };
88
-
89
- const pb_field_t grpc_gcp_HandshakerResp_fields[5] = {
90
- PB_FIELD( 1, BYTES , OPTIONAL, CALLBACK, FIRST, grpc_gcp_HandshakerResp, out_frames, out_frames, 0),
91
- PB_FIELD( 2, UINT32 , OPTIONAL, STATIC , OTHER, grpc_gcp_HandshakerResp, bytes_consumed, out_frames, 0),
92
- PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_HandshakerResp, result, bytes_consumed, &grpc_gcp_HandshakerResult_fields),
93
- PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_gcp_HandshakerResp, status, result, &grpc_gcp_HandshakerStatus_fields),
94
- PB_LAST_FIELD
95
- };
96
-
97
-
98
- /* Check that field information fits in pb_field_t */
99
- #if !defined(PB_FIELD_32BIT)
100
- /* If you get an error here, it means that you need to define PB_FIELD_32BIT
101
- * compile-time option. You can do that in pb.h or on compiler command line.
102
- *
103
- * The reason you need to do this is that some of your messages contain tag
104
- * numbers or field sizes that are larger than what can fit in 8 or 16 bit
105
- * field descriptors.
106
- */
107
- PB_STATIC_ASSERT((pb_membersize(grpc_gcp_StartClientHandshakeReq, target_identities) < 65536 && pb_membersize(grpc_gcp_StartClientHandshakeReq, local_identity) < 65536 && pb_membersize(grpc_gcp_StartClientHandshakeReq, local_endpoint) < 65536 && pb_membersize(grpc_gcp_StartClientHandshakeReq, remote_endpoint) < 65536 && pb_membersize(grpc_gcp_StartClientHandshakeReq, rpc_versions) < 65536 && pb_membersize(grpc_gcp_ServerHandshakeParameters, local_identities) < 65536 && pb_membersize(grpc_gcp_StartServerHandshakeReq, handshake_parameters[0]) < 65536 && pb_membersize(grpc_gcp_StartServerHandshakeReq, local_endpoint) < 65536 && pb_membersize(grpc_gcp_StartServerHandshakeReq, remote_endpoint) < 65536 && pb_membersize(grpc_gcp_StartServerHandshakeReq, rpc_versions) < 65536 && pb_membersize(grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry, value) < 65536 && pb_membersize(grpc_gcp_HandshakerReq, client_start) < 65536 && pb_membersize(grpc_gcp_HandshakerReq, server_start) < 65536 && pb_membersize(grpc_gcp_HandshakerReq, next) < 65536 && pb_membersize(grpc_gcp_HandshakerResult, peer_identity) < 65536 && pb_membersize(grpc_gcp_HandshakerResult, local_identity) < 65536 && pb_membersize(grpc_gcp_HandshakerResult, peer_rpc_versions) < 65536 && pb_membersize(grpc_gcp_HandshakerResp, result) < 65536 && pb_membersize(grpc_gcp_HandshakerResp, status) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_grpc_gcp_Endpoint_grpc_gcp_Identity_grpc_gcp_StartClientHandshakeReq_grpc_gcp_ServerHandshakeParameters_grpc_gcp_StartServerHandshakeReq_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_grpc_gcp_NextHandshakeMessageReq_grpc_gcp_HandshakerReq_grpc_gcp_HandshakerResult_grpc_gcp_HandshakerStatus_grpc_gcp_HandshakerResp)
108
- #endif
109
-
110
- #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT)
111
- /* If you get an error here, it means that you need to define PB_FIELD_16BIT
112
- * compile-time option. You can do that in pb.h or on compiler command line.
113
- *
114
- * The reason you need to do this is that some of your messages contain tag
115
- * numbers or field sizes that are larger than what can fit in the default
116
- * 8 bit descriptors.
117
- */
118
- PB_STATIC_ASSERT((pb_membersize(grpc_gcp_StartClientHandshakeReq, target_identities) < 256 && pb_membersize(grpc_gcp_StartClientHandshakeReq, local_identity) < 256 && pb_membersize(grpc_gcp_StartClientHandshakeReq, local_endpoint) < 256 && pb_membersize(grpc_gcp_StartClientHandshakeReq, remote_endpoint) < 256 && pb_membersize(grpc_gcp_StartClientHandshakeReq, rpc_versions) < 256 && pb_membersize(grpc_gcp_ServerHandshakeParameters, local_identities) < 256 && pb_membersize(grpc_gcp_StartServerHandshakeReq, handshake_parameters[0]) < 256 && pb_membersize(grpc_gcp_StartServerHandshakeReq, local_endpoint) < 256 && pb_membersize(grpc_gcp_StartServerHandshakeReq, remote_endpoint) < 256 && pb_membersize(grpc_gcp_StartServerHandshakeReq, rpc_versions) < 256 && pb_membersize(grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry, value) < 256 && pb_membersize(grpc_gcp_HandshakerReq, client_start) < 256 && pb_membersize(grpc_gcp_HandshakerReq, server_start) < 256 && pb_membersize(grpc_gcp_HandshakerReq, next) < 256 && pb_membersize(grpc_gcp_HandshakerResult, peer_identity) < 256 && pb_membersize(grpc_gcp_HandshakerResult, local_identity) < 256 && pb_membersize(grpc_gcp_HandshakerResult, peer_rpc_versions) < 256 && pb_membersize(grpc_gcp_HandshakerResp, result) < 256 && pb_membersize(grpc_gcp_HandshakerResp, status) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grpc_gcp_Endpoint_grpc_gcp_Identity_grpc_gcp_StartClientHandshakeReq_grpc_gcp_ServerHandshakeParameters_grpc_gcp_StartServerHandshakeReq_grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_grpc_gcp_NextHandshakeMessageReq_grpc_gcp_HandshakerReq_grpc_gcp_HandshakerResult_grpc_gcp_HandshakerStatus_grpc_gcp_HandshakerResp)
119
- #endif
120
-
121
-
122
- /* @@protoc_insertion_point(eof) */
@@ -1,254 +0,0 @@
1
- /* Automatically generated nanopb header */
2
- /* Generated by nanopb-0.3.7-dev */
3
-
4
- #ifndef PB_GRPC_GCP_HANDSHAKER_PB_H_INCLUDED
5
- #define PB_GRPC_GCP_HANDSHAKER_PB_H_INCLUDED
6
- #include "pb.h"
7
- #include "src/core/tsi/alts/handshaker/transport_security_common.pb.h"
8
- /* @@protoc_insertion_point(includes) */
9
- #if PB_PROTO_HEADER_VERSION != 30
10
- #error Regenerate this file with the current version of nanopb generator.
11
- #endif
12
-
13
- #ifdef __cplusplus
14
- extern "C" {
15
- #endif
16
-
17
- /* Enum definitions */
18
- typedef enum _grpc_gcp_HandshakeProtocol {
19
- grpc_gcp_HandshakeProtocol_HANDSHAKE_PROTOCOL_UNSPECIFIED = 0,
20
- grpc_gcp_HandshakeProtocol_TLS = 1,
21
- grpc_gcp_HandshakeProtocol_ALTS = 2
22
- } grpc_gcp_HandshakeProtocol;
23
- #define _grpc_gcp_HandshakeProtocol_MIN grpc_gcp_HandshakeProtocol_HANDSHAKE_PROTOCOL_UNSPECIFIED
24
- #define _grpc_gcp_HandshakeProtocol_MAX grpc_gcp_HandshakeProtocol_ALTS
25
- #define _grpc_gcp_HandshakeProtocol_ARRAYSIZE ((grpc_gcp_HandshakeProtocol)(grpc_gcp_HandshakeProtocol_ALTS+1))
26
-
27
- typedef enum _grpc_gcp_NetworkProtocol {
28
- grpc_gcp_NetworkProtocol_NETWORK_PROTOCOL_UNSPECIFIED = 0,
29
- grpc_gcp_NetworkProtocol_TCP = 1,
30
- grpc_gcp_NetworkProtocol_UDP = 2
31
- } grpc_gcp_NetworkProtocol;
32
- #define _grpc_gcp_NetworkProtocol_MIN grpc_gcp_NetworkProtocol_NETWORK_PROTOCOL_UNSPECIFIED
33
- #define _grpc_gcp_NetworkProtocol_MAX grpc_gcp_NetworkProtocol_UDP
34
- #define _grpc_gcp_NetworkProtocol_ARRAYSIZE ((grpc_gcp_NetworkProtocol)(grpc_gcp_NetworkProtocol_UDP+1))
35
-
36
- /* Struct definitions */
37
- typedef struct _grpc_gcp_Identity {
38
- pb_callback_t service_account;
39
- pb_callback_t hostname;
40
- /* @@protoc_insertion_point(struct:grpc_gcp_Identity) */
41
- } grpc_gcp_Identity;
42
-
43
- typedef struct _grpc_gcp_NextHandshakeMessageReq {
44
- pb_callback_t in_bytes;
45
- /* @@protoc_insertion_point(struct:grpc_gcp_NextHandshakeMessageReq) */
46
- } grpc_gcp_NextHandshakeMessageReq;
47
-
48
- typedef struct _grpc_gcp_ServerHandshakeParameters {
49
- pb_callback_t record_protocols;
50
- pb_callback_t local_identities;
51
- /* @@protoc_insertion_point(struct:grpc_gcp_ServerHandshakeParameters) */
52
- } grpc_gcp_ServerHandshakeParameters;
53
-
54
- typedef struct _grpc_gcp_Endpoint {
55
- pb_callback_t ip_address;
56
- bool has_port;
57
- int32_t port;
58
- bool has_protocol;
59
- grpc_gcp_NetworkProtocol protocol;
60
- /* @@protoc_insertion_point(struct:grpc_gcp_Endpoint) */
61
- } grpc_gcp_Endpoint;
62
-
63
- typedef struct _grpc_gcp_HandshakerResult {
64
- pb_callback_t application_protocol;
65
- pb_callback_t record_protocol;
66
- pb_callback_t key_data;
67
- bool has_peer_identity;
68
- grpc_gcp_Identity peer_identity;
69
- bool has_local_identity;
70
- grpc_gcp_Identity local_identity;
71
- bool has_keep_channel_open;
72
- bool keep_channel_open;
73
- bool has_peer_rpc_versions;
74
- grpc_gcp_RpcProtocolVersions peer_rpc_versions;
75
- /* @@protoc_insertion_point(struct:grpc_gcp_HandshakerResult) */
76
- } grpc_gcp_HandshakerResult;
77
-
78
- typedef struct _grpc_gcp_HandshakerStatus {
79
- bool has_code;
80
- uint32_t code;
81
- pb_callback_t details;
82
- /* @@protoc_insertion_point(struct:grpc_gcp_HandshakerStatus) */
83
- } grpc_gcp_HandshakerStatus;
84
-
85
- typedef struct _grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry {
86
- bool has_key;
87
- int32_t key;
88
- bool has_value;
89
- grpc_gcp_ServerHandshakeParameters value;
90
- /* @@protoc_insertion_point(struct:grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry) */
91
- } grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry;
92
-
93
- typedef struct _grpc_gcp_HandshakerResp {
94
- pb_callback_t out_frames;
95
- bool has_bytes_consumed;
96
- uint32_t bytes_consumed;
97
- bool has_result;
98
- grpc_gcp_HandshakerResult result;
99
- bool has_status;
100
- grpc_gcp_HandshakerStatus status;
101
- /* @@protoc_insertion_point(struct:grpc_gcp_HandshakerResp) */
102
- } grpc_gcp_HandshakerResp;
103
-
104
- typedef struct _grpc_gcp_StartClientHandshakeReq {
105
- bool has_handshake_security_protocol;
106
- grpc_gcp_HandshakeProtocol handshake_security_protocol;
107
- pb_callback_t application_protocols;
108
- pb_callback_t record_protocols;
109
- pb_callback_t target_identities;
110
- bool has_local_identity;
111
- grpc_gcp_Identity local_identity;
112
- bool has_local_endpoint;
113
- grpc_gcp_Endpoint local_endpoint;
114
- bool has_remote_endpoint;
115
- grpc_gcp_Endpoint remote_endpoint;
116
- pb_callback_t target_name;
117
- bool has_rpc_versions;
118
- grpc_gcp_RpcProtocolVersions rpc_versions;
119
- /* @@protoc_insertion_point(struct:grpc_gcp_StartClientHandshakeReq) */
120
- } grpc_gcp_StartClientHandshakeReq;
121
-
122
- typedef struct _grpc_gcp_StartServerHandshakeReq {
123
- pb_callback_t application_protocols;
124
- pb_size_t handshake_parameters_count;
125
- grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry handshake_parameters[3];
126
- pb_callback_t in_bytes;
127
- bool has_local_endpoint;
128
- grpc_gcp_Endpoint local_endpoint;
129
- bool has_remote_endpoint;
130
- grpc_gcp_Endpoint remote_endpoint;
131
- bool has_rpc_versions;
132
- grpc_gcp_RpcProtocolVersions rpc_versions;
133
- /* @@protoc_insertion_point(struct:grpc_gcp_StartServerHandshakeReq) */
134
- } grpc_gcp_StartServerHandshakeReq;
135
-
136
- typedef struct _grpc_gcp_HandshakerReq {
137
- bool has_client_start;
138
- grpc_gcp_StartClientHandshakeReq client_start;
139
- bool has_server_start;
140
- grpc_gcp_StartServerHandshakeReq server_start;
141
- bool has_next;
142
- grpc_gcp_NextHandshakeMessageReq next;
143
- /* @@protoc_insertion_point(struct:grpc_gcp_HandshakerReq) */
144
- } grpc_gcp_HandshakerReq;
145
-
146
- /* Default values for struct fields */
147
-
148
- /* Initializer values for message structs */
149
- #define grpc_gcp_Endpoint_init_default {{{NULL}, NULL}, false, 0, false, (grpc_gcp_NetworkProtocol)0}
150
- #define grpc_gcp_Identity_init_default {{{NULL}, NULL}, {{NULL}, NULL}}
151
- #define grpc_gcp_StartClientHandshakeReq_init_default {false, (grpc_gcp_HandshakeProtocol)0, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, false, grpc_gcp_Identity_init_default, false, grpc_gcp_Endpoint_init_default, false, grpc_gcp_Endpoint_init_default, {{NULL}, NULL}, false, grpc_gcp_RpcProtocolVersions_init_default}
152
- #define grpc_gcp_ServerHandshakeParameters_init_default {{{NULL}, NULL}, {{NULL}, NULL}}
153
- #define grpc_gcp_StartServerHandshakeReq_init_default {{{NULL}, NULL}, 0, {grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_init_default, grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_init_default, grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_init_default}, {{NULL}, NULL}, false, grpc_gcp_Endpoint_init_default, false, grpc_gcp_Endpoint_init_default, false, grpc_gcp_RpcProtocolVersions_init_default}
154
- #define grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_init_default {false, 0, false, grpc_gcp_ServerHandshakeParameters_init_default}
155
- #define grpc_gcp_NextHandshakeMessageReq_init_default {{{NULL}, NULL}}
156
- #define grpc_gcp_HandshakerReq_init_default {false, grpc_gcp_StartClientHandshakeReq_init_default, false, grpc_gcp_StartServerHandshakeReq_init_default, false, grpc_gcp_NextHandshakeMessageReq_init_default}
157
- #define grpc_gcp_HandshakerResult_init_default {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, false, grpc_gcp_Identity_init_default, false, grpc_gcp_Identity_init_default, false, 0, false, grpc_gcp_RpcProtocolVersions_init_default}
158
- #define grpc_gcp_HandshakerStatus_init_default {false, 0, {{NULL}, NULL}}
159
- #define grpc_gcp_HandshakerResp_init_default {{{NULL}, NULL}, false, 0, false, grpc_gcp_HandshakerResult_init_default, false, grpc_gcp_HandshakerStatus_init_default}
160
- #define grpc_gcp_Endpoint_init_zero {{{NULL}, NULL}, false, 0, false, (grpc_gcp_NetworkProtocol)0}
161
- #define grpc_gcp_Identity_init_zero {{{NULL}, NULL}, {{NULL}, NULL}}
162
- #define grpc_gcp_StartClientHandshakeReq_init_zero {false, (grpc_gcp_HandshakeProtocol)0, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, false, grpc_gcp_Identity_init_zero, false, grpc_gcp_Endpoint_init_zero, false, grpc_gcp_Endpoint_init_zero, {{NULL}, NULL}, false, grpc_gcp_RpcProtocolVersions_init_zero}
163
- #define grpc_gcp_ServerHandshakeParameters_init_zero {{{NULL}, NULL}, {{NULL}, NULL}}
164
- #define grpc_gcp_StartServerHandshakeReq_init_zero {{{NULL}, NULL}, 0, {grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_init_zero, grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_init_zero, grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_init_zero}, {{NULL}, NULL}, false, grpc_gcp_Endpoint_init_zero, false, grpc_gcp_Endpoint_init_zero, false, grpc_gcp_RpcProtocolVersions_init_zero}
165
- #define grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_init_zero {false, 0, false, grpc_gcp_ServerHandshakeParameters_init_zero}
166
- #define grpc_gcp_NextHandshakeMessageReq_init_zero {{{NULL}, NULL}}
167
- #define grpc_gcp_HandshakerReq_init_zero {false, grpc_gcp_StartClientHandshakeReq_init_zero, false, grpc_gcp_StartServerHandshakeReq_init_zero, false, grpc_gcp_NextHandshakeMessageReq_init_zero}
168
- #define grpc_gcp_HandshakerResult_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, false, grpc_gcp_Identity_init_zero, false, grpc_gcp_Identity_init_zero, false, 0, false, grpc_gcp_RpcProtocolVersions_init_zero}
169
- #define grpc_gcp_HandshakerStatus_init_zero {false, 0, {{NULL}, NULL}}
170
- #define grpc_gcp_HandshakerResp_init_zero {{{NULL}, NULL}, false, 0, false, grpc_gcp_HandshakerResult_init_zero, false, grpc_gcp_HandshakerStatus_init_zero}
171
-
172
- /* Field tags (for use in manual encoding/decoding) */
173
- #define grpc_gcp_Identity_service_account_tag 1
174
- #define grpc_gcp_Identity_hostname_tag 2
175
- #define grpc_gcp_NextHandshakeMessageReq_in_bytes_tag 1
176
- #define grpc_gcp_ServerHandshakeParameters_record_protocols_tag 1
177
- #define grpc_gcp_ServerHandshakeParameters_local_identities_tag 2
178
- #define grpc_gcp_Endpoint_ip_address_tag 1
179
- #define grpc_gcp_Endpoint_port_tag 2
180
- #define grpc_gcp_Endpoint_protocol_tag 3
181
- #define grpc_gcp_HandshakerResult_application_protocol_tag 1
182
- #define grpc_gcp_HandshakerResult_record_protocol_tag 2
183
- #define grpc_gcp_HandshakerResult_key_data_tag 3
184
- #define grpc_gcp_HandshakerResult_peer_identity_tag 4
185
- #define grpc_gcp_HandshakerResult_local_identity_tag 5
186
- #define grpc_gcp_HandshakerResult_keep_channel_open_tag 6
187
- #define grpc_gcp_HandshakerResult_peer_rpc_versions_tag 7
188
- #define grpc_gcp_HandshakerStatus_code_tag 1
189
- #define grpc_gcp_HandshakerStatus_details_tag 2
190
- #define grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_key_tag 1
191
- #define grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_value_tag 2
192
- #define grpc_gcp_HandshakerResp_out_frames_tag 1
193
- #define grpc_gcp_HandshakerResp_bytes_consumed_tag 2
194
- #define grpc_gcp_HandshakerResp_result_tag 3
195
- #define grpc_gcp_HandshakerResp_status_tag 4
196
- #define grpc_gcp_StartClientHandshakeReq_handshake_security_protocol_tag 1
197
- #define grpc_gcp_StartClientHandshakeReq_application_protocols_tag 2
198
- #define grpc_gcp_StartClientHandshakeReq_record_protocols_tag 3
199
- #define grpc_gcp_StartClientHandshakeReq_target_identities_tag 4
200
- #define grpc_gcp_StartClientHandshakeReq_local_identity_tag 5
201
- #define grpc_gcp_StartClientHandshakeReq_local_endpoint_tag 6
202
- #define grpc_gcp_StartClientHandshakeReq_remote_endpoint_tag 7
203
- #define grpc_gcp_StartClientHandshakeReq_target_name_tag 8
204
- #define grpc_gcp_StartClientHandshakeReq_rpc_versions_tag 9
205
- #define grpc_gcp_StartServerHandshakeReq_application_protocols_tag 1
206
- #define grpc_gcp_StartServerHandshakeReq_handshake_parameters_tag 2
207
- #define grpc_gcp_StartServerHandshakeReq_in_bytes_tag 3
208
- #define grpc_gcp_StartServerHandshakeReq_local_endpoint_tag 4
209
- #define grpc_gcp_StartServerHandshakeReq_remote_endpoint_tag 5
210
- #define grpc_gcp_StartServerHandshakeReq_rpc_versions_tag 6
211
- #define grpc_gcp_HandshakerReq_client_start_tag 1
212
- #define grpc_gcp_HandshakerReq_server_start_tag 2
213
- #define grpc_gcp_HandshakerReq_next_tag 3
214
-
215
- /* Struct field encoding specification for nanopb */
216
- extern const pb_field_t grpc_gcp_Endpoint_fields[4];
217
- extern const pb_field_t grpc_gcp_Identity_fields[3];
218
- extern const pb_field_t grpc_gcp_StartClientHandshakeReq_fields[10];
219
- extern const pb_field_t grpc_gcp_ServerHandshakeParameters_fields[3];
220
- extern const pb_field_t grpc_gcp_StartServerHandshakeReq_fields[7];
221
- extern const pb_field_t grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_fields[3];
222
- extern const pb_field_t grpc_gcp_NextHandshakeMessageReq_fields[2];
223
- extern const pb_field_t grpc_gcp_HandshakerReq_fields[4];
224
- extern const pb_field_t grpc_gcp_HandshakerResult_fields[8];
225
- extern const pb_field_t grpc_gcp_HandshakerStatus_fields[3];
226
- extern const pb_field_t grpc_gcp_HandshakerResp_fields[5];
227
-
228
- /* Maximum encoded size of messages (where known) */
229
- /* grpc_gcp_Endpoint_size depends on runtime parameters */
230
- /* grpc_gcp_Identity_size depends on runtime parameters */
231
- /* grpc_gcp_StartClientHandshakeReq_size depends on runtime parameters */
232
- /* grpc_gcp_ServerHandshakeParameters_size depends on runtime parameters */
233
- /* grpc_gcp_StartServerHandshakeReq_size depends on runtime parameters */
234
- #define grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_size (17 + grpc_gcp_ServerHandshakeParameters_size)
235
- /* grpc_gcp_NextHandshakeMessageReq_size depends on runtime parameters */
236
- #define grpc_gcp_HandshakerReq_size (18 + grpc_gcp_StartClientHandshakeReq_size + grpc_gcp_StartServerHandshakeReq_size + grpc_gcp_NextHandshakeMessageReq_size)
237
- /* grpc_gcp_HandshakerResult_size depends on runtime parameters */
238
- /* grpc_gcp_HandshakerStatus_size depends on runtime parameters */
239
- /* grpc_gcp_HandshakerResp_size depends on runtime parameters */
240
-
241
- /* Message IDs (where set with "msgid" option) */
242
- #ifdef PB_MSGID
243
-
244
- #define HANDSHAKER_MESSAGES \
245
-
246
-
247
- #endif
248
-
249
- #ifdef __cplusplus
250
- } /* extern "C" */
251
- #endif
252
- /* @@protoc_insertion_point(eof) */
253
-
254
- #endif