#include <vat/vat.h>
#include <vppinfra/socket.h>
-#include <svm/memfd.h>
#include <vlibapi/api.h>
#include <vlibmemory/api.h>
#include <vnet/ip/ip.h>
socket_client_main_t *scm = vam->socket_client_main;
int my_fd = -1;
clib_error_t *error;
- memfd_private_t memfd;
+ ssvm_private_t memfd;
i32 retval = ntohl (mp->retval);
if (retval == 0)
vam->client_index_invalid = 1;
/* Note: this closes memfd.fd */
- retval = memfd_slave_init (&memfd);
+ retval = ssvm_slave_init_memfd (&memfd);
if (retval)
clib_warning ("WARNING: segment map returned %d", retval);
u8 host_mac_addr_set = 0;
u8 *host_bridge = 0;
ip4_address_t host_ip4_addr;
+ ip4_address_t host_ip4_gw;
+ u8 host_ip4_gw_set = 0;
u32 host_ip4_prefix_len = 0;
ip6_address_t host_ip6_addr;
+ ip6_address_t host_ip6_gw;
+ u8 host_ip6_gw_set = 0;
u32 host_ip6_prefix_len = 0;
int ret;
int rx_ring_sz = 0, tx_ring_sz = 0;
else if (unformat (i, "host-ip6-addr %U/%d", unformat_ip6_address,
&host_ip6_addr, &host_ip6_prefix_len))
;
+ else if (unformat (i, "host-ip4-gw %U", unformat_ip4_address,
+ &host_ip4_gw))
+ host_ip4_gw_set = 1;
+ else if (unformat (i, "host-ip6-gw %U", unformat_ip6_address,
+ &host_ip6_gw))
+ host_ip6_gw_set = 1;
else if (unformat (i, "rx-ring-size %d", &rx_ring_sz))
;
else if (unformat (i, "tx-ring-size %d", &tx_ring_sz))
clib_memcpy (mp->host_ip4_addr, &host_ip4_addr, 4);
if (host_ip4_prefix_len)
clib_memcpy (mp->host_ip6_addr, &host_ip6_addr, 16);
-
+ if (host_ip4_gw_set)
+ clib_memcpy (mp->host_ip4_gw, &host_ip4_gw, 4);
+ if (host_ip6_gw_set)
+ clib_memcpy (mp->host_ip6_gw, &host_ip6_gw, 16);
vec_free (host_ns);
vec_free (host_if_name);