aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.h
diff options
context:
space:
mode:
authorliuyacan <liuyacan@corp.netease.com>2021-06-13 14:54:55 +0800
committerFlorin Coras <florin.coras@gmail.com>2021-06-14 14:35:04 +0000
commit55c952ed5f56a1a478f03f8458e82530478c4359 (patch)
tree43198873060cc8b36cda93995a2f4e56810e87ff /src/vcl/vppcom.h
parent89d939e52c999edec66194c60bc5afb2397a2842 (diff)
vcl: improve shutdown()
This commit does following: - Change the behavior of shutdown() with SHUT_RDWR flag. - Check SHUT_RD flag when read() - Change the errno when write() after SHUT_WR - Remove unused code All the above modification passed the packetdrill test. Type: improvement Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: I0c81f52e563562e58580d70976526b898e65e915
Diffstat (limited to 'src/vcl/vppcom.h')
-rw-r--r--src/vcl/vppcom.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/vcl/vppcom.h b/src/vcl/vppcom.h
index c2a625e974e..19a01c798b5 100644
--- a/src/vcl/vppcom.h
+++ b/src/vcl/vppcom.h
@@ -99,6 +99,7 @@ typedef enum
VPPCOM_ETIMEDOUT = -ETIMEDOUT,
VPPCOM_EEXIST = -EEXIST,
VPPCOM_ENOPROTOOPT = -ENOPROTOOPT,
+ VPPCOM_EPIPE = -EPIPE,
VPPCOM_ENOENT = -ENOENT,
} vppcom_error_t;
@@ -138,8 +139,6 @@ typedef enum
VPPCOM_ATTR_SET_TCP_KEEPINTVL,
VPPCOM_ATTR_GET_TCP_USER_MSS,
VPPCOM_ATTR_SET_TCP_USER_MSS,
- VPPCOM_ATTR_SET_SHUT,
- VPPCOM_ATTR_GET_SHUT,
VPPCOM_ATTR_SET_CONNECTED,
VPPCOM_ATTR_SET_CKPAIR,
VPPCOM_ATTR_SET_VRF,
@@ -174,7 +173,7 @@ extern int vppcom_app_create (const char *app_name);
extern void vppcom_app_destroy (void);
extern int vppcom_session_create (uint8_t proto, uint8_t is_nonblocking);
-extern int vppcom_session_shutdown (uint32_t session_handle);
+extern int vppcom_session_shutdown (uint32_t session_handle, int how);
extern int vppcom_session_close (uint32_t session_handle);
extern int vppcom_session_bind (uint32_t session_handle, vppcom_endpt_t * ep);
extern int vppcom_session_listen (uint32_t session_handle, uint32_t q_len);