By the way I would need to access it to increment it by a certain uint32_t value
So something like Uint32_t inc = 5; struct tcp_header *tcpheader = dp_packet_l4(ctx->xin->packet); uint32_t tcp_seq_to_print = ntohl(get_16aligned_be32(&tcpHeader->tcp_seq)); tcp_seq_to_print += inc; and then set tcpheader->tcp_seq = tcp_seq_to_print //obviously a type error here Thanks! From: Luca Mancini<mailto:[email protected]> Sent: Friday, July 24, 2020 10:32 To: discuss<mailto:[email protected]>; Numan Siddique<mailto:[email protected]> Subject: RE: [ovs-discuss] ovs_16aligned_be32 type Hi Numan, Unfortunately I tried this already and it prints an outrageous number: struct tcp_header *tcpheader = dp_packet_l4(ctx->xin->packet); uint32_t tcp_seq_to_print = ntohl(get_16aligned_be32(&tcpHeader->tcp_seq)); VLOG_ERR("tcp seq = %u", tcp_seq_to_print); It prints: 2393808764 and I’m certain it should be a one digit number Luca From: Numan Siddique<mailto:[email protected]> Sent: Friday, July 24, 2020 10:02 To: Luca Mancini<mailto:[email protected]> Cc: [email protected]<mailto:[email protected]> Subject: Re: [ovs-discuss] ovs_16aligned_be32 type On Fri, Jul 24, 2020 at 3:34 AM Luca Mancini <[email protected]<mailto:[email protected]>> wrote: Can some please tell me how to print the value, ovs_16aligned_be32 tcp_seq These types confuse me uint32_t tcp_seq_to_print = ntohl(get_16aligned_be32(&tcp_seq)) ; VLOG_INFO("tcp seq = %u", tcp_seq_to_print); Thanks Numan _______________________________________________ discuss mailing list [email protected]<mailto:[email protected]> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
_______________________________________________ discuss mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
