diff options
author | Ethan Jackson <ethan@nicira.com> | 2012-02-14 20:53:59 -0800 |
---|---|---|
committer | Ethan Jackson <ethan@nicira.com> | 2012-02-21 00:02:20 -0800 |
commit | bde9f75de100e3801735bf69f605320f4db65cba (patch) | |
tree | 136cb7844551f64173f256cbace160f428cfaf54 /lib/netdev-dummy.c | |
parent | d35f8e72cdcfa7b99e1987bb17b7bc1035ce2213 (diff) |
unixctl: New JSON RPC back-end.
The unixctl library had used the vde2 management protocol since the
early days of Open vSwitch. As Open vSwitch has matured, several
Python daemons have been added to the code base which would benefit
from a unixctl implementations. Instead of implementing the old
unixctl protocol in Python, this patch changes unixctl to use JSON
RPC for which we already have an implementation in both Python and
C. Future patches will need to implement a unixctl library in
Python on top of JSON RPC.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'lib/netdev-dummy.c')
-rw-r--r-- | lib/netdev-dummy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index 57962d10..5c6563cc 100644 --- a/lib/netdev-dummy.c +++ b/lib/netdev-dummy.c @@ -410,7 +410,7 @@ netdev_dummy_receive(struct unixctl_conn *conn, dummy_dev = shash_find_data(&dummy_netdev_devs, argv[1]); if (!dummy_dev) { - unixctl_command_reply(conn, 501, "no such dummy netdev"); + unixctl_command_reply_error(conn, "no such dummy netdev"); return; } @@ -421,7 +421,7 @@ netdev_dummy_receive(struct unixctl_conn *conn, packet = eth_from_packet_or_flow(argv[i]); if (!packet) { - unixctl_command_reply(conn, 501, "bad packet syntax"); + unixctl_command_reply_error(conn, "bad packet syntax"); return; } @@ -437,9 +437,9 @@ netdev_dummy_receive(struct unixctl_conn *conn, } if (!n_listeners) { - unixctl_command_reply(conn, 202, "packets queued but nobody listened"); + unixctl_command_reply(conn, "packets queued but nobody listened"); } else { - unixctl_command_reply(conn, 200, "success"); + unixctl_command_reply(conn, "success"); } } |