2 * Distributed under the terms of the GNU GPL version 2.
3 * Copyright (c) 2008 Nicira Networks
8 #include "openflow/nicira-ext.h"
9 #include "nx_act_snat.h"
14 nx_recv_msg(struct sw_chain *chain, const struct sender *sender,
17 const struct nicira_header *nh = msg;
19 switch (ntohl(nh->subtype)) {
21 case NXT_ACT_SET_CONFIG: {
22 const struct nx_act_config *nac = msg;
23 if (ntohs(nh->header.length) < sizeof(*nac))
26 if (nac->type == htons(NXAST_SNAT))
27 return snat_mod_config(chain->dp, nac);
35 dp_send_error_msg(chain->dp, sender, OFPET_BAD_REQUEST,
36 OFPBRC_BAD_SUBTYPE, msg, ntohs(nh->header.length));