uint64_t packets, uint64_t bytes);
struct ofbundle {
- struct ofproto_dpif *ofproto; /* Owning ofproto. */
struct hmap_node hmap_node; /* In struct ofproto's "bundles" hmap. */
+ struct ofproto_dpif *ofproto; /* Owning ofproto. */
void *aux; /* Key supplied by ofproto's client. */
char *name; /* Identifier for log messages. */
* With few exceptions, ofproto implementations may look at these fields but
* should not modify them. */
struct ofproto {
+ struct hmap_node hmap_node; /* In global 'all_ofprotos' hmap. */
const struct ofproto_class *ofproto_class;
char *type; /* Datapath type. */
char *name; /* Datapath name. */
- struct hmap_node hmap_node; /* In global 'all_ofprotos' hmap. */
/* Settings. */
uint64_t fallback_dpid; /* Datapath ID if no better choice found. */
* With few exceptions, ofproto implementations may look at these fields but
* should not modify them. */
struct ofport {
- struct ofproto *ofproto; /* The ofproto that contains this port. */
struct hmap_node hmap_node; /* In struct ofproto's "ports" hmap. */
+ struct ofproto *ofproto; /* The ofproto that contains this port. */
struct netdev *netdev;
struct ofputil_phy_port pp;
uint16_t ofp_port; /* OpenFlow port number. */
* With few exceptions, ofproto implementations may look at these fields but
* should not modify them. */
struct rule {
- struct ofproto *ofproto; /* The ofproto that contains this rule. */
struct list ofproto_node; /* Owned by ofproto base code. */
+ struct ofproto *ofproto; /* The ofproto that contains this rule. */
struct cls_rule cr; /* In owning ofproto's classifier. */
struct ofoperation *pending; /* Operation now in progress, if nonnull. */
-/* Copyright (c) 2009, 2010, 2011 Nicira Networks
+/* Copyright (c) 2009, 2010, 2011, 2012 Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/* JSON-RPC database server session. */
struct ovsdb_jsonrpc_session {
+ struct list node; /* Element in remote's sessions list. */
struct ovsdb_session up;
struct ovsdb_jsonrpc_remote *remote;
- struct list node; /* Element in remote's sessions list. */
/* Triggers. */
struct hmap triggers; /* Hmap of "struct ovsdb_jsonrpc_trigger"s. */
-/* Copyright (c) 2009, 2010, 2011 Nicira Networks
+/* Copyright (c) 2009, 2010, 2011, 2012 Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/* A row in a database table. */
struct ovsdb_row {
- struct ovsdb_table *table; /* Table to which this belongs. */
struct hmap_node hmap_node; /* Element in ovsdb_table's 'rows' hmap. */
+ struct ovsdb_table *table; /* Table to which this belongs. */
struct ovsdb_txn_row *txn_row; /* Transaction that row is in, if any. */
/* Weak references. */
-/* Copyright (c) 2011 Nicira Networks
+/* Copyright (c) 2011, 2012 Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* A lock always has one or more "lock waiters" kept on a list. The waiter at
* the head of the list owns the lock. */
struct ovsdb_lock {
+ struct hmap_node hmap_node; /* In ovsdb_server's "locks" hmap. */
struct ovsdb_server *server; /* The containing server. */
char *name; /* Unique name. */
- struct hmap_node hmap_node; /* In ovsdb_server's "locks" hmap. */
struct list waiters; /* Contains "struct ovsdb_lock_waiter"s. */
};
/* A session's request for a database lock. */
struct ovsdb_lock_waiter {
+ struct hmap_node session_node; /* In ->session->locks's hmap. */
+ struct ovsdb_lock *lock; /* The lock being waited for. */
+
enum ovsdb_lock_mode mode;
char *lock_name;
- struct ovsdb_lock *lock; /* The lock being waited for. */
- struct list lock_node; /* In ->lock->waiters's list. */
-
struct ovsdb_session *session;
- struct hmap_node session_node; /* In ->session->locks's hmap. */
+ struct list lock_node; /* In ->lock->waiters's list. */
};
struct ovsdb_session *ovsdb_lock_waiter_remove(struct ovsdb_lock_waiter *);
};
struct port {
- struct bridge *bridge;
struct hmap_node hmap_node; /* Element in struct bridge's "ports" hmap. */
+ struct bridge *bridge;
char *name;
const struct ovsrec_port *cfg;