tun(4) device programming

Dear colleagues!

Can I find somewhere a document describing the correct programming of the tun(4) device?

Based on the available sample code I wrote a network daemon that uses the tun(4) devices. It even works.
However, the study of the code is always a special case, and it is never completely replace of normal manual.
Is there somewhere in the manual about programming tun(4) device?

For example, how to correctly determine that a particular tun(4) device is not in use and can be occupied by my program?

I want before the publication of the code to make sure that it is methodologically correct and there is no cause for ridicule.

Ogogon.
 
Back
Top