Home
last modified time | relevance | path

Searched refs:tun (Results 1 – 25 of 45) sorted by relevance

12

/linux/drivers/net/
H A Dtun.c6 * $Id: tun.c,v 1.15 2002/03/01 02:44:24 maxk Exp $
30 #define DRV_NAME "tun"
134 struct tun_struct __rcu *tun; member
162 struct tun_struct *tun; member
227 static void tun_flow_init(struct tun_struct *tun);
228 static void tun_flow_uninit(struct tun_struct *tun);
270 static void tun_napi_init(struct tun_struct *tun, struct tun_file *tfile, in tun_napi_init() argument
276 netif_napi_add_tx(tun->dev, &tfile->napi, tun_napi_poll); in tun_napi_init()
320 static struct tun_flow_entry *tun_flow_create(struct tun_struct *tun, in tun_flow_create() argument
327 netif_info(tun, tx_queue in tun_flow_create()
341 tun_flow_delete(struct tun_struct * tun,struct tun_flow_entry * e) tun_flow_delete() argument
350 tun_flow_flush(struct tun_struct * tun) tun_flow_flush() argument
365 tun_flow_delete_by_queue(struct tun_struct * tun,u16 queue_index) tun_flow_delete_by_queue() argument
384 struct tun_struct *tun = timer_container_of(tun, t, flow_gc_timer); tun_flow_cleanup() local
414 tun_flow_update(struct tun_struct * tun,u32 rxhash,struct tun_file * tfile) tun_flow_update() argument
464 tun_automq_select_queue(struct tun_struct * tun,struct sk_buff * skb) tun_automq_select_queue() argument
483 tun_ebpf_select_queue(struct tun_struct * tun,struct sk_buff * skb) tun_ebpf_select_queue() argument
503 struct tun_struct *tun = netdev_priv(dev); tun_select_queue() local
516 tun_not_capable(struct tun_struct * tun) tun_not_capable() argument
526 tun_set_real_num_queues(struct tun_struct * tun) tun_set_real_num_queues() argument
532 tun_disable_queue(struct tun_struct * tun,struct tun_file * tfile) tun_disable_queue() argument
541 struct tun_struct *tun = tfile->detached; tun_enable_queue() local
577 struct tun_struct *tun; __tun_detach() local
647 struct tun_struct *tun; tun_detach() local
664 struct tun_struct *tun = netdev_priv(dev); tun_detach_all() local
706 tun_force_wake_queue(struct tun_struct * tun,struct tun_file * tfile) tun_force_wake_queue() argument
725 tun_attach(struct tun_struct * tun,struct file * file,bool skip_filter,bool napi,bool napi_frags,bool publish_tun) tun_attach() argument
825 struct tun_struct *tun; tun_get() local
836 tun_put(struct tun_struct * tun) tun_put() argument
951 struct tun_struct *tun = netdev_priv(dev); tun_net_init() local
1005 struct tun_struct *tun = netdev_priv(dev); tun_net_close() local
1028 tun_automq_xmit(struct tun_struct * tun,struct sk_buff * skb) tun_automq_xmit() argument
1046 run_ebpf_filter(struct tun_struct * tun,struct sk_buff * skb,int len) run_ebpf_filter() argument
1062 struct tun_struct *tun = netdev_priv(dev); tun_net_xmit() local
1181 struct tun_struct *tun = netdev_priv(dev); tun_net_fix_features() local
1188 struct tun_struct *tun = netdev_priv(dev); tun_set_headroom() local
1204 struct tun_struct *tun = netdev_priv(dev); tun_net_get_stats64() local
1215 struct tun_struct *tun = netdev_priv(dev); tun_xdp_set() local
1255 struct tun_struct *tun = netdev_priv(dev); tun_net_change_carrier() local
1291 struct tun_struct *tun = netdev_priv(dev); tun_xdp_xmit() local
1369 tun_flow_init(struct tun_struct * tun) tun_flow_init() argument
1382 tun_flow_uninit(struct tun_struct * tun) tun_flow_uninit() argument
1394 struct tun_struct *tun = netdev_priv(dev); tun_net_initialize() local
1432 tun_sock_writeable(struct tun_struct * tun,struct tun_file * tfile) tun_sock_writeable() argument
1445 struct tun_struct *tun = tun_get(tfile); tun_chr_poll() local
1560 tun_rx_batched(struct tun_struct * tun,struct tun_file * tfile,struct sk_buff * skb,int more) tun_rx_batched() argument
1600 tun_can_build_skb(struct tun_struct * tun,struct tun_file * tfile,int len,int noblock,bool zerocopy) tun_can_build_skb() argument
1644 tun_xdp_act(struct tun_struct * tun,struct bpf_prog * xdp_prog,struct xdp_buff * xdp,u32 act) tun_xdp_act() argument
1682 tun_build_skb(struct tun_struct * tun,struct tun_file * tfile,struct iov_iter * from,struct virtio_net_hdr * hdr,int len,int * skb_xdp) tun_build_skb() argument
1779 tun_get_user(struct tun_struct * tun,struct tun_file * tfile,void * msg_control,struct iov_iter * from,int noblock,bool more) tun_get_user() argument
2081 struct tun_struct *tun = tun_get(tfile); tun_chr_write_iter() local
2097 tun_put_user_xdp(struct tun_struct * tun,struct tun_file * tfile,struct xdp_frame * xdp_frame,struct iov_iter * iter) tun_put_user_xdp() argument
2125 tun_put_user(struct tun_struct * tun,struct tun_file * tfile,struct sk_buff * skb,struct iov_iter * iter) tun_put_user() argument
2210 __tun_wake_queue(struct tun_struct * tun,struct tun_file * tfile,int consumed) __tun_wake_queue() argument
2243 tun_ring_consume(struct tun_struct * tun,struct tun_file * tfile) tun_ring_consume() argument
2256 tun_ring_recv(struct tun_struct * tun,struct tun_file * tfile,int noblock,int * err) tun_ring_recv() argument
2298 tun_do_read(struct tun_struct * tun,struct tun_file * tfile,struct iov_iter * to,int noblock,void * ptr) tun_do_read() argument
2339 struct tun_struct *tun = tun_get(tfile); tun_chr_read_iter() local
2365 __tun_set_ebpf(struct tun_struct * tun,struct tun_prog __rcu ** prog_p,struct bpf_prog * prog) __tun_set_ebpf() argument
2392 struct tun_struct *tun = netdev_priv(dev); tun_free_netdev() local
2404 struct tun_struct *tun = netdev_priv(dev); tun_setup() local
2447 const struct tun_struct *tun = netdev_priv(dev); tun_fill_info() local
2521 tun_xdp_one(struct tun_struct * tun,struct tun_file * tfile,struct xdp_buff * xdp,int * flush,struct tun_page * tpage) tun_xdp_one() argument
2661 struct tun_struct *tun = tun_get(tfile); tun_sendmsg() local
2716 struct tun_struct *tun = tun_get(tfile); tun_recvmsg() local
2767 struct tun_struct *tun; tun_peek_len() local
2793 tun_flags(struct tun_struct * tun) tun_flags() argument
2801 struct tun_struct *tun = netdev_priv(to_net_dev(dev)); tun_flags_show() local
2808 struct tun_struct *tun = netdev_priv(to_net_dev(dev)); owner_show() local
2818 struct tun_struct *tun = netdev_priv(to_net_dev(dev)); group_show() local
2842 struct tun_struct *tun; tun_set_iff() local
2984 tun_get_iff(struct tun_struct * tun,struct ifreq * ifr) tun_get_iff() argument
2996 set_offload(struct tun_struct * tun,unsigned long arg) set_offload() argument
3050 tun_detach_filter(struct tun_struct * tun,int n) tun_detach_filter() argument
3065 tun_attach_filter(struct tun_struct * tun) tun_attach_filter() argument
3085 tun_set_sndbuf(struct tun_struct * tun) tun_set_sndbuf() argument
3099 struct tun_struct *tun; tun_set_queue() local
3132 tun_set_ebpf(struct tun_struct * tun,struct tun_prog __rcu ** prog_p,void __user * data) tun_set_ebpf() argument
3196 struct tun_struct *tun; __tun_chr_ioctl() local
3596 struct tun_struct *tun; tun_chr_show_fdinfo() local
3655 struct tun_struct *tun = netdev_priv(dev); tun_get_link_ksettings() local
3664 struct tun_struct *tun = netdev_priv(dev); tun_set_link_ksettings() local
3672 struct tun_struct *tun = netdev_priv(dev); tun_get_drvinfo() local
3689 struct tun_struct *tun = netdev_priv(dev); tun_get_msglevel() local
3696 struct tun_struct *tun = netdev_priv(dev); tun_set_msglevel() local
3706 struct tun_struct *tun = netdev_priv(dev); tun_get_coalesce() local
3718 struct tun_struct *tun = netdev_priv(dev); tun_set_coalesce() local
3731 struct tun_struct *tun = netdev_priv(dev); tun_get_channels() local
3751 tun_queue_resize(struct tun_struct * tun) tun_queue_resize() argument
3789 struct tun_struct *tun = netdev_priv(dev); tun_device_event() local
3893 struct tun_struct *tun; tun_wake_queue() local
[all...]
/linux/net/qrtr/
H A Dtun.c21 struct qrtr_tun *tun = container_of(ep, struct qrtr_tun, ep); in qrtr_tun_send() local
23 skb_queue_tail(&tun->queue, skb); in qrtr_tun_send()
26 wake_up_interruptible(&tun->readq); in qrtr_tun_send()
33 struct qrtr_tun *tun; in qrtr_tun_open() local
36 tun = kzalloc_obj(*tun); in qrtr_tun_open()
37 if (!tun) in qrtr_tun_open()
40 skb_queue_head_init(&tun->queue); in qrtr_tun_open()
41 init_waitqueue_head(&tun->readq); in qrtr_tun_open()
43 tun->ep.xmit = qrtr_tun_send; in qrtr_tun_open()
45 filp->private_data = tun; in qrtr_tun_open()
[all …]
H A DMakefile7 obj-$(CONFIG_QRTR_TUN) += qrtr-tun.o
8 qrtr-tun-y := tun.o
/linux/drivers/net/ethernet/intel/libie/
H A Drx.c23 #define LIBIE_RX_PT(oip, ofrag, tun, tp, tefr, iprot, pl) { \ argument
26 .tunnel_type = LIBETH_RX_PT_TUNNEL_IP_##tun, \
46 #define LIBIE_RX_PT_IP_L3(oip, tun, teprot, tefr) \ argument
47 LIBIE_RX_PT(IPV##oip, NOT_FRAG, tun, teprot, tefr, NONE, L3)
48 #define LIBIE_RX_PT_IP_L4(oip, tun, teprot, iprot) \ argument
49 LIBIE_RX_PT(IPV##oip, NOT_FRAG, tun, teprot, NOT_FRAG, iprot, L4)
51 #define LIBIE_RX_PT_IP_NOF(oip, tun, ver) \ argument
52 LIBIE_RX_PT_IP_L3(oip, tun, ver, NOT_FRAG), \
53 LIBIE_RX_PT_IP_L4(oip, tun, ver, UDP), \
55 LIBIE_RX_PT_IP_L4(oip, tun, ver, TCP), \
[all …]
/linux/net/netfilter/
H A Dnf_flow_table_path.c92 struct flow_offload_tunnel tun;
137 info->tun.src_v6 = path->tun.src_v6; in nft_dev_path_info()
138 info->tun.dst_v6 = path->tun.dst_v6; in nft_dev_path_info()
139 info->tun.inner_proto = path->tun.inner_proto; in nft_dev_path_info()
140 info->tun_dst = path->tun.dst; in nft_dev_path_info()
249 route->tuple[!dir].in.tun.src_v6 = info.tun in nft_dev_forward_path()
91 struct flow_offload_tunnel tun; global() member
[all...]
H A Dnf_flow_table_ip.c158 } tun; member
195 if (ctx->tun.inner_proto == IPPROTO_IPIP) { in nf_flow_tuple_encap()
196 tuple->tun.dst_v4.s_addr = iph->daddr; in nf_flow_tuple_encap()
197 tuple->tun.src_v4.s_addr = iph->saddr; in nf_flow_tuple_encap()
198 tuple->tun.inner_proto = IPPROTO_IPIP; in nf_flow_tuple_encap()
203 if (ctx->tun.inner_proto == IPPROTO_IPV6) { in nf_flow_tuple_encap()
204 tuple->tun.dst_v6 = ip6h->daddr; in nf_flow_tuple_encap()
205 tuple->tun.src_v6 = ip6h->saddr; in nf_flow_tuple_encap()
206 tuple->tun.inner_proto = IPPROTO_IPV6; in nf_flow_tuple_encap()
330 ctx->tun.inner_proto = iph->protocol; in nf_flow_ip4_tunnel_proto()
[all …]
/linux/tools/testing/selftests/net/ovpn/
H A Dcommon.sh178 ip netns exec "${peer}" ${OVPN_CLI} new_iface tun${1} $MODE
179 ip -n "${peer}" addr add ${2} dev tun${1}
182 ip -n "${peer}" addr add ${OVPN_LAN_IP} dev tun${1}
187 ip -n "${peer}" link set mtu ${3} dev tun${1}
189 ip -n "${peer}" link set tun${1} up
258 tun${1} ${PEER_ID} ${TX_ID} ${LPORT} ${RADDR} \
260 ip netns exec "${peer_ns}" ${OVPN_CLI} new_key tun${1} \
284 ip netns exec "${peer_ns}" ${OVPN_CLI} connect tun${1} \
344 ip -n "${peer}" link set tun${peer_id} down 2>/dev/null || true
345 ip netns exec "${peer}" ${OVPN_CLI} del_iface tun${peer_id} \
H A Dtest.sh55 tun${p} $((p + OVPN_ID_OFFSET)) 60 120
227 ip netns exec "${peer_ns}" ${OVPN_CLI} new_key tun${p} \
232 tun${p} $((p + OVPN_ID_OFFSET))
274 ip netns exec "${peer_ns}" ${OVPN_CLI} get_key tun${p} \
277 ip netns exec "${peer_ns}" ${OVPN_CLI} get_key tun${p} \
314 ip netns exec "${peer_ns}" ${OVPN_CLI} del_key tun${p} \
317 ip netns exec "${peer_ns}" ${OVPN_CLI} del_key tun${p} \
336 tun${p} $((p + OVPN_ID_OFFSET)) 0 0
347 tun${p} $((p + OVPN_ID_OFFSET)) 3 3
H A Dtest-close-socket.sh47 tun${p} $((p + OVPN_ID_OFFSET)) 60 120
/linux/tools/testing/selftests/drivers/net/mlxsw/
H A Dmirror_gre_scale.sh58 local tun=gt6-$i
68 tunnel_create $tun ip6gretap \
83 action mirred egress mirror dev $tun
97 local tun=gt6-$i
106 tunnel_destroy $tun
/linux/Documentation/networking/
H A Dtuntap.rst27 In order to use the driver a program has to open /dev/net/tun and issue a
34 IP packets (with tun) or ethernet frames (with tap). Which one is being used
37 The package from http://vtun.sourceforge.net/tun contains two simple examples
38 for how to use tun and tap devices. Both programs work like a bridge between
50 mknod /dev/net/tun c 10 200
54 e.g. chmod 0666 /dev/net/tun
60 unprivileged users, then you need the /dev/net/tun device to be usable by
73 modprobe tun
77 /dev/net/tun is being opened.
86 "tun%d"), but (as far as I can see) this can be any valid network device name.
[all …]
/linux/drivers/net/ethernet/intel/ice/virt/
H A Dfdir.c477 ice_vc_fdir_rem_prof(struct ice_vf *vf, enum ice_fltr_ptype flow, int tun) in ice_vc_fdir_rem_prof() argument
494 prof_id = vf_prof->prof_id[tun]; in ice_vc_fdir_rem_prof()
502 if (!fdir->prof_entry_cnt[flow][tun]) in ice_vc_fdir_rem_prof()
505 for (i = 0; i < fdir->prof_entry_cnt[flow][tun]; i++) in ice_vc_fdir_rem_prof()
506 if (vf_prof->entry_h[i][tun]) { in ice_vc_fdir_rem_prof()
511 vf_prof->entry_h[i][tun]); in ice_vc_fdir_rem_prof()
512 vf_prof->entry_h[i][tun] = 0; in ice_vc_fdir_rem_prof()
516 devm_kfree(dev, vf_prof->fdir_seg[tun]); in ice_vc_fdir_rem_prof()
517 vf_prof->fdir_seg[tun] = NULL; in ice_vc_fdir_rem_prof()
522 fdir->prof_entry_cnt[flow][tun] = 0; in ice_vc_fdir_rem_prof()
[all …]
/linux/tools/testing/selftests/drivers/net/hw/
H A Dtso.py137 def test_builder(name, cfg, outer_ipver, feature, tun=None, inner_ipver=None): argument
151 if tun:
152 remote_v4, remote_v6 = build_tunnel(cfg, ipver, tun)
174 f.__name__ = name + ((outer_ipver + "_") if tun else "") + "ipv" + inner_ipver
/linux/tools/testing/selftests/rdma/
H A Drxe_socket_with_netns.sh40 ip tuntap add mode tun tun0
52 ip tuntap add mode tun tun1
H A Drxe_test_NETDEV_UNREGISTER.sh32 ip tuntap add mode tun "$DEV_NAME"
H A Drxe_ipv6.sh24 for mod in tun veth rdma_rxe; do
/linux/tools/testing/selftests/net/
H A Dtun.c153 fd = open("/dev/net/tun", O_RDWR); in tun_alloc()
155 fprintf(stderr, "can't open tun: %s\n", strerror(errno)); in tun_alloc()
184 fd = open("/dev/net/tun", O_RDWR); in tun_open()
484 FIXTURE(tun) in FIXTURE()
490 FIXTURE_SETUP(tun) in FIXTURE_SETUP()
501 FIXTURE_TEARDOWN(tun) in FIXTURE_TEARDOWN()
509 TEST_F(tun, delete_detach_close) in TEST_F()
516 TEST_F(tun, detach_delete_close) in TEST_F()
522 TEST_F(tun, detach_close_delete) in TEST_F()
530 TEST_F(tun, reattach_delete_clos in TEST_F()
483 FIXTURE(tun) FIXTURE() argument
489 FIXTURE_SETUP(tun) FIXTURE_SETUP() argument
500 FIXTURE_TEARDOWN(tun) FIXTURE_TEARDOWN() argument
508 TEST_F(tun,delete_detach_close) TEST_F() argument
515 TEST_F(tun,detach_delete_close) TEST_F() argument
521 TEST_F(tun,detach_close_delete) TEST_F() argument
529 TEST_F(tun,reattach_delete_close) TEST_F() argument
536 TEST_F(tun,reattach_close_delete) TEST_F() argument
[all...]
H A D.gitignore55 tun
/linux/drivers/infiniband/hw/mlx4/
H A Dmad.c536 tun_ctx = dev->sriov.demux[port-1].tun[slave]; in mlx4_ib_send_to_slave()
1970 if (dev->sriov.demux[port - 1].tun[slave]) { in free_pv_object()
1971 kfree(dev->sriov.demux[port - 1].tun[slave]); in free_pv_object()
1972 dev->sriov.demux[port - 1].tun[slave] = NULL; in free_pv_object()
2127 dev->sriov.demux[port - 1].tun[slave], 1); in mlx4_ib_tunnels_update()
2133 dev->sriov.demux[port - 1].tun[slave]); in mlx4_ib_tunnels_update()
2160 ctx->tun = kzalloc_objs(struct mlx4_ib_demux_pv_ctx *, in mlx4_ib_alloc_demux_ctx()
2162 if (!ctx->tun) in mlx4_ib_alloc_demux_ctx()
2179 ret = alloc_pv_object(dev, i, port, &ctx->tun[i]); in mlx4_ib_alloc_demux_ctx()
2228 kfree(ctx->tun); in mlx4_ib_alloc_demux_ctx()
[all …]
/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dspectrum_ipip.c14 struct ip_tunnel *tun = netdev_priv(ol_dev); in mlxsw_sp_ipip_netdev_parms4() local
16 return tun->parms; in mlxsw_sp_ipip_netdev_parms4()
22 struct ip6_tnl *tun = netdev_priv(ol_dev); in mlxsw_sp_ipip_netdev_parms6() local
24 return tun->parms; in mlxsw_sp_ipip_netdev_parms6()
/linux/net/ipv4/
H A Dipip.c379 path->tun.src_v4.s_addr = tiph->saddr; in ipip_fill_forward_path()
380 path->tun.dst_v4.s_addr = tiph->daddr; in ipip_fill_forward_path()
381 path->tun.inner_proto = IPPROTO_IPIP; in ipip_fill_forward_path()
382 path->tun.dst = &rt->dst; in ipip_fill_forward_path()
/linux/tools/testing/selftests/net/netfilter/
H A Dnf_conntrack_packetdrill.sh10 modprobe -q tun
/linux/include/net/netfilter/
H A Dnf_flow_table.h146 struct flow_offload_tunnel tun; member
227 struct flow_offload_tunnel tun; member
/linux/drivers/net/ethernet/qlogic/qed/
H A Dqed_main.c380 struct qed_tunnel_info *tun = &cdev->tunnel; in qed_fill_dev_info() local
385 if (tun->vxlan.tun_cls == QED_TUNN_CLSS_MAC_VLAN && in qed_fill_dev_info()
386 tun->vxlan.b_mode_enabled) in qed_fill_dev_info()
389 if (tun->l2_gre.b_mode_enabled && tun->ip_gre.b_mode_enabled && in qed_fill_dev_info()
390 tun->l2_gre.tun_cls == QED_TUNN_CLSS_MAC_VLAN && in qed_fill_dev_info()
391 tun->ip_gre.tun_cls == QED_TUNN_CLSS_MAC_VLAN) in qed_fill_dev_info()
394 if (tun->l2_geneve.b_mode_enabled && tun->ip_geneve.b_mode_enabled && in qed_fill_dev_info()
395 tun->l2_geneve.tun_cls == QED_TUNN_CLSS_MAC_VLAN && in qed_fill_dev_info()
396 tun->ip_geneve.tun_cls == QED_TUNN_CLSS_MAC_VLAN) in qed_fill_dev_info()
/linux/Documentation/translations/zh_CN/networking/
H A Dmsg_zerocopy.rst208 这包括环回到数据包套接字(例如,tcpdump)和 tun 设备。

12