On Tue, 17 Jul 2018 10:30:19 +0900,
knet solutions wrote:
> 
> [1  <multipart/alternative (7bit)>]
> [1.1  <text/plain; UTF-8 (7bit)>]
> Hi,
> 
> How do we extract the payload from the packet.
> 
> 
> 
> Ethernet Header  + (Payload)
>                               IP Header   +   (Payload)
>                                                      TCP/UDP  Header
> +       (Payload)
> 
> 
> 
> On different scenarios, i require different  payloads (ethernet payload, IP
> payload,  TCP/UDP Payload).
> 
> 
> I referred earlier mailing list, and it was mentioned as,
> 
> pkt.protocols[-1]
> 
> 
> But this gives only payload for TCP or UDP Protocols.
> 
> How to extract other protocol payloads?
> 

use get_protocol. See:

http://osrg.github.io/ryu-book/en/html/packet_lib.html#basic-usage

--
IWAMOTO Toshihiro

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to