- s = format (s, "%s ", (mp->encap==LB_ENCAP_TYPE_GRE4)?
- "gre4":(mp->encap==LB_ENCAP_TYPE_GRE6)?"gre6":"l3dsr");
+ s = format (s, "%s ", (mp->encap == LB_ENCAP_TYPE_GRE4)? "gre4"
+ : (mp->encap == LB_ENCAP_TYPE_GRE6)? "gre6"
+ : (mp->encap == LB_ENCAP_TYPE_NAT4)? "nat4"
+ : (mp->encap == LB_ENCAP_TYPE_NAT6)? "nat6"
+ : "l3dsr");
+
+ if (mp->encap==LB_ENCAP_TYPE_L3DSR)
+ {
+ s = format (s, "dscp %u ", mp->dscp);
+ }
+
+ if ((mp->encap==LB_ENCAP_TYPE_NAT4)
+ || (mp->encap==LB_ENCAP_TYPE_NAT6))
+ {
+ s = format (s, "type %u ", mp->type);
+ s = format (s, "port %u ", mp->port);
+ s = format (s, "target_port %u ", mp->target_port);
+ s = format (s, "node_port %u ", mp->node_port);
+ }
+