HI, I am trying to implement the following vppctl command through C API. vpp version 20.09.
*vppctl set int ip addr host-eth3 10.22.6.20/24 <http://10.22.6.20/24>vppctl set int state host-eth3 up* First command i.e. to plumb the IP works fine through the program attached but to make the interface up, i am using vl_api_sw_interface_set_flags_t message. vl_api_sw_interface_set_flags_t *mp; mp = vl_msg_api_alloc (sizeof (*mp)); clib_memset (mp, 0, sizeof (*mp)); mp->_vl_msg_id = clib_host_to_net_u16 (VL_API_SW_INTERFACE_SET_FLAGS); mp->client_index = api_client_index; mp->context = vpp_client_context; mp->sw_if_index = clib_host_to_net_u32 (ifindex); //mp->flags = IF_STATUS_API_FLAG_ADMIN_UP; mp->flags = IF_STATUS_API_FLAG_LINK_UP & IF_STATUS_API_FLAG_ADMIN_UP; vl_msg_api_send_shmem (api_vl_input_queue, (u8 *) & mp); reply handler says retval is success but i don't see interface state is up through vppctl. vppctl command shows IP is plumbed fine. Can anyone suggest what's the issue? Also, In this version, vl_api_sw_interface_set_flags_t flag parameter is a enum with IF_STATUS_API_FLAG_ADMIN_UP , IF_STATUS_API_FLAG_LINK_UP. So I am not sure how to make the interface state down. Thanks in advance. Regards, Subrata
VPP_binary_API_client.c
Description: Binary data
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#20404): https://lists.fd.io/g/vpp-dev/message/20404 Mute This Topic: https://lists.fd.io/mt/86769737/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-