Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Apropos / Subsearch:
optional field

 modstat(2)							  modstat(2)

      modstat - get information for a dynamically loaded kernel module

      #include <&lt&lt&lt;sys/mod.h>&gt&gt&gt;
      int modstat(int module_id, struct modstatus *stbuf,
		  int get_next_module);

      The modstat function allows processes with appropriate privilege to
      get information for dynamically loaded kernel modules. It fills in the
      elements of the modstatus structure, specified by stbuf, with the
      information available for the given module identifier module_id.	If
      the value of get_next_module is TRUE, modstat returns the information
      for the next module whose identifier is greater than or equal to
      module_id.  Any module_id associated with a registered module (see
      kmadmin(1M)) may be queried by modstat.

      The struct modstatus and struct modspecific_stat definitions are:

	   struct modstatus {
		int32_t	 ms_id;		      /* numeric id of module */
		uint64_t ms_base;	      /* base address of module */
		uint32_t ms_size;	      /* amount of memory of module
					      when loaded */
		uint64_t ms_bss;	      /* base address of BSS */
		uint32_t ms_bss_size;	      /* memory size of BSS */
		int32_t	 ms_rev;	      /* version number */
		char	 ms_path[MAXPATHLEN]; /* loaded module path */
		time_t	 ms_unload_delay;     /* unload delay */
		int32_t	 ms_holdcnt;	      /* hold count */
		int32_t	 ms_depcnt;	      /* dependent count */
		struct modspecific_stat	      /* module type specific info */
	   struct modspecific_stat {
	       char	mss_linkinfo[MODMAXLINKINFOLEN]; /* informational */
	       int32_t	mss_type;		  /* type of module */
	       int32_t	mss_p0[2];		  /* type specific info */
	       int32_t	mss_p1[2];		  /* type specific info */

      modstat is currently implemented as a macro.

      On success, modstat returns 0, otherwise it returns -1 and sets errno
      to indicate the error.


 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000

 modstat(2)							  modstat(2)

      modstat fails if one or more of the following are true:

      [EINVAL]	  module_id does not match any loaded or registered module
		  when get_next_module is FALSE or module_id is greater than
		  the identifier for any loaded module when get_next_module
		  is TRUE.

      [ENOSYS]	  The Dynamically Loadable Kernel Module feature is not

      [EPERM]	   The calling process does not have appropriate privilege.

      kmadmin(1M), modload(2).

 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000