Hi Ole / Others, Thanks for your email, i getting following compilation error [root@8f57181df3a1 vpp_c_api_examples]#* gcc vpp_api_client_test3.c -o vpp_api_client_test3.o -lvlibmemoryclient -lsvm -lvppinfra -lvlib* In file included from /usr/include/vppinfra/error.h:41:0, from /usr/include/vlibapi/api.h:24, from vpp_api_client_test3.c:3: /usr/include/vppinfra/clib.h:43:18: error: missing binary operator before token "(" #if __has_include(<vppinfra/config.h>) ^ In file included from /usr/include/vppinfra/mem.h:49:0, from /usr/include/vppinfra/vec.h:42, from /usr/include/vppinfra/error.h:53, from /usr/include/vlibapi/api.h:24, from vpp_api_client_test3.c:3: /usr/include/vppinfra/string.h:92:34: error: expected ';', ',' or ')' before 'dst' clib_memcpy_fast (void *restrict dst, const void *restrict src, size_t n) ^ [root@8f57181df3a1 vpp_c_api_examples]# vim /usr/include/vppinfra/clib.h +43 [root@8f57181df3a1 vpp_c_api_examples]# vim /usr/include/vppinfra/clib.h +43 [root@8f57181df3a1 vpp_c_api_examples]# gcc --version gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44) Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@8f57181df3a1 vpp_c_api_examples]# ----------------- c -code ---------------- #include<stdio.h> #include<stdlib.h> #include <vlibapi/api.h> #include <vlibmemory/api.h> #include <vpp/api/vpe_msg_enum.h> #define vl_typedefs #define vl_endianfun #include <vpp/api/vpe_all_api_h.h> #undef vl_typedefs #undef vl_endianfun int main() { char *name = "vpp-test-app"; clib_mem_init_thread_safe (0, 64ULL << 20); if (vl_client_api_map("/vpe-api")) { printf("unable to map....\n"); goto quit; } if (vl_client_connect("vpp-test-app", 0, 32) < 0) { printf("unable to connect \n"); vl_client_api_unmap(); goto quit; } printf("successfully connected... \n"); quit: return 0; } ------------ Can you please suggest what can i be doing worng ? Thanks, Regards, Venu On Thu, 30 Sept 2021 at 13:21, <otr...@employees.org> wrote: > Hi Venu, > > > Any examples for VAPI shared to use binary APIs ? > > Try this for a start: > https://git.fd.io/vpp/tree/src/vpp-api/vapi/vapi_c_test.c > > Cheers, > Ole > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20239): https://lists.fd.io/g/vpp-dev/message/20239 Mute This Topic: https://lists.fd.io/mt/85796959/21656 Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp Mute #socket-api:https://lists.fd.io/g/vpp-dev/mutehashtag/socket-api Mute #sock-api:https://lists.fd.io/g/vpp-dev/mutehashtag/sock-api Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-