tokio-rs / tokio-uds

Unix Domain Sockets for tokio
Apache License 2.0
52 stars 25 forks source link

Use with /dev/net/tun #3

Open Yamakaky opened 7 years ago

Yamakaky commented 7 years ago

To add a new TUN/TAP device, you have to open /dev/net/tun, configure it with ioctl then read/select it like a normal fd. Would it be appropriate for use with UnixDatagram? If so, did you consider adding impl FromRawFd for UnixDatagram?

alexcrichton commented 7 years ago

It's plausible that a FromRawFd method could be added but are the relevant methods appropriate? I haven't worked with TUN/TAP much but do those basically look like unix sockets? (e.g. also in sockaddrs received)