X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fdummy.c;h=0918037393fc9946a3fdc9a34d3275bcffe60542;hb=28c5588e8e1a8d091c5d2275232c35f2968a97fa;hp=3916febd1ddf4f2757ec24c097637280886ab3ee;hpb=614c4892032f424efa5f0ec404b2d499acad254d;p=sliver-openvswitch.git diff --git a/lib/dummy.c b/lib/dummy.c index 3916febd1..091803739 100644 --- a/lib/dummy.c +++ b/lib/dummy.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Nicira Networks. + * Copyright (c) 2010, 2011, 2012, 2013 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,10 +22,17 @@ * testing. A client program might call this function if it is designed * specifically for testing or the user enables it on the command line. * + * If 'override' is false, then "dummy" dpif and netdev classes will be + * created. If 'override' is true, then in addition all existing dpif and + * netdev classes will be deleted and replaced by dummy classes. + * * There is no strong reason why dummy devices shouldn't always be enabled. */ void -dummy_enable(void) +dummy_enable(bool override) { - netdev_dummy_register(); - dpif_dummy_register(); + netdev_dummy_register(override); + dpif_dummy_register(override); + timeval_dummy_register(); + vlandev_dummy_enable(); } +