diff options
author | Craig Tiller <ctiller@google.com> | 2016-11-16 17:12:55 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-11-16 17:12:55 -0800 |
commit | d7f15831c6a4dcd71fe10babde7bb0b380fb1eff (patch) | |
tree | ec9a9ae51e356def3b7b7e63d440286c33ae2cbf /src/core/lib/transport | |
parent | 3468fe1a767a19e596e9c3a2f62f18b412b51e5f (diff) |
Tests are starting to compile
Diffstat (limited to 'src/core/lib/transport')
-rw-r--r-- | src/core/lib/transport/static_metadata.c | 100 | ||||
-rw-r--r-- | src/core/lib/transport/static_metadata.h | 25 |
2 files changed, 67 insertions, 58 deletions
diff --git a/src/core/lib/transport/static_metadata.c b/src/core/lib/transport/static_metadata.c index e24f3fa55e..0eb5cd5d74 100644 --- a/src/core/lib/transport/static_metadata.c +++ b/src/core/lib/transport/static_metadata.c @@ -101,14 +101,16 @@ static uint8_t g_raw_bytes[] = { 110, 103, 101, 114, 101, 102, 101, 114, 101, 114, 114, 101, 102, 114, 101, 115, 104, 114, 101, 116, 114, 121, 45, 97, 102, 116, 101, 114, 58, 115, 99, 104, 101, 109, 101, 115, 101, 114, 118, 101, 114, 115, 101, 116, 45, - 99, 111, 111, 107, 105, 101, 47, 47, 105, 110, 100, 101, 120, 46, 104, - 116, 109, 108, 58, 115, 116, 97, 116, 117, 115, 115, 116, 114, 105, 99, - 116, 45, 116, 114, 97, 110, 115, 112, 111, 114, 116, 45, 115, 101, 99, - 117, 114, 105, 116, 121, 116, 101, 116, 114, 97, 105, 108, 101, 114, 115, - 116, 114, 97, 110, 115, 102, 101, 114, 45, 101, 110, 99, 111, 100, 105, - 110, 103, 117, 115, 101, 114, 45, 97, 103, 101, 110, 116, 118, 97, 114, - 121, 118, 105, 97, 119, 119, 119, 45, 97, 117, 116, 104, 101, 110, 116, - 105, 99, 97, 116, 101}; + 99, 111, 111, 107, 105, 101, 47, 47, 103, 114, 112, 99, 46, 108, 98, + 46, 118, 49, 46, 76, 111, 97, 100, 66, 97, 108, 97, 110, 99, 101, + 114, 47, 66, 97, 108, 97, 110, 99, 101, 76, 111, 97, 100, 47, 105, + 110, 100, 101, 120, 46, 104, 116, 109, 108, 58, 115, 116, 97, 116, 117, + 115, 115, 116, 114, 105, 99, 116, 45, 116, 114, 97, 110, 115, 112, 111, + 114, 116, 45, 115, 101, 99, 117, 114, 105, 116, 121, 116, 101, 116, 114, + 97, 105, 108, 101, 114, 115, 116, 114, 97, 110, 115, 102, 101, 114, 45, + 101, 110, 99, 111, 100, 105, 110, 103, 117, 115, 101, 114, 45, 97, 103, + 101, 110, 116, 118, 97, 114, 121, 118, 105, 97, 119, 119, 119, 45, 97, + 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101}; static void static_ref(void *unused) {} static void static_unref(grpc_exec_ctx *exec_ctx, void *unused) {} @@ -116,7 +118,7 @@ static grpc_slice_refcount g_refcnt = {static_ref, static_unref}; bool grpc_is_static_metadata_string(grpc_slice slice) { return slice.refcount != NULL && slice.refcount->ref == static_ref; -}; +} const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT] = { {.refcount = &g_refcnt, @@ -294,25 +296,27 @@ const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT] = { {.refcount = &g_refcnt, .data.refcounted = {.bytes = g_raw_bytes + 891, .length = 1}}, {.refcount = &g_refcnt, - .data.refcounted = {.bytes = g_raw_bytes + 892, .length = 11}}, + .data.refcounted = {.bytes = g_raw_bytes + 892, .length = 36}}, + {.refcount = &g_refcnt, + .data.refcounted = {.bytes = g_raw_bytes + 928, .length = 11}}, {.refcount = &g_refcnt, - .data.refcounted = {.bytes = g_raw_bytes + 903, .length = 7}}, + .data.refcounted = {.bytes = g_raw_bytes + 939, .length = 7}}, {.refcount = &g_refcnt, - .data.refcounted = {.bytes = g_raw_bytes + 910, .length = 25}}, + .data.refcounted = {.bytes = g_raw_bytes + 946, .length = 25}}, {.refcount = &g_refcnt, - .data.refcounted = {.bytes = g_raw_bytes + 935, .length = 2}}, + .data.refcounted = {.bytes = g_raw_bytes + 971, .length = 2}}, {.refcount = &g_refcnt, - .data.refcounted = {.bytes = g_raw_bytes + 937, .length = 8}}, + .data.refcounted = {.bytes = g_raw_bytes + 973, .length = 8}}, {.refcount = &g_refcnt, - .data.refcounted = {.bytes = g_raw_bytes + 945, .length = 17}}, + .data.refcounted = {.bytes = g_raw_bytes + 981, .length = 17}}, {.refcount = &g_refcnt, - .data.refcounted = {.bytes = g_raw_bytes + 962, .length = 10}}, + .data.refcounted = {.bytes = g_raw_bytes + 998, .length = 10}}, {.refcount = &g_refcnt, - .data.refcounted = {.bytes = g_raw_bytes + 972, .length = 4}}, + .data.refcounted = {.bytes = g_raw_bytes + 1008, .length = 4}}, {.refcount = &g_refcnt, - .data.refcounted = {.bytes = g_raw_bytes + 976, .length = 3}}, + .data.refcounted = {.bytes = g_raw_bytes + 1012, .length = 3}}, {.refcount = &g_refcnt, - .data.refcounted = {.bytes = g_raw_bytes + 979, .length = 16}}, + .data.refcounted = {.bytes = g_raw_bytes + 1015, .length = 16}}, }; static const uint8_t g_revmap[] = { @@ -376,13 +380,15 @@ static const uint8_t g_revmap[] = { 255, 255, 82, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 83, 255, 255, 255, 255, 255, 255, 84, 255, 255, 255, 255, 255, 85, 255, 255, 255, 255, 255, 255, 255, 255, 255, 86, 87, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 88, 255, 255, 255, 255, 255, 255, 89, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 90, 255, 91, 255, 255, 255, 255, 255, 255, 255, - 92, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 93, 255, 255, 255, 255, 255, 255, 255, 255, 255, 94, 255, 255, - 255, 95, 255, 255, 96, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255}; + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 88, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 89, 255, 255, 255, 255, 255, + 255, 90, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 91, 255, 92, 255, + 255, 255, 255, 255, 255, 255, 93, 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 94, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 95, 255, 255, 255, 96, 255, 255, 97, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; int grpc_static_metadata_index(grpc_slice slice) { if (GRPC_SLICE_LENGTH(slice) == 0) return 33; @@ -390,7 +396,7 @@ int grpc_static_metadata_index(grpc_slice slice) { if (ofs > sizeof(g_revmap)) return -1; uint8_t id = g_revmap[ofs]; return id == 255 ? -1 : id; -}; +} grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT]; uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = { @@ -405,14 +411,14 @@ uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = { #define ELEMS_PHASHSALT 0x9e3779b9 static const uint8_t elems_tab[] = { - 47, 1, 61, 0, 32, 0, 47, 1, 37, 0, 0, 0, 47, 61, 76, 0, - 76, 0, 61, 0, 32, 37, 51, 0, 47, 47, 79, 4, 76, 1, 0, 0, - 0, 76, 0, 47, 85, 34, 0, 10, 0, 28, 0, 76, 0, 61, 0, 0, - 46, 4, 12, 47, 88, 28, 61, 79, 28, 70, 0, 68, 85, 0, 87, 0, + 0, 17, 61, 28, 4, 12, 47, 0, 0, 0, 61, 0, 47, 0, 61, 76, + 61, 70, 76, 0, 0, 10, 4, 60, 0, 0, 0, 16, 88, 47, 1, 76, + 76, 0, 76, 0, 61, 0, 23, 0, 0, 51, 1, 92, 32, 0, 25, 0, + 34, 0, 37, 0, 76, 76, 32, 38, 70, 79, 81, 0, 64, 0, 0, 0, }; static uint32_t elems_phash(uint32_t val) { - val -= 1003; + val -= 917; uint32_t a, b, rsl; @@ -423,27 +429,27 @@ static uint32_t elems_phash(uint32_t val) { } static const uint16_t elem_keys[] = { - 1218, 8544, 2652, 1973, 7264, 2458, 2734, 3933, 1682, 6435, 3912, 3941, - 4396, 4418, 4850, 4852, 7890, 8541, 6726, 9345, 6338, 6629, 6920, 3939, - 7156, 8540, 8108, 8090, 8181, 8666, 8821, 1876, 8545, 1391, 8957, 1488, - 7405, 7265, 3331, 2943, 2846, 6241, 4851, 2167, 5368, 1585, 1294, 1003, - 9054, 6144, 8542, 8539, 8107, 7793, 7502, 7159, 7696, 2264, 6532, 2749, - 9248, 1197, 7987, 9151, 7017, 4423, 7119, 6823, 3938, 8543, 3525, 3911, - 2070, 2361, 2555, 6047, 1100, 3940, 3622, 3428, 8278, 0, 0, 0, + 2091, 1405, 8728, 2777, 7192, 2287, 2581, 2483, 2973, 4441, 3561, 3951, + 6403, 4463, 9441, 8726, 2875, 5423, 8730, 7338, 6109, 6207, 6697, 6893, + 7229, 8363, 8729, 3952, 8173, 8191, 8725, 8853, 9245, 9343, 1601, 8727, + 7481, 7340, 7971, 7775, 6501, 3973, 3659, 3979, 3463, 3980, 1307, 8190, + 9010, 8731, 4901, 6599, 3365, 7579, 6795, 9147, 9539, 8069, 6305, 7873, + 1209, 1111, 1699, 1503, 7089, 4468, 2189, 4900, 7232, 2385, 6991, 3978, + 1993, 4902, 2679, 2762, 1013, 3981, 1230, 1895, 8265, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; static const uint8_t elem_idxs[] = { - 3, 72, 17, 10, 54, 15, 18, 28, 8, 44, 27, 32, 33, 34, 36, 38, 60, - 69, 47, 80, 43, 46, 49, 30, 52, 68, 64, 62, 65, 74, 75, 9, 73, 5, - 76, 6, 56, 55, 22, 21, 20, 42, 37, 12, 39, 7, 4, 1, 77, 41, 70, - 67, 63, 59, 57, 53, 58, 13, 45, 19, 79, 2, 61, 78, 50, 35, 51, 48, - 29, 71, 24, 26, 11, 14, 16, 40, 0, 31, 25, 23, 66}; + 11, 5, 70, 19, 51, 13, 16, 15, 21, 33, 24, 26, 43, 34, 79, 68, 20, + 39, 72, 54, 40, 41, 46, 48, 52, 66, 71, 27, 62, 64, 67, 74, 77, 78, + 7, 69, 56, 55, 60, 58, 44, 28, 25, 30, 23, 31, 4, 63, 75, 73, 37, + 45, 22, 57, 47, 76, 80, 61, 42, 59, 2, 0, 8, 6, 50, 35, 12, 36, + 53, 14, 49, 29, 10, 38, 17, 18, 1, 32, 3, 9, 65}; grpc_mdelem *grpc_static_mdelem_for_static_strings(int a, int b) { if (a == -1 || b == -1) return NULL; - uint32_t k = (uint32_t)(a * 97 + b); + uint32_t k = (uint32_t)(a * 98 + b); uint32_t h = elems_phash(k); return elem_keys[h] == k ? &grpc_static_mdelem_table[elem_idxs[h]] : NULL; } @@ -455,9 +461,9 @@ const uint8_t grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2] = 40, 32, 40, 53, 40, 58, 40, 59, 40, 60, 40, 61, 45, 31, 45, 53, 45, 58, 50, 0, 50, 1, 50, 2, 55, 33, 62, 33, 63, 33, 64, 33, 65, 33, 66, 33, 67, 33, 68, 33, 69, 33, 70, 33, 71, 33, 72, 33, 73, 38, 73, 75, 73, 78, - 74, 86, 74, 87, 76, 33, 77, 33, 79, 33, 80, 33, 81, 33, 82, 33, 83, 39, - 83, 56, 83, 57, 84, 33, 85, 33, 88, 3, 88, 4, 88, 5, 88, 6, 88, 7, - 88, 8, 88, 9, 89, 33, 90, 91, 92, 33, 93, 33, 94, 33, 95, 33, 96, 33}; + 74, 86, 74, 88, 76, 33, 77, 33, 79, 33, 80, 33, 81, 33, 82, 33, 83, 39, + 83, 56, 83, 57, 84, 33, 85, 33, 89, 3, 89, 4, 89, 5, 89, 6, 89, 7, + 89, 8, 89, 9, 90, 33, 91, 92, 93, 33, 94, 33, 95, 33, 96, 33, 97, 33}; const uint8_t grpc_static_accept_encoding_metadata[8] = {0, 29, 26, 30, 28, 32, 27, 31}; diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h index c6348a5280..282a3231ca 100644 --- a/src/core/lib/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -44,7 +44,7 @@ #include "src/core/lib/transport/metadata.h" -#define GRPC_STATIC_MDSTR_COUNT 97 +#define GRPC_STATIC_MDSTR_COUNT 98 extern const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT]; /* "0" */ #define GRPC_MDSTR_0 (grpc_static_slice_table[0]) @@ -223,26 +223,29 @@ extern const grpc_slice grpc_static_slice_table[GRPC_STATIC_MDSTR_COUNT]; #define GRPC_MDSTR_SET_COOKIE (grpc_static_slice_table[85]) /* "/" */ #define GRPC_MDSTR_SLASH (grpc_static_slice_table[86]) +/* "/grpc.lb.v1.LoadBalancer/BalanceLoad" */ +#define GRPC_MDSTR_SLASH_GRPC_DOT_LB_DOT_V1_DOT_LOADBALANCER_SLASH_BALANCELOAD \ + (grpc_static_slice_table[87]) /* "/index.html" */ -#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[87]) +#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (grpc_static_slice_table[88]) /* ":status" */ -#define GRPC_MDSTR_STATUS (grpc_static_slice_table[88]) +#define GRPC_MDSTR_STATUS (grpc_static_slice_table[89]) /* "strict-transport-security" */ -#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[89]) +#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (grpc_static_slice_table[90]) /* "te" */ -#define GRPC_MDSTR_TE (grpc_static_slice_table[90]) +#define GRPC_MDSTR_TE (grpc_static_slice_table[91]) /* "trailers" */ -#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[91]) +#define GRPC_MDSTR_TRAILERS (grpc_static_slice_table[92]) /* "transfer-encoding" */ -#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[92]) +#define GRPC_MDSTR_TRANSFER_ENCODING (grpc_static_slice_table[93]) /* "user-agent" */ -#define GRPC_MDSTR_USER_AGENT (grpc_static_slice_table[93]) +#define GRPC_MDSTR_USER_AGENT (grpc_static_slice_table[94]) /* "vary" */ -#define GRPC_MDSTR_VARY (grpc_static_slice_table[94]) +#define GRPC_MDSTR_VARY (grpc_static_slice_table[95]) /* "via" */ -#define GRPC_MDSTR_VIA (grpc_static_slice_table[95]) +#define GRPC_MDSTR_VIA (grpc_static_slice_table[96]) /* "www-authenticate" */ -#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[96]) +#define GRPC_MDSTR_WWW_AUTHENTICATE (grpc_static_slice_table[97]) bool grpc_is_static_metadata_string(grpc_slice slice); |