- return nxm_dst_check(ap->dst, ofs, n_bits, flow);
+ return autopath_check(autopath, NULL);
+}
+
+enum ofperr
+autopath_check(const struct ofpact_autopath *autopath, const struct flow *flow)
+{
+ return mf_check_dst(&autopath->dst, flow);
+}
+
+void
+autopath_to_nxast(const struct ofpact_autopath *autopath,
+ struct ofpbuf *openflow)
+{
+ struct nx_action_autopath *ap = ofputil_put_NXAST_AUTOPATH(openflow);
+
+ ap->ofs_nbits = nxm_encode_ofs_nbits(autopath->dst.ofs,
+ autopath->dst.n_bits);
+ ap->dst = htonl(autopath->dst.field->nxm_header);
+ ap->id = htonl(autopath->port);