25#ifndef ROUTING_PROTOCOL_INCLUDED
26#define ROUTING_PROTOCOL_INCLUDED
44 if (
name ==
"classic") {
46 }
else if (
name ==
"x") {
49 throw std::invalid_argument(
"Invalid protocol name: '" +
name +
"'");
82 throw std::invalid_argument(
"Invalid protocol: " +
Type
supported protocols
Definition: base_protocol.h:32
Definition: protocol.h:33
static Type get_by_name(const std::string &name)
Returns type of the protocol by its name.
Definition: protocol.h:41
static Type get_default()
Definition: protocol.h:37
static std::string to_string(const Type &type)
Definition: protocol.h:55
virtual enum enum_protocol_type type() const =0
static constexpr uint16_t kXProtocolDefaultPort
Definition: protocol.h:92
static constexpr uint16_t kClassicProtocolDefaultPort
default server ports for supported protocols
Definition: protocol.h:91
static uint16_t get_default_port(Type type)
Returns default port for the selected protocol.
Definition: protocol.h:71
static std::string to_string(const LEX_STRING &str)
Definition: lex_string.h:50
struct result result
Definition: result.h:34
case opt name
Definition: sslopt-case.h:29