2 * Copyright (c) 2015 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.
17 #ifndef NETLINK_CONNTRACK_H
18 #define NETLINK_CONNTRACK_H
20 #include "byte-order.h"
23 #include "dynamic-string.h"
30 enum nl_ct_event_type {
31 NL_CT_EVENT_NEW = 1 << 0,
32 NL_CT_EVENT_UPDATE = 1 << 1,
33 NL_CT_EVENT_DELETE = 1 << 2,
36 struct nl_ct_dump_state;
38 int nl_ct_dump_start(struct nl_ct_dump_state **, const uint16_t *zone);
39 int nl_ct_dump_next(struct nl_ct_dump_state *, struct ct_dpif_entry *);
40 int nl_ct_dump_done(struct nl_ct_dump_state *);
42 int nl_ct_flush(void);
43 int nl_ct_flush_zone(uint16_t zone);
45 bool nl_ct_parse_entry(struct ofpbuf *, struct ct_dpif_entry *,
46 enum nl_ct_event_type *);
47 void nl_ct_format_event_entry(const struct ct_dpif_entry *,
48 enum nl_ct_event_type, struct ds *,
49 bool verbose, bool print_stats);
51 #endif /* NETLINK_CONNTRACK_H */