+static void
+read_flow_file(const char *name)
+{
+ enum nx_flow_format flow_format;
+ FILE *stream;
+
+ stream = fopen(optarg, "r");
+ if (!stream) {
+ ovs_fatal(errno, "%s: open", name);
+ }
+
+ flow_format = NXFF_OPENFLOW10;
+ while (parse_ofp_add_flow_file(&default_flows, &flow_format, stream)) {
+ continue;
+ }
+
+ fclose(stream);
+}
+
+static void
+add_port_queue(char *s)
+{
+ char *save_ptr = NULL;
+ char *port_name;
+ char *queue_id;
+
+ port_name = strtok_r(s, ":", &save_ptr);
+ queue_id = strtok_r(NULL, "", &save_ptr);
+ if (!queue_id) {
+ ovs_fatal(0, "argument to -Q or --port-queue should take the form "
+ "\"<port-name>:<queue-id>\"");
+ }
+
+ if (!shash_add_once(&port_queues, port_name,
+ (void *) (uintptr_t) atoi(queue_id))) {
+ ovs_fatal(0, "<port-name> arguments for -Q or --port-queue must "
+ "be unique");
+ }
+}
+