aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-05-16 18:18:14 +0000
committerDave Barach <openvpp@barachs.net>2020-05-21 16:54:58 +0000
commit1e96617d952e2d5d8cc367a226702f8f825ed039 (patch)
tree700a6360a48e5d738a2dcb00cf9c99ea82664866 /src/vcl/vppcom.c
parentfc74697ed3b45499027b272332af786e8e7917bb (diff)
vcl: support connected udp listens
Request connected udp listener behavior by setting VPPCOM_ATTR_SET_CONNECTED attribute with vppcom_session_attr Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iba95155c0f41cea8c6e1a4263946270d49c213ac
Diffstat (limited to 'src/vcl/vppcom.c')
-rw-r--r--src/vcl/vppcom.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 173b7fdd556..35e7804d8cb 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -209,6 +209,8 @@ vcl_send_session_listen (vcl_worker_t * wrk, vcl_session_t * s)
clib_memcpy_fast (&mp->ip, &s->transport.lcl_ip, sizeof (mp->ip));
mp->port = s->transport.lcl_port;
mp->proto = s->session_type;
+ if (s->flags & VCL_SESSION_F_CONNECTED)
+ mp->flags = TRANSPORT_CFG_F_CONNECTED;
app_send_ctrl_evt_to_vpp (mq, app_evt);
}
@@ -3592,6 +3594,11 @@ vppcom_session_attr (uint32_t session_handle, uint32_t op,
*(int *) buffer = SHUT_RDWR;
*buflen = sizeof (int);
break;
+
+ case VPPCOM_ATTR_SET_CONNECTED:
+ session->flags |= VCL_SESSION_F_CONNECTED;
+ break;
+
default:
rv = VPPCOM_EINVAL;
break;