X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-print.c;h=c8c331ec0a34975cc5ff096993c86a8da431119f;hb=6b8c377a6e25b18da473c3a24dfad8ec9e01ad7f;hp=7e0963c08cb6ec39371d2a0968a69b3dd8bb62d4;hpb=631cf301a6f342fe832a54e8755c7fae5ffcdfa0;p=sliver-openvswitch.git diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 7e0963c08..c8c331ec0 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -68,16 +68,16 @@ ofp_packet_to_string(const void *data, size_t len) flow_extract(&buf, &md, &flow); flow_format(&ds, &flow); - l4_size = ofpbuf_get_l4_size(&buf); + l4_size = ofpbuf_l4_size(&buf); if (flow.nw_proto == IPPROTO_TCP && l4_size >= TCP_HEADER_LEN) { - struct tcp_header *th = ofpbuf_get_l4(&buf); + struct tcp_header *th = ofpbuf_l4(&buf); ds_put_format(&ds, " tcp_csum:%"PRIx16, ntohs(th->tcp_csum)); } else if (flow.nw_proto == IPPROTO_UDP && l4_size >= UDP_HEADER_LEN) { - struct udp_header *uh = ofpbuf_get_l4(&buf); + struct udp_header *uh = ofpbuf_l4(&buf); ds_put_format(&ds, " udp_csum:%"PRIx16, ntohs(uh->udp_csum)); } else if (flow.nw_proto == IPPROTO_SCTP && l4_size >= SCTP_HEADER_LEN) { - struct sctp_header *sh = ofpbuf_get_l4(&buf); + struct sctp_header *sh = ofpbuf_l4(&buf); ds_put_format(&ds, " sctp_csum:%"PRIx32, ntohl(sh->sctp_csum)); }