| 63 | }; |
| 64 | |
| 65 | static inline enum proxy_tok_match match_proxy_token(const str *buf, |
| 66 | const char *tok, int tok_len) |
| 67 | { |
| 68 | int cmp_len; |
| 69 | |
| 70 | cmp_len = (buf->len < tok_len) ? buf->len : tok_len; |
| 71 | if (strncasecmp(buf->s, tok, cmp_len) != 0) |
| 72 | return PP_TOK_MISMATCH; |
| 73 | if (buf->len < tok_len) |
| 74 | return PP_TOK_PARTIAL; |
| 75 | return PP_TOK_MATCH; |
| 76 | } |
| 77 | |
| 78 | int is_net_proxy_protocol(char *buf, int size) |
| 79 | { |
no outgoing calls
no test coverage detected