What is the significance of caddr_t and when is it used?

Viewed 23085

Can somebody please tell me:

  1. What is caddr_t ?
  2. When is it used ?
  3. How it is different from void* ?
  4. When to use void* and when to use caddr_t ?

Thanks in advance.

2 Answers

caddr_t was used as a pointer to a core address. I used it in SVR4 when I needed to access kernel structures from user space (having used mmap to access /dev/kmem). Even when "/proc" existed, the ps command still used mmap of the kernel to start walking the process table. As everybody states it was superseded by void *.

Related