Austin Schuh | 0a0a827 | 2021-12-08 13:19:32 -0800 | [diff] [blame] | 1 | #include "aos/network/sctp_lib.h" |
Austin Schuh | 60e7794 | 2022-05-16 17:48:24 -0700 | [diff] [blame] | 2 | |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 3 | #include "absl/flags/flag.h" |
Austin Schuh | 0a0a827 | 2021-12-08 13:19:32 -0800 | [diff] [blame] | 4 | |
Philipp Schrader | 790cb54 | 2023-07-05 21:06:52 -0700 | [diff] [blame] | 5 | #include "aos/init.h" |
| 6 | |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 7 | ABSL_FLAG(std::string, host, "", "host to resolve"); |
| 8 | ABSL_FLAG(int32_t, port, 2977, "port to use"); |
Austin Schuh | 0a0a827 | 2021-12-08 13:19:32 -0800 | [diff] [blame] | 9 | |
| 10 | int main(int argc, char **argv) { |
| 11 | aos::InitGoogle(&argc, &argv); |
| 12 | struct sockaddr_storage sockaddr = aos::message_bridge::ResolveSocket( |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 13 | absl::GetFlag(FLAGS_host), absl::GetFlag(FLAGS_port), |
| 14 | aos::message_bridge::Ipv6Enabled()); |
Austin Schuh | 0a0a827 | 2021-12-08 13:19:32 -0800 | [diff] [blame] | 15 | LOG(INFO) << "Family " << aos::message_bridge::Family(sockaddr); |
| 16 | LOG(INFO) << "Address " << aos::message_bridge::Address(sockaddr); |
| 17 | return 0; |
| 18 | } |