struct ethernet_header_t *hdr0 =  vlib_buffer_get_current (b);

    struct ip4_header_t *hdr1 = 0;

    hdr1 = (ip4_header_t *) (hdr0 + 1);

    struct udp_header_t *hdr2 = 0;

    hdr2 = (udp_header_t *) (hdr1 + 1);



Hemant



From: [email protected] <[email protected]> On Behalf Of 
[email protected]
Sent: Thursday, June 10, 2021 3:49 PM
To: [email protected]
Subject: [vpp-dev] vpp plugin to parse a packet to check ipv4 or ipv6 #vpp 
#vpp-dev #classify #vnet



Hi,

I am newbie to VPP Plugin development.
I am able to create a sample plugin and check the packets passing through my 
node.
I am trying to check the packet is ipv4 or ipv6

i am able to get the pointer to ethernet header from vlib buffer from the 
below API call in my while loop

en0 = vlib_buffer_get_current (b0)

Now my question is can someone point to an VPP API/ sample plugin
* To traverse through the packet to identify below from the vlib_buffer_t i.e 
from b0
* the ip protocol of a packet i.e ipv4 or ipv6
* tcp packet or not.

Any directions to my basic question much appreciated.



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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#19556): https://lists.fd.io/g/vpp-dev/message/19556
Mute This Topic: https://lists.fd.io/mt/83453317/21656
Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp
Mute #vnet:https://lists.fd.io/g/vpp-dev/mutehashtag/vnet
Mute #classify:https://lists.fd.io/g/vpp-dev/mutehashtag/classify
Mute #vpp-dev:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-dev
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to