X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fstatus.c;h=67cb27814f5b0efb2535f64d0ef00ed4c632e5c0;hb=fec00620d6f2a011a0a1c1a18e0d061f59606113;hp=e4834d84b862821a3835330afcd38e67b466c269;hpb=4e8e4213a815a30216e855a805a8bcd5b8c5a886;p=openvswitch diff --git a/ofproto/status.c b/ofproto/status.c index e4834d84..67cb2781 100644 --- a/ofproto/status.c +++ b/ofproto/status.c @@ -35,7 +35,7 @@ #include "vconn.h" #include "vlog.h" -VLOG_DEFINE_THIS_MODULE(status) +VLOG_DEFINE_THIS_MODULE(status); struct status_category { struct list node; @@ -59,8 +59,9 @@ struct status_reply { int switch_status_handle_request(struct switch_status *ss, struct rconn *rconn, - struct nicira_header *request) + const struct ofp_header *oh) { + const struct nicira_header *request = (const struct nicira_header *) oh; struct status_category *c; struct nicira_header *reply; struct status_reply sr; @@ -77,10 +78,8 @@ switch_status_handle_request(struct switch_status *ss, struct rconn *rconn, c->cb(&sr, c->aux); } } - reply = make_openflow_xid(sizeof *reply + sr.output.length, - OFPT_VENDOR, request->header.xid, &b); - reply->vendor = htonl(NX_VENDOR_ID); - reply->subtype = htonl(NXT_STATUS_REPLY); + reply = make_nxmsg_xid(sizeof *reply + sr.output.length, + NXT_STATUS_REPLY, request->header.xid, &b); memcpy(reply + 1, sr.output.string, sr.output.length); retval = rconn_send(rconn, b, NULL); if (retval && retval != EAGAIN) {