]> git.proxmox.com Git - mirror_ovs.git/blame - lib/ipf.h
ovsdb-idl: Fix iteration over tracked rows with no actual data.
[mirror_ovs.git] / lib / ipf.h
CommitLineData
4ea96698
DB
1/*
2 * Copyright (c) 2019 Nicira, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef IPF_H
18#define IPF_H 1
19
20#include "dp-packet.h"
21#include "openvswitch/types.h"
22
23struct ipf;
24
25struct ipf_proto_status {
26 uint64_t nfrag_accepted;
27 uint64_t nfrag_completed_sent;
28 uint64_t nfrag_expired_sent;
29 uint64_t nfrag_too_small;
30 uint64_t nfrag_overlap;
31 uint64_t nfrag_purged;
32 unsigned int min_frag_size;
33 bool enabled;
34};
35
36struct ipf_status {
37 struct ipf_proto_status v4;
38 struct ipf_proto_status v6;
39 unsigned int nfrag;
40 unsigned int nfrag_max;
41};
42
43struct ipf *ipf_init(void);
44void ipf_destroy(struct ipf *ipf);
45void ipf_preprocess_conntrack(struct ipf *ipf, struct dp_packet_batch *pb,
46 long long now, ovs_be16 dl_type, uint16_t zone,
47 uint32_t hash_basis);
48
49void ipf_postprocess_conntrack(struct ipf *ipf, struct dp_packet_batch *pb,
50 long long now, ovs_be16 dl_type);
51
52int ipf_set_enabled(struct ipf *ipf, bool v6, bool enable);
53int ipf_set_min_frag(struct ipf *ipf, bool v6, uint32_t value);
54int ipf_set_max_nfrags(struct ipf *ipf, uint32_t value);
55int ipf_get_status(struct ipf *ipf, struct ipf_status *ipf_status);
56
57struct ipf_dump_ctx;
58int ipf_dump_start(struct ipf_dump_ctx **ipf_dump_ctx);
59int ipf_dump_next(struct ipf *ipf, struct ipf_dump_ctx *ipf_dump_ctx,
60 char **dump);
61int ipf_dump_done(struct ipf_dump_ctx *ipf_dump_ctx);
62
63#endif /* ipf.h */