Sorry if I wasn’t being clear. I’ll take a crack at explaining this but forgive me is this is still not very understandable.
Since device drivers need physical access to the hardware in order to do things like setting up registers on telephony cards so they may write audio samples directly into system memory, they need to run inside the kernel with full system privileges. This is referred to as kernel mode. Normal applications on Linux run primarily in user-mode and the kernel controls what sort of access they have to the rest of the system.
When an application needs access to a physical resource (disk, clock, telephony card, etc…) it must make a system call. System calls all allow a process to switch from user-mode to kernel-mode so that the kernel may perform some action for the process. Because of the special nature of system calls their number and function is fixed by the kernel. A driver cannot just add a new system call that is callable by a normal application. What a driver is able to do, however, is set function pointers in a file_operations structure that the kernel will call when the user passes a file descriptor returned form an open() call on one of the /dev/dahdi/xxx files to the read(), write(), ioctl(), or poll() functions in the C library.
Most of the telephony specific operations on a DAHDI channel like taking a line off hook, reversing polarity, starting a ring cycle, etc… all must be done through DAHDI specific ioctls which are passed as the request parameter on the ioctl function in the C library. The C library and kernel will eventually hand these requests to the DAHDI kernel module.
If you look at the zapata library you linked before, I believe you will find at it’s lowest layers are calls into the kernel through read, write, ioctl, and poll calls. It is those Zaptel ioctls and parameters that you will need to change to their DAHDI equivalents if you want to port that library.
For example, search chan_dahdi.c in the Asterisk source for “ioctl”. That will provide examples of how Asterisk, through chan_dahdi, communicates with the hardware through read, write, ioctl, and poll calls.
As an aside, it would be possible to write a libdahdi.so which provide normal C function calls that map to ioctls. However I’m not aware of any versions of Asterisk that have used such a library which I assume was for performance reasons. Also Asterisk needs certain sorts of telephony functions like tone generators and detectors to run on any Asterisk channel and not just from DAHDI interfaces.
Hopefully this helps to explain why there isn’t a need for a DAHDI specific library you link to your application and call into like other libraries.