syntax of \fIflows\fR.
.TP
-\fBmonitor \fIswitch\fR
+\fBmonitor \fIswitch\fR [\fImiss-len\fR [\fIsend-exp]]
Connects to \fIswitch\fR and prints to the console all OpenFlow
messages received. Usually, \fIswitch\fR should specify a connection
named on \fBsecchan\fR(8)'s \fB-l\fR or \fB--listen\fR command line
option.
-This option may be useful for debugging switch implementations.
+If \fImiss-len\fR is provided, \fBdpctl\fR sends an OpenFlow ``set
+configuration'' message at connection setup time that requests
+\fImiss-len\fR bytes of each packet that misses the flow table. The
+OpenFlow reference implementation not send these messages to the
+\fBdpctl monitor\fR client connection unless a nonzero value is
+specified on this argument.
+
+If \fIsend-exp\fR is specified as \fB1\fR, \fBdpctl\fR will also
+request to be sent flow expiration messages. If this argument is
+omitted, or \fB0\fR is specified, then \fRdpctl\fR will not request
+flow expirations.
+
+This command may be useful for debugging switch or controller
+implementations.
.TP
\fBexecute \fIswitch command \fR[\fIarg\fR...]
" add-flows SWITCH FILE add flows from FILE\n"
" mod-flows SWITCH FLOW modify actions of matching FLOWs\n"
" del-flows SWITCH [FLOW] delete matching FLOWs\n"
- " monitor SWITCH print packets received from SWITCH\n"
+ " monitor SWITCH MISSLEN EXP print packets received from SWITCH\n"
" execute SWITCH CMD [ARG...] execute CMD with ARGS on SWITCH\n"
"\nFor OpenFlow switches and controllers:\n"
" probe VCONN probe whether VCONN is up\n"
struct vconn *vconn;
open_vconn(argv[1], &vconn);
+ if (argc > 2) {
+ int miss_send_len = atoi(argv[2]);
+ int send_flow_exp = argc > 3 ? atoi(argv[3]) : 0;
+ struct ofp_switch_config *osc;
+ struct ofpbuf *buf;
+
+ osc = make_openflow(sizeof *osc, OFPT_SET_CONFIG, &buf);
+ osc->flags = htons(send_flow_exp ? OFPC_SEND_FLOW_EXP : 0);
+ osc->miss_send_len = htons(miss_send_len);
+ send_openflow_buffer(vconn, buf);
+ }
for (;;) {
struct ofpbuf *b;
run(vconn_recv_block(vconn, &b), "vconn_recv");
{ "status", 1, 2, do_status },
{ "help", 0, INT_MAX, do_help },
- { "monitor", 1, 1, do_monitor },
+ { "monitor", 1, 3, do_monitor },
{ "dump-desc", 1, 1, do_dump_desc },
{ "dump-tables", 1, 1, do_dump_tables },
{ "dump-flows", 1, 2, do_dump_flows },