New program ofp-discover.
[sliver-openvswitch.git] / datapath / datapath.h
index 76798ef..bb714d3 100644 (file)
 #endif
 
 /* Capabilities supported by this implementation. */
-#define OFP_SUPPORTED_CAPABILITIES (OFPC_MULTI_PHY_TX)
+#define OFP_SUPPORTED_CAPABILITIES ( OFPC_FLOW_STATS \
+               | OFPC_TABLE_STATS \
+               | OFPC_PORT_STATS \
+               | OFPC_MULTI_PHY_TX )
 
 /* Actions supported by this implementation. */
 #define OFP_SUPPORTED_ACTIONS ( (1 << OFPAT_OUTPUT) \
@@ -45,8 +48,7 @@ struct datapath {
        struct task_struct *dp_task; /* Kernel thread for maintenance. */
 
        /* Data related to the "of" device of this datapath */
-       struct net_device dev;
-       struct net_device_stats stats;
+       struct net_device *netdev;
 
        /* Configuration set from controller */
        uint16_t flags;
@@ -54,7 +56,8 @@ struct datapath {
 
        /* Switch ports. */
        struct net_bridge_port *ports[OFPP_MAX];
-       struct list_head port_list; /* List of ports, for flooding. */
+       struct net_bridge_port *local_port; /* OFPP_LOCAL port. */
+       struct list_head port_list; /* All ports, including local_port. */
 };
 
 /* Information necessary to reply to the sender of an OpenFlow message. */
@@ -71,13 +74,11 @@ int dp_set_origin(struct datapath *, uint16_t, struct sk_buff *);
 int dp_send_features_reply(struct datapath *, const struct sender *);
 int dp_send_config_reply(struct datapath *, const struct sender *);
 int dp_send_flow_expired(struct datapath *, struct sw_flow *);
-int dp_send_flow_stats(struct datapath *, const struct sender *,
-                       const struct ofp_match *);
-int dp_send_table_stats(struct datapath *, const struct sender *);
-int dp_send_port_stats(struct datapath *, const struct sender *);
 int dp_send_error_msg(struct datapath *, const struct sender *, 
                        uint16_t, uint16_t, const uint8_t *, size_t);
 int dp_update_port_flags(struct datapath *dp, const struct ofp_phy_port *opp);
+int dp_send_echo_reply(struct datapath *, const struct sender *,
+                      const struct ofp_header *);
 
 /* Should hold at least RCU read lock when calling */
 struct datapath *dp_get(int dp_idx);