Translates names to addresses in the running system.
#include <nlist.h>
int knlist( NList, NumberOfElements, Size)
struct nlist *NList;
int NumberOfElements;
int Size;
The knlist subroutine allows a program to examine the list of symbols exported by kernel routines to other kernel modules.
The first field in the nlist structure is an input parameter to the knlist subroutine. The n_value field is modified by the knlist subroutine, and all the others remain unchanged. The nlist structure consists of the following fields:
If the name is not found, all fields, other than n_name, are set to 0.
The nlist.h file is automatically included by the a.out.h file for compatibility. However, do not include the a.out.h file if you only need the information necessary to use the knlist subroutine. If you do include the a.out.h file, follow the #include statement with the line:
#undef n_name
#undef n_name
before accessing the n_name field in the netent structure. If you need to access the n_name field in a syment or nlist structure after undefining it, redefine the n_name field with:
#define n_name _n._n_name
NList | Points to an array of nlist structures. |
NumberOfElements | Specifies the number of structures in the array of nlist structures. |
Size | Specifies the size of each structure. |
Upon successful completion, knlist returns a value of 0. Otherwise, a value of -1 is returned, and the errno global variable is set to indicate the error.
The knlist subroutine fails when the following is true:
EFAULT | Indicates that the NList parameter points outside the limit of the array of nlist structures. |