#include "netlink.h"
#include "odp-util.h"
#include "ofp-print.h"
+#include "ofp-util.h"
#include "ofpbuf.h"
#include "openflow/nicira-ext.h"
#include "openflow/openflow.h"
#include "timeval.h"
#include "util.h"
#include "vconn.h"
+#include "vlog.h"
#include "xtoxll.h"
-#include "vlog.h"
-#define THIS_MODULE VLM_ofctl
+VLOG_DEFINE_THIS_MODULE(ofctl)
#define DEFAULT_IDLE_TIMEOUT 60
main(int argc, char *argv[])
{
set_program_name(argv[0]);
- time_init();
- vlog_init();
parse_options(argc, argv);
signal(SIGPIPE, SIG_IGN);
run_command(argc - optind, argv + optind, all_commands);
uint16_t *idle_timeout, uint16_t *hard_timeout,
uint64_t *cookie)
{
+ struct ofp_match normalized;
char *save_ptr = NULL;
char *name;
uint32_t wildcards;
}
}
match->wildcards = htonl(wildcards);
+
+ normalized = *match;
+ normalize_match(&normalized);
+ if (memcmp(match, &normalized, sizeof normalized)) {
+ char *old = ofp_match_to_literal_string(match);
+ char *new = ofp_match_to_literal_string(&normalized);
+ VLOG_WARN("The specified flow is not in normal form:");
+ VLOG_WARN(" as specified: %s", old);
+ VLOG_WARN("as normalized: %s", new);
+ free(old);
+ free(new);
+ }
}
static void