The first part of each device structure is the DevServerPart structure. DevServerPart contains the following fields :
typedef struct _DevServerPart {
char *name; /*name of device*/
char dev_type[24]; /*pointer to string containing device type*/
DevServerClass class_pointer; /*pointer to class type*/
long state; /*device state*/
long n_state; /*next device state*/
}
DevServerPart;
All these values (except the n_state variable) have to be initialised at device creation time. The most important is the class_pointer variable which is used by the method finder to locate the device class structure.