xref: /qemu/net/tap-stub.c (revision f03e0cf6)
14348300eSThomas Huth /*
24348300eSThomas Huth  * QEMU System Emulator
34348300eSThomas Huth  *
44348300eSThomas Huth  * Copyright (c) 2003-2008 Fabrice Bellard
54348300eSThomas Huth  *
64348300eSThomas Huth  * Permission is hereby granted, free of charge, to any person obtaining a copy
74348300eSThomas Huth  * of this software and associated documentation files (the "Software"), to deal
84348300eSThomas Huth  * in the Software without restriction, including without limitation the rights
94348300eSThomas Huth  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
104348300eSThomas Huth  * copies of the Software, and to permit persons to whom the Software is
114348300eSThomas Huth  * furnished to do so, subject to the following conditions:
124348300eSThomas Huth  *
134348300eSThomas Huth  * The above copyright notice and this permission notice shall be included in
144348300eSThomas Huth  * all copies or substantial portions of the Software.
154348300eSThomas Huth  *
164348300eSThomas Huth  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
174348300eSThomas Huth  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
184348300eSThomas Huth  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
194348300eSThomas Huth  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
204348300eSThomas Huth  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
214348300eSThomas Huth  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
224348300eSThomas Huth  * THE SOFTWARE.
234348300eSThomas Huth  */
244348300eSThomas Huth 
254348300eSThomas Huth #include "qemu/osdep.h"
264348300eSThomas Huth #include "qapi/error.h"
274348300eSThomas Huth #include "tap_int.h"
284348300eSThomas Huth 
tap_open(char * ifname,int ifname_size,int * vnet_hdr,int vnet_hdr_required,int mq_required,Error ** errp)294348300eSThomas Huth int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
304348300eSThomas Huth              int vnet_hdr_required, int mq_required, Error **errp)
314348300eSThomas Huth {
324348300eSThomas Huth     error_setg(errp, "tap is not supported in this build");
334348300eSThomas Huth     return -1;
344348300eSThomas Huth }
354348300eSThomas Huth 
tap_set_sndbuf(int fd,const NetdevTapOptions * tap,Error ** errp)364348300eSThomas Huth void tap_set_sndbuf(int fd, const NetdevTapOptions *tap, Error **errp)
374348300eSThomas Huth {
384348300eSThomas Huth }
394348300eSThomas Huth 
tap_probe_vnet_hdr(int fd,Error ** errp)40e7b347d0SDaniel P. Berrange int tap_probe_vnet_hdr(int fd, Error **errp)
414348300eSThomas Huth {
424348300eSThomas Huth     return 0;
434348300eSThomas Huth }
444348300eSThomas Huth 
tap_probe_has_ufo(int fd)454348300eSThomas Huth int tap_probe_has_ufo(int fd)
464348300eSThomas Huth {
474348300eSThomas Huth     return 0;
484348300eSThomas Huth }
494348300eSThomas Huth 
tap_probe_has_uso(int fd)50f03e0cf6SYuri Benditovich int tap_probe_has_uso(int fd)
51f03e0cf6SYuri Benditovich {
52f03e0cf6SYuri Benditovich     return 0;
53f03e0cf6SYuri Benditovich }
54f03e0cf6SYuri Benditovich 
tap_probe_vnet_hdr_len(int fd,int len)554348300eSThomas Huth int tap_probe_vnet_hdr_len(int fd, int len)
564348300eSThomas Huth {
574348300eSThomas Huth     return 0;
584348300eSThomas Huth }
594348300eSThomas Huth 
tap_fd_set_vnet_hdr_len(int fd,int len)604348300eSThomas Huth void tap_fd_set_vnet_hdr_len(int fd, int len)
614348300eSThomas Huth {
624348300eSThomas Huth }
634348300eSThomas Huth 
tap_fd_set_vnet_le(int fd,int is_le)644348300eSThomas Huth int tap_fd_set_vnet_le(int fd, int is_le)
654348300eSThomas Huth {
664348300eSThomas Huth     return -EINVAL;
674348300eSThomas Huth }
684348300eSThomas Huth 
tap_fd_set_vnet_be(int fd,int is_be)694348300eSThomas Huth int tap_fd_set_vnet_be(int fd, int is_be)
704348300eSThomas Huth {
714348300eSThomas Huth     return -EINVAL;
724348300eSThomas Huth }
734348300eSThomas Huth 
tap_fd_set_offload(int fd,int csum,int tso4,int tso6,int ecn,int ufo,int uso4,int uso6)744348300eSThomas Huth void tap_fd_set_offload(int fd, int csum, int tso4,
752ab0ec31SAndrew Melnychenko                         int tso6, int ecn, int ufo, int uso4, int uso6)
764348300eSThomas Huth {
774348300eSThomas Huth }
784348300eSThomas Huth 
tap_fd_enable(int fd)794348300eSThomas Huth int tap_fd_enable(int fd)
804348300eSThomas Huth {
814348300eSThomas Huth     return -1;
824348300eSThomas Huth }
834348300eSThomas Huth 
tap_fd_disable(int fd)844348300eSThomas Huth int tap_fd_disable(int fd)
854348300eSThomas Huth {
864348300eSThomas Huth     return -1;
874348300eSThomas Huth }
884348300eSThomas Huth 
tap_fd_get_ifname(int fd,char * ifname)894348300eSThomas Huth int tap_fd_get_ifname(int fd, char *ifname)
904348300eSThomas Huth {
914348300eSThomas Huth     return -1;
924348300eSThomas Huth }
938f364e34SAndrew Melnychenko 
tap_fd_set_steering_ebpf(int fd,int prog_fd)948f364e34SAndrew Melnychenko int tap_fd_set_steering_ebpf(int fd, int prog_fd)
958f364e34SAndrew Melnychenko {
968f364e34SAndrew Melnychenko     return -1;
978f364e34SAndrew Melnychenko }
98