Interface TunDevice

    • Method Detail

      • localAddress

        TunAddress localAddress()
        The actual name of the device.
        Returns:
        The actual name of the device.
      • readPacket

        TunPacket readPacket​(io.netty.buffer.ByteBufAllocator alloc)
                      throws IOException
        Reads and blocks until a TunPacket has been received by the tun device.
        Parameters:
        alloc -
        Returns:
        TunPacket received by the tun device
        Throws:
        IOException - if read failed
      • writePacket

        void writePacket​(io.netty.buffer.ByteBufAllocator alloc,
                         TunPacket msg)
                  throws IOException
        Writes and blocks until a TunPacket has been sent by the tun device.
        Parameters:
        alloc -
        msg - TunPacket to write by the tun device
        Throws:
        IOException - if write failed
      • isClosed

        boolean isClosed()
        Returns whether the device is closed or not.
        Returns:
        true if the device has been closed.