ksyms man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

KSYMS(4)		 BSD Kernel Interfaces Manual		      KSYMS(4)

NAME
     ksyms — kernel symbol table interface

SYNOPSIS
     pseudo-device ksyms

DESCRIPTION
     The /dev/ksyms character device provides a read-only interface to the
     current kernel symbol table.  It can be accessed either as a sequential
     file, where it looks like an executable file but with zero-sized text and
     data segments, or via ioctl(2).

     /dev/ksyms represents the symbol table at the time when the device is
     opened, and may not change until it is closed.

     The in-kernel symbol manager is designed to be able to handle any type of
     symbol table.  However, only elf(5) symbol tables are currently dealt
     with.

IOCTLS
     The ioctl(2) command codes below are defined in <sys/ksyms.h>.

     The (third) argument to the ioctl(2) should be a pointer to the type
     indicated.

	   KIOCGSIZE (int)
		   Returns the total size of the current symbol table.	This
		   should be used when allocating a buffer to read in the
		   whole symbol table to memory.

	   KIOCGVALUE (struct ksyms_gsymbol)
		   Returns the value for the given symbol name in a symtab-
		   independent fashion.

			 struct ksyms_gsymbol {
				 const char *kg_name;
				 unsigned long *kg_value;
			 };

		   The struct element kg_name should be set to the name of the
		   requested value, and the address that kg_value points to
		   will receive the symbol value.

	   KIOCGSYMBOL (struct ksyms_gsymbol)
		   Returns the complete symbol for the given symbol name.

			 struct ksyms_gsymbol {
				 const char *kg_name;
				 void *kg_sym;
			 };

		   The struct element kg_name should be set to the name of the
		   requested symbol, and the found symbol will be written to
		   the kg_sym address.	It is the callers responsibility to
		   ensure that enough space for the symbol is allocated.

FILES
     /dev/ksyms

SEE ALSO
     ioctl(2), nlist(3), elf(5)

HISTORY
     A ksyms device exists in many different operating systems.	 This imple‐
     mentation is modelled in function after Solaris ksyms.  This ksyms driver
     was written by Anders Magnusson for NetBSD.

     The ksyms driver first appeared in NetBSD 2.0.

BSD			       November 12, 2008			   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net