summaryrefslogtreecommitdiffstats
path: root/vpp-api/python/pneum
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-api/python/pneum')
-rw-r--r--vpp-api/python/pneum/pneum.c5
-rw-r--r--vpp-api/python/pneum/pneum.h2
-rw-r--r--vpp-api/python/pneum/test_pneum.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/vpp-api/python/pneum/pneum.c b/vpp-api/python/pneum/pneum.c
index 7250cf6a..ebe47b2f 100644
--- a/vpp-api/python/pneum/pneum.c
+++ b/vpp-api/python/pneum/pneum.c
@@ -116,11 +116,14 @@ pneum_rx_thread_fn (void *arg)
}
int
-pneum_connect (char *name)
+pneum_connect (char * name, char * chroot_prefix)
{
int rv = 0;
pneum_main_t *pm = &pneum_main;
+ if (chroot_prefix != NULL)
+ vl_set_memory_root_path (chroot_prefix);
+
if ((rv = vl_client_api_map("/vpe-api"))) {
clib_warning ("vl_client_api map rv %d", rv);
return rv;
diff --git a/vpp-api/python/pneum/pneum.h b/vpp-api/python/pneum/pneum.h
index 75fccf84..75b10f8d 100644
--- a/vpp-api/python/pneum/pneum.h
+++ b/vpp-api/python/pneum/pneum.h
@@ -15,7 +15,7 @@
#ifndef included_pneum_h
#define included_pneum_h
-int pneum_connect(char *name);
+int pneum_connect(char * name, char * chroot_prefix);
int pneum_disconnect(void);
int pneum_read(char **data, int *l);
int pneum_write(char *data, int len);
diff --git a/vpp-api/python/pneum/test_pneum.c b/vpp-api/python/pneum/test_pneum.c
index b3131953..20c29a7e 100644
--- a/vpp-api/python/pneum/test_pneum.c
+++ b/vpp-api/python/pneum/test_pneum.c
@@ -76,7 +76,7 @@ int main (int argc, char ** argv)
vl_api_show_version_t message;
vl_api_show_version_t *mp;
int async = 1;
- int rv = pneum_connect("pneum_client");
+ int rv = pneum_connect("pneum_client", NULL);
if (rv != 0) {
printf("Connect failed: %d\n", rv);