Lines Matching refs:port
147 TEST_CASE("snmp_parse_server: hostname and port", "[snmp_parse_server]") {
151 SECTION("simple name and numeric port") {
153 const auto port = "10007"s;
154 const auto str = host + ":" + port;
158 REQUIRE(sc.cport == port);
162 SECTION("simple name and string port") {
164 const auto port = "telnet"s;
165 const auto str = host + ":" + port;
169 REQUIRE(sc.cport == port);
173 SECTION("name with embedded colon and numeric port") {
175 const auto port = "10007"s;
176 const auto str = host + ":" + port;
180 REQUIRE(sc.cport == port);
184 SECTION("FQDN with embedded colon and numeric port") {
186 const auto port = "10007"s;
187 const auto str = host + ":" + port;
191 REQUIRE(sc.cport == port);
195 SECTION("simple name and empty port") {
197 const auto port = ""s;
198 const auto str = host + ":" + port;
200 REQUIRE(sc.error == "empty port name"s);
204 TEST_CASE("snmp_parse_server: ipv6 and port", "[snmp_parse_server]") {
208 SECTION("ANY address and numeric port") {
210 const auto port = "10007"s;
211 const auto str = "[" + host + "]:" + port;
215 REQUIRE(sc.cport == port);
219 SECTION("localhost address and string port") {
221 const auto port = "snmp"s;
222 const auto str = "[" + host + "]:" + port;
226 REQUIRE(sc.cport == port);
230 SECTION("some address name and empty port") {
232 const auto port = ""s;
233 const auto str = "[" + host + "]:" + port;
235 REQUIRE(sc.error == "empty port name"s);
391 TEST_CASE("snmp_parse_server: transport, host and port", "[snmp_parse_server]") {
395 SECTION("udp, host and port") {
398 const auto port = "ssh"s;
399 const auto str = trans + "::" + host + ":" + port;
403 REQUIRE(sc.cport == port);
407 SECTION("udp, host with colon and port") {
410 const auto port = "ssh"s;
411 const auto str = trans + "::" + host + ":" + port;
415 REQUIRE(sc.cport == port);
419 SECTION("udp and port") {
422 const auto port = "ssh"s;
423 const auto str = trans + "::" + host + ":" + port;
427 REQUIRE(sc.cport == port);
431 SECTION("udp6, ipv6 and port") {
434 const auto port = "ssh"s;
435 const auto str = trans + "::[" + host + "]:" + port;
439 REQUIRE(sc.cport == port);
485 TEST_CASE("snmp_parse_server: transport, community, host and port", "[snmp_parse_server]")
490 SECTION("transport, community, host and numeric port") {
494 const auto port = "65000"s;
495 const auto str = trans + "::" + comm + "@" + host + ":" + port;
499 REQUIRE(sc.cport == port);
503 SECTION("transport, community, ipv4 and symbolic port") {
507 const auto port = "ftp"s;
508 const auto str = trans + "::" + comm + "@" + host + ":" + port;
512 REQUIRE(sc.cport == port);
516 SECTION("transport, community, ipv6 and symbolic port") {
520 const auto port = "ftp"s;
521 const auto str = trans + "::" + comm + "@[" + host + "]:" + port;
525 REQUIRE(sc.cport == port);