interface-attach-tap

Synopsis

(interface-attach-tap specifier)

Parameters

  • specifier

Description

This procedure creates a network TAP interface with the provided name. This procedure is available on Linux only (on macOS it will never succeed).

Side Effects

Return Value

On success, an interface object is returned.

See Also

Example

> (define i (interface-attach-tap "scheme0"))
i
> (system "ifconfig scheme0")
scheme0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
       ether 9e:ac:3a:55:65:f6  txqueuelen 1000  (Ethernet)
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

0
> (system "ifconfig scheme0 up")
0
> (interface-write i packet)
ok
> (system "ifconfig scheme0")
scheme0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet6 fe80::9cac:3aff:fe55:65f6  prefixlen 64  scopeid 0x20<link>
       ether 9e:ac:3a:55:65:f6  txqueuelen 1000  (Ethernet)
       RX packets 1  bytes 203 (203.0 B)
       RX errors 0  dropped 5  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

0
>