From: Ben Pfaff Date: Thu, 14 Apr 2011 20:16:47 +0000 (-0700) Subject: ofproto: Move private definitions to separate header. X-Git-Tag: v1.2.0~329^2~42 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d08a2e920631099d68f4efd4e72f6c14987520ce;p=sliver-openvswitch.git ofproto: Move private definitions to separate header. --- diff --git a/ofproto/automake.mk b/ofproto/automake.mk index 18aa7e6c6..ef45e9f27 100644 --- a/ofproto/automake.mk +++ b/ofproto/automake.mk @@ -24,6 +24,7 @@ ofproto_libofproto_a_SOURCES = \ ofproto/pktbuf.c \ ofproto/pktbuf.h \ ofproto/pinsched.c \ - ofproto/pinsched.h + ofproto/pinsched.h \ + ofproto/private.h EXTRA_DIST += ofproto/ofproto-unixctl.man diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index 4d9e75825..ef9a61c77 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -31,6 +31,7 @@ #include "pinsched.h" #include "poll-loop.h" #include "pktbuf.h" +#include "private.h" #include "rconn.h" #include "shash.h" #include "timeval.h" diff --git a/ofproto/fail-open.c b/ofproto/fail-open.c index bf57b9fcc..197e5183e 100644 --- a/ofproto/fail-open.c +++ b/ofproto/fail-open.c @@ -28,6 +28,7 @@ #include "ofproto.h" #include "pktbuf.h" #include "poll-loop.h" +#include "private.h" #include "rconn.h" #include "timeval.h" #include "vconn.h" diff --git a/ofproto/in-band.c b/ofproto/in-band.c index e75d19eac..5f3b9bfea 100644 --- a/ofproto/in-band.c +++ b/ofproto/in-band.c @@ -35,6 +35,7 @@ #include "openflow/openflow.h" #include "packets.h" #include "poll-loop.h" +#include "private.h" #include "timeval.h" #include "vlog.h" diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 45c51253a..49f6645e5 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -54,6 +54,7 @@ #include "pinsched.h" #include "pktbuf.h" #include "poll-loop.h" +#include "private.h" #include "rconn.h" #include "shash.h" #include "sset.h" diff --git a/ofproto/ofproto.h b/ofproto/ofproto.h index 4860ba364..2e01fba64 100644 --- a/ofproto/ofproto.h +++ b/ofproto/ofproto.h @@ -182,12 +182,6 @@ void ofproto_get_all_flows(struct ofproto *p, struct ds *); void ofproto_get_netflow_ids(const struct ofproto *, uint8_t *engine_type, uint8_t *engine_id); -/* Functions for use by ofproto implementation modules, not by clients. */ -void ofproto_add_flow(struct ofproto *, const struct cls_rule *, - const union ofp_action *, size_t n_actions); -void ofproto_delete_flow(struct ofproto *, const struct cls_rule *); -void ofproto_flush_flows(struct ofproto *); - /* Hooks for ovs-vswitchd. */ struct ofhooks { bool (*normal_cb)(const struct flow *, const struct ofpbuf *packet, diff --git a/ofproto/private.h b/ofproto/private.h new file mode 100644 index 000000000..f75152e2a --- /dev/null +++ b/ofproto/private.h @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2009, 2010, 2011 Nicira Networks. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef OFPROTO_PRIVATE_H +#define OFPROTO_PRIVATE_H 1 + +/* Definitions for use within ofproto. */ + +#include "ofproto/ofproto.h" + +void ofproto_add_flow(struct ofproto *, const struct cls_rule *, + const union ofp_action *, size_t n_actions); +void ofproto_delete_flow(struct ofproto *, const struct cls_rule *); +void ofproto_flush_flows(struct ofproto *); + +#endif /* ofproto/private.h */