#include #include #include #include "mymx.h" int main(int argc, char**argv) { const char*peer_name = argv[1]; uint64_t peer_nic; mx_endpoint_t endpoint; mx_endpoint_addr_t addr; int rc; mx_set_error_handler(MX_ERRORS_RETURN); rc = mx_init(); check_rc(rc, "init"); rc = mx_open_endpoint(MX_ANY_NIC, endpoint_id, filter, NULL, 0, &endpoint); check_rc(rc, "open_endpoint"); rc = mx_hostname_to_nic_id(peer_name, &peer_nic); check_rc(rc, "hostname_to_nic_id"); printf("destination: %llX\n", peer_nic); rc = mx_connect(endpoint, peer_nic, endpoint_id, filter, timeout, &addr); check_rc(rc, "mx_connect"); return 0; }