Unfortunately, I am in C code of the VPP plugin and all I have for span src
and dst is names of the interfaces, "TenGigabitEthernet3/0/0",
"TenGigabitEthernet3/0/1".  Is there an unformat trick to convert the name
to sw_if_index - I see unformat_vnet_sw_interface but I don't have access to
any unformat_input_t*.  Am using C API for the first time.

 

Hemant

 

From: v...@barachs.net <v...@barachs.net> 
Sent: Wednesday, July 07, 2021 6:29 PM
To: hem...@mnkcg.com; vpp-dev@lists.fd.io
Subject: RE: [vpp-dev] how to use span api in c code?

 

That doc URL is from 17.04. 

 

See span_add_delete_entry() in span.[ch].

 

HTH... Dave 

 

From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>  <vpp-dev@lists.fd.io
<mailto:vpp-dev@lists.fd.io> > On Behalf Of hemant via lists.fd.io
Sent: Wednesday, July 7, 2021 5:40 PM
To: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> 
Subject: [vpp-dev] how to use span api in c code?

 

I see

 

https://docs.fd.io/vpp/17.04/span_doc.html

 

The link about says this is the api: : sw_interface_span_enable_disable

 

I call the API in C code as: 

sw_interface_span_enable_disable ("TenGigabitEthernet3/0/0",
"TenGigabitEthernet3/0/1", 3, true);

 

When I compile the code I get this error:

 

error: implicit declaration of function 'sw_interface_span_enable_disable'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]

 

What header file do I need to include? Span.h doesn't include this api.

 

Hemant

 

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19717): https://lists.fd.io/g/vpp-dev/message/19717
Mute This Topic: https://lists.fd.io/mt/84055396/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to