api: add to_net parameter to endian messages
[vpp.git] / src / vlibmemory / vlib_api_cli.c
index 4492f5a..6ae81cd 100644 (file)
@@ -554,7 +554,7 @@ vl_msg_api_process_file (vlib_main_t * vm, u8 * filename,
            }
          if (m)
            {
-             m->endian_handler (tmpbuf + sizeof (uword));
+             m->endian_handler (tmpbuf + sizeof (uword), 1 /* to network */);
            }
        }
 
@@ -674,7 +674,7 @@ vl_msg_print_trace (u8 *msg, void *ctx)
       clib_memcpy_fast (tmpbuf, msg, msg_length);
       msg = tmpbuf;
 
-      m->endian_handler (tmpbuf);
+      m->endian_handler (tmpbuf, 0 /* from network */);
     }
 
   vlib_cli_output (a->vm, "%U\n",
@@ -824,7 +824,7 @@ vl_msg_exec_json_command (vlib_main_t *vm, cJSON *o)
        }
 
       if (clib_arch_is_little_endian)
-       m->endian_handler (msg);
+       m->endian_handler (msg, 1 /* to network */);
 
       if (!m->handler)
        {