Re: [ovs-discuss] How to store the tcp_src or tcp_dst field value in a variable and then print in vlogs?

2019-02-18 Thread Flavio Leitner
On Mon, Feb 18, 2019 at 11:05:53AM +0800, Krish wrote: > Thanks for reply Ben. > Does it mean that *miniflow_extract* will also initialize the L3 header > pointer? If you look at the miniflow_extract(), you will see that it calls dp_packet_reset_offsets(packet) which will set all the header point

Re: [ovs-discuss] How to store the tcp_src or tcp_dst field value in a variable and then print in vlogs?

2019-02-18 Thread Krish
Flavio, Thank you for the clarification. You explained it very well. I don't want to wait for the miniflow_extraction, so I am left with parsing packet myself. Here is what I am doing now: for(numb=0;numbpackets[numb]; const void *data = dp_packet_data(packet); frame = data; *dp_packet_reset_of

Re: [ovs-discuss] How to store the tcp_src or tcp_dst field value in a variable and then print in vlogs?

2019-02-18 Thread Krish
Hi Flavio, I think I got tcp_src and tcp_dst values, I can also successfully print them. Here is what I did: for(numb=0;numbpackets[numb]; size_t size = dp_packet_size(packet); const void *data = dp_packet_data(packet); const char *frame = (const char *)data; dp_packet_reset_offsets(packet); *data