-static int
-create_device(struct netdev_options *options, struct netdev_dev **netdev_devp)
-{
- struct netdev_class *netdev_class;
-
- if (!options->may_create) {
- VLOG_WARN("attempted to create a device that may not be created: %s",
- options->name);
- return ENODEV;
- }
-
- if (!options->type || strlen(options->type) == 0) {
- /* Default to system. */
- options->type = "system";
- }
-
- netdev_class = shash_find_data(&netdev_classes, options->type);
- if (!netdev_class) {
- VLOG_WARN("could not create netdev %s of unknown type %s",
- options->name, options->type);
- return EAFNOSUPPORT;
- }
-
- return netdev_class->create(options->name, options->type, options->args,
- netdev_devp);
-}
-
-/* Opens the network device named 'name' (e.g. "eth0") and returns zero if
- * successful, otherwise a positive errno value. On success, sets '*netdevp'
- * to the new network device, otherwise to null.
- *
- * If this is the first time the device has been opened, then create is called
- * before opening. The device is created using the given type and arguments.
- *
- * 'ethertype' may be a 16-bit Ethernet protocol value in host byte order to
- * capture frames of that type received on the device. It may also be one of
- * the 'enum netdev_pseudo_ethertype' values to receive frames in one of those
- * categories.
+/* Opens the network device named 'name' (e.g. "eth0") of the specified 'type'
+ * (e.g. "system") and returns zero if successful, otherwise a positive errno
+ * value. On success, sets '*netdevp' to the new network device, otherwise to
+ * null.