aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat
diff options
context:
space:
mode:
Diffstat (limited to 'src/vat')
-rw-r--r--src/vat/api_format.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c
index a84a67e75ba..e7d0b026312 100644
--- a/src/vat/api_format.c
+++ b/src/vat/api_format.c
@@ -103,13 +103,16 @@ int
vat_socket_connect (vat_main_t * vam)
{
int rv;
+ api_main_t *am = vlibapi_get_main ();
vam->socket_client_main = &socket_client_main;
if ((rv = vl_socket_client_connect ((char *) vam->socket_name,
"vpp_api_test",
0 /* default socket rx, tx buffer */ )))
return rv;
+
/* vpp expects the client index in network order */
vam->my_client_index = htonl (socket_client_main.client_index);
+ am->my_client_index = vam->my_client_index;
return 0;
}
#else /* vpp built-in case, we don't do sockets... */