]>
git.proxmox.com Git - ovs.git/blob - lib/ipf.h
2 * Copyright (c) 2019 Nicira, Inc.
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:
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 #include "dp-packet.h"
21 #include "openvswitch/types.h"
25 struct 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
;
37 struct ipf_proto_status v4
;
38 struct ipf_proto_status v6
;
40 unsigned int nfrag_max
;
43 struct ipf
*ipf_init(void);
44 void ipf_destroy(struct ipf
*ipf
);
45 void ipf_preprocess_conntrack(struct ipf
*ipf
, struct dp_packet_batch
*pb
,
46 long long now
, ovs_be16 dl_type
, uint16_t zone
,
49 void ipf_postprocess_conntrack(struct ipf
*ipf
, struct dp_packet_batch
*pb
,
50 long long now
, ovs_be16 dl_type
);
52 int ipf_set_enabled(struct ipf
*ipf
, bool v6
, bool enable
);
53 int ipf_set_min_frag(struct ipf
*ipf
, bool v6
, uint32_t value
);
54 int ipf_set_max_nfrags(struct ipf
*ipf
, uint32_t value
);
55 int ipf_get_status(struct ipf
*ipf
, struct ipf_status
*ipf_status
);
58 int ipf_dump_start(struct ipf_dump_ctx
**ipf_dump_ctx
);
59 int ipf_dump_next(struct ipf
*ipf
, struct ipf_dump_ctx
*ipf_dump_ctx
,
61 int ipf_dump_done(struct ipf_dump_ctx
*ipf_dump_ctx
);