+static int
+api_gtpu_tunnel_update_tteid (vat_main_t * vam)
+{
+ unformat_input_t *line_input = vam->input;
+ vl_api_gtpu_tunnel_update_tteid_t *mp;
+ ip46_address_t dst;
+ u8 ipv6_set = 0;
+ u8 dst_set = 0;
+ u32 encap_vrf_id = 0;
+ u32 teid = 0, tteid = 0;
+ int ret;
+
+ /* Can't "universally zero init" (={0}) due to GCC bug 53119 */
+ clib_memset (&dst, 0, sizeof dst);
+
+ while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
+ {
+ if (unformat (line_input, "dst %U", unformat_ip4_address, &dst.ip4))
+ {
+ dst_set = 1;
+ }
+ else if (unformat (line_input, "dst %U", unformat_ip6_address, &dst.ip6))
+ {
+ ipv6_set = 1;
+ dst_set = 1;
+ }
+ else if (unformat (line_input, "encap-vrf-id %d", &encap_vrf_id))
+ ;
+ else if (unformat (line_input, "teid %d", &teid))
+ ;
+ else if (unformat (line_input, "tteid %d", &tteid))
+ ;
+ else
+ {
+ errmsg ("parse error '%U'", format_unformat_error, line_input);
+ return -99;
+ }
+ }
+
+ if (dst_set == 0)
+ {
+ errmsg ("tunnel dst address not specified");
+ return -99;
+ }
+
+ M (GTPU_TUNNEL_UPDATE_TTEID, mp);
+
+ ip_address_encode(&dst, ipv6_set ? IP46_TYPE_IP6 : IP46_TYPE_IP4,
+ &mp->dst_address);
+ mp->encap_vrf_id = ntohl (encap_vrf_id);
+ mp->teid = ntohl (teid);
+ mp->tteid = ntohl (tteid);
+
+ S (mp);
+ W (ret);
+ return ret;
+}
+