int getdev (fildes)
FD fildes;
int gettype (fildes)
FD makefd (type, device)
int type, device;
FD settype (type, fildes)
gettype returns the type of device from the file descriptor fildes.
makefd returns a fildes given a type of device type and a device number device.
settype will take the file descriptor fildes and change the device type to type.