summaryrefslogtreecommitdiff
path: root/lib/netdev-linux.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-09-24 10:54:42 -0700
committerBen Pfaff <blp@nicira.com>2010-10-06 13:49:07 -0700
commitb8dcf5e9c554e2c5fc35a68a086d304fc0cea59a (patch)
treec681ff46e6848bda0f07d46586664a11af861092 /lib/netdev-linux.c
parent6fcfff1b116eb59999cc686f37f08b8f9af27996 (diff)
downloadopenvswitch-b8dcf5e9c554e2c5fc35a68a086d304fc0cea59a.tar.gz
netdev: Pass class structure, instead of type, to "create" function.
This opens up the possibility of storing private data at a relative offset to the class structure, instead of having to keep a separate table.
Diffstat (limited to 'lib/netdev-linux.c')
-rw-r--r--lib/netdev-linux.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 2ea411dcd..abfbe6ef8 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -487,8 +487,9 @@ netdev_linux_cache_cb(const struct rtnetlink_change *change,
/* Creates the netdev device of 'type' with 'name'. */
static int
-netdev_linux_create_system(const char *name, const char *type OVS_UNUSED,
- const struct shash *args, struct netdev_dev **netdev_devp)
+netdev_linux_create_system(const struct netdev_class *class OVS_UNUSED,
+ const char *name, const struct shash *args,
+ struct netdev_dev **netdev_devp)
{
struct netdev_dev_linux *netdev_dev;
int error;
@@ -520,8 +521,9 @@ netdev_linux_create_system(const char *name, const char *type OVS_UNUSED,
* buffers, across all readers. Therefore once data is read it will
* be unavailable to other reads for tap devices. */
static int
-netdev_linux_create_tap(const char *name, const char *type OVS_UNUSED,
- const struct shash *args, struct netdev_dev **netdev_devp)
+netdev_linux_create_tap(const struct netdev_class *class OVS_UNUSED,
+ const char *name, const struct shash *args,
+ struct netdev_dev **netdev_devp)
{
struct netdev_dev_linux *netdev_dev;
struct tap_state *state;