More info from the want_ip4_arp_events API (see src/vnet/ip/ip.api) where the
mac_ip param in the events will tell the client if the event is for ARP
resolution in L# or MAC/IP info in BDs:
/** \brief Register for IP4 ARP resolution event on receing ARP reply or
MAC/IP info from ARP requests in L2 BDs
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
@param enable_disable - 1 => register for events, 0 => cancel registration
@param pid - sender's pid
@param ip - exact IP4 address of interested arp resolution event, or
0 to get MAC/IP info from ARP requests in BDs
*/
autoreply define want_ip4_arp_events
{
u32 client_index;
u32 context;
u8 enable_disable;
u32 pid;
vl_api_ip4_address_t ip;
};
/** \brief Tell client about an IP4 ARP resolution event or
MAC/IP info from ARP requests in L2 BDs
@param client_index - opaque cookie to identify the sender
@param ip - the exact ip4 address of interest
@param pid - client pid registered to receive notification
@param sw_if_index - interface which received ARP packet
@param mac - the new mac address
@param mac_ip - 0: ARP resolution event, 1: MAC/IP info from L2 BDs
*/
define ip4_arp_event
{
u32 client_index;
vl_api_ip4_address_t ip;
u32 pid;
u32 sw_if_index;
vl_api_mac_address_t mac;
u8 mac_ip;
};
Regards,
John
-Original Message-
From: vpp-dev@lists.fd.io On Behalf Of John Lo (loj) via
Lists.Fd.Io
Sent: Thursday, April 18, 2019 11:30 AM
To: Raj ; vpp-dev
Cc: vpp-dev@lists.fd.io
Subject: Re: [vpp-dev] Using wildcard-ip4-arp-publisher-process
Hi Raj,
The registration for ARP events with specific IP is different to when
registration for a wild card IP.
If a client register for ARP events for a specific IP address, an event will be
sent by VPP to the client when ARP resolution occurred for the specified IP
address in L3 FIB.
If a client register for ARP events for a wild card IP address, an event will
be sent by VPP to client when an ARP request was sent by an interface in a
bridge domain (BD) where the ARP-termination feature is enabled in that BD. It
has nothing to do with ARP resolution but rather an interface in a BD sent an
ARP request or GARP. It is designed for clients to learn MAC and IP of an
interface in a BD which can be useful if these are interfaces for VMs. Again
- these events are generated from a BD for the registered client only if ARP
termination is enabled on a BD. ARP termination is not enabled on BDs by
default.
Hope this helps,
John
-Original Message-
From: vpp-dev@lists.fd.io On Behalf Of Raj
Sent: Thursday, April 18, 2019 9:38 AM
To: vpp-dev
Subject: [vpp-dev] Using wildcard-ip4-arp-publisher-process
Hi all,
I am trying to get ARP events from VPP and found that there is a
'wildcard-ip4-arp-publisher-process' process which could be used. To use this,
I registered a client using API `vpp.api.want_ip4_arp_events` using 0 as IP
address argument. I could see that registration is happening and
`wc_arp_set_publisher_node` function was getting invoked, as it should.
But the node was not reporting any ARP events to the client. Looking through
the code, the main function in the node, `wc_arp_process (vlib_main_t vm,
vlib_node_runtime_t rt, vlib_frame_t * f)` is not getting invoked.
I also registered another client, using `vpp.api.want_ip4_arp_events` but using
a valid IP addres as IP address in argument. Here I'm able to get the ARP
events in the client process from ip-route-resolver-process, as expected.
I just need to figure out why wildcard-ip4-arp-publisher-process is not
reporting ARP events, though ip-route-resolver-process is doing so.
Thanks and Regards,
Raj
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12816): https://lists.fd.io/g/vpp-dev/message/12816
Mute This Topic: https://lists.fd.io/mt/31223473/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-