diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ext/transport/chttp2/client/insecure/README.md | 1 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/client/insecure/channel_create.c (renamed from src/core/lib/surface/channel_create.c) | 2 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/client/secure/README.md | 1 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/client/secure/secure_channel_create.c (renamed from src/core/lib/surface/secure_channel_create.c) | 7 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/server/insecure/README.md | 1 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/server/insecure/server_chttp2.c (renamed from src/core/lib/surface/server_chttp2.c) | 2 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/server/secure/README.md | 1 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c (renamed from src/core/lib/security/server_secure_chttp2.c) | 2 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/README.md | 4 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/alpn.c (renamed from src/core/lib/transport/chttp2/alpn.c) | 2 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/alpn.h (renamed from src/core/lib/transport/chttp2/alpn.h) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/bin_encoder.c (renamed from src/core/lib/transport/chttp2/bin_encoder.c) | 4 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/bin_encoder.h (renamed from src/core/lib/transport/chttp2/bin_encoder.h) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/chttp2_transport.c (renamed from src/core/lib/transport/chttp2_transport.c) | 10 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/chttp2_transport.h (renamed from src/core/lib/transport/chttp2_transport.h) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame.h (renamed from src/core/lib/transport/chttp2/frame.h) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame_data.c (renamed from src/core/lib/transport/chttp2/frame_data.c) | 4 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame_data.h (renamed from src/core/lib/transport/chttp2/frame_data.h) | 8 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame_goaway.c (renamed from src/core/lib/transport/chttp2/frame_goaway.c) | 4 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame_goaway.h (renamed from src/core/lib/transport/chttp2/frame_goaway.h) | 8 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame_ping.c (renamed from src/core/lib/transport/chttp2/frame_ping.c) | 4 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame_ping.h (renamed from src/core/lib/transport/chttp2/frame_ping.h) | 8 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame_rst_stream.c (renamed from src/core/lib/transport/chttp2/frame_rst_stream.c) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame_rst_stream.h (renamed from src/core/lib/transport/chttp2/frame_rst_stream.h) | 8 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame_settings.c (renamed from src/core/lib/transport/chttp2/frame_settings.c) | 10 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame_settings.h (renamed from src/core/lib/transport/chttp2/frame_settings.h) | 8 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame_window_update.c (renamed from src/core/lib/transport/chttp2/frame_window_update.c) | 4 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/frame_window_update.h (renamed from src/core/lib/transport/chttp2/frame_window_update.h) | 8 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/hpack_encoder.c (renamed from src/core/lib/transport/chttp2/hpack_encoder.c) | 10 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/hpack_encoder.h (renamed from src/core/lib/transport/chttp2/hpack_encoder.h) | 8 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/hpack_parser.c (renamed from src/core/lib/transport/chttp2/hpack_parser.c) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/hpack_parser.h (renamed from src/core/lib/transport/chttp2/hpack_parser.h) | 10 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/hpack_table.c (renamed from src/core/lib/transport/chttp2/hpack_table.c) | 2 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/hpack_table.h (renamed from src/core/lib/transport/chttp2/hpack_table.h) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/hpack_tables.txt (renamed from src/core/lib/transport/chttp2/hpack_tables.txt) | 0 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/http2_errors.h (renamed from src/core/lib/transport/chttp2/http2_errors.h) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/huffsyms.c (renamed from src/core/lib/transport/chttp2/huffsyms.c) | 2 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/huffsyms.h (renamed from src/core/lib/transport/chttp2/huffsyms.h) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/incoming_metadata.c (renamed from src/core/lib/transport/chttp2/incoming_metadata.c) | 4 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/incoming_metadata.h (renamed from src/core/lib/transport/chttp2/incoming_metadata.h) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/internal.h (renamed from src/core/lib/transport/chttp2/internal.h) | 28 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/parsing.c (renamed from src/core/lib/transport/chttp2/parsing.c) | 8 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/status_conversion.c (renamed from src/core/lib/transport/chttp2/status_conversion.c) | 2 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/status_conversion.h (renamed from src/core/lib/transport/chttp2/status_conversion.h) | 8 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/stream_lists.c (renamed from src/core/lib/transport/chttp2/stream_lists.c) | 2 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/stream_map.c (renamed from src/core/lib/transport/chttp2/stream_map.c) | 2 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/stream_map.h (renamed from src/core/lib/transport/chttp2/stream_map.h) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/timeout_encoding.c (renamed from src/core/lib/transport/chttp2/timeout_encoding.c) | 2 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/timeout_encoding.h (renamed from src/core/lib/transport/chttp2/timeout_encoding.h) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/varint.c (renamed from src/core/lib/transport/chttp2/varint.c) | 2 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/varint.h (renamed from src/core/lib/transport/chttp2/varint.h) | 6 | ||||
-rw-r--r-- | src/core/ext/transport/chttp2/transport/writing.c (renamed from src/core/lib/transport/chttp2/writing.c) | 4 | ||||
-rw-r--r-- | src/core/lib/iomgr/socket_utils_common_posix.c | 22 | ||||
-rw-r--r-- | src/core/lib/iomgr/socket_utils_posix.h | 10 | ||||
-rw-r--r-- | src/core/lib/iomgr/udp_server.c | 13 | ||||
-rw-r--r-- | src/core/lib/security/client_auth_filter.c | 4 | ||||
-rw-r--r-- | src/core/lib/security/security_connector.c | 2 | ||||
-rw-r--r-- | src/core/lib/surface/init.c | 2 | ||||
-rw-r--r-- | src/core/lib/transport/metadata.c | 2 |
59 files changed, 185 insertions, 153 deletions
diff --git a/src/core/ext/transport/chttp2/client/insecure/README.md b/src/core/ext/transport/chttp2/client/insecure/README.md new file mode 100644 index 0000000000..fa11463388 --- /dev/null +++ b/src/core/ext/transport/chttp2/client/insecure/README.md @@ -0,0 +1 @@ +Plugin for creating insecure channels using chttp2 diff --git a/src/core/lib/surface/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index e8777ce816..cf987a02e0 100644 --- a/src/core/lib/surface/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -40,6 +40,7 @@ #include <grpc/support/slice.h> #include <grpc/support/slice_buffer.h> +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/census/grpc_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/client_channel.h" @@ -49,7 +50,6 @@ #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" -#include "src/core/lib/transport/chttp2_transport.h" typedef struct { grpc_connector base; diff --git a/src/core/ext/transport/chttp2/client/secure/README.md b/src/core/ext/transport/chttp2/client/secure/README.md new file mode 100644 index 0000000000..405a86e5db --- /dev/null +++ b/src/core/ext/transport/chttp2/client/secure/README.md @@ -0,0 +1 @@ +Plugin for creating secure channels using chttp2 diff --git a/src/core/lib/surface/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index dcb367023e..203475ba52 100644 --- a/src/core/lib/surface/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -40,6 +40,7 @@ #include <grpc/support/slice.h> #include <grpc/support/slice_buffer.h> +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/client_channel.h" #include "src/core/lib/client_config/resolver_registry.h" @@ -49,7 +50,6 @@ #include "src/core/lib/security/security_context.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" -#include "src/core/lib/transport/chttp2_transport.h" #include "src/core/lib/tsi/transport_security_interface.h" typedef struct { @@ -267,7 +267,7 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, gpr_log(GPR_ERROR, "Cannot set security context in channel args."); grpc_exec_ctx_finish(&exec_ctx); return grpc_lame_client_channel_create( - target, GRPC_STATUS_INVALID_ARGUMENT, + target, GRPC_STATUS_INTERNAL, "Security connector exists in channel args."); } @@ -276,8 +276,7 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds, GRPC_SECURITY_OK) { grpc_exec_ctx_finish(&exec_ctx); return grpc_lame_client_channel_create( - target, GRPC_STATUS_INVALID_ARGUMENT, - "Failed to create security connector."); + target, GRPC_STATUS_INTERNAL, "Failed to create security connector."); } connector_arg = grpc_security_connector_to_arg(&security_connector->base); diff --git a/src/core/ext/transport/chttp2/server/insecure/README.md b/src/core/ext/transport/chttp2/server/insecure/README.md new file mode 100644 index 0000000000..fc0bc14ed7 --- /dev/null +++ b/src/core/ext/transport/chttp2/server/insecure/README.md @@ -0,0 +1 @@ +Plugin for creating insecure servers using chttp2 diff --git a/src/core/lib/surface/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index f0c2ee5153..c1ccfbf639 100644 --- a/src/core/lib/surface/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -36,12 +36,12 @@ #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc/support/useful.h> +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/http_server_filter.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/server.h" -#include "src/core/lib/transport/chttp2_transport.h" static void setup_transport(grpc_exec_ctx *exec_ctx, void *server, grpc_transport *transport) { diff --git a/src/core/ext/transport/chttp2/server/secure/README.md b/src/core/ext/transport/chttp2/server/secure/README.md new file mode 100644 index 0000000000..6bda696a9a --- /dev/null +++ b/src/core/ext/transport/chttp2/server/secure/README.md @@ -0,0 +1 @@ +Plugin for creating secure servers using chttp2 diff --git a/src/core/lib/security/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 7c9dd221ed..80834f4e88 100644 --- a/src/core/lib/security/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -39,6 +39,7 @@ #include <grpc/support/log.h> #include <grpc/support/sync.h> #include <grpc/support/useful.h> +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/http_server_filter.h" #include "src/core/lib/iomgr/endpoint.h" @@ -50,7 +51,6 @@ #include "src/core/lib/security/security_context.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/server.h" -#include "src/core/lib/transport/chttp2_transport.h" typedef struct grpc_server_secure_state { grpc_server *server; diff --git a/src/core/ext/transport/chttp2/transport/README.md b/src/core/ext/transport/chttp2/transport/README.md new file mode 100644 index 0000000000..4684e58759 --- /dev/null +++ b/src/core/ext/transport/chttp2/transport/README.md @@ -0,0 +1,4 @@ +chttp2 transport plugin - implements grpc over http2 + +Used by chttp2/{client,server}/{insecure,secure} plugins to implement most of +their functionality diff --git a/src/core/lib/transport/chttp2/alpn.c b/src/core/ext/transport/chttp2/transport/alpn.c index befe319180..c901905d02 100644 --- a/src/core/lib/transport/chttp2/alpn.c +++ b/src/core/ext/transport/chttp2/transport/alpn.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/transport/chttp2/alpn.h" +#include "src/core/ext/transport/chttp2/transport/alpn.h" #include <grpc/support/log.h> #include <grpc/support/useful.h> diff --git a/src/core/lib/transport/chttp2/alpn.h b/src/core/ext/transport/chttp2/transport/alpn.h index a9184e63a4..94843a1456 100644 --- a/src/core/lib/transport/chttp2/alpn.h +++ b/src/core/ext/transport/chttp2/transport/alpn.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_ALPN_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_ALPN_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_ALPN_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_ALPN_H #include <string.h> @@ -46,4 +46,4 @@ size_t grpc_chttp2_num_alpn_versions(void); * grpc_chttp2_num_alpn_versions()) */ const char *grpc_chttp2_get_alpn_version_index(size_t i); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_ALPN_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_ALPN_H */ diff --git a/src/core/lib/transport/chttp2/bin_encoder.c b/src/core/ext/transport/chttp2/transport/bin_encoder.c index 79d0aa3d6f..d39f99c271 100644 --- a/src/core/lib/transport/chttp2/bin_encoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.c @@ -31,12 +31,12 @@ * */ -#include "src/core/lib/transport/chttp2/bin_encoder.h" +#include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include <string.h> #include <grpc/support/log.h> -#include "src/core/lib/transport/chttp2/huffsyms.h" +#include "src/core/ext/transport/chttp2/transport/huffsyms.h" static const char alphabet[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; diff --git a/src/core/lib/transport/chttp2/bin_encoder.h b/src/core/ext/transport/chttp2/transport/bin_encoder.h index 1c5cd1e1c6..39dae973c9 100644 --- a/src/core/lib/transport/chttp2/bin_encoder.h +++ b/src/core/ext/transport/chttp2/transport/bin_encoder.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_BIN_ENCODER_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_BIN_ENCODER_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H #include <grpc/support/slice.h> @@ -51,4 +51,4 @@ gpr_slice grpc_chttp2_huffman_compress(gpr_slice input); return y; */ gpr_slice grpc_chttp2_base64_encode_and_huffman_compress(gpr_slice input); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_BIN_ENCODER_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_BIN_ENCODER_H */ diff --git a/src/core/lib/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 7fed3d8b47..0a307a73a6 100644 --- a/src/core/lib/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/transport/chttp2_transport.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include <math.h> #include <stdio.h> @@ -43,12 +43,12 @@ #include <grpc/support/string_util.h> #include <grpc/support/useful.h> +#include "src/core/ext/transport/chttp2/transport/http2_errors.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" +#include "src/core/ext/transport/chttp2/transport/status_conversion.h" +#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/string.h" -#include "src/core/lib/transport/chttp2/http2_errors.h" -#include "src/core/lib/transport/chttp2/internal.h" -#include "src/core/lib/transport/chttp2/status_conversion.h" -#include "src/core/lib/transport/chttp2/timeout_encoding.h" #include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/transport/transport_impl.h" diff --git a/src/core/lib/transport/chttp2_transport.h b/src/core/ext/transport/chttp2/transport/chttp2_transport.h index 5008cab7f8..8ebf9fced6 100644 --- a/src/core/lib/transport/chttp2_transport.h +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_TRANSPORT_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_TRANSPORT_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/transport/transport.h" @@ -48,4 +48,4 @@ void grpc_chttp2_transport_start_reading(grpc_exec_ctx *exec_ctx, grpc_transport *transport, gpr_slice *slices, size_t nslices); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_TRANSPORT_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H */ diff --git a/src/core/lib/transport/chttp2/frame.h b/src/core/ext/transport/chttp2/transport/frame.h index 4674bc9703..e1311a1805 100644 --- a/src/core/lib/transport/chttp2/frame.h +++ b/src/core/ext/transport/chttp2/transport/frame.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H #include <grpc/support/port_platform.h> #include <grpc/support/slice.h> @@ -66,4 +66,4 @@ typedef struct grpc_chttp2_transport_parsing grpc_chttp2_transport_parsing; #define GRPC_CHTTP2_DATA_FLAG_PADDED 8 #define GRPC_CHTTP2_FLAG_HAS_PRIORITY 0x20 -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_H */ diff --git a/src/core/lib/transport/chttp2/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c index cf25c3ccc1..cdd624647c 100644 --- a/src/core/lib/transport/chttp2/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -31,15 +31,15 @@ * */ -#include "src/core/lib/transport/chttp2/frame_data.h" +#include "src/core/ext/transport/chttp2/transport/frame_data.h" #include <string.h> #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc/support/useful.h> +#include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/support/string.h" -#include "src/core/lib/transport/chttp2/internal.h" #include "src/core/lib/transport/transport.h" grpc_chttp2_parse_error grpc_chttp2_data_parser_init( diff --git a/src/core/lib/transport/chttp2/frame_data.h b/src/core/ext/transport/chttp2/transport/frame_data.h index da404a42c6..f2762ed9de 100644 --- a/src/core/lib/transport/chttp2/frame_data.h +++ b/src/core/ext/transport/chttp2/transport/frame_data.h @@ -31,16 +31,16 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_DATA_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_DATA_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H /* Parser for GRPC streams embedded in DATA frames */ #include <grpc/support/slice.h> #include <grpc/support/slice_buffer.h> +#include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/transport/byte_stream.h" -#include "src/core/lib/transport/chttp2/frame.h" typedef enum { GRPC_CHTTP2_DATA_FH_0, @@ -98,4 +98,4 @@ void grpc_chttp2_encode_data(uint32_t id, gpr_slice_buffer *inbuf, uint32_t write_bytes, int is_eof, gpr_slice_buffer *outbuf); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_DATA_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_DATA_H */ diff --git a/src/core/lib/transport/chttp2/frame_goaway.c b/src/core/ext/transport/chttp2/transport/frame_goaway.c index bb8c28df90..3697fdef41 100644 --- a/src/core/lib/transport/chttp2/frame_goaway.c +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.c @@ -31,8 +31,8 @@ * */ -#include "src/core/lib/transport/chttp2/frame_goaway.h" -#include "src/core/lib/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/frame_goaway.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include <string.h> diff --git a/src/core/lib/transport/chttp2/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h index f64c44f3d9..e655134434 100644 --- a/src/core/lib/transport/chttp2/frame_goaway.h +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h @@ -31,14 +31,14 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_GOAWAY_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_GOAWAY_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H #include <grpc/support/port_platform.h> #include <grpc/support/slice.h> #include <grpc/support/slice_buffer.h> +#include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/transport/chttp2/frame.h" typedef enum { GRPC_CHTTP2_GOAWAY_LSI0, @@ -74,4 +74,4 @@ void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, gpr_slice debug_data, gpr_slice_buffer *slice_buffer); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_GOAWAY_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_GOAWAY_H */ diff --git a/src/core/lib/transport/chttp2/frame_ping.c b/src/core/ext/transport/chttp2/transport/frame_ping.c index 14ca394264..c0192a734d 100644 --- a/src/core/lib/transport/chttp2/frame_ping.c +++ b/src/core/ext/transport/chttp2/transport/frame_ping.c @@ -31,8 +31,8 @@ * */ -#include "src/core/lib/transport/chttp2/frame_ping.h" -#include "src/core/lib/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/frame_ping.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include <string.h> diff --git a/src/core/lib/transport/chttp2/frame_ping.h b/src/core/ext/transport/chttp2/transport/frame_ping.h index 7640fc4773..1c1d513c99 100644 --- a/src/core/lib/transport/chttp2/frame_ping.h +++ b/src/core/ext/transport/chttp2/transport/frame_ping.h @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_PING_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_PING_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H #include <grpc/support/slice.h> +#include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/transport/chttp2/frame.h" typedef struct { uint8_t byte; @@ -53,4 +53,4 @@ grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_PING_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_PING_H */ diff --git a/src/core/lib/transport/chttp2/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c index 060912afc4..acfc3627e8 100644 --- a/src/core/lib/transport/chttp2/frame_rst_stream.c +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c @@ -31,12 +31,12 @@ * */ -#include "src/core/lib/transport/chttp2/frame_rst_stream.h" -#include "src/core/lib/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/frame_rst_stream.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include <grpc/support/log.h> -#include "src/core/lib/transport/chttp2/frame.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" gpr_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code) { gpr_slice slice = gpr_slice_malloc(13); diff --git a/src/core/lib/transport/chttp2/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h index 93155fde9d..134f1368a0 100644 --- a/src/core/lib/transport/chttp2/frame_rst_stream.h +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H #include <grpc/support/slice.h> +#include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/transport/chttp2/frame.h" typedef struct { uint8_t byte; @@ -52,4 +52,4 @@ grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_RST_STREAM_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_RST_STREAM_H */ diff --git a/src/core/lib/transport/chttp2/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.c index 48429c2a78..799d87b87d 100644 --- a/src/core/lib/transport/chttp2/frame_settings.c +++ b/src/core/ext/transport/chttp2/transport/frame_settings.c @@ -31,18 +31,18 @@ * */ -#include "src/core/lib/transport/chttp2/frame_settings.h" -#include "src/core/lib/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/frame_settings.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include <string.h> #include <grpc/support/log.h> #include <grpc/support/useful.h> +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/ext/transport/chttp2/transport/http2_errors.h" #include "src/core/lib/debug/trace.h" -#include "src/core/lib/transport/chttp2/frame.h" -#include "src/core/lib/transport/chttp2/http2_errors.h" -#include "src/core/lib/transport/chttp2_transport.h" #define MAX_MAX_HEADER_LIST_SIZE (1024 * 1024 * 1024) diff --git a/src/core/lib/transport/chttp2/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h index 8b294de021..73524addf0 100644 --- a/src/core/lib/transport/chttp2/frame_settings.h +++ b/src/core/ext/transport/chttp2/transport/frame_settings.h @@ -31,13 +31,13 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_SETTINGS_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_SETTINGS_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H #include <grpc/support/port_platform.h> #include <grpc/support/slice.h> +#include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/transport/chttp2/frame.h" typedef enum { GRPC_CHTTP2_SPS_ID0, @@ -100,4 +100,4 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_SETTINGS_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_SETTINGS_H */ diff --git a/src/core/lib/transport/chttp2/frame_window_update.c b/src/core/ext/transport/chttp2/transport/frame_window_update.c index 2ab5003316..1a561cebaf 100644 --- a/src/core/lib/transport/chttp2/frame_window_update.c +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.c @@ -31,8 +31,8 @@ * */ -#include "src/core/lib/transport/chttp2/frame_window_update.h" -#include "src/core/lib/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/frame_window_update.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include <grpc/support/log.h> diff --git a/src/core/lib/transport/chttp2/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h index 4b1aea294d..f9f670b6f1 100644 --- a/src/core/lib/transport/chttp2/frame_window_update.h +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H #include <grpc/support/slice.h> +#include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/transport/chttp2/frame.h" typedef struct { uint8_t byte; @@ -53,4 +53,4 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_FRAME_WINDOW_UPDATE_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_FRAME_WINDOW_UPDATE_H */ diff --git a/src/core/lib/transport/chttp2/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c index 6b45929b04..819addd9e3 100644 --- a/src/core/lib/transport/chttp2/hpack_encoder.c +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/transport/chttp2/hpack_encoder.h" +#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include <assert.h> #include <string.h> @@ -45,10 +45,10 @@ #include <grpc/support/log.h> #include <grpc/support/useful.h> -#include "src/core/lib/transport/chttp2/bin_encoder.h" -#include "src/core/lib/transport/chttp2/hpack_table.h" -#include "src/core/lib/transport/chttp2/timeout_encoding.h" -#include "src/core/lib/transport/chttp2/varint.h" +#include "src/core/ext/transport/chttp2/transport/bin_encoder.h" +#include "src/core/ext/transport/chttp2/transport/hpack_table.h" +#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h" +#include "src/core/ext/transport/chttp2/transport/varint.h" #include "src/core/lib/transport/static_metadata.h" #define HASH_FRAGMENT_1(x) ((x)&255) diff --git a/src/core/lib/transport/chttp2/hpack_encoder.h b/src/core/ext/transport/chttp2/transport/hpack_encoder.h index de46a8f146..d79de35979 100644 --- a/src/core/lib/transport/chttp2/hpack_encoder.h +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.h @@ -31,13 +31,13 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_HPACK_ENCODER_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_HPACK_ENCODER_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H #include <grpc/support/port_platform.h> #include <grpc/support/slice.h> #include <grpc/support/slice_buffer.h> -#include "src/core/lib/transport/chttp2/frame.h" +#include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/metadata_batch.h" @@ -92,4 +92,4 @@ void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c, uint32_t id, grpc_metadata_batch *metadata, int is_eof, gpr_slice_buffer *outbuf); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_HPACK_ENCODER_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_ENCODER_H */ diff --git a/src/core/lib/transport/chttp2/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index d41ebab147..58e90f98f2 100644 --- a/src/core/lib/transport/chttp2/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -31,8 +31,8 @@ * */ -#include "src/core/lib/transport/chttp2/hpack_parser.h" -#include "src/core/lib/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/hpack_parser.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include <assert.h> #include <stddef.h> @@ -48,9 +48,9 @@ #include <grpc/support/port_platform.h> #include <grpc/support/useful.h> +#include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/string.h" -#include "src/core/lib/transport/chttp2/bin_encoder.h" typedef enum { NOT_BINARY, diff --git a/src/core/lib/transport/chttp2/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h index a534fd5cf4..0aaddc8b9c 100644 --- a/src/core/lib/transport/chttp2/hpack_parser.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h @@ -31,15 +31,15 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_HPACK_PARSER_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_HPACK_PARSER_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H #include <stddef.h> #include <grpc/support/port_platform.h> +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/ext/transport/chttp2/transport/hpack_table.h" #include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/transport/chttp2/frame.h" -#include "src/core/lib/transport/chttp2/hpack_table.h" #include "src/core/lib/transport/metadata.h" typedef struct grpc_chttp2_hpack_parser grpc_chttp2_hpack_parser; @@ -113,4 +113,4 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_HPACK_PARSER_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_PARSER_H */ diff --git a/src/core/lib/transport/chttp2/hpack_table.c b/src/core/ext/transport/chttp2/transport/hpack_table.c index f92bc26585..d02f4ddc61 100644 --- a/src/core/lib/transport/chttp2/hpack_table.c +++ b/src/core/ext/transport/chttp2/transport/hpack_table.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/transport/chttp2/hpack_table.h" +#include "src/core/ext/transport/chttp2/transport/hpack_table.h" #include <assert.h> #include <string.h> diff --git a/src/core/lib/transport/chttp2/hpack_table.h b/src/core/ext/transport/chttp2/transport/hpack_table.h index 2cbc02dd9c..b3475c8f5c 100644 --- a/src/core/lib/transport/chttp2/hpack_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_table.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_HPACK_TABLE_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_HPACK_TABLE_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H #include <grpc/support/port_platform.h> #include <grpc/support/slice.h> @@ -105,4 +105,4 @@ typedef struct { grpc_chttp2_hptbl_find_result grpc_chttp2_hptbl_find( const grpc_chttp2_hptbl *tbl, grpc_mdelem *md); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_HPACK_TABLE_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HPACK_TABLE_H */ diff --git a/src/core/lib/transport/chttp2/hpack_tables.txt b/src/core/ext/transport/chttp2/transport/hpack_tables.txt index 08842a0267..08842a0267 100644 --- a/src/core/lib/transport/chttp2/hpack_tables.txt +++ b/src/core/ext/transport/chttp2/transport/hpack_tables.txt diff --git a/src/core/lib/transport/chttp2/http2_errors.h b/src/core/ext/transport/chttp2/transport/http2_errors.h index 0238f9d80b..85542e2337 100644 --- a/src/core/lib/transport/chttp2/http2_errors.h +++ b/src/core/ext/transport/chttp2/transport/http2_errors.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_HTTP2_ERRORS_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_HTTP2_ERRORS_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_ERRORS_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_ERRORS_H /* error codes for RST_STREAM from http2 draft 14 section 7 */ typedef enum { @@ -53,4 +53,4 @@ typedef enum { GRPC_CHTTP2__ERROR_DO_NOT_USE = -1 } grpc_chttp2_error_code; -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_HTTP2_ERRORS_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HTTP2_ERRORS_H */ diff --git a/src/core/lib/transport/chttp2/huffsyms.c b/src/core/ext/transport/chttp2/transport/huffsyms.c index 27497e6ae0..91f62bf34b 100644 --- a/src/core/lib/transport/chttp2/huffsyms.c +++ b/src/core/ext/transport/chttp2/transport/huffsyms.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/transport/chttp2/huffsyms.h" +#include "src/core/ext/transport/chttp2/transport/huffsyms.h" /* Constants pulled from the HPACK spec, and converted to C using the vim command: diff --git a/src/core/lib/transport/chttp2/huffsyms.h b/src/core/ext/transport/chttp2/transport/huffsyms.h index 1ca77b9207..780baeaf55 100644 --- a/src/core/lib/transport/chttp2/huffsyms.h +++ b/src/core/ext/transport/chttp2/transport/huffsyms.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_HUFFSYMS_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_HUFFSYMS_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HUFFSYMS_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HUFFSYMS_H /* HPACK static huffman table */ @@ -45,4 +45,4 @@ typedef struct { extern const grpc_chttp2_huffsym grpc_chttp2_huffsyms[GRPC_CHTTP2_NUM_HUFFSYMS]; -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_HUFFSYMS_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_HUFFSYMS_H */ diff --git a/src/core/lib/transport/chttp2/incoming_metadata.c b/src/core/ext/transport/chttp2/transport/incoming_metadata.c index a1a8d37562..ef5fd4fe03 100644 --- a/src/core/lib/transport/chttp2/incoming_metadata.c +++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.c @@ -31,11 +31,11 @@ * */ -#include "src/core/lib/transport/chttp2/incoming_metadata.h" +#include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" #include <string.h> -#include "src/core/lib/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include <grpc/support/alloc.h> #include <grpc/support/log.h> diff --git a/src/core/lib/transport/chttp2/incoming_metadata.h b/src/core/ext/transport/chttp2/transport/incoming_metadata.h index edfa0adf9d..5e1dc72389 100644 --- a/src/core/lib/transport/chttp2/incoming_metadata.h +++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_INCOMING_METADATA_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_INCOMING_METADATA_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H #include "src/core/lib/transport/transport.h" @@ -57,4 +57,4 @@ void grpc_chttp2_incoming_metadata_buffer_add( void grpc_chttp2_incoming_metadata_buffer_set_deadline( grpc_chttp2_incoming_metadata_buffer *buffer, gpr_timespec deadline); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_INCOMING_METADATA_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INCOMING_METADATA_H */ diff --git a/src/core/lib/transport/chttp2/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 346e404204..2fae653623 100644 --- a/src/core/lib/transport/chttp2/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -31,24 +31,24 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_INTERNAL_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_INTERNAL_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H #include <assert.h> #include <stdbool.h> +#include "src/core/ext/transport/chttp2/transport/frame.h" +#include "src/core/ext/transport/chttp2/transport/frame_data.h" +#include "src/core/ext/transport/chttp2/transport/frame_goaway.h" +#include "src/core/ext/transport/chttp2/transport/frame_ping.h" +#include "src/core/ext/transport/chttp2/transport/frame_rst_stream.h" +#include "src/core/ext/transport/chttp2/transport/frame_settings.h" +#include "src/core/ext/transport/chttp2/transport/frame_window_update.h" +#include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" +#include "src/core/ext/transport/chttp2/transport/hpack_parser.h" +#include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" +#include "src/core/ext/transport/chttp2/transport/stream_map.h" #include "src/core/lib/iomgr/endpoint.h" -#include "src/core/lib/transport/chttp2/frame.h" -#include "src/core/lib/transport/chttp2/frame_data.h" -#include "src/core/lib/transport/chttp2/frame_goaway.h" -#include "src/core/lib/transport/chttp2/frame_ping.h" -#include "src/core/lib/transport/chttp2/frame_rst_stream.h" -#include "src/core/lib/transport/chttp2/frame_settings.h" -#include "src/core/lib/transport/chttp2/frame_window_update.h" -#include "src/core/lib/transport/chttp2/hpack_encoder.h" -#include "src/core/lib/transport/chttp2/hpack_parser.h" -#include "src/core/lib/transport/chttp2/incoming_metadata.h" -#include "src/core/lib/transport/chttp2/stream_map.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/transport_impl.h" @@ -777,4 +777,4 @@ void grpc_chttp2_ack_ping(grpc_exec_ctx *exec_ctx, void grpc_chttp2_become_writable(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_INTERNAL_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H */ diff --git a/src/core/lib/transport/chttp2/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 9ee52f63f2..a9f043cee3 100644 --- a/src/core/lib/transport/chttp2/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include <string.h> @@ -39,10 +39,10 @@ #include <grpc/support/log.h> #include <grpc/support/string_util.h> +#include "src/core/ext/transport/chttp2/transport/http2_errors.h" +#include "src/core/ext/transport/chttp2/transport/status_conversion.h" +#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h" #include "src/core/lib/profiling/timers.h" -#include "src/core/lib/transport/chttp2/http2_errors.h" -#include "src/core/lib/transport/chttp2/status_conversion.h" -#include "src/core/lib/transport/chttp2/timeout_encoding.h" #include "src/core/lib/transport/static_metadata.h" static int init_frame_parser(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/transport/chttp2/status_conversion.c b/src/core/ext/transport/chttp2/transport/status_conversion.c index 73dd63e720..5a79579989 100644 --- a/src/core/lib/transport/chttp2/status_conversion.c +++ b/src/core/ext/transport/chttp2/transport/status_conversion.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/transport/chttp2/status_conversion.h" +#include "src/core/ext/transport/chttp2/transport/status_conversion.h" int grpc_chttp2_grpc_status_to_http2_error(grpc_status_code status) { switch (status) { diff --git a/src/core/lib/transport/chttp2/status_conversion.h b/src/core/ext/transport/chttp2/transport/status_conversion.h index 241417d32e..e92a5f6702 100644 --- a/src/core/lib/transport/chttp2/status_conversion.h +++ b/src/core/ext/transport/chttp2/transport/status_conversion.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_STATUS_CONVERSION_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_STATUS_CONVERSION_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STATUS_CONVERSION_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STATUS_CONVERSION_H #include <grpc/grpc.h> -#include "src/core/lib/transport/chttp2/http2_errors.h" +#include "src/core/ext/transport/chttp2/transport/http2_errors.h" /* Conversion of grpc status codes to http2 error codes (for RST_STREAM) */ grpc_chttp2_error_code grpc_chttp2_grpc_status_to_http2_error( @@ -47,4 +47,4 @@ grpc_status_code grpc_chttp2_http2_error_to_grpc_status( grpc_status_code grpc_chttp2_http2_status_to_grpc_status(int status); int grpc_chttp2_grpc_status_to_http2_status(grpc_status_code status); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_STATUS_CONVERSION_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STATUS_CONVERSION_H */ diff --git a/src/core/lib/transport/chttp2/stream_lists.c b/src/core/ext/transport/chttp2/transport/stream_lists.c index b51a041dc7..01ed49b1ec 100644 --- a/src/core/lib/transport/chttp2/stream_lists.c +++ b/src/core/ext/transport/chttp2/transport/stream_lists.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include <grpc/support/log.h> diff --git a/src/core/lib/transport/chttp2/stream_map.c b/src/core/ext/transport/chttp2/transport/stream_map.c index dbbbe783bf..3fb1389650 100644 --- a/src/core/lib/transport/chttp2/stream_map.c +++ b/src/core/ext/transport/chttp2/transport/stream_map.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/transport/chttp2/stream_map.h" +#include "src/core/ext/transport/chttp2/transport/stream_map.h" #include <string.h> diff --git a/src/core/lib/transport/chttp2/stream_map.h b/src/core/ext/transport/chttp2/transport/stream_map.h index 1c56b18e54..4e8586fe46 100644 --- a/src/core/lib/transport/chttp2/stream_map.h +++ b/src/core/ext/transport/chttp2/transport/stream_map.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_STREAM_MAP_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_STREAM_MAP_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_MAP_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_MAP_H #include <grpc/support/port_platform.h> @@ -81,4 +81,4 @@ void grpc_chttp2_stream_map_for_each(grpc_chttp2_stream_map *map, void *value), void *user_data); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_STREAM_MAP_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_STREAM_MAP_H */ diff --git a/src/core/lib/transport/chttp2/timeout_encoding.c b/src/core/ext/transport/chttp2/transport/timeout_encoding.c index 0edacaafd3..d5b9da9252 100644 --- a/src/core/lib/transport/chttp2/timeout_encoding.c +++ b/src/core/ext/transport/chttp2/transport/timeout_encoding.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/transport/chttp2/timeout_encoding.h" +#include "src/core/ext/transport/chttp2/transport/timeout_encoding.h" #include <stdio.h> #include <string.h> diff --git a/src/core/lib/transport/chttp2/timeout_encoding.h b/src/core/ext/transport/chttp2/transport/timeout_encoding.h index 731beb5a37..dc64f9cc3f 100644 --- a/src/core/lib/transport/chttp2/timeout_encoding.h +++ b/src/core/ext/transport/chttp2/transport/timeout_encoding.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_TIMEOUT_ENCODING_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_TIMEOUT_ENCODING_H #include <grpc/support/time.h> #include "src/core/lib/support/string.h" @@ -44,4 +44,4 @@ void grpc_chttp2_encode_timeout(gpr_timespec timeout, char *buffer); int grpc_chttp2_decode_timeout(const char *buffer, gpr_timespec *timeout); -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_TIMEOUT_ENCODING_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_TIMEOUT_ENCODING_H */ diff --git a/src/core/lib/transport/chttp2/varint.c b/src/core/ext/transport/chttp2/transport/varint.c index 6dfef45362..6721d042a2 100644 --- a/src/core/lib/transport/chttp2/varint.c +++ b/src/core/ext/transport/chttp2/transport/varint.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/transport/chttp2/varint.h" +#include "src/core/ext/transport/chttp2/transport/varint.h" uint32_t grpc_chttp2_hpack_varint_length(uint32_t tail_value) { if (tail_value < (1 << 7)) { diff --git a/src/core/lib/transport/chttp2/varint.h b/src/core/ext/transport/chttp2/transport/varint.h index e4a0ae3c22..6442ea3c5a 100644 --- a/src/core/lib/transport/chttp2/varint.h +++ b/src/core/ext/transport/chttp2/transport/varint.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_TRANSPORT_CHTTP2_VARINT_H -#define GRPC_CORE_LIB_TRANSPORT_CHTTP2_VARINT_H +#ifndef GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_VARINT_H +#define GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_VARINT_H #include <grpc/support/port_platform.h> @@ -72,4 +72,4 @@ void grpc_chttp2_hpack_write_varint_tail(uint32_t tail_value, uint8_t* target, } \ } while (0) -#endif /* GRPC_CORE_LIB_TRANSPORT_CHTTP2_VARINT_H */ +#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_VARINT_H */ diff --git a/src/core/lib/transport/chttp2/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index daea331d31..8d5886f225 100644 --- a/src/core/lib/transport/chttp2/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -31,14 +31,14 @@ * */ -#include "src/core/lib/transport/chttp2/internal.h" +#include "src/core/ext/transport/chttp2/transport/internal.h" #include <limits.h> #include <grpc/support/log.h> +#include "src/core/ext/transport/chttp2/transport/http2_errors.h" #include "src/core/lib/profiling/timers.h" -#include "src/core/lib/transport/chttp2/http2_errors.h" static void finalize_outbuf(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing); diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index 9dbc2784e4..b433aee7fa 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -89,6 +89,28 @@ int grpc_set_socket_no_sigpipe_if_possible(int fd) { #endif } +int grpc_set_socket_ip_pktinfo_if_possible(int fd) { +#ifdef GPR_HAVE_IP_PKTINFO + int get_local_ip = 1; + return 0 == setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip, + sizeof(get_local_ip)); +#else + (void)fd; + return 1; +#endif +} + +int grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) { +#ifdef GPR_HAVE_IPV6_RECVPKTINFO + int get_local_ip = 1; + return 0 == setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip, + sizeof(get_local_ip)); +#else + (void)fd; + return 1; +#endif +} + /* set a socket to close on exec */ int grpc_set_socket_cloexec(int fd, int close_on_exec) { int oldflags = fcntl(fd, F_GETFD, 0); diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h index 063f298d72..f73ad6317d 100644 --- a/src/core/lib/iomgr/socket_utils_posix.h +++ b/src/core/lib/iomgr/socket_utils_posix.h @@ -68,6 +68,16 @@ int grpc_ipv6_loopback_available(void); If SO_NO_SIGPIPE is not available, returns 1. */ int grpc_set_socket_no_sigpipe_if_possible(int fd); +/* Tries to set IP_PKTINFO if available on this platform. + Returns 1 on success, 0 on failure. + If IP_PKTINFO is not available, returns 1. */ +int grpc_set_socket_ip_pktinfo_if_possible(int fd); + +/* Tries to set IPV6_RECVPKTINFO if available on this platform. + Returns 1 on success, 0 on failure. + If IPV6_RECVPKTINFO is not available, returns 1. */ +int grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd); + /* An enum to keep track of IPv4/IPv6 socket modes. Currently, this information is only used when a socket is first created, but diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index 3d8bcc9c81..9068109c3a 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -208,8 +208,6 @@ static int prepare_socket(int fd, const struct sockaddr *addr, size_t addr_len) { struct sockaddr_storage sockname_temp; socklen_t sockname_len; - int get_local_ip; - int rc; if (fd < 0) { goto error; @@ -220,14 +218,9 @@ static int prepare_socket(int fd, const struct sockaddr *addr, strerror(errno)); } - get_local_ip = 1; - rc = setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip, - sizeof(get_local_ip)); - if (rc == 0 && addr->sa_family == AF_INET6) { -#if !defined(__APPLE__) - rc = setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip, - sizeof(get_local_ip)); -#endif + if (grpc_set_socket_ip_pktinfo_if_possible(fd) && + addr->sa_family == AF_INET6) { + grpc_set_socket_ipv6_recvpktinfo_if_possible(fd); } GPR_ASSERT(addr_len < ~(socklen_t)0); diff --git a/src/core/lib/security/client_auth_filter.c b/src/core/lib/security/client_auth_filter.c index b9e5bf0339..af6073e560 100644 --- a/src/core/lib/security/client_auth_filter.c +++ b/src/core/lib/security/client_auth_filter.c @@ -172,7 +172,7 @@ static void send_security_metadata(grpc_exec_ctx *exec_ctx, calld->creds = grpc_composite_call_credentials_create(channel_call_creds, ctx->creds, NULL); if (calld->creds == NULL) { - bubble_up_error(exec_ctx, elem, GRPC_STATUS_INVALID_ARGUMENT, + bubble_up_error(exec_ctx, elem, GRPC_STATUS_INTERNAL, "Incompatible credentials set on channel and call."); return; } @@ -201,7 +201,7 @@ static void on_host_checked(grpc_exec_ctx *exec_ctx, void *user_data, char *error_msg; gpr_asprintf(&error_msg, "Invalid host %s set in :authority metadata.", grpc_mdstr_as_c_string(calld->host)); - bubble_up_error(exec_ctx, elem, GRPC_STATUS_INVALID_ARGUMENT, error_msg); + bubble_up_error(exec_ctx, elem, GRPC_STATUS_INTERNAL, error_msg); gpr_free(error_msg); } } diff --git a/src/core/lib/security/security_connector.c b/src/core/lib/security/security_connector.c index 5474bc3a9e..48b23a9dcf 100644 --- a/src/core/lib/security/security_connector.c +++ b/src/core/lib/security/security_connector.c @@ -42,6 +42,7 @@ #include <grpc/support/slice_buffer.h> #include <grpc/support/string_util.h> +#include "src/core/ext/transport/chttp2/transport/alpn.h" #include "src/core/lib/security/credentials.h" #include "src/core/lib/security/handshake.h" #include "src/core/lib/security/secure_endpoint.h" @@ -49,7 +50,6 @@ #include "src/core/lib/support/env.h" #include "src/core/lib/support/load_file.h" #include "src/core/lib/support/string.h" -#include "src/core/lib/transport/chttp2/alpn.h" #include "src/core/lib/tsi/fake_transport_security.h" #include "src/core/lib/tsi/ssl_transport_security.h" diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index dcb9c62d36..dbfc8a9336 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -40,6 +40,7 @@ #include <grpc/support/alloc.h> #include <grpc/support/time.h> /* TODO(ctiller): find another way? - better not to include census here */ +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/census/grpc_plugin.h" #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/client_channel.h" @@ -67,7 +68,6 @@ #include "src/core/lib/surface/lame_client.h" #include "src/core/lib/surface/server.h" #include "src/core/lib/surface/surface_trace.h" -#include "src/core/lib/transport/chttp2_transport.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/transport_impl.h" diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 7605f09991..451c8d1cd3 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -44,11 +44,11 @@ #include <grpc/support/string_util.h> #include <grpc/support/time.h> +#include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/murmur_hash.h" #include "src/core/lib/support/string.h" -#include "src/core/lib/transport/chttp2/bin_encoder.h" #include "src/core/lib/transport/static_metadata.h" /* There are two kinds of mdelem and mdstr instances. |