Update L2 header offset after VLAN tag rewrite
[vpp.git] / extras / vcl-ldpreload / src / libvcl-ldpreload / vcom.h
index f6ee8a2..5871b52 100644 (file)
@@ -55,6 +55,11 @@ extern ssize_t __wur vcom_writev (int __fd, const struct iovec *__iov,
  */
 extern int vcom_fcntl (int __fd, int __cmd, ...);
 
+/*
+ * VPP implementation of glibc APIs ioctl
+ */
+extern int vcom_ioctl (int __fd, unsigned long int __cmd, ...);
+
 /*
  * vpp implementation of glibc APIs from <sys/select.h>
  */
@@ -173,6 +178,12 @@ extern int
 vcom_epoll_pwait (int __epfd, struct epoll_event *__events,
                  int __maxevents, int __timeout, const __sigset_t * __ss);
 
+/*
+ * NOTE: observed __nfds is less than 128 from kubecon strace files
+ * for the POC, it's fair to assume that nfds is less than 1024.
+ * TBD: make it thread safe and design to scale.
+ * */
+#define MAX_POLL_NFDS_DEFAULT   1024
 extern int vcom_poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);
 
 #ifdef __USE_GNU