+static int
+nx_action_len(enum nx_action_subtype subtype)
+{
+ switch (subtype) {
+ case NXAST_SNAT__OBSOLETE: return -1;
+ case NXAST_RESUBMIT: return sizeof(struct nx_action_resubmit);
+ case NXAST_SET_TUNNEL: return sizeof(struct nx_action_set_tunnel);
+ case NXAST_DROP_SPOOFED_ARP:
+ return sizeof(struct nx_action_drop_spoofed_arp);
+ case NXAST_SET_QUEUE: return sizeof(struct nx_action_set_queue);
+ case NXAST_POP_QUEUE: return sizeof(struct nx_action_pop_queue);
+ case NXAST_REG_MOVE: return sizeof(struct nx_action_reg_move);
+ case NXAST_REG_LOAD: return sizeof(struct nx_action_reg_load);
+ case NXAST_NOTE: return -1;
+ case NXAST_SET_TUNNEL64: return sizeof(struct nx_action_set_tunnel64);
+ case NXAST_MULTIPATH: return sizeof(struct nx_action_multipath);
+ default: return -1;
+ }
+}
+