#define fdev_set_udata(stream,u) \
	do { (stream)->udata = u; } while(0) 

This macro inserts a pointer to user defined data into a FILE stream object.

The user data can be useful for tracking state in the put and get functions supplied to the fdevopen() function.