+/* Sends each of the messages in list 'replies' on 'ofconn' in order,
+ * accounting them as replies. */
+void
+ofconn_send_replies(const struct ofconn *ofconn, struct list *replies)
+{
+ struct ofpbuf *reply, *next;
+
+ LIST_FOR_EACH_SAFE (reply, next, list_node, replies) {
+ list_remove(&reply->list_node);
+ ofconn_send_reply(ofconn, reply);
+ }
+}
+
+/* Sends 'error', which should be an OpenFlow error created with
+ * e.g. ofp_mkerr(), on 'ofconn', as a reply to 'request'. Only at most the
+ * first 64 bytes of 'request' are used. */
+void
+ofconn_send_error(const struct ofconn *ofconn,
+ const struct ofp_header *request, int error)
+{
+ struct ofpbuf *msg = ofputil_encode_error_msg(error, request);
+ if (msg) {
+ ofconn_send_reply(ofconn, msg);
+ }
+}
+