X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fnetflow.c;h=77572fe58be1428378f6ed3472363e73a06e48ba;hb=926ea16ea3b38df0f34cdccdea92aa4933ca9dd4;hp=af6dda78cc1c58060abb45c4dc642127eed9d681;hpb=d98e60075528c3065ad453f7add4b30f22edcde3;p=openvswitch diff --git a/ofproto/netflow.c b/ofproto/netflow.c index af6dda78..77572fe5 100644 --- a/ofproto/netflow.c +++ b/ofproto/netflow.c @@ -148,7 +148,7 @@ gen_netflow_rec(struct netflow *nf, struct netflow_flow *nf_flow, nf_rec->init_time = htonl(nf_flow->created - nf->boot_time); nf_rec->used_time = htonl(MAX(nf_flow->created, expired->used) - nf->boot_time); - if (expired->flow.nw_proto == IP_TYPE_ICMP) { + if (expired->flow.nw_proto == IPPROTO_ICMP) { /* In NetFlow, the ICMP type and code are concatenated and * placed in the 'dst_port' field. */ uint8_t type = ntohs(expired->flow.tp_src); @@ -283,6 +283,14 @@ netflow_destroy(struct netflow *nf) } } +/* Initializes a new 'nf_flow' given that the caller has already cleared it to + * all-zero-bits. */ +void +netflow_flow_init(struct netflow_flow *nf_flow OVS_UNUSED) +{ + /* Nothing to do. */ +} + void netflow_flow_clear(struct netflow_flow *nf_flow) {