aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'src/vcl')
-rw-r--r--src/vcl/ldp.c10
-rw-r--r--src/vcl/vppcom.c15
-rw-r--r--src/vcl/vppcom.h1
3 files changed, 26 insertions, 0 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index b72c0c54acd..a10d4d02fb4 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -1952,9 +1952,15 @@ getsockopt (int fd, int level, int optname,
case SO_REUSEADDR:
rv = vls_attr (vlsh, VPPCOM_ATTR_GET_REUSEADDR, optval, optlen);
break;
+ case SO_REUSEPORT:
+ rv = vls_attr (vlsh, VPPCOM_ATTR_GET_REUSEPORT, optval, optlen);
+ break;
case SO_BROADCAST:
rv = vls_attr (vlsh, VPPCOM_ATTR_GET_BROADCAST, optval, optlen);
break;
+ case SO_DOMAIN:
+ rv = vls_attr (vlsh, VPPCOM_ATTR_GET_DOMAIN, optval, optlen);
+ break;
case SO_ERROR:
rv = vls_attr (vlsh, VPPCOM_ATTR_GET_ERROR, optval, optlen);
break;
@@ -2053,6 +2059,10 @@ setsockopt (int fd, int level, int optname,
rv = vls_attr (vlsh, VPPCOM_ATTR_SET_REUSEADDR,
(void *) optval, &optlen);
break;
+ case SO_REUSEPORT:
+ rv = vls_attr (vlsh, VPPCOM_ATTR_SET_REUSEPORT, (void *) optval,
+ &optlen);
+ break;
case SO_BROADCAST:
rv = vls_attr (vlsh, VPPCOM_ATTR_SET_BROADCAST,
(void *) optval, &optlen);
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index b576e1a8dd3..a439d2550a1 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -3636,6 +3636,21 @@ vppcom_session_attr (uint32_t session_handle, uint32_t op,
*buflen = sizeof (u32);
break;
+ case VPPCOM_ATTR_GET_DOMAIN:
+ if (buffer && buflen && (*buflen >= sizeof (int)))
+ {
+ if (session->transport.is_ip4)
+ *(int *) buffer = AF_INET;
+ else
+ *(int *) buffer = AF_INET6;
+ *buflen = sizeof (int);
+ }
+ else
+ rv = VPPCOM_EINVAL;
+ VDBG (2, "VPPCOM_ATTR_GET_DOMAIN: %d, buflen %u", *(int *) buffer,
+ *buflen);
+ break;
+
default:
rv = VPPCOM_EINVAL;
break;
diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h
index 1d2fa5df1ba..c808829802f 100644
--- a/src/vcl/vppcom.h
+++ b/src/vcl/vppcom.h
@@ -141,6 +141,7 @@ typedef enum
VPPCOM_ATTR_SET_CKPAIR,
VPPCOM_ATTR_SET_VRF,
VPPCOM_ATTR_GET_VRF,
+ VPPCOM_ATTR_GET_DOMAIN,
} vppcom_attr_op_t;
typedef struct _vcl_poll