[P4-dev] runtime_CLI.py in C/C++

Andreas Pantelopoulos padelopoulos at gmail.com
Mon May 22 13:33:45 EDT 2017


Thanks for the prompt answer. What exactly do you mean by " bmv2 Thrift API
is not meant to be portable" ? What I want to achieve is port the
simple_switch in the ns3 simulator so as to run simulations that involve p4
switches *almost* automatically. To do that, all the binaries should be
compiled in a specific manner. Since, runtime_CLI.py is in python, it is
not compiled. I tried converting in C and then compiling but that has other

Thanks for the code link!


On Mon, May 22, 2017 at 7:26 PM, Antonin Bas <antonin at barefootnetworks.com>

> Hi,
> I am not aware of a C++ equivalent of the runtime_CLI. The bmv2 Thrift API
> is not meant to be portable and is not available on other P4 targets, so
> you should probably keep that in mind.
> There is an example of a small C++ client implementing a control-plane for
> L2 switching here: https://github.com/p4lang/behavioral-model/blob/
> master/targets/l2_switch/learn_client/learn_client.cpp. It is only meant
> to be used with l2_switch.p4 but can be adapted for other P4 programs.
> Best,
> Antonin
> On Mon, May 22, 2017 at 10:12 AM, Andreas Pantelopoulos <
> padelopoulos at gmail.com> wrote:
>> Hello,
>> I am wondering if you have developed any other thrift client for the
>> behavioral model in C or C++. It might as well be not fully functional or
>> just a draft.
>> Thanks a lot,
>> Andreas
>> _______________________________________________
>> P4-dev mailing list
>> P4-dev at lists.p4.org
>> http://lists.p4.org/mailman/listinfo/p4-dev_lists.p4.org
> --
> Antonin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20170522/613cfe70/attachment-0002.html>

More information about the P4-dev mailing list