From 9918cc552f19e019763e41ec3147847033c74528 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Sun, 8 Dec 2024 16:54:45 -0800 Subject: [PATCH 1/9] Add docs for v33 Signed-off-by: Lucas De Marchi --- README.md | 1 + v33/api-index-full.html | 380 +++++++ v33/ch01.html | 46 + v33/home.png | Bin 0 -> 256 bytes v33/index.html | 47 + v33/left-insensitive.png | Bin 0 -> 395 bytes v33/left.png | Bin 0 -> 262 bytes v33/libkmod-libkmod-config.html | 475 ++++++++ v33/libkmod-libkmod-list.html | 234 ++++ v33/libkmod-libkmod-loaded.html | 296 +++++ v33/libkmod-libkmod-module.html | 1839 +++++++++++++++++++++++++++++++ v33/libkmod-libkmod.html | 595 ++++++++++ v33/libkmod.devhelp2 | 96 ++ v33/right-insensitive.png | Bin 0 -> 373 bytes v33/right.png | Bin 0 -> 261 bytes v33/style.css | 531 +++++++++ v33/up-insensitive.png | Bin 0 -> 374 bytes v33/up.png | Bin 0 -> 260 bytes 18 files changed, 4540 insertions(+) create mode 100644 README.md create mode 100644 v33/api-index-full.html create mode 100644 v33/ch01.html create mode 100644 v33/home.png create mode 100644 v33/index.html create mode 100644 v33/left-insensitive.png create mode 100644 v33/left.png create mode 100644 v33/libkmod-libkmod-config.html create mode 100644 v33/libkmod-libkmod-list.html create mode 100644 v33/libkmod-libkmod-loaded.html create mode 100644 v33/libkmod-libkmod-module.html create mode 100644 v33/libkmod-libkmod.html create mode 100644 v33/libkmod.devhelp2 create mode 100644 v33/right-insensitive.png create mode 100644 v33/right.png create mode 100644 v33/style.css create mode 100644 v33/up-insensitive.png create mode 100644 v33/up.png diff --git a/README.md b/README.md new file mode 100644 index 0000000..d8aa4c2 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Documentation website for kmod diff --git a/v33/api-index-full.html b/v33/api-index-full.html new file mode 100644 index 0000000..6272025 --- /dev/null +++ b/v33/api-index-full.html @@ -0,0 +1,380 @@ + + + + +API Index: libkmod Reference Manual + + + + + + + + + + + + + + + +
+

+API Index

+

C

+
+kmod_config_get_aliases, function in libkmod-config +
+
+
+kmod_config_get_blacklists, function in libkmod-config +
+
+
+kmod_config_get_install_commands, function in libkmod-config +
+
+
+kmod_config_get_options, function in libkmod-config +
+
+
+kmod_config_get_remove_commands, function in libkmod-config +
+
+
+kmod_config_get_softdeps, function in libkmod-config +
+
+
+kmod_config_get_weakdeps, function in libkmod-config +
+
+
+kmod_config_iter, struct in libkmod-config +
+
+
+kmod_config_iter_free_iter, function in libkmod-config +
+
+
+kmod_config_iter_get_key, function in libkmod-config +
+
+
+kmod_config_iter_get_value, function in libkmod-config +
+
+
+kmod_config_iter_next, function in libkmod-config +
+
+
+kmod_ctx, struct in libkmod +
+
+

D

+
+kmod_dump_index, function in libkmod +
+
+

G

+
+kmod_get_dirname, function in libkmod +
+
+
+kmod_get_log_priority, function in libkmod +
+
+
+kmod_get_userdata, function in libkmod +
+
+

L

+
+kmod_list, struct in libkmod-list +
+
+
+kmod_list_foreach, macro in libkmod-list +
+
+
+kmod_list_foreach_reverse, macro in libkmod-list +
+
+
+kmod_list_last, function in libkmod-list +
+
+
+kmod_list_next, function in libkmod-list +
+
+
+kmod_list_prev, function in libkmod-list +
+
+
+kmod_load_resources, function in libkmod +
+
+

M

+
+kmod_module, struct in libkmod-module +
+
+
+kmod_module_apply_filter, function in libkmod-module +
+
+
+kmod_module_dependency_symbols_free_list, function in libkmod-module +
+
+
+kmod_module_dependency_symbol_get_bind, function in libkmod-module +
+
+
+kmod_module_dependency_symbol_get_crc, function in libkmod-module +
+
+
+kmod_module_dependency_symbol_get_symbol, function in libkmod-module +
+
+
+kmod_module_get_dependencies, function in libkmod-module +
+
+
+kmod_module_get_dependency_symbols, function in libkmod-module +
+
+
+kmod_module_get_filtered_blacklist, function in libkmod-module +
+
+
+kmod_module_get_holders, function in libkmod-loaded +
+
+
+kmod_module_get_info, function in libkmod-module +
+
+
+kmod_module_get_initstate, function in libkmod-loaded +
+
+
+kmod_module_get_install_commands, function in libkmod-module +
+
+
+kmod_module_get_module, function in libkmod-module +
+
+
+kmod_module_get_name, function in libkmod-module +
+
+
+kmod_module_get_options, function in libkmod-module +
+
+
+kmod_module_get_path, function in libkmod-module +
+
+
+kmod_module_get_refcnt, function in libkmod-loaded +
+
+
+kmod_module_get_remove_commands, function in libkmod-module +
+
+
+kmod_module_get_sections, function in libkmod-module +
+
+
+kmod_module_get_size, function in libkmod-loaded +
+
+
+kmod_module_get_softdeps, function in libkmod-module +
+
+
+kmod_module_get_symbols, function in libkmod-module +
+
+
+kmod_module_get_versions, function in libkmod-module +
+
+
+kmod_module_get_weakdeps, function in libkmod-module +
+
+
+kmod_module_info_free_list, function in libkmod-module +
+
+
+kmod_module_info_get_key, function in libkmod-module +
+
+
+kmod_module_info_get_value, function in libkmod-module +
+
+
+kmod_module_initstate_str, function in libkmod-loaded +
+
+
+kmod_module_insert_module, function in libkmod-module +
+
+
+kmod_module_new_from_loaded, function in libkmod-loaded +
+
+
+kmod_module_new_from_lookup, function in libkmod-module +
+
+
+kmod_module_new_from_name, function in libkmod-module +
+
+
+kmod_module_new_from_name_lookup, function in libkmod-module +
+
+
+kmod_module_new_from_path, function in libkmod-module +
+
+
+kmod_module_probe_insert_module, function in libkmod-module +
+
+
+kmod_module_ref, function in libkmod-module +
+
+
+kmod_module_remove_module, function in libkmod-module +
+
+
+kmod_module_section_free_list, function in libkmod-module +
+
+
+kmod_module_section_get_address, function in libkmod-module +
+
+
+kmod_module_section_get_name, function in libkmod-module +
+
+
+kmod_module_symbols_free_list, function in libkmod-module +
+
+
+kmod_module_symbol_get_crc, function in libkmod-module +
+
+
+kmod_module_symbol_get_symbol, function in libkmod-module +
+
+
+kmod_module_unref, function in libkmod-module +
+
+
+kmod_module_unref_list, function in libkmod-module +
+
+
+kmod_module_versions_free_list, function in libkmod-module +
+
+
+kmod_module_version_get_crc, function in libkmod-module +
+
+
+kmod_module_version_get_symbol, function in libkmod-module +
+
+

N

+
+kmod_new, function in libkmod +
+
+

R

+
+kmod_ref, function in libkmod +
+
+

S

+
+kmod_set_log_fn, function in libkmod +
+
+
+kmod_set_log_priority, function in libkmod +
+
+
+kmod_set_userdata, function in libkmod +
+
+

U

+
+kmod_unload_resources, function in libkmod +
+
+
+kmod_unref, function in libkmod +
+
+

V

+
+kmod_validate_resources, function in libkmod +
+
+
+ + + \ No newline at end of file diff --git a/v33/ch01.html b/v33/ch01.html new file mode 100644 index 0000000..a5986d7 --- /dev/null +++ b/v33/ch01.html @@ -0,0 +1,46 @@ + + + + +libkmod: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+libkmod

+
+
+libkmod — libkmod context +
+
+libkmod-list — general purpose list +
+
+libkmod-config — retrieve current libkmod configuration +
+
+libkmod-module — operate on kernel modules +
+
+libkmod-loaded — currently loaded modules +
+
+
+ + + \ No newline at end of file diff --git a/v33/home.png b/v33/home.png new file mode 100644 index 0000000000000000000000000000000000000000..9346b336a784463192c7daab5133a3673dd69845 GIT binary patch literal 256 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefRMbARQqaxysz9Q}BI-m)~Y zggoA|1V*z2{cQ=d;!=?fvu4~`n82RKrk1UubNXTJj1GP|o-=>$A29f{JgJ9K`^t{Q z-oWs>M&_hvT&MjX@T4-&sBW+1^4oB5G4r2q!qGktZ!n*!)hjrjd0_4L6;4%u<}orJ u%Vo~x?#i!!ww+1OGuHe}T=cKQUzn^_t)8|WlnDbmjKR~@&t;ucLK6T + + + +libkmod Reference Manual: libkmod Reference Manual + + + + + + + +
+
+
+
+

for libkmod version 33 +

+
+
+
+
+
libkmod
+
+
+libkmod — libkmod context +
+
+libkmod-list — general purpose list +
+
+libkmod-config — retrieve current libkmod configuration +
+
+libkmod-module — operate on kernel modules +
+
+libkmod-loaded — currently loaded modules +
+
+
API Index
+
+
+ + + \ No newline at end of file diff --git a/v33/left-insensitive.png b/v33/left-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..3269393a7f72af744a772c437bd7b3976c23709d GIT binary patch literal 395 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefH0HbvDJm`3=E7Co-U3d7N^fnTIWJ3j{^~q!iyia4kV=mdU|Jhfgdm;SLIpiYJ7wv^kjFiECCc&8T30!RG0~&BG=X zlu#U4@Z`))V`EG9e^NqDr#{!5k|)wT* zYTNt0`@q%TAD$){%#eQ?;$^ly8}yZCU%T~u0XM^%t?f#e znB*EuLv2rP%K3BMvFO}YmnR}KSgH;`EHL$)^!tH~iBxZ#h^zJi*#P5Xb6B50U@nx2 mU;T=yfcwnSOsS9SKd{M#MlNkCuvG>I8-u5-pUXO@geCx5`k@p6 literal 0 HcmV?d00001 diff --git a/v33/left.png b/v33/left.png new file mode 100644 index 0000000000000000000000000000000000000000..2abde032b0c98b756b12d380da4318205cd78470 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefRMaSLay~*pwMJb7sn8b(^oI8=R24v(*CjE{-BFv z0BhvLm?o9(UC{-Ci?lD?Ve-7-xypA!PTC(0^;>UheG4Altep3@`rO0#Rjs1)RxCLr zE5mee>7m*=%yEk+GVvGkRy0O&*&MTd5SjH(lgq~7r%6oRW$l1p-*S}iC>@fyDsz%y z`UIW8^Ao=maGhj3E8{7Cd_qof`K4oa->23`>&M2+XBtd2J`8jogQu&X%Q~loCIG_? BVG#fT literal 0 HcmV?d00001 diff --git a/v33/libkmod-libkmod-config.html b/v33/libkmod-libkmod-config.html new file mode 100644 index 0000000..95c4b07 --- /dev/null +++ b/v33/libkmod-libkmod-config.html @@ -0,0 +1,475 @@ + + + + +libkmod-config: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-config

+

libkmod-config — retrieve current libkmod configuration

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
struct kmod_config_iter * + +kmod_config_get_blacklists () +
struct kmod_config_iter * + +kmod_config_get_install_commands () +
struct kmod_config_iter * + +kmod_config_get_remove_commands () +
struct kmod_config_iter * + +kmod_config_get_aliases () +
struct kmod_config_iter * + +kmod_config_get_options () +
struct kmod_config_iter * + +kmod_config_get_softdeps () +
struct kmod_config_iter * + +kmod_config_get_weakdeps () +
const char * + +kmod_config_iter_get_key () +
const char * + +kmod_config_iter_get_value () +
+bool + +kmod_config_iter_next () +
+void + +kmod_config_iter_free_iter () +
+
+
+

Types and Values

+
++++ + + + + +
structkmod_config_iter
+
+
+

Description

+
+
+

Functions

+
+

kmod_config_get_blacklists ()

+
struct kmod_config_iter *
+kmod_config_get_blacklists (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the blacklist maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the blacklists or NULL on failure. Free it +with kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_get_install_commands ()

+
struct kmod_config_iter *
+kmod_config_get_install_commands (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the install commands maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the install commands or NULL on failure. Free +it with kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_get_remove_commands ()

+
struct kmod_config_iter *
+kmod_config_get_remove_commands (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the remove commands maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the remove commands or NULL on failure. Free +it with kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_get_aliases ()

+
struct kmod_config_iter *
+kmod_config_get_aliases (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the aliases maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the aliases or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_get_options ()

+
struct kmod_config_iter *
+kmod_config_get_options (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the options maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the options or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_get_softdeps ()

+
struct kmod_config_iter *
+kmod_config_get_softdeps (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the softdeps maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the softdeps or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_get_weakdeps ()

+
struct kmod_config_iter *
+kmod_config_get_weakdeps (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the weakdeps maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the weakdeps or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_iter_get_key ()

+
const char *
+kmod_config_iter_get_key (const struct kmod_config_iter *iter);
+

When using a new allocated iterator, user must perform a call to +kmod_config_iter_next() to initialize iterator's position and check if it's +valid.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+

Returns

+

the key of the current configuration pointed by iter +.

+
+
+
+
+

kmod_config_iter_get_value ()

+
const char *
+kmod_config_iter_get_value (const struct kmod_config_iter *iter);
+

When using a new allocated iterator, user must perform a call to +kmod_config_iter_next() to initialize iterator's position and check if it's +valid.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+

Returns

+

the value of the current configuration pointed by iter +.

+
+
+
+
+

kmod_config_iter_next ()

+
bool
+kmod_config_iter_next (struct kmod_config_iter *iter);
+

Make iter + point to the next item of a certain configuration. It's an +automatically recycling iterator. When it reaches the end, false is +returned; then if user wants to iterate again, it's sufficient to call this +function once more.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+

Returns

+

true if next position of iter +is valid or false if its end is +reached.

+
+
+
+
+

kmod_config_iter_free_iter ()

+
void
+kmod_config_iter_free_iter (struct kmod_config_iter *iter);
+

Free resources used by the iterator.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+
+
+

Types and Values

+
+

struct kmod_config_iter

+
struct kmod_config_iter;
+
+
+
+ + + \ No newline at end of file diff --git a/v33/libkmod-libkmod-list.html b/v33/libkmod-libkmod-list.html new file mode 100644 index 0000000..d4f6d5e --- /dev/null +++ b/v33/libkmod-libkmod-list.html @@ -0,0 +1,234 @@ + + + + +libkmod-list: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-list

+

libkmod-list — general purpose list

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + +
#define +kmod_list_foreach() +
#define +kmod_list_foreach_reverse() +
struct kmod_list * + +kmod_list_last () +
struct kmod_list * + +kmod_list_next () +
struct kmod_list * + +kmod_list_prev () +
+
+
+

Types and Values

+
++++ + + + + +
structkmod_list
+
+
+

Description

+
+
+

Functions

+
+

kmod_list_foreach()

+
#define             kmod_list_foreach(list_entry, first_entry)
+
+
+
+

kmod_list_foreach_reverse()

+
#define             kmod_list_foreach_reverse(list_entry, first_entry)
+
+
+
+

kmod_list_last ()

+
struct kmod_list *
+kmod_list_last (const struct kmod_list *list);
+

Get the last element of the list +. As list + is a circular list, +this is a cheap operation O(1) with the last element being the +previous element.

+

If the list has a single element it will return the list itself (as +expected, and this is what differentiates from kmod_list_prev()).

+
+

Parameters

+
+++++ + + + + + +

list

the head of the list

 
+
+
+

Returns

+

last node at list +or NULL if the list is empty.

+
+
+
+
+

kmod_list_next ()

+
struct kmod_list *
+kmod_list_next (const struct kmod_list *list,
+                const struct kmod_list *curr);
+

Get the next node in list + relative to curr + as if list + was not a circular +list. I.e. calling this function in the last node of the list returns +NULL.. It can be used to iterate a list by checking for NULL return to know +when all elements were iterated.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

list

the head of the list

 

curr

the current node in the list

 
+
+
+

Returns

+

node next to curr +or NULL if either this node is the last of or +list is empty.

+
+
+
+
+

kmod_list_prev ()

+
struct kmod_list *
+kmod_list_prev (const struct kmod_list *list,
+                const struct kmod_list *curr);
+

Get the previous node in list + relative to curr + as if list + was not a +circular list. I.e.: the previous of the head is NULL. It can be used to +iterate a list by checking for NULL return to know when all elements were +iterated.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

list

the head of the list

 

curr

the current node in the list

 
+
+
+

Returns

+

node previous to curr +or NULL if either this node is the head of +the list or the list is empty.

+
+
+
+
+

Types and Values

+
+

struct kmod_list

+
struct kmod_list;
+
+
+
+ + + \ No newline at end of file diff --git a/v33/libkmod-libkmod-loaded.html b/v33/libkmod-libkmod-loaded.html new file mode 100644 index 0000000..0b8bae3 --- /dev/null +++ b/v33/libkmod-libkmod-loaded.html @@ -0,0 +1,296 @@ + + + + +libkmod-loaded: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-loaded

+

libkmod-loaded — currently loaded modules

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+int + +kmod_module_new_from_loaded () +
+int + +kmod_module_get_initstate () +
const char * + +kmod_module_initstate_str () +
+long + +kmod_module_get_size () +
+int + +kmod_module_get_refcnt () +
struct kmod_list * + +kmod_module_get_holders () +
+
+
+

Description

+

Information about currently loaded modules, as reported by Linux kernel. +These information are not cached by libkmod and are always read from /sys +and /proc/modules.

+
+
+

Functions

+
+

kmod_module_new_from_loaded ()

+
int
+kmod_module_new_from_loaded (struct kmod_ctx *ctx,
+                             struct kmod_list **list);
+

Create a new list of kmod modules with all modules currently loaded in +kernel. It uses /proc/modules to get the names of loaded modules and to +create kmod modules by calling kmod_module_new_from_name() in each of them. +They are put in list + in no particular order.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. The returned list + must be released by +calling kmod_module_unref_list(). Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned list are +completed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

ctx

kmod library context

 

list

where to save the list of loaded modules

 
+
+
+

Returns

+

0 on success or < 0 on error.

+
+
+
+
+

kmod_module_get_initstate ()

+
int
+kmod_module_get_initstate (const struct kmod_module *mod);
+

Get the initstate of this mod +, as returned by Linux Kernel, by reading +/sys filesystem.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

< 0 on error or module state if module is found in kernel, valid states are +KMOD_MODULE_BUILTIN: module is builtin; +KMOD_MODULE_LIVE: module is live in kernel; +KMOD_MODULE_COMING: module is being loaded; +KMOD_MODULE_GOING: module is being unloaded.

+
+
+
+
+

kmod_module_initstate_str ()

+
const char *
+kmod_module_initstate_str (enum kmod_module_initstate state);
+

Translate a initstate to a string.

+
+

Parameters

+
+++++ + + + + + +

state

the state as returned by kmod_module_get_initstate()

 
+
+
+

Returns

+

the string associated to the state +. This string is statically +allocated, do not free it.

+
+
+
+
+

kmod_module_get_size ()

+
long
+kmod_module_get_size (const struct kmod_module *mod);
+

Get the size of this kmod module as returned by Linux kernel. If supported, +the size is read from the coresize attribute in /sys/module. For older +kernels, this falls back on /proc/modules and searches for the specified +module to get its size.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the size of this kmod module.

+
+
+
+
+

kmod_module_get_refcnt ()

+
int
+kmod_module_get_refcnt (const struct kmod_module *mod);
+

Get the ref count of this mod +, as returned by Linux Kernel, by reading +/sys filesystem.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the reference count on success or < 0 on failure.

+
+
+
+
+

kmod_module_get_holders ()

+
struct kmod_list *
+kmod_module_get_holders (const struct kmod_module *mod);
+

Get a list of kmod modules that are holding this mod +, as returned by Linux +Kernel. After use, free the list + by calling kmod_module_unref_list().

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a new list of kmod modules on success or NULL on failure.

+
+
+
+
+ + + \ No newline at end of file diff --git a/v33/libkmod-libkmod-module.html b/v33/libkmod-libkmod-module.html new file mode 100644 index 0000000..b763a9a --- /dev/null +++ b/v33/libkmod-libkmod-module.html @@ -0,0 +1,1839 @@ + + + + +libkmod-module: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-module

+

libkmod-module — operate on kernel modules

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+int + +kmod_module_new_from_lookup () +
+int + +kmod_module_new_from_name_lookup () +
+int + +kmod_module_new_from_name () +
+int + +kmod_module_new_from_path () +
struct kmod_module * + +kmod_module_ref () +
struct kmod_module * + +kmod_module_unref () +
+int + +kmod_module_unref_list () +
+int + +kmod_module_insert_module () +
+int + +kmod_module_probe_insert_module () +
+int + +kmod_module_remove_module () +
struct kmod_module * + +kmod_module_get_module () +
struct kmod_list * + +kmod_module_get_dependencies () +
+int + +kmod_module_get_softdeps () +
+int + +kmod_module_get_weakdeps () +
+int + +kmod_module_apply_filter () +
+int + +kmod_module_get_filtered_blacklist () +
const char * + +kmod_module_get_install_commands () +
const char * + +kmod_module_get_remove_commands () +
const char * + +kmod_module_get_name () +
const char * + +kmod_module_get_options () +
const char * + +kmod_module_get_path () +
+int + +kmod_module_get_dependency_symbols () +
+int + +kmod_module_dependency_symbol_get_bind () +
+uint64_t + +kmod_module_dependency_symbol_get_crc () +
const char * + +kmod_module_dependency_symbol_get_symbol () +
+void + +kmod_module_dependency_symbols_free_list () +
struct kmod_list * + +kmod_module_get_sections () +
+void + +kmod_module_section_free_list () +
unsigned long + +kmod_module_section_get_address () +
const char * + +kmod_module_section_get_name () +
+int + +kmod_module_get_symbols () +
+uint64_t + +kmod_module_symbol_get_crc () +
const char * + +kmod_module_symbol_get_symbol () +
+void + +kmod_module_symbols_free_list () +
+int + +kmod_module_get_versions () +
+uint64_t + +kmod_module_version_get_crc () +
const char * + +kmod_module_version_get_symbol () +
+void + +kmod_module_versions_free_list () +
+int + +kmod_module_get_info () +
+void + +kmod_module_info_free_list () +
const char * + +kmod_module_info_get_key () +
const char * + +kmod_module_info_get_value () +
+
+
+

Types and Values

+
++++ + + + + +
structkmod_module
+
+
+

Description

+
+
+

Functions

+
+

kmod_module_new_from_lookup ()

+
int
+kmod_module_new_from_lookup (struct kmod_ctx *ctx,
+                             const char *given_alias,
+                             struct kmod_list **list);
+

Create a new list of kmod modules using an alias or module name and lookup +libkmod's configuration files and indexes in order to find the module. +Once it's found in one of the places, it stops searching and create the +list of modules that is saved in list +.

+

The search order is: 1. aliases in configuration file; 2. module names in +modules.dep index; 3. symbol aliases in modules.symbols index; 4. aliases +from install commands; 5. builtin indexes from kernel.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. The returned list + must be released by +calling kmod_module_unref_list(). Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned list are +completed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

given_alias

alias to look for

 

list

an empty list where to save the list of modules matching +given_alias +

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if any of the lookup +methods failed, which is basically due to memory allocation fail. If module +is not found, it still returns 0, but list +is an empty list.

+
+
+
+
+

kmod_module_new_from_name_lookup ()

+
int
+kmod_module_new_from_name_lookup (struct kmod_ctx *ctx,
+                                  const char *modname,
+                                  struct kmod_module **mod);
+

Lookup by module name, without considering possible aliases. This is similar +to kmod_module_new_from_lookup(), but don't consider as source indexes and +configurations that work with aliases. When succesful, this always resolves +to one and only one module.

+

The search order is: 1. module names in modules.dep index;

+
  1. builtin indexes from kernel.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned list are +completed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

modname

module name to look for

 

mod

returned module on success

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if any of the lookup +methods failed, which is basically due to memory allocation failure. If +module is not found, it still returns 0, but mod +is left untouched.

+
+
+
+
+

kmod_module_new_from_name ()

+
int
+kmod_module_new_from_name (struct kmod_ctx *ctx,
+                           const char *name,
+                           struct kmod_module **mod);
+

Create a new struct kmod_module using the module name. name + can not be an +alias, file name or anything else; it must be a module name. There's no +check if the module exists in the system.

+

This function is also used internally by many others that return a new +struct kmod_module or a new list of modules.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned +kmod_module are done.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

name

name of the module

 

mod

where to save the created struct kmod_module

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if name is not a valid +module name or if memory allocation failed.

+
+
+
+
+

kmod_module_new_from_path ()

+
int
+kmod_module_new_from_path (struct kmod_ctx *ctx,
+                           const char *path,
+                           struct kmod_module **mod);
+

Create a new struct kmod_module using the module path. path + must be an +existent file with in the filesystem and must be accessible to libkmod.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned +kmod_module are done.

+

If path + is relative, it's treated as relative to the current working +directory. Otherwise, give an absolute path.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

path

path where to find the given module

 

mod

where to save the created struct kmod_module

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if file does not exist, if +it's not a valid file for a kmod_module or if memory allocation failed.

+
+
+
+
+

kmod_module_ref ()

+
struct kmod_module *
+kmod_module_ref (struct kmod_module *mod);
+

Take a reference of the kmod module, incrementing its refcount.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the passed module +with its refcount incremented.

+
+
+
+
+

kmod_module_unref ()

+
struct kmod_module *
+kmod_module_unref (struct kmod_module *mod);
+

Drop a reference of the kmod module. If the refcount reaches zero, its +resources are released.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

NULL if mod +is NULL or if the module was released. Otherwise it +returns the passed mod +with its refcount decremented.

+
+
+
+
+

kmod_module_unref_list ()

+
int
+kmod_module_unref_list (struct kmod_list *list);
+

Drop a reference of each kmod module in list + and releases the resources +taken by the list itself.

+
+

Parameters

+
+++++ + + + + + +

list

list of kmod modules

 
+
+
+

Returns

+

0

+
+
+
+
+

kmod_module_insert_module ()

+
int
+kmod_module_insert_module (struct kmod_module *mod,
+                           unsigned int flags,
+                           const char *options);
+

Insert a module in Linux kernel. It opens the file pointed by mod +, +mmap'ing it and passing to kernel.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

mod

kmod module

 

flags

flags are not passed to Linux Kernel, but instead they dictate the +behavior of this function, valid flags are +KMOD_INSERT_FORCE_VERMAGIC: ignore kernel version magic; +KMOD_INSERT_FORCE_MODVERSION: ignore symbol version hashes.

 

options

module's options to pass to Linux Kernel.

 
+
+
+

Returns

+

0 on success or < 0 on failure. If module is already loaded it +returns -EEXIST.

+
+
+
+
+

kmod_module_probe_insert_module ()

+
int
+kmod_module_probe_insert_module (struct kmod_module *mod,
+                                 unsigned int flags,
+                                 const char *extra_options,
+                                 int (*run_install) (struct kmod_module *m, const char *cmdline, void *data),
+                                 const void *data,
+                                 void (*print_action) (struct kmod_module *m, bool install, const char *options));
+

Insert a module in Linux kernel resolving dependencies, soft dependencies, +install commands and applying blacklist.

+

If run_install + is NULL, this function will fork and exec by calling +system(3). Don't pass a NULL argument in run_install + if your binary is +setuid/setgid (see warning in system(3)). If you need control over the +execution of an install command, give a callback function instead.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

mod

kmod module

 

flags

flags are not passed to Linux Kernel, but instead they dictate the +behavior of this function, valid flags are +KMOD_PROBE_FORCE_VERMAGIC: ignore kernel version magic; +KMOD_PROBE_FORCE_MODVERSION: ignore symbol version hashes; +KMOD_PROBE_IGNORE_COMMAND: whether the probe should ignore install +commands and softdeps configured in the system; +KMOD_PROBE_IGNORE_LOADED: do not check whether the module is already +live in kernel or not; +KMOD_PROBE_DRY_RUN: dry run, do not insert module, just call the +associated callback function; +KMOD_PROBE_FAIL_ON_LOADED: if KMOD_PROBE_IGNORE_LOADED is not specified +and the module is already live in kernel, the function will fail if this +flag is specified; +KMOD_PROBE_APPLY_BLACKLIST_ALL: probe will apply KMOD_FILTER_BLACKLIST +filter to this module and its dependencies. If any of the dependencies (or +the module) is blacklisted, the probe will fail, unless the blacklisted +module is already live in kernel; +KMOD_PROBE_APPLY_BLACKLIST: probe will fail if the module is blacklisted; +KMOD_PROBE_APPLY_BLACKLIST_ALIAS_ONLY: probe will fail if the module is an +alias and is blacklisted.

 

extra_options

module's options to pass to Linux Kernel. It applies only +to mod +, not to its dependencies.

 

run_install

function to run when mod +is backed by an install command.

 

data

data to give back to run_install +callback

 

print_action

function to call with the action being taken (install or +insmod). It's useful for tools like modprobe when running with verbose +output or in dry-run mode.

 
+
+
+

Returns

+

0 on success, > 0 if stopped by a reason given in flags +or < 0 on +failure.

+
+
+
+
+

kmod_module_remove_module ()

+
int
+kmod_module_remove_module (struct kmod_module *mod,
+                           unsigned int flags);
+

Remove a module from Linux kernel.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

flags

flags used when removing the module. +KMOD_REMOVE_FORCE: force remove module regardless if it's still in +use by a kernel subsystem or other process; passed directly to Linux kernel +KMOD_REMOVE_NOWAIT: is always enforced, causing us to pass O_NONBLOCK to +delete_module(2). +KMOD_REMOVE_NOLOG: when module removal fails, do not log anything as the +caller may want to handle retries and log when appropriate.

 
+
+
+

Returns

+

0 on success or < 0 on failure.

+
+
+
+
+

kmod_module_get_module ()

+
struct kmod_module *
+kmod_module_get_module (const struct kmod_list *entry);
+

Get the kmod module of this entry + in the list, increasing its refcount. +After it's used, unref it. Since the refcount is incremented upon return, +you still have to call kmod_module_unref_list() to release the list of kmod +modules.

+
+

Parameters

+
+++++ + + + + + +

entry

an entry in a list of kmod modules.

 
+
+
+

Returns

+

NULL on failure or the kmod_module contained in this list entry +with its refcount incremented.

+
+
+
+
+

kmod_module_get_dependencies ()

+
struct kmod_list *
+kmod_module_get_dependencies (const struct kmod_module *mod);
+

Search the modules.dep index to find the dependencies of the given mod +. +The result is cached in mod +, so subsequent calls to this function will +return the already searched list of modules.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

NULL on failure. Otherwise it returns a list of kmod modules +that can be released by calling kmod_module_unref_list().

+
+
+
+
+

kmod_module_get_softdeps ()

+
int
+kmod_module_get_softdeps (const struct kmod_module *mod,
+                          struct kmod_list **pre,
+                          struct kmod_list **post);
+

Get soft dependencies for this kmod module. Soft dependencies come +from configuration file and are not cached in mod + because it may include +dependency cycles that would make we leak kmod_module. Any call +to this function will search for this module in configuration, allocate a +list and return the result.

+

Both pre + and post + are newly created list of kmod_module and +should be unreferenced with kmod_module_unref_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

mod

kmod module

 

pre

where to save the list of preceding soft dependencies.

 

post

where to save the list of post soft dependencies.

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_module_get_weakdeps ()

+
int
+kmod_module_get_weakdeps (const struct kmod_module *mod,
+                          struct kmod_list **weak);
+
+
+
+

kmod_module_apply_filter ()

+
int
+kmod_module_apply_filter (const struct kmod_ctx *ctx,
+                          enum kmod_filter filter_type,
+                          const struct kmod_list *input,
+                          struct kmod_list **output);
+

Given a list input +, this function filter it out by the filter mask +and save it in output +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

filter_type

bitmask to filter modules out, valid types are +KMOD_FILTER_BLACKLIST: filter modules in blacklist out; +KMOD_FILTER_BUILTIN: filter builtin modules out.

 

input

list of kmod_module to be filtered

 

output

where to save the new list

 
+
+
+

Returns

+

0 on success or < 0 otherwise. output +is saved with the updated +list.

+
+
+
+
+

kmod_module_get_filtered_blacklist ()

+
int
+kmod_module_get_filtered_blacklist (const struct kmod_ctx *ctx,
+                                    const struct kmod_list *input,
+                                    struct kmod_list **output);
+

This function should not be used. Use kmod_module_apply_filter instead.

+

Given a list input +, this function filter it out with config's blacklist +and save it in output +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

input

list of kmod_module to be filtered with blacklist

 

output

where to save the new list

 
+
+
+

Returns

+

0 on success or < 0 otherwise. output +is saved with the updated +list.

+
+
+
+
+

kmod_module_get_install_commands ()

+
const char *
+kmod_module_get_install_commands (const struct kmod_module *mod);
+

Get install commands for this kmod module. Install commands come from the +configuration file and are cached in mod +. The first call to this function +will search for this module in configuration and subsequent calls return +the cached string. The install commands are returned as they were in the +configuration, concatenated by ';'. No other processing is made in this +string.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a string with all install commands separated by semicolons. This +string is owned by mod +, do not free it.

+
+
+
+
+

kmod_module_get_remove_commands ()

+
const char *
+kmod_module_get_remove_commands (const struct kmod_module *mod);
+

Get remove commands for this kmod module. Remove commands come from the +configuration file and are cached in mod +. The first call to this function +will search for this module in configuration and subsequent calls return +the cached string. The remove commands are returned as they were in the +configuration, concatenated by ';'. No other processing is made in this +string.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a string with all remove commands separated by semicolons. This +string is owned by mod +, do not free it.

+
+
+
+
+

kmod_module_get_name ()

+
const char *
+kmod_module_get_name (const struct kmod_module *mod);
+

Get the name of this kmod module. Name is always available, independently +if it was created by kmod_module_new_from_name() or another function and +it's always normalized (dashes are replaced with underscores).

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the name of this kmod module.

+
+
+
+
+

kmod_module_get_options ()

+
const char *
+kmod_module_get_options (const struct kmod_module *mod);
+

Get options of this kmod module. Options come from the configuration file +and are cached in mod +. The first call to this function will search for +this module in configuration and subsequent calls return the cached string.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a string with all the options separated by spaces. This string is +owned by mod +, do not free it.

+
+
+
+
+

kmod_module_get_path ()

+
const char *
+kmod_module_get_path (const struct kmod_module *mod);
+

Get the path of this kmod module. If this kmod module was not created by +path, it can search the modules.dep index in order to find out the module +under context's dirname.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the path of this kmod module or NULL if such information is not +available.

+
+
+
+
+

kmod_module_get_dependency_symbols ()

+
int
+kmod_module_get_dependency_symbols (const struct kmod_module *mod,
+                                    struct kmod_list **list);
+

Get a list of entries in ELF section ".symtab" or "__ksymtab_strings".

+

After use, free the list + by calling +kmod_module_dependency_symbols_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module dependency_symbols. Use +kmod_module_dependency_symbol_get_symbol() and +kmod_module_dependency_symbol_get_crc(). Release this list with +kmod_module_dependency_symbols_free_list()

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_module_dependency_symbol_get_bind ()

+
int
+kmod_module_dependency_symbol_get_bind
+                               (const struct kmod_list *entry);
+

Get the bind type of a kmod module dependency_symbol.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module dependency_symbol

 
+
+
+

Returns

+

the bind of this kmod module dependency_symbol on success +or < 0 on failure.

+
+
+
+
+

kmod_module_dependency_symbol_get_crc ()

+
uint64_t
+kmod_module_dependency_symbol_get_crc (const struct kmod_list *entry);
+

Get the crc of a kmod module dependency_symbol.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module dependency_symbol

 
+
+
+

Returns

+

the crc of this kmod module dependency_symbol if available, otherwise default to 0.

+
+
+
+
+

kmod_module_dependency_symbol_get_symbol ()

+
const char *
+kmod_module_dependency_symbol_get_symbol
+                               (const struct kmod_list *entry);
+

Get the dependency symbol of a kmod module

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module dependency_symbols

 
+
+
+

Returns

+

the symbol of this kmod module dependency_symbols on success or NULL +on failure. The string is owned by the dependency_symbols, do not free it.

+
+
+
+
+

kmod_module_dependency_symbols_free_list ()

+
void
+kmod_module_dependency_symbols_free_list
+                               (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module dependency_symbols list

 
+
+
+
+
+

kmod_module_get_sections ()

+
struct kmod_list *
+kmod_module_get_sections (const struct kmod_module *mod);
+

Get a list of kmod sections of this mod +, as returned by Linux Kernel. The +structure contained in this list is internal to libkmod and their fields +can be obtained by calling kmod_module_section_get_name() and +kmod_module_section_get_address().

+

After use, free the list + by calling kmod_module_section_free_list().

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a new list of kmod module sections on success or NULL on failure.

+
+
+
+
+

kmod_module_section_free_list ()

+
void
+kmod_module_section_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module section list

 
+
+
+
+
+

kmod_module_section_get_address ()

+
unsigned long
+kmod_module_section_get_address (const struct kmod_list *entry);
+

Get the address of a kmod module section.

+

After use, free the list + by calling kmod_module_section_free_list().

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module section

 
+
+
+

Returns

+

the address of this kmod module section on success or ULONG_MAX +on failure.

+
+
+
+
+

kmod_module_section_get_name ()

+
const char *
+kmod_module_section_get_name (const struct kmod_list *entry);
+
+
+
+

kmod_module_get_symbols ()

+
int
+kmod_module_get_symbols (const struct kmod_module *mod,
+                         struct kmod_list **list);
+

Get a list of entries in ELF section ".symtab" or "__ksymtab_strings".

+

After use, free the list + by calling kmod_module_symbols_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module symbols. Use +kmod_module_symbol_get_symbol() and +kmod_module_symbol_get_crc(). Release this list with +kmod_module_symbols_free_list()

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_module_symbol_get_crc ()

+
uint64_t
+kmod_module_symbol_get_crc (const struct kmod_list *entry);
+

Get the crc of a kmod module symbol.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module symbol

 
+
+
+

Returns

+

the crc of this kmod module symbol if available, otherwise default to 0.

+
+
+
+
+

kmod_module_symbol_get_symbol ()

+
const char *
+kmod_module_symbol_get_symbol (const struct kmod_list *entry);
+

Get the symbol of a kmod module symbols.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module symbols

 
+
+
+

Returns

+

the symbol of this kmod module symbols on success or NULL +on failure. The string is owned by the symbols, do not free it.

+
+
+
+
+

kmod_module_symbols_free_list ()

+
void
+kmod_module_symbols_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module symbols list

 
+
+
+
+
+

kmod_module_get_versions ()

+
int
+kmod_module_get_versions (const struct kmod_module *mod,
+                          struct kmod_list **list);
+

Get a list of entries in ELF section "__versions".

+

After use, free the list + by calling kmod_module_versions_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module versions. Use +kmod_module_version_get_symbol() and +kmod_module_version_get_crc(). Release this list with +kmod_module_versions_free_list()

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_module_version_get_crc ()

+
uint64_t
+kmod_module_version_get_crc (const struct kmod_list *entry);
+

Get the crc of a kmod module version.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module version

 
+
+
+

Returns

+

the crc of this kmod module version if available, otherwise default to 0.

+
+
+
+
+

kmod_module_version_get_symbol ()

+
const char *
+kmod_module_version_get_symbol (const struct kmod_list *entry);
+

Get the symbol of a kmod module versions.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module versions

 
+
+
+

Returns

+

the symbol of this kmod module versions on success or NULL +on failure. The string is owned by the versions, do not free it.

+
+
+
+
+

kmod_module_versions_free_list ()

+
void
+kmod_module_versions_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module versions list

 
+
+
+
+
+

kmod_module_get_info ()

+
int
+kmod_module_get_info (const struct kmod_module *mod,
+                      struct kmod_list **list);
+

Get a list of entries in ELF section ".modinfo", these contain +alias, license, depends, vermagic and other keys with respective +values. If the module is signed (CONFIG_MODULE_SIG), information +about the module signature is included as well: signer, +sig_key and sig_hashalgo.

+

After use, free the list + by calling kmod_module_info_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module information. Use +kmod_module_info_get_key() and +kmod_module_info_get_value(). Release this list with +kmod_module_info_free_list()

 
+
+
+

Returns

+

number of entries in list +on success or < 0 otherwise.

+
+
+
+
+

kmod_module_info_free_list ()

+
void
+kmod_module_info_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module info list

 
+
+
+
+
+

kmod_module_info_get_key ()

+
const char *
+kmod_module_info_get_key (const struct kmod_list *entry);
+

Get the key of a kmod module info.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module info

 
+
+
+

Returns

+

the key of this kmod module info on success or NULL on +failure. The string is owned by the info, do not free it.

+
+
+
+
+

kmod_module_info_get_value ()

+
const char *
+kmod_module_info_get_value (const struct kmod_list *entry);
+

Get the value of a kmod module info.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module info

 
+
+
+

Returns

+

the value of this kmod module info on success or NULL on +failure. The string is owned by the info, do not free it.

+
+
+
+
+

Types and Values

+
+

struct kmod_module

+
struct kmod_module;
+

Opaque object representing a module.

+
+
+
+ + + \ No newline at end of file diff --git a/v33/libkmod-libkmod.html b/v33/libkmod-libkmod.html new file mode 100644 index 0000000..5fc64ac --- /dev/null +++ b/v33/libkmod-libkmod.html @@ -0,0 +1,595 @@ + + + + +libkmod: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod

+

libkmod — libkmod context

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
struct kmod_ctx * + +kmod_new () +
struct kmod_ctx * + +kmod_ref () +
struct kmod_ctx * + +kmod_unref () +
+int + +kmod_load_resources () +
+void + +kmod_unload_resources () +
+int + +kmod_validate_resources () +
+int + +kmod_dump_index () +
+void + +kmod_set_log_priority () +
+int + +kmod_get_log_priority () +
+void + +kmod_set_log_fn () +
+void * + +kmod_get_userdata () +
+void + +kmod_set_userdata () +
const char * + +kmod_get_dirname () +
+
+
+

Types and Values

+
++++ + + + + +
structkmod_ctx
+
+
+

Description

+

The context contains the default values for the library user, +and is passed to all library operations.

+
+
+

Functions

+
+

kmod_new ()

+
struct kmod_ctx *
+kmod_new (const char *dirname,
+          const char * const *config_paths);
+

Create kmod library context. This reads the kmod configuration +and fills in the default values.

+

The initial refcount is 1, and needs to be decremented to +release the resources of the kmod library context.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

dirname

what to consider as linux module's directory, if NULL +defaults to $MODULE_DIRECTORY/uname -r. If it's relative, +it's treated as relative to the current working directory. +Otherwise, give an absolute dirname.

 

config_paths

ordered array of paths (directories or files) where +to load from user-defined configuration parameters such as +alias, blacklists, commands (install, remove). If NULL +defaults to /etc/modprobe.d, /run/modprobe.d, +/usr/local/lib/modprobe.d, DISTCONFDIR/modprobe.d, and +/lib/modprobe.d. Give an empty vector if configuration should +not be read. This array must be null terminated.

 
+
+
+

Returns

+

a new kmod library context

+
+
+
+
+

kmod_ref ()

+
struct kmod_ctx *
+kmod_ref (struct kmod_ctx *ctx);
+

Take a reference of the kmod library context.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the passed kmod library context

+
+
+
+
+

kmod_unref ()

+
struct kmod_ctx *
+kmod_unref (struct kmod_ctx *ctx);
+

Drop a reference of the kmod library context. If the refcount +reaches zero, the resources of the context will be released.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the passed kmod library context or NULL if it's freed

+
+
+
+
+

kmod_load_resources ()

+
int
+kmod_load_resources (struct kmod_ctx *ctx);
+

Load indexes and keep them open in ctx +. This way it's faster to lookup +information within the indexes. If this function is not called before a +search, the necessary index is always opened and closed.

+

If user will do more than one or two lookups, insertions, deletions, most +likely it's good to call this function first. Particularly in a daemon like +udev that on bootup issues hundreds of calls to lookup the index, calling +this function will speedup the searches.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_unload_resources ()

+
void
+kmod_unload_resources (struct kmod_ctx *ctx);
+

Unload all the indexes. This will free the resources to maintain the index +open and all subsequent searches will need to open and close the index.

+

User is free to call kmod_load_resources() and kmod_unload_resources() as +many times as wanted during the lifecycle of ctx +. For example, if a daemon +knows that when starting up it will lookup a lot of modules, it could call +kmod_load_resources() and after the first burst of searches is gone, it +could free the resources by calling kmod_unload_resources().

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_validate_resources ()

+
int
+kmod_validate_resources (struct kmod_ctx *ctx);
+

Check if indexes and configuration files changed on disk and the current +context is not valid anymore.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

KMOD_RESOURCES_OK if resources are still valid, +KMOD_RESOURCES_MUST_RELOAD if it's sufficient to call +kmod_unload_resources() and kmod_load_resources() or +KMOD_RESOURCES_MUST_RECREATE if ctx +must be re-created.

+
+
+
+
+

kmod_dump_index ()

+
int
+kmod_dump_index (struct kmod_ctx *ctx,
+                 enum kmod_index type,
+                 int fd);
+

Dump index to file descriptor. Note that this function doesn't use stdio.h +so call fflush() before calling this function to be sure data is written in +order.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

type

index to dump, valid indexes are +KMOD_INDEX_MODULES_DEP: index of module dependencies; +KMOD_INDEX_MODULES_ALIAS: index of module aliases; +KMOD_INDEX_MODULES_SYMBOL: index of symbol aliases; +KMOD_INDEX_MODULES_BUILTIN_ALIAS: index of builtin module aliases. +KMOD_INDEX_MODULES_BUILTIN: index of builtin module.

 

fd

file descriptor to dump index to

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_set_log_priority ()

+
void
+kmod_set_log_priority (struct kmod_ctx *ctx,
+                       int priority);
+

Set the current logging priority. The value controls which messages +are logged.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

ctx

kmod library context

 

priority

the new logging priority

 
+
+
+
+
+

kmod_get_log_priority ()

+
int
+kmod_get_log_priority (const struct kmod_ctx *ctx);
+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the current logging priority

+
+
+
+
+

kmod_set_log_fn ()

+
void
+kmod_set_log_fn (struct kmod_ctx *ctx,
+                 void (*log_fn) (void *log_data, int priority, const char *file, int line, const char *fn, const char *format, va_list args),
+                 const void *data);
+

The built-in logging writes to stderr. It can be +overridden by a custom function, to plug log messages +into the user's logging functionality.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

log_fn

function to be called for logging messages

 

data

data to pass to log function

 
+
+
+
+
+

kmod_get_userdata ()

+
void *
+kmod_get_userdata (const struct kmod_ctx *ctx);
+

Retrieve stored data pointer from library context. This might be useful +to access from callbacks.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

stored userdata

+
+
+
+
+

kmod_set_userdata ()

+
void
+kmod_set_userdata (struct kmod_ctx *ctx,
+                   const void *userdata);
+

Store custom userdata + in the library context.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

ctx

kmod library context

 

userdata

data pointer

 
+
+
+
+
+

kmod_get_dirname ()

+
const char *
+kmod_get_dirname (const struct kmod_ctx *ctx);
+

Retrieve the absolute path used for linux modules in this context. The path +is computed from the arguments to kmod_new().

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+
+
+

Types and Values

+
+

struct kmod_ctx

+
struct kmod_ctx;
+

Opaque object representing the library context.

+
+
+
+ + + \ No newline at end of file diff --git a/v33/libkmod.devhelp2 b/v33/libkmod.devhelp2 new file mode 100644 index 0000000..b8eff97 --- /dev/null +++ b/v33/libkmod.devhelp2 @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/v33/right-insensitive.png b/v33/right-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..4c95785b907b978f36674cd98bf5302669c15c1b GIT binary patch literal 373 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefG`u!(zUX23=E7+o-U3d7N^fn+URvSL8NuRG*{E) z?#-+97X-^pidQ*u@StO1(S@7g8g>nnA24$?ty?)cmuaa|Y>ez2*_Ia?6HP4j{3LIs zTr!s1ao_Sz^~3e4zRJGAjKZGn=XP#)Wmuo-QN>teTzzI!&R*jMI^Oa#7_ukLYdicf zOx;1mb-rt04s-c|uIH8fnX}$)XJa^0_-F3(pA%=sGI<|(n_*&=yYt96+n5InXn_GN+EraJI9q(O+n{6MQKErp&KxRvpfn0xh z`sSMqH(2Z%?kaFBTf06W^y=UDA9gR9YrwNS*1pjB((0K%&+SbAx3`XA&dKZ}j*nX7 QfdRze>FVdQ&MBb@09|aA9{>OV literal 0 HcmV?d00001 diff --git a/v33/right.png b/v33/right.png new file mode 100644 index 0000000000000000000000000000000000000000..76260ec8865f4e13cd269ec62eccd78a33adba3c GIT binary patch literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefRMbR+#PqI2*V^#7sn8b(^oI8=W9$9IsUQVezxzH zy`G{eu0`y#boSlU-NAlQG~=D)BPJG4k(^0qdDa(AdQvI0d|vJT=i7_<_D6`Cy?Dm; zP0@1EeB~D|O$oQe*sxL-P;q{2UCr}fN-o#M~tpZzsGyfNz46SZlIJCbKH zZQscEqpOfBCPDgx dt +{ + padding-top: 0.25em; + padding-bottom: 0.25em; + font-weight: bold; +} + +dl.toc > dl +{ + padding-bottom: 0.5em; +} + +.parameter +{ + font-style: normal; +} + +.footer +{ + padding-top: 3.5em; + /* tango:aluminium 3 */ + color: #babdb6; + text-align: center; + font-size: 80%; +} + +.informalfigure, +.figure +{ + margin: 1em; +} + +.informalexample, +.example +{ + margin-top: 1em; + margin-bottom: 1em; +} + +.warning +{ + /* tango:orange 0/1 */ + background: #ffeed9; + background: rgba(252, 175, 62, 0.1); + border-color: #ffb04f; + border-color: rgba(252, 175, 62, 0.2); +} +.note +{ + /* tango:chameleon 0/0.5 */ + background: #d8ffb2; + background: rgba(138, 226, 52, 0.1); + border-color: #abf562; + border-color: rgba(138, 226, 52, 0.2); +} +div.blockquote +{ + border-color: #eeeeec; +} +.note, .warning, div.blockquote +{ + padding: 0.5em; + border-width: 1px; + border-style: solid; + margin: 2em; +} +.note p, .warning p +{ + margin: 0; +} + +div.warning h3.title, +div.note h3.title +{ + display: none; +} + +p + div.section +{ + margin-top: 1em; +} + +div.refnamediv, +div.refsynopsisdiv, +div.refsect1, +div.refsect2, +div.toc, +div.section +{ + margin-bottom: 1em; +} + +/* blob links */ +h2 .extralinks, h3 .extralinks +{ + float: right; + /* tango:aluminium 3 */ + color: #babdb6; + font-size: 80%; + font-weight: normal; +} + +.lineart +{ + color: #d3d7cf; + font-weight: normal; +} + +.annotation +{ + /* tango:aluminium 5 */ + color: #555753; + font-weight: normal; +} + +.structfield +{ + font-style: normal; + font-weight: normal; +} + +acronym,abbr +{ + border-bottom: 1px dotted gray; +} + +.listing_frame { + /* tango:sky blue 1 */ + border: solid 1px #729fcf; + border: solid 1px rgba(114, 159, 207, 0.2); + padding: 0px; +} + +.listing_lines, .listing_code { + margin-top: 0px; + margin-bottom: 0px; + padding: 0.5em; +} +.listing_lines { + /* tango:sky blue 0.5 */ + background: #a6c5e3; + background: rgba(114, 159, 207, 0.2); + /* tango:aluminium 6 */ + color: #2e3436; +} +.listing_code { + /* tango:sky blue 0 */ + background: #e6f3ff; + background: rgba(114, 159, 207, 0.1); +} +.listing_code .programlisting { + /* override from previous */ + border: none 0px; + padding: 0px; + background: none; +} +.listing_lines pre, .listing_code pre { + margin: 0px; +} + +@media screen { + /* these have a as a first child, but since there are no parent selectors + * we can't use that. */ + a.footnote + { + position: relative; + top: 0em ! important; + } + /* this is needed so that the local anchors are displayed below the naviagtion */ + div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] + { + display: inline-block; + position: relative; + top:-5em; + } + /* this seems to be a bug in the xsl style sheets when generating indexes */ + div.index div.index + { + top: 0em; + } + /* make space for the fixed navigation bar and add space at the bottom so that + * link targets appear somewhat close to top + */ + body + { + padding-top: 2.5em; + padding-bottom: 500px; + max-width: 60em; + } + p + { + max-width: 60em; + } + /* style and size the navigation bar */ + table.navigation#top + { + position: fixed; + background: #e2e2e2; + border-bottom: solid 1px #babdb6; + border-spacing: 5px; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + z-index: 10; + } + table.navigation#top td + { + padding-left: 6px; + padding-right: 6px; + } + .navigation a, .navigation a:visited + { + /* tango:sky blue 3 */ + color: #204a87; + } + .navigation a:hover + { + /* tango:sky blue 2 */ + color: #3465a4; + } + td.shortcuts + { + /* tango:sky blue 2 */ + color: #3465a4; + font-size: 80%; + white-space: nowrap; + } + td.shortcuts .dim + { + color: #babdb6; + } + .navigation .title + { + font-size: 80%; + max-width: none; + margin: 0px; + font-weight: normal; + } +} +@media screen and (min-width: 60em) { + /* screen larger than 60em */ + body { margin: auto; } +} +@media screen and (max-width: 60em) { + /* screen less than 60em */ + #nav_hierarchy { display: none; } + #nav_interfaces { display: none; } + #nav_prerequisites { display: none; } + #nav_derived_interfaces { display: none; } + #nav_implementations { display: none; } + #nav_child_properties { display: none; } + #nav_style_properties { display: none; } + #nav_index { display: none; } + #nav_glossary { display: none; } + .gallery_image { display: none; } + .property_flags { display: none; } + .signal_flags { display: none; } + .parameter_annotations { display: none; } + .enum_member_annotations { display: none; } + .struct_member_annotations { display: none; } + .union_member_annotations { display: none; } + /* now that a column is hidden, optimize space */ + col.parameters_name { width: auto; } + col.parameters_description { width: auto; } + col.struct_members_name { width: auto; } + col.struct_members_description { width: auto; } + col.enum_members_name { width: auto; } + col.enum_members_description { width: auto; } + col.union_members_name { width: auto; } + col.union_members_description { width: auto; } + .listing_lines { display: none; } +} +@media print { + table.navigation { + visibility: collapse; + display: none; + } + div.titlepage table.navigation { + visibility: visible; + display: table; + background: #e2e2e2; + border: solid 1px #babdb6; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + height: 3em; + } +} + +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.hll { background-color: #ffffcc } +.c { color: #3D7B7B; font-style: italic } /* Comment */ +.err { border: 1px solid #FF0000 } /* Error */ +.k { color: #008000; font-weight: bold } /* Keyword */ +.o { color: #666666 } /* Operator */ +.ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.cp { color: #9C6500 } /* Comment.Preproc */ +.cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ +.gd { color: #A00000 } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.gr { color: #E40000 } /* Generic.Error */ +.gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.gi { color: #008400 } /* Generic.Inserted */ +.go { color: #717171 } /* Generic.Output */ +.gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.gt { color: #0044DD } /* Generic.Traceback */ +.kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.kp { color: #008000 } /* Keyword.Pseudo */ +.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.kt { color: #B00040 } /* Keyword.Type */ +.m { color: #666666 } /* Literal.Number */ +.s { color: #BA2121 } /* Literal.String */ +.na { color: #687822 } /* Name.Attribute */ +.nb { color: #008000 } /* Name.Builtin */ +.nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.no { color: #880000 } /* Name.Constant */ +.nd { color: #AA22FF } /* Name.Decorator */ +.ni { color: #717171; font-weight: bold } /* Name.Entity */ +.ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ +.nf { color: #0000FF } /* Name.Function */ +.nl { color: #767600 } /* Name.Label */ +.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.nt { color: #008000; font-weight: bold } /* Name.Tag */ +.nv { color: #19177C } /* Name.Variable */ +.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.w { color: #bbbbbb } /* Text.Whitespace */ +.mb { color: #666666 } /* Literal.Number.Bin */ +.mf { color: #666666 } /* Literal.Number.Float */ +.mh { color: #666666 } /* Literal.Number.Hex */ +.mi { color: #666666 } /* Literal.Number.Integer */ +.mo { color: #666666 } /* Literal.Number.Oct */ +.sa { color: #BA2121 } /* Literal.String.Affix */ +.sb { color: #BA2121 } /* Literal.String.Backtick */ +.sc { color: #BA2121 } /* Literal.String.Char */ +.dl { color: #BA2121 } /* Literal.String.Delimiter */ +.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.s2 { color: #BA2121 } /* Literal.String.Double */ +.se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ +.sh { color: #BA2121 } /* Literal.String.Heredoc */ +.si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ +.sx { color: #008000 } /* Literal.String.Other */ +.sr { color: #A45A77 } /* Literal.String.Regex */ +.s1 { color: #BA2121 } /* Literal.String.Single */ +.ss { color: #19177C } /* Literal.String.Symbol */ +.bp { color: #008000 } /* Name.Builtin.Pseudo */ +.fm { color: #0000FF } /* Name.Function.Magic */ +.vc { color: #19177C } /* Name.Variable.Class */ +.vg { color: #19177C } /* Name.Variable.Global */ +.vi { color: #19177C } /* Name.Variable.Instance */ +.vm { color: #19177C } /* Name.Variable.Magic */ +.il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/v33/up-insensitive.png b/v33/up-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..f40498606db349a7321cf6b470523e836ee7ac2e GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefG~@Ex#w@70gTL^E{-7zACwHGSRJaopUzr*FR_KPpkxheNzTDP+%{a~ox zRb6~e-_l%s#;V|Jw-)bO$G_X=4F`Y7SBoCzyjAZQ8BPW>ywAP8?pbBsZ|wt?+h6S6&uqY)kkMnwQQEd@7k`4t@sCCO z@7MoiEI4Q_#IB70vhu7Ab+>SXLxu@LWH Qzz|~aboFyt=akR{08E^fv;Y7A literal 0 HcmV?d00001 diff --git a/v33/up.png b/v33/up.png new file mode 100644 index 0000000000000000000000000000000000000000..80b4b37e997d69b2e128bc3090bc447ccb74bbe9 GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefRFevZLys@4W>+6GUE!tU04Ii{0w_tkMIDB?rA5 zttYTN Date: Sun, 8 Dec 2024 18:36:44 -0800 Subject: [PATCH 2/9] Add v32 docs Signed-off-by: Lucas De Marchi --- v32/api-index-full.html | 372 +++++++ v32/ch01.html | 46 + v32/home.png | Bin 0 -> 256 bytes v32/index.html | 47 + v32/left-insensitive.png | Bin 0 -> 395 bytes v32/left.png | Bin 0 -> 262 bytes v32/libkmod-libkmod-config.html | 438 ++++++++ v32/libkmod-libkmod-list.html | 234 ++++ v32/libkmod-libkmod-loaded.html | 296 +++++ v32/libkmod-libkmod-module.html | 1824 +++++++++++++++++++++++++++++++ v32/libkmod-libkmod.html | 594 ++++++++++ v32/libkmod.devhelp2 | 94 ++ v32/right-insensitive.png | Bin 0 -> 373 bytes v32/right.png | Bin 0 -> 261 bytes v32/style.css | 531 +++++++++ v32/up-insensitive.png | Bin 0 -> 374 bytes v32/up.png | Bin 0 -> 260 bytes 17 files changed, 4476 insertions(+) create mode 100644 v32/api-index-full.html create mode 100644 v32/ch01.html create mode 100644 v32/home.png create mode 100644 v32/index.html create mode 100644 v32/left-insensitive.png create mode 100644 v32/left.png create mode 100644 v32/libkmod-libkmod-config.html create mode 100644 v32/libkmod-libkmod-list.html create mode 100644 v32/libkmod-libkmod-loaded.html create mode 100644 v32/libkmod-libkmod-module.html create mode 100644 v32/libkmod-libkmod.html create mode 100644 v32/libkmod.devhelp2 create mode 100644 v32/right-insensitive.png create mode 100644 v32/right.png create mode 100644 v32/style.css create mode 100644 v32/up-insensitive.png create mode 100644 v32/up.png diff --git a/v32/api-index-full.html b/v32/api-index-full.html new file mode 100644 index 0000000..c1605fc --- /dev/null +++ b/v32/api-index-full.html @@ -0,0 +1,372 @@ + + + + +API Index: libkmod Reference Manual + + + + + + + + + + + + + + + +
+

+API Index

+

C

+
+kmod_config_get_aliases, function in libkmod-config +
+
+
+kmod_config_get_blacklists, function in libkmod-config +
+
+
+kmod_config_get_install_commands, function in libkmod-config +
+
+
+kmod_config_get_options, function in libkmod-config +
+
+
+kmod_config_get_remove_commands, function in libkmod-config +
+
+
+kmod_config_get_softdeps, function in libkmod-config +
+
+
+kmod_config_iter, struct in libkmod-config +
+
+
+kmod_config_iter_free_iter, function in libkmod-config +
+
+
+kmod_config_iter_get_key, function in libkmod-config +
+
+
+kmod_config_iter_get_value, function in libkmod-config +
+
+
+kmod_config_iter_next, function in libkmod-config +
+
+
+kmod_ctx, struct in libkmod +
+
+

D

+
+kmod_dump_index, function in libkmod +
+
+

G

+
+kmod_get_dirname, function in libkmod +
+
+
+kmod_get_log_priority, function in libkmod +
+
+
+kmod_get_userdata, function in libkmod +
+
+

L

+
+kmod_list, struct in libkmod-list +
+
+
+kmod_list_foreach, macro in libkmod-list +
+
+
+kmod_list_foreach_reverse, macro in libkmod-list +
+
+
+kmod_list_last, function in libkmod-list +
+
+
+kmod_list_next, function in libkmod-list +
+
+
+kmod_list_prev, function in libkmod-list +
+
+
+kmod_load_resources, function in libkmod +
+
+

M

+
+kmod_module, struct in libkmod-module +
+
+
+kmod_module_apply_filter, function in libkmod-module +
+
+
+kmod_module_dependency_symbols_free_list, function in libkmod-module +
+
+
+kmod_module_dependency_symbol_get_bind, function in libkmod-module +
+
+
+kmod_module_dependency_symbol_get_crc, function in libkmod-module +
+
+
+kmod_module_dependency_symbol_get_symbol, function in libkmod-module +
+
+
+kmod_module_get_dependencies, function in libkmod-module +
+
+
+kmod_module_get_dependency_symbols, function in libkmod-module +
+
+
+kmod_module_get_filtered_blacklist, function in libkmod-module +
+
+
+kmod_module_get_holders, function in libkmod-loaded +
+
+
+kmod_module_get_info, function in libkmod-module +
+
+
+kmod_module_get_initstate, function in libkmod-loaded +
+
+
+kmod_module_get_install_commands, function in libkmod-module +
+
+
+kmod_module_get_module, function in libkmod-module +
+
+
+kmod_module_get_name, function in libkmod-module +
+
+
+kmod_module_get_options, function in libkmod-module +
+
+
+kmod_module_get_path, function in libkmod-module +
+
+
+kmod_module_get_refcnt, function in libkmod-loaded +
+
+
+kmod_module_get_remove_commands, function in libkmod-module +
+
+
+kmod_module_get_sections, function in libkmod-module +
+
+
+kmod_module_get_size, function in libkmod-loaded +
+
+
+kmod_module_get_softdeps, function in libkmod-module +
+
+
+kmod_module_get_symbols, function in libkmod-module +
+
+
+kmod_module_get_versions, function in libkmod-module +
+
+
+kmod_module_info_free_list, function in libkmod-module +
+
+
+kmod_module_info_get_key, function in libkmod-module +
+
+
+kmod_module_info_get_value, function in libkmod-module +
+
+
+kmod_module_initstate_str, function in libkmod-loaded +
+
+
+kmod_module_insert_module, function in libkmod-module +
+
+
+kmod_module_new_from_loaded, function in libkmod-loaded +
+
+
+kmod_module_new_from_lookup, function in libkmod-module +
+
+
+kmod_module_new_from_name, function in libkmod-module +
+
+
+kmod_module_new_from_name_lookup, function in libkmod-module +
+
+
+kmod_module_new_from_path, function in libkmod-module +
+
+
+kmod_module_probe_insert_module, function in libkmod-module +
+
+
+kmod_module_ref, function in libkmod-module +
+
+
+kmod_module_remove_module, function in libkmod-module +
+
+
+kmod_module_section_free_list, function in libkmod-module +
+
+
+kmod_module_section_get_address, function in libkmod-module +
+
+
+kmod_module_section_get_name, function in libkmod-module +
+
+
+kmod_module_symbols_free_list, function in libkmod-module +
+
+
+kmod_module_symbol_get_crc, function in libkmod-module +
+
+
+kmod_module_symbol_get_symbol, function in libkmod-module +
+
+
+kmod_module_unref, function in libkmod-module +
+
+
+kmod_module_unref_list, function in libkmod-module +
+
+
+kmod_module_versions_free_list, function in libkmod-module +
+
+
+kmod_module_version_get_crc, function in libkmod-module +
+
+
+kmod_module_version_get_symbol, function in libkmod-module +
+
+

N

+
+kmod_new, function in libkmod +
+
+

R

+
+kmod_ref, function in libkmod +
+
+

S

+
+kmod_set_log_fn, function in libkmod +
+
+
+kmod_set_log_priority, function in libkmod +
+
+
+kmod_set_userdata, function in libkmod +
+
+

U

+
+kmod_unload_resources, function in libkmod +
+
+
+kmod_unref, function in libkmod +
+
+

V

+
+kmod_validate_resources, function in libkmod +
+
+
+ + + \ No newline at end of file diff --git a/v32/ch01.html b/v32/ch01.html new file mode 100644 index 0000000..a5986d7 --- /dev/null +++ b/v32/ch01.html @@ -0,0 +1,46 @@ + + + + +libkmod: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+libkmod

+
+
+libkmod — libkmod context +
+
+libkmod-list — general purpose list +
+
+libkmod-config — retrieve current libkmod configuration +
+
+libkmod-module — operate on kernel modules +
+
+libkmod-loaded — currently loaded modules +
+
+
+ + + \ No newline at end of file diff --git a/v32/home.png b/v32/home.png new file mode 100644 index 0000000000000000000000000000000000000000..9346b336a784463192c7daab5133a3673dd69845 GIT binary patch literal 256 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefRMbARQqaxysz9Q}BI-m)~Y zggoA|1V*z2{cQ=d;!=?fvu4~`n82RKrk1UubNXTJj1GP|o-=>$A29f{JgJ9K`^t{Q z-oWs>M&_hvT&MjX@T4-&sBW+1^4oB5G4r2q!qGktZ!n*!)hjrjd0_4L6;4%u<}orJ u%Vo~x?#i!!ww+1OGuHe}T=cKQUzn^_t)8|WlnDbmjKR~@&t;ucLK6T + + + +libkmod Reference Manual: libkmod Reference Manual + + + + + + + +
+
+
+
+

for libkmod version 32 +

+
+
+
+
+
libkmod
+
+
+libkmod — libkmod context +
+
+libkmod-list — general purpose list +
+
+libkmod-config — retrieve current libkmod configuration +
+
+libkmod-module — operate on kernel modules +
+
+libkmod-loaded — currently loaded modules +
+
+
API Index
+
+
+ + + \ No newline at end of file diff --git a/v32/left-insensitive.png b/v32/left-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..3269393a7f72af744a772c437bd7b3976c23709d GIT binary patch literal 395 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefH0HbvDJm`3=E7Co-U3d7N^fnTIWJ3j{^~q!iyia4kV=mdU|Jhfgdm;SLIpiYJ7wv^kjFiECCc&8T30!RG0~&BG=X zlu#U4@Z`))V`EG9e^NqDr#{!5k|)wT* zYTNt0`@q%TAD$){%#eQ?;$^ly8}yZCU%T~u0XM^%t?f#e znB*EuLv2rP%K3BMvFO}YmnR}KSgH;`EHL$)^!tH~iBxZ#h^zJi*#P5Xb6B50U@nx2 mU;T=yfcwnSOsS9SKd{M#MlNkCuvG>I8-u5-pUXO@geCx5`k@p6 literal 0 HcmV?d00001 diff --git a/v32/left.png b/v32/left.png new file mode 100644 index 0000000000000000000000000000000000000000..2abde032b0c98b756b12d380da4318205cd78470 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefRMaSLay~*pwMJb7sn8b(^oI8=R24v(*CjE{-BFv z0BhvLm?o9(UC{-Ci?lD?Ve-7-xypA!PTC(0^;>UheG4Altep3@`rO0#Rjs1)RxCLr zE5mee>7m*=%yEk+GVvGkRy0O&*&MTd5SjH(lgq~7r%6oRW$l1p-*S}iC>@fyDsz%y z`UIW8^Ao=maGhj3E8{7Cd_qof`K4oa->23`>&M2+XBtd2J`8jogQu&X%Q~loCIG_? BVG#fT literal 0 HcmV?d00001 diff --git a/v32/libkmod-libkmod-config.html b/v32/libkmod-libkmod-config.html new file mode 100644 index 0000000..445239c --- /dev/null +++ b/v32/libkmod-libkmod-config.html @@ -0,0 +1,438 @@ + + + + +libkmod-config: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-config

+

libkmod-config — retrieve current libkmod configuration

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
struct kmod_config_iter * + +kmod_config_get_blacklists () +
struct kmod_config_iter * + +kmod_config_get_install_commands () +
struct kmod_config_iter * + +kmod_config_get_remove_commands () +
struct kmod_config_iter * + +kmod_config_get_aliases () +
struct kmod_config_iter * + +kmod_config_get_options () +
struct kmod_config_iter * + +kmod_config_get_softdeps () +
const char * + +kmod_config_iter_get_key () +
const char * + +kmod_config_iter_get_value () +
+bool + +kmod_config_iter_next () +
+void + +kmod_config_iter_free_iter () +
+
+
+

Types and Values

+
++++ + + + + +
structkmod_config_iter
+
+
+

Description

+
+
+

Functions

+
+

kmod_config_get_blacklists ()

+
struct kmod_config_iter *
+kmod_config_get_blacklists (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the blacklist maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the blacklists or NULL on failure. Free it +with kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_get_install_commands ()

+
struct kmod_config_iter *
+kmod_config_get_install_commands (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the install commands maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the install commands or NULL on failure. Free +it with kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_get_remove_commands ()

+
struct kmod_config_iter *
+kmod_config_get_remove_commands (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the remove commands maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the remove commands or NULL on failure. Free +it with kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_get_aliases ()

+
struct kmod_config_iter *
+kmod_config_get_aliases (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the aliases maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the aliases or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_get_options ()

+
struct kmod_config_iter *
+kmod_config_get_options (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the options maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the options or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_get_softdeps ()

+
struct kmod_config_iter *
+kmod_config_get_softdeps (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the softdeps maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the softdeps or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+
+
+
+

kmod_config_iter_get_key ()

+
const char *
+kmod_config_iter_get_key (const struct kmod_config_iter *iter);
+

When using a new allocated iterator, user must perform a call to +kmod_config_iter_next() to initialize iterator's position and check if it's +valid.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+

Returns

+

the key of the current configuration pointed by iter +.

+
+
+
+
+

kmod_config_iter_get_value ()

+
const char *
+kmod_config_iter_get_value (const struct kmod_config_iter *iter);
+

When using a new allocated iterator, user must perform a call to +kmod_config_iter_next() to initialize iterator's position and check if it's +valid.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+

Returns

+

the value of the current configuration pointed by iter +.

+
+
+
+
+

kmod_config_iter_next ()

+
bool
+kmod_config_iter_next (struct kmod_config_iter *iter);
+

Make iter + point to the next item of a certain configuration. It's an +automatically recycling iterator. When it reaches the end, false is +returned; then if user wants to iterate again, it's sufficient to call this +function once more.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+

Returns

+

true if next position of iter +is valid or false if its end is +reached.

+
+
+
+
+

kmod_config_iter_free_iter ()

+
void
+kmod_config_iter_free_iter (struct kmod_config_iter *iter);
+

Free resources used by the iterator.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+
+
+

Types and Values

+
+

struct kmod_config_iter

+
struct kmod_config_iter;
+
+
+
+ + + \ No newline at end of file diff --git a/v32/libkmod-libkmod-list.html b/v32/libkmod-libkmod-list.html new file mode 100644 index 0000000..d4f6d5e --- /dev/null +++ b/v32/libkmod-libkmod-list.html @@ -0,0 +1,234 @@ + + + + +libkmod-list: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-list

+

libkmod-list — general purpose list

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + +
#define +kmod_list_foreach() +
#define +kmod_list_foreach_reverse() +
struct kmod_list * + +kmod_list_last () +
struct kmod_list * + +kmod_list_next () +
struct kmod_list * + +kmod_list_prev () +
+
+
+

Types and Values

+
++++ + + + + +
structkmod_list
+
+
+

Description

+
+
+

Functions

+
+

kmod_list_foreach()

+
#define             kmod_list_foreach(list_entry, first_entry)
+
+
+
+

kmod_list_foreach_reverse()

+
#define             kmod_list_foreach_reverse(list_entry, first_entry)
+
+
+
+

kmod_list_last ()

+
struct kmod_list *
+kmod_list_last (const struct kmod_list *list);
+

Get the last element of the list +. As list + is a circular list, +this is a cheap operation O(1) with the last element being the +previous element.

+

If the list has a single element it will return the list itself (as +expected, and this is what differentiates from kmod_list_prev()).

+
+

Parameters

+
+++++ + + + + + +

list

the head of the list

 
+
+
+

Returns

+

last node at list +or NULL if the list is empty.

+
+
+
+
+

kmod_list_next ()

+
struct kmod_list *
+kmod_list_next (const struct kmod_list *list,
+                const struct kmod_list *curr);
+

Get the next node in list + relative to curr + as if list + was not a circular +list. I.e. calling this function in the last node of the list returns +NULL.. It can be used to iterate a list by checking for NULL return to know +when all elements were iterated.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

list

the head of the list

 

curr

the current node in the list

 
+
+
+

Returns

+

node next to curr +or NULL if either this node is the last of or +list is empty.

+
+
+
+
+

kmod_list_prev ()

+
struct kmod_list *
+kmod_list_prev (const struct kmod_list *list,
+                const struct kmod_list *curr);
+

Get the previous node in list + relative to curr + as if list + was not a +circular list. I.e.: the previous of the head is NULL. It can be used to +iterate a list by checking for NULL return to know when all elements were +iterated.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

list

the head of the list

 

curr

the current node in the list

 
+
+
+

Returns

+

node previous to curr +or NULL if either this node is the head of +the list or the list is empty.

+
+
+
+
+

Types and Values

+
+

struct kmod_list

+
struct kmod_list;
+
+
+
+ + + \ No newline at end of file diff --git a/v32/libkmod-libkmod-loaded.html b/v32/libkmod-libkmod-loaded.html new file mode 100644 index 0000000..0b8bae3 --- /dev/null +++ b/v32/libkmod-libkmod-loaded.html @@ -0,0 +1,296 @@ + + + + +libkmod-loaded: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-loaded

+

libkmod-loaded — currently loaded modules

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+int + +kmod_module_new_from_loaded () +
+int + +kmod_module_get_initstate () +
const char * + +kmod_module_initstate_str () +
+long + +kmod_module_get_size () +
+int + +kmod_module_get_refcnt () +
struct kmod_list * + +kmod_module_get_holders () +
+
+
+

Description

+

Information about currently loaded modules, as reported by Linux kernel. +These information are not cached by libkmod and are always read from /sys +and /proc/modules.

+
+
+

Functions

+
+

kmod_module_new_from_loaded ()

+
int
+kmod_module_new_from_loaded (struct kmod_ctx *ctx,
+                             struct kmod_list **list);
+

Create a new list of kmod modules with all modules currently loaded in +kernel. It uses /proc/modules to get the names of loaded modules and to +create kmod modules by calling kmod_module_new_from_name() in each of them. +They are put in list + in no particular order.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. The returned list + must be released by +calling kmod_module_unref_list(). Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned list are +completed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

ctx

kmod library context

 

list

where to save the list of loaded modules

 
+
+
+

Returns

+

0 on success or < 0 on error.

+
+
+
+
+

kmod_module_get_initstate ()

+
int
+kmod_module_get_initstate (const struct kmod_module *mod);
+

Get the initstate of this mod +, as returned by Linux Kernel, by reading +/sys filesystem.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

< 0 on error or module state if module is found in kernel, valid states are +KMOD_MODULE_BUILTIN: module is builtin; +KMOD_MODULE_LIVE: module is live in kernel; +KMOD_MODULE_COMING: module is being loaded; +KMOD_MODULE_GOING: module is being unloaded.

+
+
+
+
+

kmod_module_initstate_str ()

+
const char *
+kmod_module_initstate_str (enum kmod_module_initstate state);
+

Translate a initstate to a string.

+
+

Parameters

+
+++++ + + + + + +

state

the state as returned by kmod_module_get_initstate()

 
+
+
+

Returns

+

the string associated to the state +. This string is statically +allocated, do not free it.

+
+
+
+
+

kmod_module_get_size ()

+
long
+kmod_module_get_size (const struct kmod_module *mod);
+

Get the size of this kmod module as returned by Linux kernel. If supported, +the size is read from the coresize attribute in /sys/module. For older +kernels, this falls back on /proc/modules and searches for the specified +module to get its size.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the size of this kmod module.

+
+
+
+
+

kmod_module_get_refcnt ()

+
int
+kmod_module_get_refcnt (const struct kmod_module *mod);
+

Get the ref count of this mod +, as returned by Linux Kernel, by reading +/sys filesystem.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the reference count on success or < 0 on failure.

+
+
+
+
+

kmod_module_get_holders ()

+
struct kmod_list *
+kmod_module_get_holders (const struct kmod_module *mod);
+

Get a list of kmod modules that are holding this mod +, as returned by Linux +Kernel. After use, free the list + by calling kmod_module_unref_list().

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a new list of kmod modules on success or NULL on failure.

+
+
+
+
+ + + \ No newline at end of file diff --git a/v32/libkmod-libkmod-module.html b/v32/libkmod-libkmod-module.html new file mode 100644 index 0000000..26d3699 --- /dev/null +++ b/v32/libkmod-libkmod-module.html @@ -0,0 +1,1824 @@ + + + + +libkmod-module: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-module

+

libkmod-module — operate on kernel modules

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+int + +kmod_module_new_from_lookup () +
+int + +kmod_module_new_from_name_lookup () +
+int + +kmod_module_new_from_name () +
+int + +kmod_module_new_from_path () +
struct kmod_module * + +kmod_module_ref () +
struct kmod_module * + +kmod_module_unref () +
+int + +kmod_module_unref_list () +
+int + +kmod_module_insert_module () +
+int + +kmod_module_probe_insert_module () +
+int + +kmod_module_remove_module () +
struct kmod_module * + +kmod_module_get_module () +
struct kmod_list * + +kmod_module_get_dependencies () +
+int + +kmod_module_get_softdeps () +
+int + +kmod_module_apply_filter () +
+int + +kmod_module_get_filtered_blacklist () +
const char * + +kmod_module_get_install_commands () +
const char * + +kmod_module_get_remove_commands () +
const char * + +kmod_module_get_name () +
const char * + +kmod_module_get_options () +
const char * + +kmod_module_get_path () +
+int + +kmod_module_get_dependency_symbols () +
+int + +kmod_module_dependency_symbol_get_bind () +
+uint64_t + +kmod_module_dependency_symbol_get_crc () +
const char * + +kmod_module_dependency_symbol_get_symbol () +
+void + +kmod_module_dependency_symbols_free_list () +
struct kmod_list * + +kmod_module_get_sections () +
+void + +kmod_module_section_free_list () +
unsigned long + +kmod_module_section_get_address () +
const char * + +kmod_module_section_get_name () +
+int + +kmod_module_get_symbols () +
+uint64_t + +kmod_module_symbol_get_crc () +
const char * + +kmod_module_symbol_get_symbol () +
+void + +kmod_module_symbols_free_list () +
+int + +kmod_module_get_versions () +
+uint64_t + +kmod_module_version_get_crc () +
const char * + +kmod_module_version_get_symbol () +
+void + +kmod_module_versions_free_list () +
+int + +kmod_module_get_info () +
+void + +kmod_module_info_free_list () +
const char * + +kmod_module_info_get_key () +
const char * + +kmod_module_info_get_value () +
+
+
+

Types and Values

+
++++ + + + + +
structkmod_module
+
+
+

Description

+
+
+

Functions

+
+

kmod_module_new_from_lookup ()

+
int
+kmod_module_new_from_lookup (struct kmod_ctx *ctx,
+                             const char *given_alias,
+                             struct kmod_list **list);
+

Create a new list of kmod modules using an alias or module name and lookup +libkmod's configuration files and indexes in order to find the module. +Once it's found in one of the places, it stops searching and create the +list of modules that is saved in list +.

+

The search order is: 1. aliases in configuration file; 2. module names in +modules.dep index; 3. symbol aliases in modules.symbols index; 4. aliases +from install commands; 5. builtin indexes from kernel.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. The returned list + must be released by +calling kmod_module_unref_list(). Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned list are +completed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

given_alias

alias to look for

 

list

an empty list where to save the list of modules matching +given_alias +

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if any of the lookup +methods failed, which is basically due to memory allocation fail. If module +is not found, it still returns 0, but list +is an empty list.

+
+
+
+
+

kmod_module_new_from_name_lookup ()

+
int
+kmod_module_new_from_name_lookup (struct kmod_ctx *ctx,
+                                  const char *modname,
+                                  struct kmod_module **mod);
+

Lookup by module name, without considering possible aliases. This is similar +to kmod_module_new_from_lookup(), but don't consider as source indexes and +configurations that work with aliases. When succesful, this always resolves +to one and only one module.

+

The search order is: 1. module names in modules.dep index;

+
  1. builtin indexes from kernel.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned list are +completed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

modname

module name to look for

 

mod

returned module on success

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if any of the lookup +methods failed, which is basically due to memory allocation failure. If +module is not found, it still returns 0, but mod +is left untouched.

+
+
+
+
+

kmod_module_new_from_name ()

+
int
+kmod_module_new_from_name (struct kmod_ctx *ctx,
+                           const char *name,
+                           struct kmod_module **mod);
+

Create a new struct kmod_module using the module name. name + can not be an +alias, file name or anything else; it must be a module name. There's no +check if the module exists in the system.

+

This function is also used internally by many others that return a new +struct kmod_module or a new list of modules.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned +kmod_module are done.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

name

name of the module

 

mod

where to save the created struct kmod_module

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if name is not a valid +module name or if memory allocation failed.

+
+
+
+
+

kmod_module_new_from_path ()

+
int
+kmod_module_new_from_path (struct kmod_ctx *ctx,
+                           const char *path,
+                           struct kmod_module **mod);
+

Create a new struct kmod_module using the module path. path + must be an +existent file with in the filesystem and must be accessible to libkmod.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned +kmod_module are done.

+

If path + is relative, it's treated as relative to the current working +directory. Otherwise, give an absolute path.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

path

path where to find the given module

 

mod

where to save the created struct kmod_module

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if file does not exist, if +it's not a valid file for a kmod_module or if memory allocation failed.

+
+
+
+
+

kmod_module_ref ()

+
struct kmod_module *
+kmod_module_ref (struct kmod_module *mod);
+

Take a reference of the kmod module, incrementing its refcount.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the passed module +with its refcount incremented.

+
+
+
+
+

kmod_module_unref ()

+
struct kmod_module *
+kmod_module_unref (struct kmod_module *mod);
+

Drop a reference of the kmod module. If the refcount reaches zero, its +resources are released.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

NULL if mod +is NULL or if the module was released. Otherwise it +returns the passed mod +with its refcount decremented.

+
+
+
+
+

kmod_module_unref_list ()

+
int
+kmod_module_unref_list (struct kmod_list *list);
+

Drop a reference of each kmod module in list + and releases the resources +taken by the list itself.

+
+

Parameters

+
+++++ + + + + + +

list

list of kmod modules

 
+
+
+

Returns

+

0

+
+
+
+
+

kmod_module_insert_module ()

+
int
+kmod_module_insert_module (struct kmod_module *mod,
+                           unsigned int flags,
+                           const char *options);
+

Insert a module in Linux kernel. It opens the file pointed by mod +, +mmap'ing it and passing to kernel.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

mod

kmod module

 

flags

flags are not passed to Linux Kernel, but instead they dictate the +behavior of this function, valid flags are +KMOD_INSERT_FORCE_VERMAGIC: ignore kernel version magic; +KMOD_INSERT_FORCE_MODVERSION: ignore symbol version hashes.

 

options

module's options to pass to Linux Kernel.

 
+
+
+

Returns

+

0 on success or < 0 on failure. If module is already loaded it +returns -EEXIST.

+
+
+
+
+

kmod_module_probe_insert_module ()

+
int
+kmod_module_probe_insert_module (struct kmod_module *mod,
+                                 unsigned int flags,
+                                 const char *extra_options,
+                                 int (*run_install) (struct kmod_module *m, const char *cmdline, void *data),
+                                 const void *data,
+                                 void (*print_action) (struct kmod_module *m, bool install, const char *options));
+

Insert a module in Linux kernel resolving dependencies, soft dependencies, +install commands and applying blacklist.

+

If run_install + is NULL, this function will fork and exec by calling +system(3). Don't pass a NULL argument in run_install + if your binary is +setuid/setgid (see warning in system(3)). If you need control over the +execution of an install command, give a callback function instead.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

mod

kmod module

 

flags

flags are not passed to Linux Kernel, but instead they dictate the +behavior of this function, valid flags are +KMOD_PROBE_FORCE_VERMAGIC: ignore kernel version magic; +KMOD_PROBE_FORCE_MODVERSION: ignore symbol version hashes; +KMOD_PROBE_IGNORE_COMMAND: whether the probe should ignore install +commands and softdeps configured in the system; +KMOD_PROBE_IGNORE_LOADED: do not check whether the module is already +live in kernel or not; +KMOD_PROBE_DRY_RUN: dry run, do not insert module, just call the +associated callback function; +KMOD_PROBE_FAIL_ON_LOADED: if KMOD_PROBE_IGNORE_LOADED is not specified +and the module is already live in kernel, the function will fail if this +flag is specified; +KMOD_PROBE_APPLY_BLACKLIST_ALL: probe will apply KMOD_FILTER_BLACKLIST +filter to this module and its dependencies. If any of the dependencies (or +the module) is blacklisted, the probe will fail, unless the blacklisted +module is already live in kernel; +KMOD_PROBE_APPLY_BLACKLIST: probe will fail if the module is blacklisted; +KMOD_PROBE_APPLY_BLACKLIST_ALIAS_ONLY: probe will fail if the module is an +alias and is blacklisted.

 

extra_options

module's options to pass to Linux Kernel. It applies only +to mod +, not to its dependencies.

 

run_install

function to run when mod +is backed by an install command.

 

data

data to give back to run_install +callback

 

print_action

function to call with the action being taken (install or +insmod). It's useful for tools like modprobe when running with verbose +output or in dry-run mode.

 
+
+
+

Returns

+

0 on success, > 0 if stopped by a reason given in flags +or < 0 on +failure.

+
+
+
+
+

kmod_module_remove_module ()

+
int
+kmod_module_remove_module (struct kmod_module *mod,
+                           unsigned int flags);
+

Remove a module from Linux kernel.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

flags

flags used when removing the module. +KMOD_REMOVE_FORCE: force remove module regardless if it's still in +use by a kernel subsystem or other process; passed directly to Linux kernel +KMOD_REMOVE_NOWAIT: is always enforced, causing us to pass O_NONBLOCK to +delete_module(2). +KMOD_REMOVE_NOLOG: when module removal fails, do not log anything as the +caller may want to handle retries and log when appropriate.

 
+
+
+

Returns

+

0 on success or < 0 on failure.

+
+
+
+
+

kmod_module_get_module ()

+
struct kmod_module *
+kmod_module_get_module (const struct kmod_list *entry);
+

Get the kmod module of this entry + in the list, increasing its refcount. +After it's used, unref it. Since the refcount is incremented upon return, +you still have to call kmod_module_unref_list() to release the list of kmod +modules.

+
+

Parameters

+
+++++ + + + + + +

entry

an entry in a list of kmod modules.

 
+
+
+

Returns

+

NULL on failure or the kmod_module contained in this list entry +with its refcount incremented.

+
+
+
+
+

kmod_module_get_dependencies ()

+
struct kmod_list *
+kmod_module_get_dependencies (const struct kmod_module *mod);
+

Search the modules.dep index to find the dependencies of the given mod +. +The result is cached in mod +, so subsequent calls to this function will +return the already searched list of modules.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

NULL on failure. Otherwise it returns a list of kmod modules +that can be released by calling kmod_module_unref_list().

+
+
+
+
+

kmod_module_get_softdeps ()

+
int
+kmod_module_get_softdeps (const struct kmod_module *mod,
+                          struct kmod_list **pre,
+                          struct kmod_list **post);
+

Get soft dependencies for this kmod module. Soft dependencies come +from configuration file and are not cached in mod + because it may include +dependency cycles that would make we leak kmod_module. Any call +to this function will search for this module in configuration, allocate a +list and return the result.

+

Both pre + and post + are newly created list of kmod_module and +should be unreferenced with kmod_module_unref_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

mod

kmod module

 

pre

where to save the list of preceding soft dependencies.

 

post

where to save the list of post soft dependencies.

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_module_apply_filter ()

+
int
+kmod_module_apply_filter (const struct kmod_ctx *ctx,
+                          enum kmod_filter filter_type,
+                          const struct kmod_list *input,
+                          struct kmod_list **output);
+

Given a list input +, this function filter it out by the filter mask +and save it in output +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

filter_type

bitmask to filter modules out, valid types are +KMOD_FILTER_BLACKLIST: filter modules in blacklist out; +KMOD_FILTER_BUILTIN: filter builtin modules out.

 

input

list of kmod_module to be filtered

 

output

where to save the new list

 
+
+
+

Returns

+

0 on success or < 0 otherwise. output +is saved with the updated +list.

+
+
+
+
+

kmod_module_get_filtered_blacklist ()

+
int
+kmod_module_get_filtered_blacklist (const struct kmod_ctx *ctx,
+                                    const struct kmod_list *input,
+                                    struct kmod_list **output);
+

This function should not be used. Use kmod_module_apply_filter instead.

+

Given a list input +, this function filter it out with config's blacklist +and save it in output +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

input

list of kmod_module to be filtered with blacklist

 

output

where to save the new list

 
+
+
+

Returns

+

0 on success or < 0 otherwise. output +is saved with the updated +list.

+
+
+
+
+

kmod_module_get_install_commands ()

+
const char *
+kmod_module_get_install_commands (const struct kmod_module *mod);
+

Get install commands for this kmod module. Install commands come from the +configuration file and are cached in mod +. The first call to this function +will search for this module in configuration and subsequent calls return +the cached string. The install commands are returned as they were in the +configuration, concatenated by ';'. No other processing is made in this +string.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a string with all install commands separated by semicolons. This +string is owned by mod +, do not free it.

+
+
+
+
+

kmod_module_get_remove_commands ()

+
const char *
+kmod_module_get_remove_commands (const struct kmod_module *mod);
+

Get remove commands for this kmod module. Remove commands come from the +configuration file and are cached in mod +. The first call to this function +will search for this module in configuration and subsequent calls return +the cached string. The remove commands are returned as they were in the +configuration, concatenated by ';'. No other processing is made in this +string.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a string with all remove commands separated by semicolons. This +string is owned by mod +, do not free it.

+
+
+
+
+

kmod_module_get_name ()

+
const char *
+kmod_module_get_name (const struct kmod_module *mod);
+

Get the name of this kmod module. Name is always available, independently +if it was created by kmod_module_new_from_name() or another function and +it's always normalized (dashes are replaced with underscores).

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the name of this kmod module.

+
+
+
+
+

kmod_module_get_options ()

+
const char *
+kmod_module_get_options (const struct kmod_module *mod);
+

Get options of this kmod module. Options come from the configuration file +and are cached in mod +. The first call to this function will search for +this module in configuration and subsequent calls return the cached string.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a string with all the options separated by spaces. This string is +owned by mod +, do not free it.

+
+
+
+
+

kmod_module_get_path ()

+
const char *
+kmod_module_get_path (const struct kmod_module *mod);
+

Get the path of this kmod module. If this kmod module was not created by +path, it can search the modules.dep index in order to find out the module +under context's dirname.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the path of this kmod module or NULL if such information is not +available.

+
+
+
+
+

kmod_module_get_dependency_symbols ()

+
int
+kmod_module_get_dependency_symbols (const struct kmod_module *mod,
+                                    struct kmod_list **list);
+

Get a list of entries in ELF section ".symtab" or "__ksymtab_strings".

+

After use, free the list + by calling +kmod_module_dependency_symbols_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module dependency_symbols. Use +kmod_module_dependency_symbol_get_symbol() and +kmod_module_dependency_symbol_get_crc(). Release this list with +kmod_module_dependency_symbols_free_list()

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_module_dependency_symbol_get_bind ()

+
int
+kmod_module_dependency_symbol_get_bind
+                               (const struct kmod_list *entry);
+

Get the bind type of a kmod module dependency_symbol.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module dependency_symbol

 
+
+
+

Returns

+

the bind of this kmod module dependency_symbol on success +or < 0 on failure.

+
+
+
+
+

kmod_module_dependency_symbol_get_crc ()

+
uint64_t
+kmod_module_dependency_symbol_get_crc (const struct kmod_list *entry);
+

Get the crc of a kmod module dependency_symbol.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module dependency_symbol

 
+
+
+

Returns

+

the crc of this kmod module dependency_symbol if available, otherwise default to 0.

+
+
+
+
+

kmod_module_dependency_symbol_get_symbol ()

+
const char *
+kmod_module_dependency_symbol_get_symbol
+                               (const struct kmod_list *entry);
+

Get the dependency symbol of a kmod module

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module dependency_symbols

 
+
+
+

Returns

+

the symbol of this kmod module dependency_symbols on success or NULL +on failure. The string is owned by the dependency_symbols, do not free it.

+
+
+
+
+

kmod_module_dependency_symbols_free_list ()

+
void
+kmod_module_dependency_symbols_free_list
+                               (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module dependency_symbols list

 
+
+
+
+
+

kmod_module_get_sections ()

+
struct kmod_list *
+kmod_module_get_sections (const struct kmod_module *mod);
+

Get a list of kmod sections of this mod +, as returned by Linux Kernel. The +structure contained in this list is internal to libkmod and their fields +can be obtained by calling kmod_module_section_get_name() and +kmod_module_section_get_address().

+

After use, free the list + by calling kmod_module_section_free_list().

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a new list of kmod module sections on success or NULL on failure.

+
+
+
+
+

kmod_module_section_free_list ()

+
void
+kmod_module_section_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module section list

 
+
+
+
+
+

kmod_module_section_get_address ()

+
unsigned long
+kmod_module_section_get_address (const struct kmod_list *entry);
+

Get the address of a kmod module section.

+

After use, free the list + by calling kmod_module_section_free_list().

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module section

 
+
+
+

Returns

+

the address of this kmod module section on success or ULONG_MAX +on failure.

+
+
+
+
+

kmod_module_section_get_name ()

+
const char *
+kmod_module_section_get_name (const struct kmod_list *entry);
+
+
+
+

kmod_module_get_symbols ()

+
int
+kmod_module_get_symbols (const struct kmod_module *mod,
+                         struct kmod_list **list);
+

Get a list of entries in ELF section ".symtab" or "__ksymtab_strings".

+

After use, free the list + by calling kmod_module_symbols_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module symbols. Use +kmod_module_symbol_get_symbol() and +kmod_module_symbol_get_crc(). Release this list with +kmod_module_symbols_free_list()

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_module_symbol_get_crc ()

+
uint64_t
+kmod_module_symbol_get_crc (const struct kmod_list *entry);
+

Get the crc of a kmod module symbol.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module symbol

 
+
+
+

Returns

+

the crc of this kmod module symbol if available, otherwise default to 0.

+
+
+
+
+

kmod_module_symbol_get_symbol ()

+
const char *
+kmod_module_symbol_get_symbol (const struct kmod_list *entry);
+

Get the symbol of a kmod module symbols.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module symbols

 
+
+
+

Returns

+

the symbol of this kmod module symbols on success or NULL +on failure. The string is owned by the symbols, do not free it.

+
+
+
+
+

kmod_module_symbols_free_list ()

+
void
+kmod_module_symbols_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module symbols list

 
+
+
+
+
+

kmod_module_get_versions ()

+
int
+kmod_module_get_versions (const struct kmod_module *mod,
+                          struct kmod_list **list);
+

Get a list of entries in ELF section "__versions".

+

After use, free the list + by calling kmod_module_versions_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module versions. Use +kmod_module_version_get_symbol() and +kmod_module_version_get_crc(). Release this list with +kmod_module_versions_free_list()

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_module_version_get_crc ()

+
uint64_t
+kmod_module_version_get_crc (const struct kmod_list *entry);
+

Get the crc of a kmod module version.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module version

 
+
+
+

Returns

+

the crc of this kmod module version if available, otherwise default to 0.

+
+
+
+
+

kmod_module_version_get_symbol ()

+
const char *
+kmod_module_version_get_symbol (const struct kmod_list *entry);
+

Get the symbol of a kmod module versions.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module versions

 
+
+
+

Returns

+

the symbol of this kmod module versions on success or NULL +on failure. The string is owned by the versions, do not free it.

+
+
+
+
+

kmod_module_versions_free_list ()

+
void
+kmod_module_versions_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module versions list

 
+
+
+
+
+

kmod_module_get_info ()

+
int
+kmod_module_get_info (const struct kmod_module *mod,
+                      struct kmod_list **list);
+

Get a list of entries in ELF section ".modinfo", these contain +alias, license, depends, vermagic and other keys with respective +values. If the module is signed (CONFIG_MODULE_SIG), information +about the module signature is included as well: signer, +sig_key and sig_hashalgo.

+

After use, free the list + by calling kmod_module_info_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module information. Use +kmod_module_info_get_key() and +kmod_module_info_get_value(). Release this list with +kmod_module_info_free_list()

 
+
+
+

Returns

+

number of entries in list +on success or < 0 otherwise.

+
+
+
+
+

kmod_module_info_free_list ()

+
void
+kmod_module_info_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module info list

 
+
+
+
+
+

kmod_module_info_get_key ()

+
const char *
+kmod_module_info_get_key (const struct kmod_list *entry);
+

Get the key of a kmod module info.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module info

 
+
+
+

Returns

+

the key of this kmod module info on success or NULL on +failure. The string is owned by the info, do not free it.

+
+
+
+
+

kmod_module_info_get_value ()

+
const char *
+kmod_module_info_get_value (const struct kmod_list *entry);
+

Get the value of a kmod module info.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module info

 
+
+
+

Returns

+

the value of this kmod module info on success or NULL on +failure. The string is owned by the info, do not free it.

+
+
+
+
+

Types and Values

+
+

struct kmod_module

+
struct kmod_module;
+

Opaque object representing a module.

+
+
+
+ + + \ No newline at end of file diff --git a/v32/libkmod-libkmod.html b/v32/libkmod-libkmod.html new file mode 100644 index 0000000..2eb595a --- /dev/null +++ b/v32/libkmod-libkmod.html @@ -0,0 +1,594 @@ + + + + +libkmod: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod

+

libkmod — libkmod context

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
struct kmod_ctx * + +kmod_new () +
struct kmod_ctx * + +kmod_ref () +
struct kmod_ctx * + +kmod_unref () +
+int + +kmod_load_resources () +
+void + +kmod_unload_resources () +
+int + +kmod_validate_resources () +
+int + +kmod_dump_index () +
+void + +kmod_set_log_priority () +
+int + +kmod_get_log_priority () +
+void + +kmod_set_log_fn () +
+void * + +kmod_get_userdata () +
+void + +kmod_set_userdata () +
const char * + +kmod_get_dirname () +
+
+
+

Types and Values

+
++++ + + + + +
structkmod_ctx
+
+
+

Description

+

The context contains the default values for the library user, +and is passed to all library operations.

+
+
+

Functions

+
+

kmod_new ()

+
struct kmod_ctx *
+kmod_new (const char *dirname,
+          const char * const *config_paths);
+

Create kmod library context. This reads the kmod configuration +and fills in the default values.

+

The initial refcount is 1, and needs to be decremented to +release the resources of the kmod library context.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

dirname

what to consider as linux module's directory, if NULL +defaults to $MODULE_DIRECTORY/uname -r. If it's relative, +it's treated as relative to the current working directory. +Otherwise, give an absolute dirname.

 

config_paths

ordered array of paths (directories or files) where +to load from user-defined configuration parameters such as +alias, blacklists, commands (install, remove). If NULL +defaults to /etc/modprobe.d, /run/modprobe.d, +/usr/local/lib/modprobe.d, DISTCONFDIR/modprobe.d, and +/lib/modprobe.d. Give an empty vector if configuration should +not be read. This array must be null terminated.

 
+
+
+

Returns

+

a new kmod library context

+
+
+
+
+

kmod_ref ()

+
struct kmod_ctx *
+kmod_ref (struct kmod_ctx *ctx);
+

Take a reference of the kmod library context.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the passed kmod library context

+
+
+
+
+

kmod_unref ()

+
struct kmod_ctx *
+kmod_unref (struct kmod_ctx *ctx);
+

Drop a reference of the kmod library context. If the refcount +reaches zero, the resources of the context will be released.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the passed kmod library context or NULL if it's freed

+
+
+
+
+

kmod_load_resources ()

+
int
+kmod_load_resources (struct kmod_ctx *ctx);
+

Load indexes and keep them open in ctx +. This way it's faster to lookup +information within the indexes. If this function is not called before a +search, the necessary index is always opened and closed.

+

If user will do more than one or two lookups, insertions, deletions, most +likely it's good to call this function first. Particularly in a daemon like +udev that on bootup issues hundreds of calls to lookup the index, calling +this function will speedup the searches.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_unload_resources ()

+
void
+kmod_unload_resources (struct kmod_ctx *ctx);
+

Unload all the indexes. This will free the resources to maintain the index +open and all subsequent searches will need to open and close the index.

+

User is free to call kmod_load_resources() and kmod_unload_resources() as +many times as wanted during the lifecycle of ctx +. For example, if a daemon +knows that when starting up it will lookup a lot of modules, it could call +kmod_load_resources() and after the first burst of searches is gone, it +could free the resources by calling kmod_unload_resources().

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_validate_resources ()

+
int
+kmod_validate_resources (struct kmod_ctx *ctx);
+

Check if indexes and configuration files changed on disk and the current +context is not valid anymore.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

KMOD_RESOURCES_OK if resources are still valid, +KMOD_RESOURCES_MUST_RELOAD if it's sufficient to call +kmod_unload_resources() and kmod_load_resources() or +KMOD_RESOURCES_MUST_RECREATE if ctx +must be re-created.

+
+
+
+
+

kmod_dump_index ()

+
int
+kmod_dump_index (struct kmod_ctx *ctx,
+                 enum kmod_index type,
+                 int fd);
+

Dump index to file descriptor. Note that this function doesn't use stdio.h +so call fflush() before calling this function to be sure data is written in +order.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

type

index to dump, valid indexes are +KMOD_INDEX_MODULES_DEP: index of module dependencies; +KMOD_INDEX_MODULES_ALIAS: index of module aliases; +KMOD_INDEX_MODULES_SYMBOL: index of symbol aliases; +KMOD_INDEX_MODULES_BUILTIN: index of builtin module.

 

fd

file descriptor to dump index to

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+
+
+
+

kmod_set_log_priority ()

+
void
+kmod_set_log_priority (struct kmod_ctx *ctx,
+                       int priority);
+

Set the current logging priority. The value controls which messages +are logged.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

ctx

kmod library context

 

priority

the new logging priority

 
+
+
+
+
+

kmod_get_log_priority ()

+
int
+kmod_get_log_priority (const struct kmod_ctx *ctx);
+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the current logging priority

+
+
+
+
+

kmod_set_log_fn ()

+
void
+kmod_set_log_fn (struct kmod_ctx *ctx,
+                 void (*log_fn) (void *log_data, int priority, const char *file, int line, const char *fn, const char *format, va_list args),
+                 const void *data);
+

The built-in logging writes to stderr. It can be +overridden by a custom function, to plug log messages +into the user's logging functionality.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

log_fn

function to be called for logging messages

 

data

data to pass to log function

 
+
+
+
+
+

kmod_get_userdata ()

+
void *
+kmod_get_userdata (const struct kmod_ctx *ctx);
+

Retrieve stored data pointer from library context. This might be useful +to access from callbacks.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

stored userdata

+
+
+
+
+

kmod_set_userdata ()

+
void
+kmod_set_userdata (struct kmod_ctx *ctx,
+                   const void *userdata);
+

Store custom userdata + in the library context.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

ctx

kmod library context

 

userdata

data pointer

 
+
+
+
+
+

kmod_get_dirname ()

+
const char *
+kmod_get_dirname (const struct kmod_ctx *ctx);
+

Retrieve the absolute path used for linux modules in this context. The path +is computed from the arguments to kmod_new().

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+
+
+

Types and Values

+
+

struct kmod_ctx

+
struct kmod_ctx;
+

Opaque object representing the library context.

+
+
+
+ + + \ No newline at end of file diff --git a/v32/libkmod.devhelp2 b/v32/libkmod.devhelp2 new file mode 100644 index 0000000..43c3902 --- /dev/null +++ b/v32/libkmod.devhelp2 @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/v32/right-insensitive.png b/v32/right-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..4c95785b907b978f36674cd98bf5302669c15c1b GIT binary patch literal 373 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefG`u!(zUX23=E7+o-U3d7N^fn+URvSL8NuRG*{E) z?#-+97X-^pidQ*u@StO1(S@7g8g>nnA24$?ty?)cmuaa|Y>ez2*_Ia?6HP4j{3LIs zTr!s1ao_Sz^~3e4zRJGAjKZGn=XP#)Wmuo-QN>teTzzI!&R*jMI^Oa#7_ukLYdicf zOx;1mb-rt04s-c|uIH8fnX}$)XJa^0_-F3(pA%=sGI<|(n_*&=yYt96+n5InXn_GN+EraJI9q(O+n{6MQKErp&KxRvpfn0xh z`sSMqH(2Z%?kaFBTf06W^y=UDA9gR9YrwNS*1pjB((0K%&+SbAx3`XA&dKZ}j*nX7 QfdRze>FVdQ&MBb@09|aA9{>OV literal 0 HcmV?d00001 diff --git a/v32/right.png b/v32/right.png new file mode 100644 index 0000000000000000000000000000000000000000..76260ec8865f4e13cd269ec62eccd78a33adba3c GIT binary patch literal 261 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefRMbR+#PqI2*V^#7sn8b(^oI8=W9$9IsUQVezxzH zy`G{eu0`y#boSlU-NAlQG~=D)BPJG4k(^0qdDa(AdQvI0d|vJT=i7_<_D6`Cy?Dm; zP0@1EeB~D|O$oQe*sxL-P;q{2UCr}fN-o#M~tpZzsGyfNz46SZlIJCbKH zZQscEqpOfBCPDgx dt +{ + padding-top: 0.25em; + padding-bottom: 0.25em; + font-weight: bold; +} + +dl.toc > dl +{ + padding-bottom: 0.5em; +} + +.parameter +{ + font-style: normal; +} + +.footer +{ + padding-top: 3.5em; + /* tango:aluminium 3 */ + color: #babdb6; + text-align: center; + font-size: 80%; +} + +.informalfigure, +.figure +{ + margin: 1em; +} + +.informalexample, +.example +{ + margin-top: 1em; + margin-bottom: 1em; +} + +.warning +{ + /* tango:orange 0/1 */ + background: #ffeed9; + background: rgba(252, 175, 62, 0.1); + border-color: #ffb04f; + border-color: rgba(252, 175, 62, 0.2); +} +.note +{ + /* tango:chameleon 0/0.5 */ + background: #d8ffb2; + background: rgba(138, 226, 52, 0.1); + border-color: #abf562; + border-color: rgba(138, 226, 52, 0.2); +} +div.blockquote +{ + border-color: #eeeeec; +} +.note, .warning, div.blockquote +{ + padding: 0.5em; + border-width: 1px; + border-style: solid; + margin: 2em; +} +.note p, .warning p +{ + margin: 0; +} + +div.warning h3.title, +div.note h3.title +{ + display: none; +} + +p + div.section +{ + margin-top: 1em; +} + +div.refnamediv, +div.refsynopsisdiv, +div.refsect1, +div.refsect2, +div.toc, +div.section +{ + margin-bottom: 1em; +} + +/* blob links */ +h2 .extralinks, h3 .extralinks +{ + float: right; + /* tango:aluminium 3 */ + color: #babdb6; + font-size: 80%; + font-weight: normal; +} + +.lineart +{ + color: #d3d7cf; + font-weight: normal; +} + +.annotation +{ + /* tango:aluminium 5 */ + color: #555753; + font-weight: normal; +} + +.structfield +{ + font-style: normal; + font-weight: normal; +} + +acronym,abbr +{ + border-bottom: 1px dotted gray; +} + +.listing_frame { + /* tango:sky blue 1 */ + border: solid 1px #729fcf; + border: solid 1px rgba(114, 159, 207, 0.2); + padding: 0px; +} + +.listing_lines, .listing_code { + margin-top: 0px; + margin-bottom: 0px; + padding: 0.5em; +} +.listing_lines { + /* tango:sky blue 0.5 */ + background: #a6c5e3; + background: rgba(114, 159, 207, 0.2); + /* tango:aluminium 6 */ + color: #2e3436; +} +.listing_code { + /* tango:sky blue 0 */ + background: #e6f3ff; + background: rgba(114, 159, 207, 0.1); +} +.listing_code .programlisting { + /* override from previous */ + border: none 0px; + padding: 0px; + background: none; +} +.listing_lines pre, .listing_code pre { + margin: 0px; +} + +@media screen { + /* these have a as a first child, but since there are no parent selectors + * we can't use that. */ + a.footnote + { + position: relative; + top: 0em ! important; + } + /* this is needed so that the local anchors are displayed below the naviagtion */ + div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] + { + display: inline-block; + position: relative; + top:-5em; + } + /* this seems to be a bug in the xsl style sheets when generating indexes */ + div.index div.index + { + top: 0em; + } + /* make space for the fixed navigation bar and add space at the bottom so that + * link targets appear somewhat close to top + */ + body + { + padding-top: 2.5em; + padding-bottom: 500px; + max-width: 60em; + } + p + { + max-width: 60em; + } + /* style and size the navigation bar */ + table.navigation#top + { + position: fixed; + background: #e2e2e2; + border-bottom: solid 1px #babdb6; + border-spacing: 5px; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + z-index: 10; + } + table.navigation#top td + { + padding-left: 6px; + padding-right: 6px; + } + .navigation a, .navigation a:visited + { + /* tango:sky blue 3 */ + color: #204a87; + } + .navigation a:hover + { + /* tango:sky blue 2 */ + color: #3465a4; + } + td.shortcuts + { + /* tango:sky blue 2 */ + color: #3465a4; + font-size: 80%; + white-space: nowrap; + } + td.shortcuts .dim + { + color: #babdb6; + } + .navigation .title + { + font-size: 80%; + max-width: none; + margin: 0px; + font-weight: normal; + } +} +@media screen and (min-width: 60em) { + /* screen larger than 60em */ + body { margin: auto; } +} +@media screen and (max-width: 60em) { + /* screen less than 60em */ + #nav_hierarchy { display: none; } + #nav_interfaces { display: none; } + #nav_prerequisites { display: none; } + #nav_derived_interfaces { display: none; } + #nav_implementations { display: none; } + #nav_child_properties { display: none; } + #nav_style_properties { display: none; } + #nav_index { display: none; } + #nav_glossary { display: none; } + .gallery_image { display: none; } + .property_flags { display: none; } + .signal_flags { display: none; } + .parameter_annotations { display: none; } + .enum_member_annotations { display: none; } + .struct_member_annotations { display: none; } + .union_member_annotations { display: none; } + /* now that a column is hidden, optimize space */ + col.parameters_name { width: auto; } + col.parameters_description { width: auto; } + col.struct_members_name { width: auto; } + col.struct_members_description { width: auto; } + col.enum_members_name { width: auto; } + col.enum_members_description { width: auto; } + col.union_members_name { width: auto; } + col.union_members_description { width: auto; } + .listing_lines { display: none; } +} +@media print { + table.navigation { + visibility: collapse; + display: none; + } + div.titlepage table.navigation { + visibility: visible; + display: table; + background: #e2e2e2; + border: solid 1px #babdb6; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + height: 3em; + } +} + +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.hll { background-color: #ffffcc } +.c { color: #3D7B7B; font-style: italic } /* Comment */ +.err { border: 1px solid #FF0000 } /* Error */ +.k { color: #008000; font-weight: bold } /* Keyword */ +.o { color: #666666 } /* Operator */ +.ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.cp { color: #9C6500 } /* Comment.Preproc */ +.cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ +.gd { color: #A00000 } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.gr { color: #E40000 } /* Generic.Error */ +.gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.gi { color: #008400 } /* Generic.Inserted */ +.go { color: #717171 } /* Generic.Output */ +.gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.gt { color: #0044DD } /* Generic.Traceback */ +.kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.kp { color: #008000 } /* Keyword.Pseudo */ +.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.kt { color: #B00040 } /* Keyword.Type */ +.m { color: #666666 } /* Literal.Number */ +.s { color: #BA2121 } /* Literal.String */ +.na { color: #687822 } /* Name.Attribute */ +.nb { color: #008000 } /* Name.Builtin */ +.nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.no { color: #880000 } /* Name.Constant */ +.nd { color: #AA22FF } /* Name.Decorator */ +.ni { color: #717171; font-weight: bold } /* Name.Entity */ +.ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ +.nf { color: #0000FF } /* Name.Function */ +.nl { color: #767600 } /* Name.Label */ +.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.nt { color: #008000; font-weight: bold } /* Name.Tag */ +.nv { color: #19177C } /* Name.Variable */ +.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.w { color: #bbbbbb } /* Text.Whitespace */ +.mb { color: #666666 } /* Literal.Number.Bin */ +.mf { color: #666666 } /* Literal.Number.Float */ +.mh { color: #666666 } /* Literal.Number.Hex */ +.mi { color: #666666 } /* Literal.Number.Integer */ +.mo { color: #666666 } /* Literal.Number.Oct */ +.sa { color: #BA2121 } /* Literal.String.Affix */ +.sb { color: #BA2121 } /* Literal.String.Backtick */ +.sc { color: #BA2121 } /* Literal.String.Char */ +.dl { color: #BA2121 } /* Literal.String.Delimiter */ +.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.s2 { color: #BA2121 } /* Literal.String.Double */ +.se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ +.sh { color: #BA2121 } /* Literal.String.Heredoc */ +.si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ +.sx { color: #008000 } /* Literal.String.Other */ +.sr { color: #A45A77 } /* Literal.String.Regex */ +.s1 { color: #BA2121 } /* Literal.String.Single */ +.ss { color: #19177C } /* Literal.String.Symbol */ +.bp { color: #008000 } /* Name.Builtin.Pseudo */ +.fm { color: #0000FF } /* Name.Function.Magic */ +.vc { color: #19177C } /* Name.Variable.Class */ +.vg { color: #19177C } /* Name.Variable.Global */ +.vi { color: #19177C } /* Name.Variable.Instance */ +.vm { color: #19177C } /* Name.Variable.Magic */ +.il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/v32/up-insensitive.png b/v32/up-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..f40498606db349a7321cf6b470523e836ee7ac2e GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefG~@Ex#w@70gTL^E{-7zACwHGSRJaopUzr*FR_KPpkxheNzTDP+%{a~ox zRb6~e-_l%s#;V|Jw-)bO$G_X=4F`Y7SBoCzyjAZQ8BPW>ywAP8?pbBsZ|wt?+h6S6&uqY)kkMnwQQEd@7k`4t@sCCO z@7MoiEI4Q_#IB70vhu7Ab+>SXLxu@LWH Qzz|~aboFyt=akR{08E^fv;Y7A literal 0 HcmV?d00001 diff --git a/v32/up.png b/v32/up.png new file mode 100644 index 0000000000000000000000000000000000000000..80b4b37e997d69b2e128bc3090bc447ccb74bbe9 GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHjTefRFevZLys@4W>+6GUE!tU04Ii{0w_tkMIDB?rA5 zttYTN Date: Fri, 7 Mar 2025 21:40:04 +0800 Subject: [PATCH 3/9] ci: Add a workflow to publish API document upon repo dispatch event Co-developed-by: Chen, Yuchi Signed-off-by: Chen, Yuchi Signed-off-by: Gongjun Song Signed-off-by: Dan He Signed-off-by: Wenjie Wang Signed-off-by: Qingqing Li --- .github/workflows/doc.yml | 61 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/doc.yml diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000..7092a44 --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,61 @@ +name: Publish docs + +on: + repository_dispatch: + types: [publish-doc] + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Echo + run: | + echo "Triggered by ${{ github.event.client_payload.source }}, version ${{ github.event.client_payload.version }}" + + - name: Checkout + uses: actions/checkout@v1 # V1 does it by git clone, other versions do it by calling REST APIs. + with: + ref: 'pages' + + - name: Generate frontpage + run: | + echo "# kmod API Document" > README.md + echo >> README.md + ls -lr | awk '{print $1, $9}' | awk '/^d.* master/ {print "- ["$9"]("$9"/index.html)"}' >> README.md + ls -lr | awk '{print $1, $9}' | awk '/^d.* v/ {print "- ["$2"]("$2"/index.html)"}' >> README.md + + - name: Commit and push + uses: actions-js/push@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + author_name: 'github-actions[bot]' + author_email: '41898282+github-actions[bot]@users.noreply.github.com' + message: 'Auto-generating frontpage for ${{ github.event.client_payload.version }}' + branch: 'pages' + empty: true + + - name: Jekyll building + uses: actions/jekyll-build-pages@v1 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + permissions: + pages: write + id-token: write + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From 529b09222b007c7532c24fbbb94139bb4632acca Mon Sep 17 00:00:00 2001 From: "Chen, Yuchi" Date: Fri, 7 Mar 2025 22:05:07 +0800 Subject: [PATCH 4/9] Use Jekyll theme from https://github.com/pages-themes/hacker Co-developed-by: Chen, Yuchi Signed-off-by: Chen, Yuchi Signed-off-by: Gongjun Song Signed-off-by: Dan He Signed-off-by: Wenjie Wang Signed-off-by: Qingqing Li --- _config.yml | 5 + _includes/head-custom-google-analytics.html | 10 + _includes/head-custom-theme-colors.html | 5 + _includes/head-custom.html | 12 + _layouts/default.html | 38 +++ _layouts/post.html | 14 + _sass/_default_colors.scss | 15 ++ _sass/hacker.scss | 4 + _sass/jekyll-theme-hacker.scss | 268 ++++++++++++++++++++ _sass/rouge-base16-dark.scss | 87 +++++++ assets/css/style.scss | 4 + assets/images/bkg.png | Bin 0 -> 1218 bytes assets/images/blacktocat.png | Bin 0 -> 268 bytes assets/images/bullet.png | Bin 0 -> 603 bytes 14 files changed, 462 insertions(+) create mode 100644 _config.yml create mode 100644 _includes/head-custom-google-analytics.html create mode 100644 _includes/head-custom-theme-colors.html create mode 100644 _includes/head-custom.html create mode 100644 _layouts/default.html create mode 100644 _layouts/post.html create mode 100644 _sass/_default_colors.scss create mode 100644 _sass/hacker.scss create mode 100644 _sass/jekyll-theme-hacker.scss create mode 100644 _sass/rouge-base16-dark.scss create mode 100644 assets/css/style.scss create mode 100644 assets/images/bkg.png create mode 100644 assets/images/blacktocat.png create mode 100644 assets/images/bullet.png diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..039ff60 --- /dev/null +++ b/_config.yml @@ -0,0 +1,5 @@ +title: kmod +description: kmod - Linux kernel module handling +show_downloads: true +google_analytics: +theme: jekyll-theme-hacker # For Open-Source Hackthon :) diff --git a/_includes/head-custom-google-analytics.html b/_includes/head-custom-google-analytics.html new file mode 100644 index 0000000..8a3ae5c --- /dev/null +++ b/_includes/head-custom-google-analytics.html @@ -0,0 +1,10 @@ +{% if site.google_analytics %} + +{% endif %} diff --git a/_includes/head-custom-theme-colors.html b/_includes/head-custom-theme-colors.html new file mode 100644 index 0000000..a30e708 --- /dev/null +++ b/_includes/head-custom-theme-colors.html @@ -0,0 +1,5 @@ + + + + + diff --git a/_includes/head-custom.html b/_includes/head-custom.html new file mode 100644 index 0000000..44cdb83 --- /dev/null +++ b/_includes/head-custom.html @@ -0,0 +1,12 @@ + + + +{% include head-custom-theme-colors.html %} + + +{% include head-custom-google-analytics.html %} + + + + + diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..1c8c883 --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,38 @@ + + + + + + + + {% include head-custom.html %} + +{% seo %} + + + + +
+
+ +

{{ site.title | default: site.github.repository_name }}

+
+

{{ site.description | default: site.github.project_tagline }}

+ +
+ {% if site.show_downloads %} + Download as .zip + Download as .tar.gz + {% endif %} + View on GitHub +
+
+
+ +
+
+ {{ content }} +
+
+ + diff --git a/_layouts/post.html b/_layouts/post.html new file mode 100644 index 0000000..0676aff --- /dev/null +++ b/_layouts/post.html @@ -0,0 +1,14 @@ +--- +layout: default +--- + +{{ page.date | date: "%-d %B %Y" }} +

{{ page.title }}

+ +

by {{ page.author | default: site.author }}

+ +{{content}} + +{% if page.tags %} + tags: {{ page.tags | join: " - " }} +{% endif %} diff --git a/_sass/_default_colors.scss b/_sass/_default_colors.scss new file mode 100644 index 0000000..dee878d --- /dev/null +++ b/_sass/_default_colors.scss @@ -0,0 +1,15 @@ +$apple-blossom: #ac4142; +$alto: #d0d0d0; +$bouquet: #aa759f; +$chelsea-cucumber: #90a959; +$cod-grey: #151515; +$conifer: #b5e853; +$dove-grey: #666; +$gallery: #eaeaea; +$grey: #888; +$gulf-stream: #75b5aa; +$hippie-blue: #6a9fb5; +$potters-clay: #8f5536; +$rajah: #f4bf75; +$raw-sienna: #d28445; +$silver-chalice: #aaa; diff --git a/_sass/hacker.scss b/_sass/hacker.scss new file mode 100644 index 0000000..b535d24 --- /dev/null +++ b/_sass/hacker.scss @@ -0,0 +1,4 @@ +// Placeholder file. If your site uses +// @import "{{ site.theme }}"; +// Then using this theme with jekyll-remote-theme will work fine. +@import "jekyll-theme-hacker"; diff --git a/_sass/jekyll-theme-hacker.scss b/_sass/jekyll-theme-hacker.scss new file mode 100644 index 0000000..b3123a1 --- /dev/null +++ b/_sass/jekyll-theme-hacker.scss @@ -0,0 +1,268 @@ +@import "rouge-base16-dark"; +@import "default_colors"; + +$body-background: $cod-grey !default; +$body-foreground: $gallery !default; +$header: $conifer !default; +$blockquote-color: $silver-chalice !default; +$blockquote-border: $dove-grey !default; +$container-max-width: 1000px; + +@mixin media-max-width($max-width) { + @media (max-width: $max-width) { + @content; + } +} + +body { + margin: 0; + padding: 0; + background: $body-background url("../images/bkg.png") 0 0; + color: $body-foreground; + font-size: 16px; + line-height: 1.5; + font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; +} + +/* General & 'Reset' Stuff */ + +.container { + width: 90%; + max-width: $container-max-width; + margin: 0 auto; +} + +section { + display: block; + margin: 0 0 20px 0; +} + +h1, h2, h3, h4, h5, h6 { + margin: 0 0 20px; +} + +li { + line-height: 1.4 ; +} + +/* Header,
+ header - container + h1 - project name + h2 - project description +*/ + +header { + background: rgba(0, 0, 0, 0.1); + width: 100%; + border-bottom: 1px dashed $conifer; //header; + padding: 20px 0; + margin: 0 0 40px 0; +} + +header h1 { + font-size: 30px; + line-height: 1.5; + margin: 0 0 0 -40px; + font-weight: bold; + font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; + color: $conifer;//$header; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1), + 0 0 5px rgba(181, 232, 83, 0.1), + 0 0 10px rgba(181, 232, 83, 0.1); + letter-spacing: -1px; + -webkit-font-smoothing: antialiased; + @include media-max-width($container-max-width) { + margin-left: 0; + } +} + + +header h1:before { + content: "./ "; + font-size: 24px; +} + +header h2 { + font-size: 18px; + font-weight: 300; + color: #666; +} + +#downloads .btn { + display: inline-block; + text-align: center; + margin: 0; +} + +/* Main Content +*/ + +#main_content { + width: 100%; + -webkit-font-smoothing: antialiased; +} +section img { + max-width: 100% +} + +h1, h2, h3, h4, h5, h6 { + font-weight: normal; + font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; + color: $header; + letter-spacing: -0.03em; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1), + 0 0 5px rgba(181, 232, 83, 0.1), + 0 0 10px rgba(181, 232, 83, 0.1); +} + +#main_content h1 { + font-size: 30px; +} + +#main_content h2 { + font-size: 24px; +} + +#main_content h3 { + font-size: 18px; +} + +#main_content h4 { + font-size: 14px; +} + +#main_content h5 { + font-size: 12px; + text-transform: uppercase; + margin: 0 0 5px 0; +} + +#main_content h6 { + font-size: 12px; + text-transform: uppercase; + color: #999; + margin: 0 0 5px 0; +} + +dt { + font-style: italic; + font-weight: bold; +} + +ul li { + list-style-image:url('../images/bullet.png'); +} + +blockquote { + color: $blockquote-color; + padding-left: 10px; + border-left: 1px dotted $blockquote-border; +} + +pre { + background: rgba(0, 0, 0, 0.9); + border: 1px solid rgba(255, 255, 255, 0.15); + padding: 10px; + font-size: 16px; + color: #b5e853; + border-radius: 2px; + word-wrap: normal; + overflow: auto; + overflow-y: hidden; +} + +code.highlighter-rouge { + background: rgba(0,0,0,0.9); + border: 1px solid rgba(255, 255, 255, 0.15); + padding: 0px 3px; + margin: 0px -3px; + color: #aa759f; + border-radius: 2px; +} + +table { + width: 100%; + margin: 0 0 20px 0; +} + +th { + text-align: left; + border-bottom: 1px dashed #b5e853; + padding: 5px 10px; +} + +td { + padding: 5px 10px; +} + +hr { + height: 0; + border: 0; + border-bottom: 1px dashed #b5e853; + color: #b5e853; +} + +/* Buttons +*/ + +.btn { + display: inline-block; + background: -webkit-linear-gradient(top, rgba(40, 40, 40, 0.3), rgba(35, 35, 35, 0.3) 50%, rgba(10, 10, 10, 0.3) 50%, rgba(0, 0, 0, 0.3)); + padding: 8px 18px; + border-radius: 50px; + border: 2px solid rgba(0, 0, 0, 0.7); + border-bottom: 2px solid rgba(0, 0, 0, 0.7); + border-top: 2px solid rgba(0, 0, 0, 1); + color: rgba(255, 255, 255, 0.8); + font-family: Helvetica, Arial, sans-serif; + font-weight: bold; + font-size: 13px; + text-decoration: none; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); +} + +.btn:hover { + background: -webkit-linear-gradient(top, rgba(40, 40, 40, 0.6), rgba(35, 35, 35, 0.6) 50%, rgba(10, 10, 10, 0.8) 50%, rgba(0, 0, 0, 0.8)); +} + +.btn .icon { + display: inline-block; + width: 16px; + height: 16px; + margin: 1px 8px 0 0; + float: left; +} + +.btn-github .icon { + opacity: 0.6; + background: url("../images/blacktocat.png") 0 0 no-repeat; +} + +/* Links + a, a:hover, a:visited +*/ + +a { + color: #63c0f5; + text-shadow: 0 0 5px rgba(104, 182, 255, 0.5); +} + +/* Clearfix */ + +.cf:before, .cf:after { + content:""; + display:table; +} + +.cf:after { + clear:both; +} + +.cf { + zoom:1; +} + +#a-title { + text-decoration: none; +} diff --git a/_sass/rouge-base16-dark.scss b/_sass/rouge-base16-dark.scss new file mode 100644 index 0000000..7f839e9 --- /dev/null +++ b/_sass/rouge-base16-dark.scss @@ -0,0 +1,87 @@ +/* + generated by rouge http://rouge.jneen.net/ + original base16 by Chris Kempson (https://github.com/chriskempson/base16) +*/ + +@import "default_colors"; + +.highlight { + + $plaintext: $alto !default; + $string: $chelsea-cucumber !default; + $literal: $chelsea-cucumber !default; + $keyword: $bouquet !default; + $error-foreground: $cod-grey !default; + $error-background: $apple-blossom !default; + $comment: $grey !default; + $preprocessor: $rajah !default; + $name-space: $rajah !default; + $name-attribute: $hippie-blue !default; + $operator: $rajah !default; + $keyword-type: $raw-sienna !default; + $regex: $gulf-stream !default; + $string-escape: $potters-clay !default; + $deleted: $apple-blossom !default; + $header: $hippie-blue !default; + + color: $plaintext; + + table td { padding: 5px; } + table pre { margin: 0; } + .w { + color: $plaintext; + } + .err { + color: $error-foreground; + background-color: $error-background; + } + .c, .cd, .cm, .c1, .cs { + color: $comment; + } + .cp { + color: $preprocessor; + } + .o, .ow { + color: $operator; + } + .p, .pi { + color: $plaintext; + } + .gi { + color: $string; + } + .gd { + color: $deleted; + } + .gh { + color: $header; + font-weight: bold; + } + .k, .kn, .kp, .kr, .kv { + color: $keyword; + } + .kc, .kt, .kd { + color: $keyword-type; + } + .s, .sb, .sc, .sd, .s2, .sh, .sx, .s1 { + color: $string; + } + .sr { + color: $regex; + } + .si, .se { + color: $string-escape; + } + .nt, .nn, .nc, .no{ + color: $name-space; + } + .na { + color: $name-attribute; + } + .m, .mf, .mh, .mi, .il, .mo, .mb, .mx { + color: $literal; + } + .ss { + color: $string; + } +} diff --git a/assets/css/style.scss b/assets/css/style.scss new file mode 100644 index 0000000..5f1392b --- /dev/null +++ b/assets/css/style.scss @@ -0,0 +1,4 @@ +--- +--- + +@import 'jekyll-theme-hacker'; diff --git a/assets/images/bkg.png b/assets/images/bkg.png new file mode 100644 index 0000000000000000000000000000000000000000..d10e5caf1adb7466673bc9cef83621fe855caa3f GIT binary patch literal 1218 zcmeAS@N?(olHy`uVBq!ia0y~yU=jggMrNQ$#TNBtK#DEEC&X1sN=jNkczmscWgJUHsE1R2ws}X9=R$~%X@*3=-vhL@-NfkR)!pBoqVTzzlmJ$gw$h( za!N&gzAjH}?UE-yuB@->I#KvPao+dRzrL@oCvVpee)R8SO|Rip8+r3Dza~8XxNqSP zmGuR0<=?XLN*y=&ko@A*R?n;zmFGjmpL|X=el)GDnT?nCc-hJ9h-*>(U-v7SP21O( zoNu0S!J*))p{S5clIq(!Rnv%W88O`}e-}D7AF~mxZfpV+3kwX-$FQx)Y;JvA%`)@d zWYLYgd8JI0aw{r!Iv89Q>eyImcyRi@1&bblZJ%(NN9SER*F|RI`9Vy^n|kYj&a|m< zH+i{|PR}_n7 z-gd`kwp)J%TC%IUg`6V4t}fWH9jMCX-LAENwM{str7XO1;E!GNEuasI-gOzw-pnlj z>{){B-p0ScV3upi-pM7+*5to^wpdM0Lo6uhXKvGLxTUb-aiDN)U^44#klW=8|4*sV zntfrzKU=lq{IC4u?*i3*Ut)0K@G9flAeW??UW>QI-$6b&yzF|LRw2jj$QO!RxR2R@ z!p-JEk`UjzM%QUGt5 zsq{^Wh=(VtSvB4F14E?hZ{X9Y?R-}fa@G1cS_4|1{K5DvW*TQF%BQWRm-W8rcnHXW5F_LnOa!0te-Gud{_`k1m{6m9unPa(^B$ zKx8W_XRUv@r+&lLzc+3*l|BZA<&8P3LiGe?mL9UxX48rf2YHj@p3l_yh=pvc)~tHC z{nO?fprlo3bGdkWi`e7f5A45eIR!{NSV4~V*iRMLf15OnS&>IfjrQ$5*USNy<-2E*PZ71vSAxg$R}ir z*HrJV2QIesUSGbBCF#9c#svfK2|7o#H8-glPWYpw_zvjL75X#RJY~u`5Y-X(HrD(= zUCM<84_%p-W@|H8MF_Nfy!EQ%2FOzxtQJYFtLINQ#Ng@b=d#Wzp$P!*bu5qo literal 0 HcmV?d00001 diff --git a/assets/images/blacktocat.png b/assets/images/blacktocat.png new file mode 100644 index 0000000000000000000000000000000000000000..9759d7762ca84fd279f8bd59706641e13c1926f0 GIT binary patch literal 268 zcmV+n0rUQeP)_yxDRcl8_oH}KY@N>TT1a{44=<&$4$p^ zC0ICT$pbdEYvno{KSou>!krh=N_9R{CeAf*BB#+UjGZ;AZi3Y`MhCJsH?yrf4($-OfLDgK%x| SfwxWo00007${dCd>QY`6?zK#qG8~eHcB(ehe3dtTp zz6=aiY77hwEes65fI&pI+kyVsc_(xbi&_G6SPZ!4!i_=@D?9F0w6md%rmzMVCWO3ZMStxs>APeV` z6HToPk{)y4eARTTV}i&**7yU5F8RqPByJ7f7l(V(z*fP#y%N{ZA*k8}SM*o+)sk0^| zVWo&jS?rFxude<7%Cf>m>EMbm?l6Vrx6ksBe>HsTzdZg`C*I{YbAygX z`No(wBmKJvw3*sg? literal 0 HcmV?d00001 From c56c38cacd76bb7669d23608c58c152ba174c2ee Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 16:57:38 +0000 Subject: [PATCH 5/9] Auto-add ci-test-docs docs for commit 06e308fa4d22005668300cd283ccf0d7bad9995f --- ci-test-docs/api-index-full.html | 422 +++++ ci-test-docs/api-index-v1.html | 200 ++ ci-test-docs/api-index-v2.html | 73 + ci-test-docs/api-index-v22.html | 34 + ci-test-docs/api-index-v3.html | 77 + ci-test-docs/api-index-v30.html | 34 + ci-test-docs/api-index-v33.html | 40 + ci-test-docs/api-index-v4.html | 77 + ci-test-docs/api-index-v6.html | 34 + ci-test-docs/ch01.html | 46 + ci-test-docs/deprecated-api-index.html | 34 + ci-test-docs/home.png | Bin 0 -> 169 bytes ci-test-docs/index.html | 56 + ci-test-docs/left-insensitive.png | Bin 0 -> 334 bytes ci-test-docs/left.png | Bin 0 -> 185 bytes ci-test-docs/libkmod-3.devhelp2 | 148 ++ ci-test-docs/libkmod-libkmod-config.html | 489 +++++ ci-test-docs/libkmod-libkmod-list.html | 287 +++ ci-test-docs/libkmod-libkmod-loaded.html | 367 ++++ ci-test-docs/libkmod-libkmod-module.html | 2179 ++++++++++++++++++++++ ci-test-docs/libkmod-libkmod.html | 711 +++++++ ci-test-docs/right-insensitive.png | Bin 0 -> 233 bytes ci-test-docs/right.png | Bin 0 -> 184 bytes ci-test-docs/style.css | 531 ++++++ ci-test-docs/up-insensitive.png | Bin 0 -> 288 bytes ci-test-docs/up.png | Bin 0 -> 186 bytes 26 files changed, 5839 insertions(+) create mode 100644 ci-test-docs/api-index-full.html create mode 100644 ci-test-docs/api-index-v1.html create mode 100644 ci-test-docs/api-index-v2.html create mode 100644 ci-test-docs/api-index-v22.html create mode 100644 ci-test-docs/api-index-v3.html create mode 100644 ci-test-docs/api-index-v30.html create mode 100644 ci-test-docs/api-index-v33.html create mode 100644 ci-test-docs/api-index-v4.html create mode 100644 ci-test-docs/api-index-v6.html create mode 100644 ci-test-docs/ch01.html create mode 100644 ci-test-docs/deprecated-api-index.html create mode 100644 ci-test-docs/home.png create mode 100644 ci-test-docs/index.html create mode 100644 ci-test-docs/left-insensitive.png create mode 100644 ci-test-docs/left.png create mode 100644 ci-test-docs/libkmod-3.devhelp2 create mode 100644 ci-test-docs/libkmod-libkmod-config.html create mode 100644 ci-test-docs/libkmod-libkmod-list.html create mode 100644 ci-test-docs/libkmod-libkmod-loaded.html create mode 100644 ci-test-docs/libkmod-libkmod-module.html create mode 100644 ci-test-docs/libkmod-libkmod.html create mode 100644 ci-test-docs/right-insensitive.png create mode 100644 ci-test-docs/right.png create mode 100644 ci-test-docs/style.css create mode 100644 ci-test-docs/up-insensitive.png create mode 100644 ci-test-docs/up.png diff --git a/ci-test-docs/api-index-full.html b/ci-test-docs/api-index-full.html new file mode 100644 index 0000000..81a1cb4 --- /dev/null +++ b/ci-test-docs/api-index-full.html @@ -0,0 +1,422 @@ + + + + +API Index: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+API Index

+

C

+
+kmod_config_get_aliases, function in libkmod-config +
+
+
+kmod_config_get_blacklists, function in libkmod-config +
+
+
+kmod_config_get_install_commands, function in libkmod-config +
+
+
+kmod_config_get_options, function in libkmod-config +
+
+
+kmod_config_get_remove_commands, function in libkmod-config +
+
+
+kmod_config_get_softdeps, function in libkmod-config +
+
+
+kmod_config_get_weakdeps, function in libkmod-config +
+
+
+kmod_config_iter, struct in libkmod-config +
+
+
+kmod_config_iter_free_iter, function in libkmod-config +
+
+
+kmod_config_iter_get_key, function in libkmod-config +
+
+
+kmod_config_iter_get_value, function in libkmod-config +
+
+
+kmod_config_iter_next, function in libkmod-config +
+
+
+kmod_ctx, struct in libkmod +
+
+

D

+
+kmod_dump_index, function in libkmod +
+
+

F

+
+kmod_filter, enum in libkmod-module +
+
+

G

+
+kmod_get_dirname, function in libkmod +
+
+
+kmod_get_log_priority, function in libkmod +
+
+
+kmod_get_userdata, function in libkmod +
+
+

I

+
+kmod_index, enum in libkmod +
+
+
+kmod_insert, enum in libkmod-module +
+
+

L

+
+kmod_list, struct in libkmod-list +
+
+
+kmod_list_foreach, macro in libkmod-list +
+
+
+kmod_list_foreach_reverse, macro in libkmod-list +
+
+
+kmod_list_last, function in libkmod-list +
+
+
+kmod_list_next, function in libkmod-list +
+
+
+kmod_list_prev, function in libkmod-list +
+
+
+kmod_load_resources, function in libkmod +
+
+

M

+
+kmod_module, struct in libkmod-module +
+
+
+kmod_module_apply_filter, function in libkmod-module +
+
+
+kmod_module_dependency_symbols_free_list, function in libkmod-module +
+
+
+kmod_module_dependency_symbol_get_bind, function in libkmod-module +
+
+
+kmod_module_dependency_symbol_get_crc, function in libkmod-module +
+
+
+kmod_module_dependency_symbol_get_symbol, function in libkmod-module +
+
+
+kmod_module_get_dependencies, function in libkmod-module +
+
+
+kmod_module_get_dependency_symbols, function in libkmod-module +
+
+
+kmod_module_get_filtered_blacklist, function in libkmod-module +
+
+
+kmod_module_get_holders, function in libkmod-loaded +
+
+
+kmod_module_get_info, function in libkmod-module +
+
+
+kmod_module_get_initstate, function in libkmod-loaded +
+
+
+kmod_module_get_install_commands, function in libkmod-module +
+
+
+kmod_module_get_module, function in libkmod-module +
+
+
+kmod_module_get_name, function in libkmod-module +
+
+
+kmod_module_get_options, function in libkmod-module +
+
+
+kmod_module_get_path, function in libkmod-module +
+
+
+kmod_module_get_refcnt, function in libkmod-loaded +
+
+
+kmod_module_get_remove_commands, function in libkmod-module +
+
+
+kmod_module_get_sections, function in libkmod-module +
+
+
+kmod_module_get_size, function in libkmod-loaded +
+
+
+kmod_module_get_softdeps, function in libkmod-module +
+
+
+kmod_module_get_symbols, function in libkmod-module +
+
+
+kmod_module_get_versions, function in libkmod-module +
+
+
+kmod_module_get_weakdeps, function in libkmod-module +
+
+
+kmod_module_info_free_list, function in libkmod-module +
+
+
+kmod_module_info_get_key, function in libkmod-module +
+
+
+kmod_module_info_get_value, function in libkmod-module +
+
+
+kmod_module_initstate, enum in libkmod-loaded +
+
+
+kmod_module_initstate_str, function in libkmod-loaded +
+
+
+kmod_module_insert_module, function in libkmod-module +
+
+
+kmod_module_new_from_loaded, function in libkmod-loaded +
+
+
+kmod_module_new_from_lookup, function in libkmod-module +
+
+
+kmod_module_new_from_name, function in libkmod-module +
+
+
+kmod_module_new_from_name_lookup, function in libkmod-module +
+
+
+kmod_module_new_from_path, function in libkmod-module +
+
+
+kmod_module_probe_insert_module, function in libkmod-module +
+
+
+kmod_module_ref, function in libkmod-module +
+
+
+kmod_module_remove_module, function in libkmod-module +
+
+
+kmod_module_section_free_list, function in libkmod-module +
+
+
+kmod_module_section_get_address, function in libkmod-module +
+
+
+kmod_module_section_get_name, function in libkmod-module +
+
+
+kmod_module_symbols_free_list, function in libkmod-module +
+
+
+kmod_module_symbol_get_crc, function in libkmod-module +
+
+
+kmod_module_symbol_get_symbol, function in libkmod-module +
+
+
+kmod_module_unref, function in libkmod-module +
+
+
+kmod_module_unref_list, function in libkmod-module +
+
+
+kmod_module_versions_free_list, function in libkmod-module +
+
+
+kmod_module_version_get_crc, function in libkmod-module +
+
+
+kmod_module_version_get_symbol, function in libkmod-module +
+
+

N

+
+kmod_new, function in libkmod +
+
+

P

+
+kmod_probe, enum in libkmod-module +
+
+

R

+
+kmod_ref, function in libkmod +
+
+
+kmod_remove, enum in libkmod-module +
+
+
+kmod_resources, enum in libkmod +
+
+

S

+
+kmod_set_log_fn, function in libkmod +
+
+
+kmod_set_log_priority, function in libkmod +
+
+
+kmod_set_userdata, function in libkmod +
+
+
+kmod_symbol_bind, enum in libkmod-module +
+
+

U

+
+kmod_unload_resources, function in libkmod +
+
+
+kmod_unref, function in libkmod +
+
+

V

+
+kmod_validate_resources, function in libkmod +
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/api-index-v1.html b/ci-test-docs/api-index-v1.html new file mode 100644 index 0000000..d3a9f5c --- /dev/null +++ b/ci-test-docs/api-index-v1.html @@ -0,0 +1,200 @@ + + + + +Index of new symbols in 1: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of new symbols in 1

+

G

+
+kmod_get_log_priority, function in libkmod +
+
+
+kmod_get_userdata, function in libkmod +
+
+

L

+
+kmod_list_next, function in libkmod-list +
+
+
+kmod_list_prev, function in libkmod-list +
+
+
+kmod_load_resources, function in libkmod +
+
+

M

+
+kmod_module_get_dependencies, function in libkmod-module +
+
+
+kmod_module_get_filtered_blacklist, function in libkmod-module +
+
+
+kmod_module_get_holders, function in libkmod-loaded +
+
+
+kmod_module_get_initstate, function in libkmod-loaded +
+
+
+kmod_module_get_install_commands, function in libkmod-module +
+
+
+kmod_module_get_module, function in libkmod-module +
+
+
+kmod_module_get_name, function in libkmod-module +
+
+
+kmod_module_get_options, function in libkmod-module +
+
+
+kmod_module_get_path, function in libkmod-module +
+
+
+kmod_module_get_refcnt, function in libkmod-loaded +
+
+
+kmod_module_get_remove_commands, function in libkmod-module +
+
+
+kmod_module_get_sections, function in libkmod-module +
+
+
+kmod_module_get_size, function in libkmod-loaded +
+
+
+kmod_module_initstate_str, function in libkmod-loaded +
+
+
+kmod_module_insert_module, function in libkmod-module +
+
+
+kmod_module_new_from_loaded, function in libkmod-loaded +
+
+
+kmod_module_new_from_lookup, function in libkmod-module +
+
+
+kmod_module_new_from_name, function in libkmod-module +
+
+
+kmod_module_new_from_path, function in libkmod-module +
+
+
+kmod_module_ref, function in libkmod-module +
+
+
+kmod_module_remove_module, function in libkmod-module +
+
+
+kmod_module_section_free_list, function in libkmod-module +
+
+
+kmod_module_section_get_address, function in libkmod-module +
+
+
+kmod_module_section_get_name, function in libkmod-module +
+
+
+kmod_module_unref, function in libkmod-module +
+
+
+kmod_module_unref_list, function in libkmod-module +
+
+

N

+
+kmod_new, function in libkmod +
+
+

R

+
+kmod_ref, function in libkmod +
+
+

S

+
+kmod_set_log_fn, function in libkmod +
+
+
+kmod_set_log_priority, function in libkmod +
+
+
+kmod_set_userdata, function in libkmod +
+
+

U

+
+kmod_unload_resources, function in libkmod +
+
+
+kmod_unref, function in libkmod +
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/api-index-v2.html b/ci-test-docs/api-index-v2.html new file mode 100644 index 0000000..f28ce3a --- /dev/null +++ b/ci-test-docs/api-index-v2.html @@ -0,0 +1,73 @@ + + + + +Index of new symbols in 2: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of new symbols in 2

+

L

+
+kmod_list_last, function in libkmod-list +
+
+

M

+
+kmod_module_get_info, function in libkmod-module +
+
+
+kmod_module_get_softdeps, function in libkmod-module +
+
+
+kmod_module_get_versions, function in libkmod-module +
+
+
+kmod_module_info_free_list, function in libkmod-module +
+
+
+kmod_module_info_get_key, function in libkmod-module +
+
+
+kmod_module_info_get_value, function in libkmod-module +
+
+
+kmod_module_versions_free_list, function in libkmod-module +
+
+
+kmod_module_version_get_crc, function in libkmod-module +
+
+
+kmod_module_version_get_symbol, function in libkmod-module +
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/api-index-v22.html b/ci-test-docs/api-index-v22.html new file mode 100644 index 0000000..856196e --- /dev/null +++ b/ci-test-docs/api-index-v22.html @@ -0,0 +1,34 @@ + + + + +Index of new symbols in 22: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of new symbols in 22

+

G

+
+kmod_get_dirname, function in libkmod +
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/api-index-v3.html b/ci-test-docs/api-index-v3.html new file mode 100644 index 0000000..d06421d --- /dev/null +++ b/ci-test-docs/api-index-v3.html @@ -0,0 +1,77 @@ + + + + +Index of new symbols in 3: libkmod Reference Manual + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ci-test-docs/api-index-v30.html b/ci-test-docs/api-index-v30.html new file mode 100644 index 0000000..edce00c --- /dev/null +++ b/ci-test-docs/api-index-v30.html @@ -0,0 +1,34 @@ + + + + +Index of new symbols in 30: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of new symbols in 30

+

M

+
+kmod_module_new_from_name_lookup, function in libkmod-module +
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/api-index-v33.html b/ci-test-docs/api-index-v33.html new file mode 100644 index 0000000..438d96f --- /dev/null +++ b/ci-test-docs/api-index-v33.html @@ -0,0 +1,40 @@ + + + + +Index of new symbols in 33: libkmod Reference Manual + + + + + + + + + + + + + + + +
+

+Index of new symbols in 33

+

C

+
+kmod_config_get_weakdeps, function in libkmod-config +
+
+

M

+
+kmod_module_get_weakdeps, function in libkmod-module +
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/api-index-v4.html b/ci-test-docs/api-index-v4.html new file mode 100644 index 0000000..0ad9f63 --- /dev/null +++ b/ci-test-docs/api-index-v4.html @@ -0,0 +1,77 @@ + + + + +Index of new symbols in 4: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of new symbols in 4

+

C

+
+kmod_config_get_aliases, function in libkmod-config +
+
+
+kmod_config_get_blacklists, function in libkmod-config +
+
+
+kmod_config_get_install_commands, function in libkmod-config +
+
+
+kmod_config_get_options, function in libkmod-config +
+
+
+kmod_config_get_remove_commands, function in libkmod-config +
+
+
+kmod_config_get_softdeps, function in libkmod-config +
+
+
+kmod_config_iter_free_iter, function in libkmod-config +
+
+
+kmod_config_iter_get_key, function in libkmod-config +
+
+
+kmod_config_iter_get_value, function in libkmod-config +
+
+
+kmod_config_iter_next, function in libkmod-config +
+
+

D

+
+kmod_dump_index, function in libkmod +
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/api-index-v6.html b/ci-test-docs/api-index-v6.html new file mode 100644 index 0000000..1fbbf3b --- /dev/null +++ b/ci-test-docs/api-index-v6.html @@ -0,0 +1,34 @@ + + + + +Index of new symbols in 6: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of new symbols in 6

+

M

+
+kmod_module_apply_filter, function in libkmod-module +
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/ch01.html b/ci-test-docs/ch01.html new file mode 100644 index 0000000..a5986d7 --- /dev/null +++ b/ci-test-docs/ch01.html @@ -0,0 +1,46 @@ + + + + +libkmod: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+libkmod

+
+
+libkmod — libkmod context +
+
+libkmod-list — general purpose list +
+
+libkmod-config — retrieve current libkmod configuration +
+
+libkmod-module — operate on kernel modules +
+
+libkmod-loaded — currently loaded modules +
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/deprecated-api-index.html b/ci-test-docs/deprecated-api-index.html new file mode 100644 index 0000000..615e279 --- /dev/null +++ b/ci-test-docs/deprecated-api-index.html @@ -0,0 +1,34 @@ + + + + +Index of deprecated symbols: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of deprecated symbols

+

M

+
+kmod_module_get_filtered_blacklist, function in libkmod-module +
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/home.png b/ci-test-docs/home.png new file mode 100644 index 0000000000000000000000000000000000000000..b293af531b3796ffdc346a08654277d8b8398f2c GIT binary patch literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`1)eUBAr-fhC6+z-|NnoFgBDXq zKI2Db1wYoLw4|@MnLb8Nu*~?OCh+^gTAJQ>`iGR2| z(wR1LoM + + + +libkmod Reference Manual: libkmod Reference Manual + + + + + + + +
+
+
+
+

for libkmod version "34" +

+
+
+
+
+
libkmod
+
+
+libkmod — libkmod context +
+
+libkmod-list — general purpose list +
+
+libkmod-config — retrieve current libkmod configuration +
+
+libkmod-module — operate on kernel modules +
+
+libkmod-loaded — currently loaded modules +
+
+
API Index
+
Index of deprecated symbols
+
Index of new symbols in 1
+
Index of new symbols in 2
+
Index of new symbols in 3
+
Index of new symbols in 4
+
Index of new symbols in 6
+
Index of new symbols in 22
+
Index of new symbols in 30
+
Index of new symbols in 33
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/left-insensitive.png b/ci-test-docs/left-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..903790a00797aafe3f59ff1d46ba95caf4d82275 GIT binary patch literal 334 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}U4T!BE0A8bYSn%)*t~i3jvYI8 z?%cU+*RH*L_wL)b@8H3MKn6q>$b~R~B#;eJ01{59R(^U2~tZL)f#CYgcR+EMpN9F=fgAc1S zI*b-}e9+45*u0>lKs&=@$~?WE5#lye;e_ z!V)?`)YE^G&Z{az+wQ6hU)+RBCS?h$%$8iYetCKPqx<`+wgvy5ZI#2x74+3YSjN-z ziQ9(7t}l<-a9lIdxI0DspwaK@gYD+Vm(F&+V!qU(ez42xrQ01&GZRnq2VNVN`|h$6 jZ(^SMsz^!W$HINA^@@S5-SwqFw=j6R`njxgN@xNATtG!d literal 0 HcmV?d00001 diff --git a/ci-test-docs/libkmod-3.devhelp2 b/ci-test-docs/libkmod-3.devhelp2 new file mode 100644 index 0000000..e1b6095 --- /dev/null +++ b/ci-test-docs/libkmod-3.devhelp2 @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ci-test-docs/libkmod-libkmod-config.html b/ci-test-docs/libkmod-libkmod-config.html new file mode 100644 index 0000000..74405ed --- /dev/null +++ b/ci-test-docs/libkmod-libkmod-config.html @@ -0,0 +1,489 @@ + + + + +libkmod-config: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-config

+

libkmod-config — retrieve current libkmod configuration

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
struct kmod_config_iter * + +kmod_config_get_blacklists () +
struct kmod_config_iter * + +kmod_config_get_install_commands () +
struct kmod_config_iter * + +kmod_config_get_remove_commands () +
struct kmod_config_iter * + +kmod_config_get_aliases () +
struct kmod_config_iter * + +kmod_config_get_options () +
struct kmod_config_iter * + +kmod_config_get_softdeps () +
struct kmod_config_iter * + +kmod_config_get_weakdeps () +
const char * + +kmod_config_iter_get_key () +
const char * + +kmod_config_iter_get_value () +
+bool + +kmod_config_iter_next () +
+void + +kmod_config_iter_free_iter () +
+
+
+

Types and Values

+
++++ + + + + +
structkmod_config_iter
+
+
+

Description

+

Access to configuration lists - it allows to get each configuration's +key/value stored by kmod.

+
+
+

Functions

+
+

kmod_config_get_blacklists ()

+
struct kmod_config_iter *
+kmod_config_get_blacklists (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the blacklist maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the blacklists or NULL on failure. Free it +with kmod_config_iter_free_iter().

+
+

Since: 4

+
+
+
+

kmod_config_get_install_commands ()

+
struct kmod_config_iter *
+kmod_config_get_install_commands (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the install commands maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the install commands or NULL on failure. Free +it with kmod_config_iter_free_iter().

+
+

Since: 4

+
+
+
+

kmod_config_get_remove_commands ()

+
struct kmod_config_iter *
+kmod_config_get_remove_commands (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the remove commands maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the remove commands or NULL on failure. Free +it with kmod_config_iter_free_iter().

+
+

Since: 4

+
+
+
+

kmod_config_get_aliases ()

+
struct kmod_config_iter *
+kmod_config_get_aliases (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the aliases maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the aliases or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+

Since: 4

+
+
+
+

kmod_config_get_options ()

+
struct kmod_config_iter *
+kmod_config_get_options (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the options maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the options or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+

Since: 4

+
+
+
+

kmod_config_get_softdeps ()

+
struct kmod_config_iter *
+kmod_config_get_softdeps (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the softdeps maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the softdeps or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+

Since: 4

+
+
+
+

kmod_config_get_weakdeps ()

+
struct kmod_config_iter *
+kmod_config_get_weakdeps (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the weakdeps maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the weakdeps or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+

Since: 33

+
+
+
+

kmod_config_iter_get_key ()

+
const char *
+kmod_config_iter_get_key (const struct kmod_config_iter *iter);
+

When using a new allocated iterator, user must perform a call to +kmod_config_iter_next() to initialize iterator's position and check if it's +valid.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+

Returns

+

the key of the current configuration pointed by iter +.

+
+

Since: 4

+
+
+
+

kmod_config_iter_get_value ()

+
const char *
+kmod_config_iter_get_value (const struct kmod_config_iter *iter);
+

When using a new allocated iterator, user must perform a call to +kmod_config_iter_next() to initialize iterator's position and check if it's +valid.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+

Returns

+

the value of the current configuration pointed by iter +.

+
+

Since: 4

+
+
+
+

kmod_config_iter_next ()

+
bool
+kmod_config_iter_next (struct kmod_config_iter *iter);
+

Make iter + point to the next item of a certain configuration. It's an +automatically recycling iterator. When it reaches the end, false is +returned; then if user wants to iterate again, it's sufficient to call this +function once more.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+

Returns

+

true if next position of iter +is valid or false if its end is +reached.

+
+

Since: 4

+
+
+
+

kmod_config_iter_free_iter ()

+
void
+kmod_config_iter_free_iter (struct kmod_config_iter *iter);
+

Free resources used by the iterator.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+

Since: 4

+
+
+
+

Types and Values

+
+

struct kmod_config_iter

+
struct kmod_config_iter;
+

Opaque object for iterating and retrieving configuration information.

+
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/libkmod-libkmod-list.html b/ci-test-docs/libkmod-libkmod-list.html new file mode 100644 index 0000000..29f09d7 --- /dev/null +++ b/ci-test-docs/libkmod-libkmod-list.html @@ -0,0 +1,287 @@ + + + + +libkmod-list: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-list

+

libkmod-list — general purpose list

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + +
#define +kmod_list_foreach() +
#define +kmod_list_foreach_reverse() +
struct kmod_list * + +kmod_list_last () +
struct kmod_list * + +kmod_list_next () +
struct kmod_list * + +kmod_list_prev () +
+
+
+

Types and Values

+
++++ + + + + +
structkmod_list
+
+
+

Description

+

Access to kmod generated lists.

+
+
+

Functions

+
+

kmod_list_foreach()

+
#define             kmod_list_foreach(curr, list)
+

Iterate over the list list +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

curr

the current node in the list

 

list

the head of the list

 
+
+
+
+
+

kmod_list_foreach_reverse()

+
#define             kmod_list_foreach_reverse(curr, list)
+

Iterate in reverse over the list list +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

curr

the current node in the list

 

list

the head of the list

 
+
+
+
+
+

kmod_list_last ()

+
struct kmod_list *
+kmod_list_last (const struct kmod_list *list);
+

Get the last element of the list +. As list + is a circular list, +this is a cheap operation O(1) with the last element being the +previous element.

+

If the list has a single element it will return the list itself (as +expected, and this is what differentiates from kmod_list_prev()).

+
+

Parameters

+
+++++ + + + + + +

list

the head of the list

 
+
+
+

Returns

+

last node at list +or NULL if the list is empty.

+
+

Since: 2

+
+
+
+

kmod_list_next ()

+
struct kmod_list *
+kmod_list_next (const struct kmod_list *list,
+                const struct kmod_list *curr);
+

Get the next node in list + relative to curr + as if list + was not a circular +list. I.e. calling this function in the last node of the list returns +NULL.. It can be used to iterate a list by checking for NULL return to know +when all elements were iterated.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

list

the head of the list

 

curr

the current node in the list

 
+
+
+

Returns

+

node next to curr +or NULL if either this node is the last of or +list is empty.

+
+

Since: 1

+
+
+
+

kmod_list_prev ()

+
struct kmod_list *
+kmod_list_prev (const struct kmod_list *list,
+                const struct kmod_list *curr);
+

Get the previous node in list + relative to curr + as if list + was not a +circular list. I.e.: the previous of the head is NULL. It can be used to +iterate a list by checking for NULL return to know when all elements were +iterated.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

list

the head of the list

 

curr

the current node in the list

 
+
+
+

Returns

+

node previous to curr +or NULL if either this node is the head of +the list or the list is empty.

+
+

Since: 1

+
+
+
+

Types and Values

+
+

struct kmod_list

+
struct kmod_list;
+

Opaque object for a circular (doubly linked) list.

+
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/libkmod-libkmod-loaded.html b/ci-test-docs/libkmod-libkmod-loaded.html new file mode 100644 index 0000000..788cb67 --- /dev/null +++ b/ci-test-docs/libkmod-libkmod-loaded.html @@ -0,0 +1,367 @@ + + + + +libkmod-loaded: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-loaded

+

libkmod-loaded — currently loaded modules

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+int + +kmod_module_new_from_loaded () +
+int + +kmod_module_get_initstate () +
const char * + +kmod_module_initstate_str () +
+long + +kmod_module_get_size () +
+int + +kmod_module_get_refcnt () +
struct kmod_list * + +kmod_module_get_holders () +
+
+
+

Types and Values

+
++++ + + + + +
enumkmod_module_initstate
+
+
+

Description

+

Information about currently loaded modules, as reported by the kernel. +These information are not cached by libkmod and are always read from /sys +and /proc/modules.

+
+
+

Functions

+
+

kmod_module_new_from_loaded ()

+
int
+kmod_module_new_from_loaded (struct kmod_ctx *ctx,
+                             struct kmod_list **list);
+

Create a new list of kmod modules with all modules currently loaded in +kernel. It uses /proc/modules to get the names of loaded modules and to +create kmod modules by calling kmod_module_new_from_name() in each of them. +They are put in list + in no particular order.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. The returned list + must be released by +calling kmod_module_unref_list(). Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned list are +completed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

ctx

kmod library context

 

list

where to save the list of loaded modules

 
+
+
+

Returns

+

0 on success or < 0 on error.

+
+

Since: 1

+
+
+
+

kmod_module_get_initstate ()

+
int
+kmod_module_get_initstate (const struct kmod_module *mod);
+

Get the initstate of this mod +, as returned by the kernel, by reading +/sys filesystem.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

< 0 on error or module state if module is found in the kernel, valid +states are kmod_module_initstate.

+
+

Since: 1

+
+
+
+

kmod_module_initstate_str ()

+
const char *
+kmod_module_initstate_str (enum kmod_module_initstate state);
+

Translate a initstate to a string.

+
+

Parameters

+
+++++ + + + + + +

state

the state as returned by kmod_module_get_initstate()

 
+
+
+

Returns

+

the string associated to the state +. This string is statically +allocated, do not free it.

+
+

Since: 1

+
+
+
+

kmod_module_get_size ()

+
long
+kmod_module_get_size (const struct kmod_module *mod);
+

Get the size of this kmod module as returned by the kernel. If supported, +the size is read from the coresize attribute in /sys/module. For older +kernels, this falls back on /proc/modules and searches for the specified +module to get its size.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the size of this kmod module.

+
+

Since: 1

+
+
+
+

kmod_module_get_refcnt ()

+
int
+kmod_module_get_refcnt (const struct kmod_module *mod);
+

Get the ref count of this mod +, as returned by the kernel, by reading +/sys filesystem.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the reference count on success or < 0 on failure.

+
+

Since: 1

+
+
+
+

kmod_module_get_holders ()

+
struct kmod_list *
+kmod_module_get_holders (const struct kmod_module *mod);
+

Get a list of kmod modules that are holding this mod +, as returned by Linux +Kernel. After use, free the list + by calling kmod_module_unref_list().

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a new list of kmod modules on success or NULL on failure.

+
+

Since: 1

+
+
+
+

Types and Values

+
+

enum kmod_module_initstate

+

The module "live information" as reported by the kernel, see +kmod_module_get_initstate().

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

KMOD_MODULE_BUILTIN

+

module is builtin

+
 

KMOD_MODULE_LIVE

+

module is live in the kernel

+
 

KMOD_MODULE_COMING

+

module is being loaded

+
 

KMOD_MODULE_GOING

+

module is being unloaded

+
 

_KMOD_MODULE_PAD

+

DO NOT USE; padding to make sure enum is not mapped to char

+
 
+
+
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/libkmod-libkmod-module.html b/ci-test-docs/libkmod-libkmod-module.html new file mode 100644 index 0000000..0ac1b32 --- /dev/null +++ b/ci-test-docs/libkmod-libkmod-module.html @@ -0,0 +1,2179 @@ + + + + +libkmod-module: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-module

+

libkmod-module — operate on kernel modules

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+int + +kmod_module_new_from_lookup () +
+int + +kmod_module_new_from_name_lookup () +
+int + +kmod_module_new_from_name () +
+int + +kmod_module_new_from_path () +
struct kmod_module * + +kmod_module_ref () +
struct kmod_module * + +kmod_module_unref () +
+int + +kmod_module_unref_list () +
+int + +kmod_module_insert_module () +
+int + +kmod_module_probe_insert_module () +
+int + +kmod_module_remove_module () +
struct kmod_module * + +kmod_module_get_module () +
struct kmod_list * + +kmod_module_get_dependencies () +
+int + +kmod_module_get_softdeps () +
+int + +kmod_module_get_weakdeps () +
+int + +kmod_module_apply_filter () +
+int + +kmod_module_get_filtered_blacklist () +
const char * + +kmod_module_get_install_commands () +
const char * + +kmod_module_get_remove_commands () +
const char * + +kmod_module_get_name () +
const char * + +kmod_module_get_options () +
const char * + +kmod_module_get_path () +
+int + +kmod_module_get_dependency_symbols () +
+int + +kmod_module_dependency_symbol_get_bind () +
+uint64_t + +kmod_module_dependency_symbol_get_crc () +
const char * + +kmod_module_dependency_symbol_get_symbol () +
+void + +kmod_module_dependency_symbols_free_list () +
struct kmod_list * + +kmod_module_get_sections () +
unsigned long + +kmod_module_section_get_address () +
const char * + +kmod_module_section_get_name () +
+void + +kmod_module_section_free_list () +
+int + +kmod_module_get_symbols () +
+uint64_t + +kmod_module_symbol_get_crc () +
const char * + +kmod_module_symbol_get_symbol () +
+void + +kmod_module_symbols_free_list () +
+int + +kmod_module_get_versions () +
+uint64_t + +kmod_module_version_get_crc () +
const char * + +kmod_module_version_get_symbol () +
+void + +kmod_module_versions_free_list () +
+int + +kmod_module_get_info () +
const char * + +kmod_module_info_get_key () +
const char * + +kmod_module_info_get_value () +
+void + +kmod_module_info_free_list () +
+
+
+

Types and Values

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + +
structkmod_module
enumkmod_insert
enumkmod_probe
enumkmod_remove
enumkmod_filter
enumkmod_symbol_bind
+
+
+

Description

+

Wide range of function to operate on kernel modules - loading, unloading, +reference counting, retrieving a list of module dependencies and more.

+
+
+

Functions

+
+

kmod_module_new_from_lookup ()

+
int
+kmod_module_new_from_lookup (struct kmod_ctx *ctx,
+                             const char *given_alias,
+                             struct kmod_list **list);
+

Create a new list of kmod modules using an alias or module name and lookup +libkmod's configuration files and indexes in order to find the module. +Once it's found in one of the places, it stops searching and create the +list of modules that is saved in list +.

+

The search order is: 1. aliases in configuration file; 2. module names in +modules.dep index; 3. symbol aliases in modules.symbols index; 4. aliases +from install commands; 5. builtin indexes from kernel.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. The returned list + must be released by +calling kmod_module_unref_list(). Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned list are +completed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

given_alias

alias to look for

 

list

an empty list where to save the list of modules matching +given_alias +

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if any of the lookup +methods failed, which is basically due to memory allocation fail. If module +is not found, it still returns 0, but list +is an empty list.

+
+

Since: 1

+
+
+
+

kmod_module_new_from_name_lookup ()

+
int
+kmod_module_new_from_name_lookup (struct kmod_ctx *ctx,
+                                  const char *modname,
+                                  struct kmod_module **mod);
+

Lookup by module name, without considering possible aliases. This is similar +to kmod_module_new_from_lookup(), but don't consider as source indexes and +configurations that work with aliases. When successful, this always resolves +to one and only one module.

+

The search order is: 1. module names in modules.dep index;

+
  1. builtin indexes from kernel.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned list are +completed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

modname

module name to look for

 

mod

returned module on success

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if any of the lookup +methods failed, which is basically due to memory allocation failure. If +module is not found, it still returns 0, but mod +is left untouched.

+
+

Since: 30

+
+
+
+

kmod_module_new_from_name ()

+
int
+kmod_module_new_from_name (struct kmod_ctx *ctx,
+                           const char *name,
+                           struct kmod_module **mod);
+

Create a new struct kmod_module using the module name. name + can not be an +alias, file name or anything else; it must be a module name. There's no +check if the module exists in the system.

+

This function is also used internally by many others that return a new +struct kmod_module or a new list of modules.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned +kmod_module are done.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

name

name of the module

 

mod

where to save the created struct kmod_module

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if name is not a valid +module name or if memory allocation failed.

+
+

Since: 1

+
+
+
+

kmod_module_new_from_path ()

+
int
+kmod_module_new_from_path (struct kmod_ctx *ctx,
+                           const char *path,
+                           struct kmod_module **mod);
+

Create a new struct kmod_module using the module path. path + must be an +existent file within the filesystem and must be accessible to libkmod.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned +kmod_module are done.

+

If path + is relative, it's treated as relative to the current working +directory. Otherwise, give an absolute path.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

path

path where to find the given module

 

mod

where to save the created struct kmod_module

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if file does not exist, if +it's not a valid file for a kmod_module or if memory allocation failed.

+
+

Since: 1

+
+
+
+

kmod_module_ref ()

+
struct kmod_module *
+kmod_module_ref (struct kmod_module *mod);
+

Take a reference of the kmod module, incrementing its refcount.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the passed module +with its refcount incremented.

+
+

Since: 1

+
+
+
+

kmod_module_unref ()

+
struct kmod_module *
+kmod_module_unref (struct kmod_module *mod);
+

Drop a reference of the kmod module. If the refcount reaches zero, its +resources are released.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

NULL if mod +is NULL or if the module was released. Otherwise it +returns the passed mod +with its refcount decremented.

+
+

Since: 1

+
+
+
+

kmod_module_unref_list ()

+
int
+kmod_module_unref_list (struct kmod_list *list);
+

Drop a reference of each kmod module in list + and releases the resources +taken by the list itself.

+
+

Parameters

+
+++++ + + + + + +

list

list of kmod modules

 
+
+
+

Returns

+

0

+
+

Since: 1

+
+
+
+

kmod_module_insert_module ()

+
int
+kmod_module_insert_module (struct kmod_module *mod,
+                           unsigned int flags,
+                           const char *options);
+

Insert a module in the kernel. It opens the file pointed by mod +, +mmap'ing it and passing to kernel.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

mod

kmod module

 

flags

flags are not passed to the kernel, but instead they dictate the +behavior of this function, valid flags kmod_insert

 

options

module's options to pass to the kernel.

 
+
+
+

Returns

+

0 on success or < 0 on failure. If module is already loaded it +returns -EEXIST.

+
+

Since: 1

+
+
+
+

kmod_module_probe_insert_module ()

+
int
+kmod_module_probe_insert_module (struct kmod_module *mod,
+                                 unsigned int flags,
+                                 const char *extra_options,
+                                 int (*run_install) (struct kmod_module *m, const char *cmdline, void *data),
+                                 const void *data,
+                                 void (*print_action) (struct kmod_module *m, bool install, const char *options));
+

Insert a module in the kernel resolving dependencies, soft dependencies, +install commands and applying blacklist.

+

If run_install + is NULL, this function will fork and exec by calling +system(3). Don't pass a NULL argument in run_install + if your binary is +setuid/setgid (see warning in system(3)). If you need control over the +execution of an install command, give a callback function instead.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

mod

kmod module

 

flags

flags are not passed to the kernel, but instead they dictate the +behavior of this function, valid flags are kmod_probe

 

extra_options

module's options to pass to the kernel. It applies only +to mod +, not to its dependencies.

 

run_install

function to run when mod +is backed by an install command.

 

data

data to give back to run_install +callback

 

print_action

function to call with the action being taken (install or +insmod). It's useful for tools like modprobe when running with verbose +output or in dry-run mode.

 
+
+
+

Returns

+

0 on success, > 0 if stopped by a reason given in flags +or < 0 on +failure.

+
+

Since: 3

+
+
+
+

kmod_module_remove_module ()

+
int
+kmod_module_remove_module (struct kmod_module *mod,
+                           unsigned int flags);
+

Remove a module from the kernel.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

flags

flags used when removing the module, valid flags are kmod_remove

 
+
+
+

Returns

+

0 on success or < 0 on failure.

+
+

Since: 1

+
+
+
+

kmod_module_get_module ()

+
struct kmod_module *
+kmod_module_get_module (const struct kmod_list *entry);
+

Get the kmod module of this entry + in the list, increasing its refcount. +After it's used, unref it. Since the refcount is incremented upon return, +you still have to call kmod_module_unref_list() to release the list of kmod +modules.

+
+

Parameters

+
+++++ + + + + + +

entry

an entry in a list of kmod modules.

 
+
+
+

Returns

+

NULL on failure or the kmod_module contained in this list entry +with its refcount incremented.

+
+

Since: 1

+
+
+
+

kmod_module_get_dependencies ()

+
struct kmod_list *
+kmod_module_get_dependencies (const struct kmod_module *mod);
+

Search the modules.dep index to find the dependencies of the given mod +. +The result is cached in mod +, so subsequent calls to this function will +return the already searched list of modules.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

NULL on failure. Otherwise it returns a list of kmod modules +that can be released by calling kmod_module_unref_list().

+
+

Since: 1

+
+
+
+

kmod_module_get_softdeps ()

+
int
+kmod_module_get_softdeps (const struct kmod_module *mod,
+                          struct kmod_list **pre,
+                          struct kmod_list **post);
+

Get soft dependencies for this kmod module. Soft dependencies come +from configuration file and are not cached in mod + because it may include +dependency cycles that would make we leak kmod_module. Any call +to this function will search for this module in configuration, allocate a +list and return the result.

+

Both pre + and post + are newly created list of kmod_module and +should be unreferenced with kmod_module_unref_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

mod

kmod module

 

pre

where to save the list of preceding soft dependencies.

 

post

where to save the list of post soft dependencies.

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 2

+
+
+
+

kmod_module_get_weakdeps ()

+
int
+kmod_module_get_weakdeps (const struct kmod_module *mod,
+                          struct kmod_list **weak);
+

Get weak dependencies for this kmod module. Weak dependencies come +from configuration file and are not cached in mod + because it may include +dependency cycles that would make we leak kmod_module. Any call +to this function will search for this module in configuration, allocate a +list and return the result.

+

weak + is newly created list of kmod_module and +should be unreferenced with kmod_module_unref_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

weak

where to save the list of weak dependencies.

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 33

+
+
+
+

kmod_module_apply_filter ()

+
int
+kmod_module_apply_filter (const struct kmod_ctx *ctx,
+                          enum kmod_filter filter_type,
+                          const struct kmod_list *input,
+                          struct kmod_list **output);
+

Given a list input +, this function filter it out by the filter mask +and save it in output +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

filter_type

bitmask to filter modules out, valid types are kmod_filter

 

input

list of kmod_module to be filtered

 

output

where to save the new list

 
+
+
+

Returns

+

0 on success or < 0 otherwise. output +is saved with the updated +list.

+
+

Since: 6

+
+
+
+

kmod_module_get_filtered_blacklist ()

+
int
+kmod_module_get_filtered_blacklist (const struct kmod_ctx *ctx,
+                                    const struct kmod_list *input,
+                                    struct kmod_list **output);
+
+

kmod_module_get_filtered_blacklist has been deprecated since version 6 and should not be used in newly-written code.

+

Use kmod_module_apply_filter instead.

+
+

This function should not be used. Use kmod_module_apply_filter instead.

+

Given a list input +, this function filter it out with config's blacklist +and save it in output +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

input

list of kmod_module to be filtered with blacklist

 

output

where to save the new list

 
+
+
+

Returns

+

0 on success or < 0 otherwise. output +is saved with the updated +list.

+
+

Since: 1

+
+
+
+

kmod_module_get_install_commands ()

+
const char *
+kmod_module_get_install_commands (const struct kmod_module *mod);
+

Get install commands for this kmod module. Install commands come from the +configuration file and are cached in mod +. The first call to this function +will search for this module in configuration and subsequent calls return +the cached string. The install commands are returned as they were in the +configuration, concatenated by ';'. No other processing is made in this +string.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a string with all install commands separated by semicolons. This +string is owned by mod +, do not free it.

+
+

Since: 1

+
+
+
+

kmod_module_get_remove_commands ()

+
const char *
+kmod_module_get_remove_commands (const struct kmod_module *mod);
+

Get remove commands for this kmod module. Remove commands come from the +configuration file and are cached in mod +. The first call to this function +will search for this module in configuration and subsequent calls return +the cached string. The remove commands are returned as they were in the +configuration, concatenated by ';'. No other processing is made in this +string.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a string with all remove commands separated by semicolons. This +string is owned by mod +, do not free it.

+
+

Since: 1

+
+
+
+

kmod_module_get_name ()

+
const char *
+kmod_module_get_name (const struct kmod_module *mod);
+

Get the name of this kmod module. Name is always available, independently +if it was created by kmod_module_new_from_name() or another function and +it's always normalized (dashes are replaced with underscores).

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the name of this kmod module.

+
+

Since: 1

+
+
+
+

kmod_module_get_options ()

+
const char *
+kmod_module_get_options (const struct kmod_module *mod);
+

Get options of this kmod module. Options come from the configuration file +and are cached in mod +. The first call to this function will search for +this module in configuration and subsequent calls return the cached string.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a string with all the options separated by spaces. This string is +owned by mod +, do not free it.

+
+

Since: 1

+
+
+
+

kmod_module_get_path ()

+
const char *
+kmod_module_get_path (const struct kmod_module *mod);
+

Get the path of this kmod module. If this kmod module was not created by +path, it can search the modules.dep index in order to find out the module +under context's dirname.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the path of this kmod module or NULL if such information is not +available.

+
+

Since: 1

+
+
+
+

kmod_module_get_dependency_symbols ()

+
int
+kmod_module_get_dependency_symbols (const struct kmod_module *mod,
+                                    struct kmod_list **list);
+

Get a list of entries in ELF section ".symtab" or "__ksymtab_strings".

+

The structure contained in this list is internal to libkmod and its fields +can be obtainsed by calling kmod_module_dependency_symbol_get_crc() and +kmod_module_dependency_symbol_get_symbol().

+

After use, free the list + by calling +kmod_module_dependency_symbols_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module dependency_symbols

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 3

+
+
+
+

kmod_module_dependency_symbol_get_bind ()

+
int
+kmod_module_dependency_symbol_get_bind
+                               (const struct kmod_list *entry);
+

Get the bind type of a kmod module dependency_symbol.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module dependency_symbol

 
+
+
+

Returns

+

the bind of this kmod module dependency_symbol on success, +or < 0 on failure. Valid bind types are kmod_symbol_bind.

+
+

Since: 3

+
+
+
+

kmod_module_dependency_symbol_get_crc ()

+
uint64_t
+kmod_module_dependency_symbol_get_crc (const struct kmod_list *entry);
+

Get the crc of a kmod module dependency_symbol.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module dependency_symbol

 
+
+
+

Returns

+

the crc of this kmod module dependency_symbol if available, otherwise default to 0.

+
+

Since: 3

+
+
+
+

kmod_module_dependency_symbol_get_symbol ()

+
const char *
+kmod_module_dependency_symbol_get_symbol
+                               (const struct kmod_list *entry);
+

Get the dependency symbol of a kmod module

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module dependency_symbols

 
+
+
+

Returns

+

the symbol of this kmod module dependency_symbols on success or NULL +on failure. The string is owned by the dependency_symbols, do not free it.

+
+

Since: 3

+
+
+
+

kmod_module_dependency_symbols_free_list ()

+
void
+kmod_module_dependency_symbols_free_list
+                               (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module dependency_symbols list

 
+
+

Since: 3

+
+
+
+

kmod_module_get_sections ()

+
struct kmod_list *
+kmod_module_get_sections (const struct kmod_module *mod);
+

Get a list of kmod sections of this mod +, as returned by the kernel.

+

The structure contained in this list is internal to libkmod and its fields +can be obtained by calling kmod_module_section_get_name() and +kmod_module_section_get_address().

+

After use, free the list + by calling kmod_module_section_free_list().

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a new list of kmod module sections on success or NULL on failure.

+
+

Since: 1

+
+
+
+

kmod_module_section_get_address ()

+
unsigned long
+kmod_module_section_get_address (const struct kmod_list *entry);
+

Get the address of a kmod module section.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module section

 
+
+
+

Returns

+

the address of this kmod module section on success or ULONG_MAX +on failure.

+
+

Since: 1

+
+
+
+

kmod_module_section_get_name ()

+
const char *
+kmod_module_section_get_name (const struct kmod_list *entry);
+

Get the name of a kmod module section.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module section

 
+
+
+

Returns

+

the name of this kmod module section on success or NULL on +failure. The string is owned by the section, do not free it.

+
+

Since: 1

+
+
+
+

kmod_module_section_free_list ()

+
void
+kmod_module_section_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module section list

 
+
+

Since: 1

+
+
+
+

kmod_module_get_symbols ()

+
int
+kmod_module_get_symbols (const struct kmod_module *mod,
+                         struct kmod_list **list);
+

Get a list of entries in ELF section ".symtab" or "__ksymtab_strings".

+

The structure contained in this list is internal to libkmod and its fields +can be obtainsed by calling kmod_module_symbol_get_crc() and +kmod_module_symbol_get_symbol().

+

After use, free the list + by calling kmod_module_symbols_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module symbols

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 3

+
+
+
+

kmod_module_symbol_get_crc ()

+
uint64_t
+kmod_module_symbol_get_crc (const struct kmod_list *entry);
+

Get the crc of a kmod module symbol.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module symbol

 
+
+
+

Returns

+

the crc of this kmod module symbol if available, otherwise default to 0.

+
+

Since: 3

+
+
+
+

kmod_module_symbol_get_symbol ()

+
const char *
+kmod_module_symbol_get_symbol (const struct kmod_list *entry);
+

Get the symbol of a kmod module symbols.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module symbols

 
+
+
+

Returns

+

the symbol of this kmod module symbols on success or NULL +on failure. The string is owned by the symbols, do not free it.

+
+

Since: 3

+
+
+
+

kmod_module_symbols_free_list ()

+
void
+kmod_module_symbols_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module symbols list

 
+
+

Since: 3

+
+
+
+

kmod_module_get_versions ()

+
int
+kmod_module_get_versions (const struct kmod_module *mod,
+                          struct kmod_list **list);
+

Get a list of entries in ELF section "__versions".

+

The structure contained in this list is internal to libkmod and its fields +can be obtainsed by calling kmod_module_version_get_crc() and +kmod_module_version_get_symbol().

+

After use, free the list + by calling kmod_module_versions_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module versions

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 2

+
+
+
+

kmod_module_version_get_crc ()

+
uint64_t
+kmod_module_version_get_crc (const struct kmod_list *entry);
+

Get the crc of a kmod module version.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module version

 
+
+
+

Returns

+

the crc of this kmod module version if available, otherwise default to 0.

+
+

Since: 2

+
+
+
+

kmod_module_version_get_symbol ()

+
const char *
+kmod_module_version_get_symbol (const struct kmod_list *entry);
+

Get the symbol of a kmod module versions.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module versions

 
+
+
+

Returns

+

the symbol of this kmod module versions on success or NULL +on failure. The string is owned by the versions, do not free it.

+
+

Since: 2

+
+
+
+

kmod_module_versions_free_list ()

+
void
+kmod_module_versions_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module versions list

 
+
+

Since: 2

+
+
+
+

kmod_module_get_info ()

+
int
+kmod_module_get_info (const struct kmod_module *mod,
+                      struct kmod_list **list);
+

Get a list of entries in ELF section ".modinfo", these contain +alias, license, depends, vermagic and other keys with respective +values. If the module is signed (CONFIG_MODULE_SIG), information +about the module signature is included as well: signer, +sig_key and sig_hashalgo.

+

The structure contained in this list is internal to libkmod and its fields +can be obtainsed by calling kmod_module_info_get_key() and +kmod_module_info_get_value().

+

After use, free the list + by calling kmod_module_info_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module information

 
+
+
+

Returns

+

number of entries in list +on success or < 0 otherwise.

+
+

Since: 2

+
+
+
+

kmod_module_info_get_key ()

+
const char *
+kmod_module_info_get_key (const struct kmod_list *entry);
+

Get the key of a kmod module info.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module info

 
+
+
+

Returns

+

the key of this kmod module info on success or NULL on +failure. The string is owned by the info, do not free it.

+
+

Since: 2

+
+
+
+

kmod_module_info_get_value ()

+
const char *
+kmod_module_info_get_value (const struct kmod_list *entry);
+

Get the value of a kmod module info.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module info

 
+
+
+

Returns

+

the value of this kmod module info on success or NULL on +failure. The string is owned by the info, do not free it.

+
+

Since: 2

+
+
+
+

kmod_module_info_free_list ()

+
void
+kmod_module_info_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module info list

 
+
+

Since: 2

+
+
+
+

Types and Values

+
+

struct kmod_module

+
struct kmod_module;
+

Opaque object representing a module.

+
+
+
+

enum kmod_insert

+

Insertion flags, used by kmod_module_insert_module().

+
+

Members

+
+++++ + + + + + + + + + + + + +

KMOD_INSERT_FORCE_VERMAGIC

+

ignore kernel version magic

+
 

KMOD_INSERT_FORCE_MODVERSION

+

ignore symbol version hashes

+
 
+
+
+
+
+

enum kmod_probe

+

Bitmask which defines the behaviour of kmod_module_probe_insert_module().

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

KMOD_PROBE_FORCE_VERMAGIC

+

ignore kernel version magic

+
 

KMOD_PROBE_FORCE_MODVERSION

+

ignore symbol version hashes

+
 

KMOD_PROBE_IGNORE_COMMAND

+

ignore install commands and softdeps configured +in the system

+
 

KMOD_PROBE_IGNORE_LOADED

+

do not check whether the module is already +live in the kernel or not

+
 

KMOD_PROBE_DRY_RUN

+

dry run, do not insert module, just call the +associated callback function

+
 

KMOD_PROBE_FAIL_ON_LOADED

+

probe will fail if KMOD_PROBE_IGNORE_LOADED is +not specified and the module is already live in the kernel

+
 

KMOD_PROBE_APPLY_BLACKLIST_ALL

+

prior to probe, apply KMOD_FILTER_BLACKLIST +filter to this module and its dependencies. If any of them are blacklisted +and the blacklisted module is not live in the kernel, the function returns +early with thus enum

+
 

KMOD_PROBE_APPLY_BLACKLIST

+

probe will return early with this enum, if the +module is blacklisted

+
 

KMOD_PROBE_APPLY_BLACKLIST_ALIAS_ONLY

+

probe will return early with this +enum, if the module is an alias and is blacklisted

+
 
+
+
+
+
+

enum kmod_remove

+

Removal flags, used by kmod_module_remove_module().

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + +

KMOD_REMOVE_FORCE

+

force remove module regardless if it's still in +use by a kernel subsystem or other process; passed directly to the kernel

+
 

KMOD_REMOVE_NOWAIT

+

always set, pass O_NONBLOCK to delete_module(2); +passed directly to the kernel

+
 

KMOD_REMOVE_NOLOG

+

when module removal fails, do not log anything; not +passed to the kernel

+
 
+
+
+
+
+

enum kmod_filter

+

Bitmask defining what gets filtered out, used by kmod_module_apply_filter().

+
+

Members

+
+++++ + + + + + + + + + + + + +

KMOD_FILTER_BLACKLIST

+

filter modules in blacklist out

+
 

KMOD_FILTER_BUILTIN

+

filter builtin modules out

+
 
+
+
+
+
+

enum kmod_symbol_bind

+

The symbol bind type, see kmod_module_dependency_symbol_get_bind().

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

KMOD_SYMBOL_NONE

+

no or unknown symbol type

+
 

KMOD_SYMBOL_LOCAL

+

local symbol, accessible only within the module

+
 

KMOD_SYMBOL_GLOBAL

+

global symbol, accessible by all modules

+
 

KMOD_SYMBOL_WEAK

+

weak symbol, a lower precedence global symbols

+
 

KMOD_SYMBOL_UNDEF

+

undefined or not yet resolved symbol

+
 
+
+
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/libkmod-libkmod.html b/ci-test-docs/libkmod-libkmod.html new file mode 100644 index 0000000..56b505d --- /dev/null +++ b/ci-test-docs/libkmod-libkmod.html @@ -0,0 +1,711 @@ + + + + +libkmod: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod

+

libkmod — libkmod context

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
struct kmod_ctx * + +kmod_new () +
struct kmod_ctx * + +kmod_ref () +
struct kmod_ctx * + +kmod_unref () +
+int + +kmod_load_resources () +
+void + +kmod_unload_resources () +
+int + +kmod_validate_resources () +
+int + +kmod_dump_index () +
+void + +kmod_set_log_priority () +
+int + +kmod_get_log_priority () +
+void + +kmod_set_log_fn () +
+void * + +kmod_get_userdata () +
+void + +kmod_set_userdata () +
const char * + +kmod_get_dirname () +
+
+
+

Types and Values

+
++++ + + + + + + + + + + + + + + +
structkmod_ctx
enumkmod_resources
enumkmod_index
+
+
+

Description

+

The context contains the default values for the library user, +and is passed to all library operations.

+
+
+

Functions

+
+

kmod_new ()

+
struct kmod_ctx *
+kmod_new (const char *dirname,
+          const char *const *config_paths);
+

Create kmod library context. This reads the kmod configuration +and fills in the default values.

+

The initial refcount is 1, and needs to be decremented to +release the resources of the kmod library context.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

dirname

what to consider as linux module's directory, if NULL +defaults to $MODULE_DIRECTORY/uname -r. If it's relative, +it's treated as relative to the current working directory. +Otherwise, give an absolute dirname.

 

config_paths

ordered array of paths (directories or files) where +to load from user-defined configuration parameters such as +alias, blacklists, commands (install, remove). If NULL +defaults to /etc/modprobe.d, /run/modprobe.d, +/usr/local/lib/modprobe.d, DISTCONFDIR/modprobe.d, and +/lib/modprobe.d. Give an empty vector if configuration should +not be read. This array must be null terminated.

 
+
+
+

Returns

+

a new kmod library context

+
+

Since: 1

+
+
+
+

kmod_ref ()

+
struct kmod_ctx *
+kmod_ref (struct kmod_ctx *ctx);
+

Take a reference of the kmod library context.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the passed kmod library context

+
+

Since: 1

+
+
+
+

kmod_unref ()

+
struct kmod_ctx *
+kmod_unref (struct kmod_ctx *ctx);
+

Drop a reference of the kmod library context. If the refcount +reaches zero, the resources of the context will be released.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the passed kmod library context or NULL if it's freed

+
+

Since: 1

+
+
+
+

kmod_load_resources ()

+
int
+kmod_load_resources (struct kmod_ctx *ctx);
+

Load indexes and keep them open in ctx +. This way it's faster to lookup +information within the indexes. If this function is not called before a +search, the necessary index is always opened and closed.

+

If user will do more than one or two lookups, insertions, deletions, most +likely it's good to call this function first. Particularly in a daemon like +udev that on boot issues hundreds of calls to lookup the index, calling +this function will speedup the searches.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 1

+
+
+
+

kmod_unload_resources ()

+
void
+kmod_unload_resources (struct kmod_ctx *ctx);
+

Unload all the indexes. This will free the resources to maintain the index +open and all subsequent searches will need to open and close the index.

+

User is free to call kmod_load_resources() and kmod_unload_resources() as +many times as wanted during the lifecycle of ctx +. For example, if a daemon +knows that when starting up it will lookup a lot of modules, it could call +kmod_load_resources() and after the first burst of searches is gone, it +could free the resources by calling kmod_unload_resources().

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 1

+
+
+
+

kmod_validate_resources ()

+
int
+kmod_validate_resources (struct kmod_ctx *ctx);
+

Check if indexes and configuration files changed on disk and the current +context is not valid anymore.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the resources state, valid states are kmod_resources.

+
+

Since: 3

+
+
+
+

kmod_dump_index ()

+
int
+kmod_dump_index (struct kmod_ctx *ctx,
+                 enum kmod_index type,
+                 int fd);
+

Dump index to file descriptor. Note that this function doesn't use stdio.h +so call fflush() before calling this function to be sure data is written in +order.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

type

index to dump, valid indexes are kmod_index

 

fd

file descriptor to dump index to

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 4

+
+
+
+

kmod_set_log_priority ()

+
void
+kmod_set_log_priority (struct kmod_ctx *ctx,
+                       int priority);
+

Set the current logging priority, as defined in syslog.h(0P). The value +controls which messages are logged.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

ctx

kmod library context

 

priority

the new logging priority

 
+
+

Since: 1

+
+
+
+

kmod_get_log_priority ()

+
int
+kmod_get_log_priority (const struct kmod_ctx *ctx);
+

Get the current logging priority, as defined in syslog.h(0P).

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the current logging priority

+
+

Since: 1

+
+
+
+

kmod_set_log_fn ()

+
void
+kmod_set_log_fn (struct kmod_ctx *ctx,
+                 void (*log_fn) (void *log_data, int priority, const char *file, int line, const char *fn, const char *format, va_list args),
+                 const void *data);
+

The built-in logging writes to stderr. It can be +overridden by a custom function, to plug log messages +into the user's logging functionality.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

log_fn

function to be called for logging messages

 

data

data to pass to log function

 
+
+

Since: 1

+
+
+
+

kmod_get_userdata ()

+
void *
+kmod_get_userdata (const struct kmod_ctx *ctx);
+

Retrieve stored data pointer from library context. This might be useful +to access from callbacks.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

stored userdata

+
+

Since: 1

+
+
+
+

kmod_set_userdata ()

+
void
+kmod_set_userdata (struct kmod_ctx *ctx,
+                   const void *userdata);
+

Store custom userdata + in the library context.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

ctx

kmod library context

 

userdata

data pointer

 
+
+

Since: 1

+
+
+
+

kmod_get_dirname ()

+
const char *
+kmod_get_dirname (const struct kmod_ctx *ctx);
+

Retrieve the absolute path used for linux modules in this context. The path +is computed from the arguments to kmod_new().

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+

Since: 22

+
+
+
+

Types and Values

+
+

struct kmod_ctx

+
struct kmod_ctx;
+

Opaque object representing the library context.

+
+
+
+

enum kmod_resources

+

The validity state of the current libkmod resources, returned by +kmod_validate_resources().

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + +

KMOD_RESOURCES_OK

+

resources are valid

+
 

KMOD_RESOURCES_MUST_RELOAD

+

resources are not valid; to resolve call +kmod_unload_resources() and kmod_load_resources()

+
 

KMOD_RESOURCES_MUST_RECREATE

+

resources are not valid; to resolve ctx + must +be re-created.

+
 
+
+
+
+
+

enum kmod_index

+

The (module) index type, used by kmod_dump_index().

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

KMOD_INDEX_MODULES_DEP

+

index of module dependencies

+
 

KMOD_INDEX_MODULES_ALIAS

+

index of module aliases

+
 

KMOD_INDEX_MODULES_SYMBOL

+

index of symbol aliases

+
 

KMOD_INDEX_MODULES_BUILTIN_ALIAS

+

index of builtin module aliases

+
 

KMOD_INDEX_MODULES_BUILTIN

+

index of builtin module

+
 

_KMOD_INDEX_PAD

+

DO NOT USE; padding to make sure enum is not mapped to char

+
 
+
+
+
+
+ + + \ No newline at end of file diff --git a/ci-test-docs/right-insensitive.png b/ci-test-docs/right-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..a3696bf9999998d124ad602a1971bf828a673ce4 GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`8$4YcLn>}1OVlLX-&gy;@yCaI zd#jh8G-6osQR>PB_TS&%Ust%mdKI;Vst06>gghyVZp literal 0 HcmV?d00001 diff --git a/ci-test-docs/right.png b/ci-test-docs/right.png new file mode 100644 index 0000000000000000000000000000000000000000..73d25da4c7a8a995fc6740b1ec0f9ccc733a72a5 GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`^`0({Ar-f-o>Am+EEGAKC_USE zi{~l@?MZPaks&XA*DsPY*}KnWzCve{@1~iR>(+1o?f+++{=CaSPBwMfxz6R# dt +{ + padding-top: 0.25em; + padding-bottom: 0.25em; + font-weight: bold; +} + +dl.toc > dl +{ + padding-bottom: 0.5em; +} + +.parameter +{ + font-style: normal; +} + +.footer +{ + padding-top: 3.5em; + /* tango:aluminium 3 */ + color: #babdb6; + text-align: center; + font-size: 80%; +} + +.informalfigure, +.figure +{ + margin: 1em; +} + +.informalexample, +.example +{ + margin-top: 1em; + margin-bottom: 1em; +} + +.warning +{ + /* tango:orange 0/1 */ + background: #ffeed9; + background: rgba(252, 175, 62, 0.1); + border-color: #ffb04f; + border-color: rgba(252, 175, 62, 0.2); +} +.note +{ + /* tango:chameleon 0/0.5 */ + background: #d8ffb2; + background: rgba(138, 226, 52, 0.1); + border-color: #abf562; + border-color: rgba(138, 226, 52, 0.2); +} +div.blockquote +{ + border-color: #eeeeec; +} +.note, .warning, div.blockquote +{ + padding: 0.5em; + border-width: 1px; + border-style: solid; + margin: 2em; +} +.note p, .warning p +{ + margin: 0; +} + +div.warning h3.title, +div.note h3.title +{ + display: none; +} + +p + div.section +{ + margin-top: 1em; +} + +div.refnamediv, +div.refsynopsisdiv, +div.refsect1, +div.refsect2, +div.toc, +div.section +{ + margin-bottom: 1em; +} + +/* blob links */ +h2 .extralinks, h3 .extralinks +{ + float: right; + /* tango:aluminium 3 */ + color: #babdb6; + font-size: 80%; + font-weight: normal; +} + +.lineart +{ + color: #d3d7cf; + font-weight: normal; +} + +.annotation +{ + /* tango:aluminium 5 */ + color: #555753; + font-weight: normal; +} + +.structfield +{ + font-style: normal; + font-weight: normal; +} + +acronym,abbr +{ + border-bottom: 1px dotted gray; +} + +.listing_frame { + /* tango:sky blue 1 */ + border: solid 1px #729fcf; + border: solid 1px rgba(114, 159, 207, 0.2); + padding: 0px; +} + +.listing_lines, .listing_code { + margin-top: 0px; + margin-bottom: 0px; + padding: 0.5em; +} +.listing_lines { + /* tango:sky blue 0.5 */ + background: #a6c5e3; + background: rgba(114, 159, 207, 0.2); + /* tango:aluminium 6 */ + color: #2e3436; +} +.listing_code { + /* tango:sky blue 0 */ + background: #e6f3ff; + background: rgba(114, 159, 207, 0.1); +} +.listing_code .programlisting { + /* override from previous */ + border: none 0px; + padding: 0px; + background: none; +} +.listing_lines pre, .listing_code pre { + margin: 0px; +} + +@media screen { + /* these have a as a first child, but since there are no parent selectors + * we can't use that. */ + a.footnote + { + position: relative; + top: 0em ! important; + } + /* this is needed so that the local anchors are displayed below the naviagtion */ + div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] + { + display: inline-block; + position: relative; + top:-5em; + } + /* this seems to be a bug in the xsl style sheets when generating indexes */ + div.index div.index + { + top: 0em; + } + /* make space for the fixed navigation bar and add space at the bottom so that + * link targets appear somewhat close to top + */ + body + { + padding-top: 2.5em; + padding-bottom: 500px; + max-width: 60em; + } + p + { + max-width: 60em; + } + /* style and size the navigation bar */ + table.navigation#top + { + position: fixed; + background: #e2e2e2; + border-bottom: solid 1px #babdb6; + border-spacing: 5px; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + z-index: 10; + } + table.navigation#top td + { + padding-left: 6px; + padding-right: 6px; + } + .navigation a, .navigation a:visited + { + /* tango:sky blue 3 */ + color: #204a87; + } + .navigation a:hover + { + /* tango:sky blue 2 */ + color: #3465a4; + } + td.shortcuts + { + /* tango:sky blue 2 */ + color: #3465a4; + font-size: 80%; + white-space: nowrap; + } + td.shortcuts .dim + { + color: #babdb6; + } + .navigation .title + { + font-size: 80%; + max-width: none; + margin: 0px; + font-weight: normal; + } +} +@media screen and (min-width: 60em) { + /* screen larger than 60em */ + body { margin: auto; } +} +@media screen and (max-width: 60em) { + /* screen less than 60em */ + #nav_hierarchy { display: none; } + #nav_interfaces { display: none; } + #nav_prerequisites { display: none; } + #nav_derived_interfaces { display: none; } + #nav_implementations { display: none; } + #nav_child_properties { display: none; } + #nav_style_properties { display: none; } + #nav_index { display: none; } + #nav_glossary { display: none; } + .gallery_image { display: none; } + .property_flags { display: none; } + .signal_flags { display: none; } + .parameter_annotations { display: none; } + .enum_member_annotations { display: none; } + .struct_member_annotations { display: none; } + .union_member_annotations { display: none; } + /* now that a column is hidden, optimize space */ + col.parameters_name { width: auto; } + col.parameters_description { width: auto; } + col.struct_members_name { width: auto; } + col.struct_members_description { width: auto; } + col.enum_members_name { width: auto; } + col.enum_members_description { width: auto; } + col.union_members_name { width: auto; } + col.union_members_description { width: auto; } + .listing_lines { display: none; } +} +@media print { + table.navigation { + visibility: collapse; + display: none; + } + div.titlepage table.navigation { + visibility: visible; + display: table; + background: #e2e2e2; + border: solid 1px #babdb6; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + height: 3em; + } +} + +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.hll { background-color: #ffffcc } +.c { color: #3D7B7B; font-style: italic } /* Comment */ +.err { border: 1px solid #FF0000 } /* Error */ +.k { color: #008000; font-weight: bold } /* Keyword */ +.o { color: #666666 } /* Operator */ +.ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.cp { color: #9C6500 } /* Comment.Preproc */ +.cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ +.gd { color: #A00000 } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.gr { color: #E40000 } /* Generic.Error */ +.gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.gi { color: #008400 } /* Generic.Inserted */ +.go { color: #717171 } /* Generic.Output */ +.gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.gt { color: #0044DD } /* Generic.Traceback */ +.kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.kp { color: #008000 } /* Keyword.Pseudo */ +.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.kt { color: #B00040 } /* Keyword.Type */ +.m { color: #666666 } /* Literal.Number */ +.s { color: #BA2121 } /* Literal.String */ +.na { color: #687822 } /* Name.Attribute */ +.nb { color: #008000 } /* Name.Builtin */ +.nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.no { color: #880000 } /* Name.Constant */ +.nd { color: #AA22FF } /* Name.Decorator */ +.ni { color: #717171; font-weight: bold } /* Name.Entity */ +.ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ +.nf { color: #0000FF } /* Name.Function */ +.nl { color: #767600 } /* Name.Label */ +.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.nt { color: #008000; font-weight: bold } /* Name.Tag */ +.nv { color: #19177C } /* Name.Variable */ +.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.w { color: #bbbbbb } /* Text.Whitespace */ +.mb { color: #666666 } /* Literal.Number.Bin */ +.mf { color: #666666 } /* Literal.Number.Float */ +.mh { color: #666666 } /* Literal.Number.Hex */ +.mi { color: #666666 } /* Literal.Number.Integer */ +.mo { color: #666666 } /* Literal.Number.Oct */ +.sa { color: #BA2121 } /* Literal.String.Affix */ +.sb { color: #BA2121 } /* Literal.String.Backtick */ +.sc { color: #BA2121 } /* Literal.String.Char */ +.dl { color: #BA2121 } /* Literal.String.Delimiter */ +.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.s2 { color: #BA2121 } /* Literal.String.Double */ +.se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ +.sh { color: #BA2121 } /* Literal.String.Heredoc */ +.si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ +.sx { color: #008000 } /* Literal.String.Other */ +.sr { color: #A45A77 } /* Literal.String.Regex */ +.s1 { color: #BA2121 } /* Literal.String.Single */ +.ss { color: #19177C } /* Literal.String.Symbol */ +.bp { color: #008000 } /* Name.Builtin.Pseudo */ +.fm { color: #0000FF } /* Name.Function.Magic */ +.vc { color: #19177C } /* Name.Variable.Class */ +.vg { color: #19177C } /* Name.Variable.Global */ +.vi { color: #19177C } /* Name.Variable.Instance */ +.vm { color: #19177C } /* Name.Variable.Magic */ +.il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/ci-test-docs/up-insensitive.png b/ci-test-docs/up-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..674be9c5b92e44f8224634b50cd8ef04e2b47965 GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}LV!<*E0F&G|Npja+xG9@fB5iW zAbAiB_UzfS7Yz38+XoaxBY|9q2wV!N79xm7MyD@P1KJ^9666=mz{t)asGw-*>YJID z-_+dIy3{)E6>EaktaciyDWkwf6fjbiE$1m4UUH<&P zj{B93eeJsUnRlC(Z{7MzERTDS`$l1NN%cj>n&QYTlpA`rG>i%w8-!bzAJv!TDix kH##3#t@Lf*+omYmdKI;Vst0316<&;S4c literal 0 HcmV?d00001 From c3cb612e7db300b83ff06bd7afee25c650ff2cfd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:31:48 +0000 Subject: [PATCH 6/9] Auto-add master docs for commit 7fe9be0046247ab1c38eb80d3887eacf94c70c79 --- master/api-index-full.html | 422 ++++++ master/api-index-v1.html | 200 +++ master/api-index-v2.html | 73 + master/api-index-v22.html | 34 + master/api-index-v3.html | 77 + master/api-index-v30.html | 34 + master/api-index-v33.html | 40 + master/api-index-v4.html | 77 + master/api-index-v6.html | 34 + master/ch01.html | 46 + master/deprecated-api-index.html | 34 + master/home.png | Bin 0 -> 169 bytes master/index.html | 56 + master/left-insensitive.png | Bin 0 -> 334 bytes master/left.png | Bin 0 -> 185 bytes master/libkmod-3.devhelp2 | 148 ++ master/libkmod-libkmod-config.html | 489 +++++++ master/libkmod-libkmod-list.html | 287 ++++ master/libkmod-libkmod-loaded.html | 367 +++++ master/libkmod-libkmod-module.html | 2179 ++++++++++++++++++++++++++++ master/libkmod-libkmod.html | 711 +++++++++ master/right-insensitive.png | Bin 0 -> 233 bytes master/right.png | Bin 0 -> 184 bytes master/style.css | 531 +++++++ master/up-insensitive.png | Bin 0 -> 288 bytes master/up.png | Bin 0 -> 186 bytes 26 files changed, 5839 insertions(+) create mode 100644 master/api-index-full.html create mode 100644 master/api-index-v1.html create mode 100644 master/api-index-v2.html create mode 100644 master/api-index-v22.html create mode 100644 master/api-index-v3.html create mode 100644 master/api-index-v30.html create mode 100644 master/api-index-v33.html create mode 100644 master/api-index-v4.html create mode 100644 master/api-index-v6.html create mode 100644 master/ch01.html create mode 100644 master/deprecated-api-index.html create mode 100644 master/home.png create mode 100644 master/index.html create mode 100644 master/left-insensitive.png create mode 100644 master/left.png create mode 100644 master/libkmod-3.devhelp2 create mode 100644 master/libkmod-libkmod-config.html create mode 100644 master/libkmod-libkmod-list.html create mode 100644 master/libkmod-libkmod-loaded.html create mode 100644 master/libkmod-libkmod-module.html create mode 100644 master/libkmod-libkmod.html create mode 100644 master/right-insensitive.png create mode 100644 master/right.png create mode 100644 master/style.css create mode 100644 master/up-insensitive.png create mode 100644 master/up.png diff --git a/master/api-index-full.html b/master/api-index-full.html new file mode 100644 index 0000000..81a1cb4 --- /dev/null +++ b/master/api-index-full.html @@ -0,0 +1,422 @@ + + + + +API Index: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+API Index

+

C

+
+kmod_config_get_aliases, function in libkmod-config +
+
+
+kmod_config_get_blacklists, function in libkmod-config +
+
+
+kmod_config_get_install_commands, function in libkmod-config +
+
+
+kmod_config_get_options, function in libkmod-config +
+
+
+kmod_config_get_remove_commands, function in libkmod-config +
+
+
+kmod_config_get_softdeps, function in libkmod-config +
+
+
+kmod_config_get_weakdeps, function in libkmod-config +
+
+
+kmod_config_iter, struct in libkmod-config +
+
+
+kmod_config_iter_free_iter, function in libkmod-config +
+
+
+kmod_config_iter_get_key, function in libkmod-config +
+
+
+kmod_config_iter_get_value, function in libkmod-config +
+
+
+kmod_config_iter_next, function in libkmod-config +
+
+
+kmod_ctx, struct in libkmod +
+
+

D

+
+kmod_dump_index, function in libkmod +
+
+

F

+
+kmod_filter, enum in libkmod-module +
+
+

G

+
+kmod_get_dirname, function in libkmod +
+
+
+kmod_get_log_priority, function in libkmod +
+
+
+kmod_get_userdata, function in libkmod +
+
+

I

+
+kmod_index, enum in libkmod +
+
+
+kmod_insert, enum in libkmod-module +
+
+

L

+
+kmod_list, struct in libkmod-list +
+
+
+kmod_list_foreach, macro in libkmod-list +
+
+
+kmod_list_foreach_reverse, macro in libkmod-list +
+
+
+kmod_list_last, function in libkmod-list +
+
+
+kmod_list_next, function in libkmod-list +
+
+
+kmod_list_prev, function in libkmod-list +
+
+
+kmod_load_resources, function in libkmod +
+
+

M

+
+kmod_module, struct in libkmod-module +
+
+
+kmod_module_apply_filter, function in libkmod-module +
+
+
+kmod_module_dependency_symbols_free_list, function in libkmod-module +
+
+
+kmod_module_dependency_symbol_get_bind, function in libkmod-module +
+
+
+kmod_module_dependency_symbol_get_crc, function in libkmod-module +
+
+
+kmod_module_dependency_symbol_get_symbol, function in libkmod-module +
+
+
+kmod_module_get_dependencies, function in libkmod-module +
+
+
+kmod_module_get_dependency_symbols, function in libkmod-module +
+
+
+kmod_module_get_filtered_blacklist, function in libkmod-module +
+
+
+kmod_module_get_holders, function in libkmod-loaded +
+
+
+kmod_module_get_info, function in libkmod-module +
+
+
+kmod_module_get_initstate, function in libkmod-loaded +
+
+
+kmod_module_get_install_commands, function in libkmod-module +
+
+
+kmod_module_get_module, function in libkmod-module +
+
+
+kmod_module_get_name, function in libkmod-module +
+
+
+kmod_module_get_options, function in libkmod-module +
+
+
+kmod_module_get_path, function in libkmod-module +
+
+
+kmod_module_get_refcnt, function in libkmod-loaded +
+
+
+kmod_module_get_remove_commands, function in libkmod-module +
+
+
+kmod_module_get_sections, function in libkmod-module +
+
+
+kmod_module_get_size, function in libkmod-loaded +
+
+
+kmod_module_get_softdeps, function in libkmod-module +
+
+
+kmod_module_get_symbols, function in libkmod-module +
+
+
+kmod_module_get_versions, function in libkmod-module +
+
+
+kmod_module_get_weakdeps, function in libkmod-module +
+
+
+kmod_module_info_free_list, function in libkmod-module +
+
+
+kmod_module_info_get_key, function in libkmod-module +
+
+
+kmod_module_info_get_value, function in libkmod-module +
+
+
+kmod_module_initstate, enum in libkmod-loaded +
+
+
+kmod_module_initstate_str, function in libkmod-loaded +
+
+
+kmod_module_insert_module, function in libkmod-module +
+
+
+kmod_module_new_from_loaded, function in libkmod-loaded +
+
+
+kmod_module_new_from_lookup, function in libkmod-module +
+
+
+kmod_module_new_from_name, function in libkmod-module +
+
+
+kmod_module_new_from_name_lookup, function in libkmod-module +
+
+
+kmod_module_new_from_path, function in libkmod-module +
+
+
+kmod_module_probe_insert_module, function in libkmod-module +
+
+
+kmod_module_ref, function in libkmod-module +
+
+
+kmod_module_remove_module, function in libkmod-module +
+
+
+kmod_module_section_free_list, function in libkmod-module +
+
+
+kmod_module_section_get_address, function in libkmod-module +
+
+
+kmod_module_section_get_name, function in libkmod-module +
+
+
+kmod_module_symbols_free_list, function in libkmod-module +
+
+
+kmod_module_symbol_get_crc, function in libkmod-module +
+
+
+kmod_module_symbol_get_symbol, function in libkmod-module +
+
+
+kmod_module_unref, function in libkmod-module +
+
+
+kmod_module_unref_list, function in libkmod-module +
+
+
+kmod_module_versions_free_list, function in libkmod-module +
+
+
+kmod_module_version_get_crc, function in libkmod-module +
+
+
+kmod_module_version_get_symbol, function in libkmod-module +
+
+

N

+
+kmod_new, function in libkmod +
+
+

P

+
+kmod_probe, enum in libkmod-module +
+
+

R

+
+kmod_ref, function in libkmod +
+
+
+kmod_remove, enum in libkmod-module +
+
+
+kmod_resources, enum in libkmod +
+
+

S

+
+kmod_set_log_fn, function in libkmod +
+
+
+kmod_set_log_priority, function in libkmod +
+
+
+kmod_set_userdata, function in libkmod +
+
+
+kmod_symbol_bind, enum in libkmod-module +
+
+

U

+
+kmod_unload_resources, function in libkmod +
+
+
+kmod_unref, function in libkmod +
+
+

V

+
+kmod_validate_resources, function in libkmod +
+
+
+ + + \ No newline at end of file diff --git a/master/api-index-v1.html b/master/api-index-v1.html new file mode 100644 index 0000000..d3a9f5c --- /dev/null +++ b/master/api-index-v1.html @@ -0,0 +1,200 @@ + + + + +Index of new symbols in 1: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of new symbols in 1

+

G

+
+kmod_get_log_priority, function in libkmod +
+
+
+kmod_get_userdata, function in libkmod +
+
+

L

+
+kmod_list_next, function in libkmod-list +
+
+
+kmod_list_prev, function in libkmod-list +
+
+
+kmod_load_resources, function in libkmod +
+
+

M

+
+kmod_module_get_dependencies, function in libkmod-module +
+
+
+kmod_module_get_filtered_blacklist, function in libkmod-module +
+
+
+kmod_module_get_holders, function in libkmod-loaded +
+
+
+kmod_module_get_initstate, function in libkmod-loaded +
+
+
+kmod_module_get_install_commands, function in libkmod-module +
+
+
+kmod_module_get_module, function in libkmod-module +
+
+
+kmod_module_get_name, function in libkmod-module +
+
+
+kmod_module_get_options, function in libkmod-module +
+
+
+kmod_module_get_path, function in libkmod-module +
+
+
+kmod_module_get_refcnt, function in libkmod-loaded +
+
+
+kmod_module_get_remove_commands, function in libkmod-module +
+
+
+kmod_module_get_sections, function in libkmod-module +
+
+
+kmod_module_get_size, function in libkmod-loaded +
+
+
+kmod_module_initstate_str, function in libkmod-loaded +
+
+
+kmod_module_insert_module, function in libkmod-module +
+
+
+kmod_module_new_from_loaded, function in libkmod-loaded +
+
+
+kmod_module_new_from_lookup, function in libkmod-module +
+
+
+kmod_module_new_from_name, function in libkmod-module +
+
+
+kmod_module_new_from_path, function in libkmod-module +
+
+
+kmod_module_ref, function in libkmod-module +
+
+
+kmod_module_remove_module, function in libkmod-module +
+
+
+kmod_module_section_free_list, function in libkmod-module +
+
+
+kmod_module_section_get_address, function in libkmod-module +
+
+
+kmod_module_section_get_name, function in libkmod-module +
+
+
+kmod_module_unref, function in libkmod-module +
+
+
+kmod_module_unref_list, function in libkmod-module +
+
+

N

+
+kmod_new, function in libkmod +
+
+

R

+
+kmod_ref, function in libkmod +
+
+

S

+
+kmod_set_log_fn, function in libkmod +
+
+
+kmod_set_log_priority, function in libkmod +
+
+
+kmod_set_userdata, function in libkmod +
+
+

U

+
+kmod_unload_resources, function in libkmod +
+
+
+kmod_unref, function in libkmod +
+
+
+ + + \ No newline at end of file diff --git a/master/api-index-v2.html b/master/api-index-v2.html new file mode 100644 index 0000000..f28ce3a --- /dev/null +++ b/master/api-index-v2.html @@ -0,0 +1,73 @@ + + + + +Index of new symbols in 2: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of new symbols in 2

+

L

+
+kmod_list_last, function in libkmod-list +
+
+

M

+
+kmod_module_get_info, function in libkmod-module +
+
+
+kmod_module_get_softdeps, function in libkmod-module +
+
+
+kmod_module_get_versions, function in libkmod-module +
+
+
+kmod_module_info_free_list, function in libkmod-module +
+
+
+kmod_module_info_get_key, function in libkmod-module +
+
+
+kmod_module_info_get_value, function in libkmod-module +
+
+
+kmod_module_versions_free_list, function in libkmod-module +
+
+
+kmod_module_version_get_crc, function in libkmod-module +
+
+
+kmod_module_version_get_symbol, function in libkmod-module +
+
+
+ + + \ No newline at end of file diff --git a/master/api-index-v22.html b/master/api-index-v22.html new file mode 100644 index 0000000..856196e --- /dev/null +++ b/master/api-index-v22.html @@ -0,0 +1,34 @@ + + + + +Index of new symbols in 22: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of new symbols in 22

+

G

+
+kmod_get_dirname, function in libkmod +
+
+
+ + + \ No newline at end of file diff --git a/master/api-index-v3.html b/master/api-index-v3.html new file mode 100644 index 0000000..d06421d --- /dev/null +++ b/master/api-index-v3.html @@ -0,0 +1,77 @@ + + + + +Index of new symbols in 3: libkmod Reference Manual + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/master/api-index-v30.html b/master/api-index-v30.html new file mode 100644 index 0000000..edce00c --- /dev/null +++ b/master/api-index-v30.html @@ -0,0 +1,34 @@ + + + + +Index of new symbols in 30: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of new symbols in 30

+

M

+
+kmod_module_new_from_name_lookup, function in libkmod-module +
+
+
+ + + \ No newline at end of file diff --git a/master/api-index-v33.html b/master/api-index-v33.html new file mode 100644 index 0000000..438d96f --- /dev/null +++ b/master/api-index-v33.html @@ -0,0 +1,40 @@ + + + + +Index of new symbols in 33: libkmod Reference Manual + + + + + + + + + + + + + + + +
+

+Index of new symbols in 33

+

C

+
+kmod_config_get_weakdeps, function in libkmod-config +
+
+

M

+
+kmod_module_get_weakdeps, function in libkmod-module +
+
+
+ + + \ No newline at end of file diff --git a/master/api-index-v4.html b/master/api-index-v4.html new file mode 100644 index 0000000..0ad9f63 --- /dev/null +++ b/master/api-index-v4.html @@ -0,0 +1,77 @@ + + + + +Index of new symbols in 4: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of new symbols in 4

+

C

+
+kmod_config_get_aliases, function in libkmod-config +
+
+
+kmod_config_get_blacklists, function in libkmod-config +
+
+
+kmod_config_get_install_commands, function in libkmod-config +
+
+
+kmod_config_get_options, function in libkmod-config +
+
+
+kmod_config_get_remove_commands, function in libkmod-config +
+
+
+kmod_config_get_softdeps, function in libkmod-config +
+
+
+kmod_config_iter_free_iter, function in libkmod-config +
+
+
+kmod_config_iter_get_key, function in libkmod-config +
+
+
+kmod_config_iter_get_value, function in libkmod-config +
+
+
+kmod_config_iter_next, function in libkmod-config +
+
+

D

+
+kmod_dump_index, function in libkmod +
+
+
+ + + \ No newline at end of file diff --git a/master/api-index-v6.html b/master/api-index-v6.html new file mode 100644 index 0000000..1fbbf3b --- /dev/null +++ b/master/api-index-v6.html @@ -0,0 +1,34 @@ + + + + +Index of new symbols in 6: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of new symbols in 6

+

M

+
+kmod_module_apply_filter, function in libkmod-module +
+
+
+ + + \ No newline at end of file diff --git a/master/ch01.html b/master/ch01.html new file mode 100644 index 0000000..a5986d7 --- /dev/null +++ b/master/ch01.html @@ -0,0 +1,46 @@ + + + + +libkmod: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+libkmod

+
+
+libkmod — libkmod context +
+
+libkmod-list — general purpose list +
+
+libkmod-config — retrieve current libkmod configuration +
+
+libkmod-module — operate on kernel modules +
+
+libkmod-loaded — currently loaded modules +
+
+
+ + + \ No newline at end of file diff --git a/master/deprecated-api-index.html b/master/deprecated-api-index.html new file mode 100644 index 0000000..615e279 --- /dev/null +++ b/master/deprecated-api-index.html @@ -0,0 +1,34 @@ + + + + +Index of deprecated symbols: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+

+Index of deprecated symbols

+

M

+
+kmod_module_get_filtered_blacklist, function in libkmod-module +
+
+
+ + + \ No newline at end of file diff --git a/master/home.png b/master/home.png new file mode 100644 index 0000000000000000000000000000000000000000..b293af531b3796ffdc346a08654277d8b8398f2c GIT binary patch literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`1)eUBAr-fhC6+z-|NnoFgBDXq zKI2Db1wYoLw4|@MnLb8Nu*~?OCh+^gTAJQ>`iGR2| z(wR1LoM + + + +libkmod Reference Manual: libkmod Reference Manual + + + + + + + +
+
+
+
+

for libkmod version "34" +

+
+
+
+
+
libkmod
+
+
+libkmod — libkmod context +
+
+libkmod-list — general purpose list +
+
+libkmod-config — retrieve current libkmod configuration +
+
+libkmod-module — operate on kernel modules +
+
+libkmod-loaded — currently loaded modules +
+
+
API Index
+
Index of deprecated symbols
+
Index of new symbols in 1
+
Index of new symbols in 2
+
Index of new symbols in 3
+
Index of new symbols in 4
+
Index of new symbols in 6
+
Index of new symbols in 22
+
Index of new symbols in 30
+
Index of new symbols in 33
+
+
+ + + \ No newline at end of file diff --git a/master/left-insensitive.png b/master/left-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..903790a00797aafe3f59ff1d46ba95caf4d82275 GIT binary patch literal 334 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}U4T!BE0A8bYSn%)*t~i3jvYI8 z?%cU+*RH*L_wL)b@8H3MKn6q>$b~R~B#;eJ01{59R(^U2~tZL)f#CYgcR+EMpN9F=fgAc1S zI*b-}e9+45*u0>lKs&=@$~?WE5#lye;e_ z!V)?`)YE^G&Z{az+wQ6hU)+RBCS?h$%$8iYetCKPqx<`+wgvy5ZI#2x74+3YSjN-z ziQ9(7t}l<-a9lIdxI0DspwaK@gYD+Vm(F&+V!qU(ez42xrQ01&GZRnq2VNVN`|h$6 jZ(^SMsz^!W$HINA^@@S5-SwqFw=j6R`njxgN@xNATtG!d literal 0 HcmV?d00001 diff --git a/master/libkmod-3.devhelp2 b/master/libkmod-3.devhelp2 new file mode 100644 index 0000000..e1b6095 --- /dev/null +++ b/master/libkmod-3.devhelp2 @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/master/libkmod-libkmod-config.html b/master/libkmod-libkmod-config.html new file mode 100644 index 0000000..74405ed --- /dev/null +++ b/master/libkmod-libkmod-config.html @@ -0,0 +1,489 @@ + + + + +libkmod-config: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-config

+

libkmod-config — retrieve current libkmod configuration

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
struct kmod_config_iter * + +kmod_config_get_blacklists () +
struct kmod_config_iter * + +kmod_config_get_install_commands () +
struct kmod_config_iter * + +kmod_config_get_remove_commands () +
struct kmod_config_iter * + +kmod_config_get_aliases () +
struct kmod_config_iter * + +kmod_config_get_options () +
struct kmod_config_iter * + +kmod_config_get_softdeps () +
struct kmod_config_iter * + +kmod_config_get_weakdeps () +
const char * + +kmod_config_iter_get_key () +
const char * + +kmod_config_iter_get_value () +
+bool + +kmod_config_iter_next () +
+void + +kmod_config_iter_free_iter () +
+
+
+

Types and Values

+
++++ + + + + +
structkmod_config_iter
+
+
+

Description

+

Access to configuration lists - it allows to get each configuration's +key/value stored by kmod.

+
+
+

Functions

+
+

kmod_config_get_blacklists ()

+
struct kmod_config_iter *
+kmod_config_get_blacklists (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the blacklist maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the blacklists or NULL on failure. Free it +with kmod_config_iter_free_iter().

+
+

Since: 4

+
+
+
+

kmod_config_get_install_commands ()

+
struct kmod_config_iter *
+kmod_config_get_install_commands (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the install commands maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the install commands or NULL on failure. Free +it with kmod_config_iter_free_iter().

+
+

Since: 4

+
+
+
+

kmod_config_get_remove_commands ()

+
struct kmod_config_iter *
+kmod_config_get_remove_commands (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the remove commands maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the remove commands or NULL on failure. Free +it with kmod_config_iter_free_iter().

+
+

Since: 4

+
+
+
+

kmod_config_get_aliases ()

+
struct kmod_config_iter *
+kmod_config_get_aliases (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the aliases maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the aliases or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+

Since: 4

+
+
+
+

kmod_config_get_options ()

+
struct kmod_config_iter *
+kmod_config_get_options (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the options maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the options or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+

Since: 4

+
+
+
+

kmod_config_get_softdeps ()

+
struct kmod_config_iter *
+kmod_config_get_softdeps (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the softdeps maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the softdeps or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+

Since: 4

+
+
+
+

kmod_config_get_weakdeps ()

+
struct kmod_config_iter *
+kmod_config_get_weakdeps (const struct kmod_ctx *ctx);
+

Retrieve an iterator to deal with the weakdeps maintained inside the +library. See kmod_config_iter_get_key(), kmod_config_iter_get_value() and +kmod_config_iter_next(). At least one call to kmod_config_iter_next() must +be made to initialize the iterator and check if it's valid.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

a new iterator over the weakdeps or NULL on failure. Free it with +kmod_config_iter_free_iter().

+
+

Since: 33

+
+
+
+

kmod_config_iter_get_key ()

+
const char *
+kmod_config_iter_get_key (const struct kmod_config_iter *iter);
+

When using a new allocated iterator, user must perform a call to +kmod_config_iter_next() to initialize iterator's position and check if it's +valid.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+

Returns

+

the key of the current configuration pointed by iter +.

+
+

Since: 4

+
+
+
+

kmod_config_iter_get_value ()

+
const char *
+kmod_config_iter_get_value (const struct kmod_config_iter *iter);
+

When using a new allocated iterator, user must perform a call to +kmod_config_iter_next() to initialize iterator's position and check if it's +valid.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+

Returns

+

the value of the current configuration pointed by iter +.

+
+

Since: 4

+
+
+
+

kmod_config_iter_next ()

+
bool
+kmod_config_iter_next (struct kmod_config_iter *iter);
+

Make iter + point to the next item of a certain configuration. It's an +automatically recycling iterator. When it reaches the end, false is +returned; then if user wants to iterate again, it's sufficient to call this +function once more.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+
+

Returns

+

true if next position of iter +is valid or false if its end is +reached.

+
+

Since: 4

+
+
+
+

kmod_config_iter_free_iter ()

+
void
+kmod_config_iter_free_iter (struct kmod_config_iter *iter);
+

Free resources used by the iterator.

+
+

Parameters

+
+++++ + + + + + +

iter

iterator over a certain configuration

 
+
+

Since: 4

+
+
+
+

Types and Values

+
+

struct kmod_config_iter

+
struct kmod_config_iter;
+

Opaque object for iterating and retrieving configuration information.

+
+
+
+ + + \ No newline at end of file diff --git a/master/libkmod-libkmod-list.html b/master/libkmod-libkmod-list.html new file mode 100644 index 0000000..29f09d7 --- /dev/null +++ b/master/libkmod-libkmod-list.html @@ -0,0 +1,287 @@ + + + + +libkmod-list: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-list

+

libkmod-list — general purpose list

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + +
#define +kmod_list_foreach() +
#define +kmod_list_foreach_reverse() +
struct kmod_list * + +kmod_list_last () +
struct kmod_list * + +kmod_list_next () +
struct kmod_list * + +kmod_list_prev () +
+
+
+

Types and Values

+
++++ + + + + +
structkmod_list
+
+
+

Description

+

Access to kmod generated lists.

+
+
+

Functions

+
+

kmod_list_foreach()

+
#define             kmod_list_foreach(curr, list)
+

Iterate over the list list +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

curr

the current node in the list

 

list

the head of the list

 
+
+
+
+
+

kmod_list_foreach_reverse()

+
#define             kmod_list_foreach_reverse(curr, list)
+

Iterate in reverse over the list list +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

curr

the current node in the list

 

list

the head of the list

 
+
+
+
+
+

kmod_list_last ()

+
struct kmod_list *
+kmod_list_last (const struct kmod_list *list);
+

Get the last element of the list +. As list + is a circular list, +this is a cheap operation O(1) with the last element being the +previous element.

+

If the list has a single element it will return the list itself (as +expected, and this is what differentiates from kmod_list_prev()).

+
+

Parameters

+
+++++ + + + + + +

list

the head of the list

 
+
+
+

Returns

+

last node at list +or NULL if the list is empty.

+
+

Since: 2

+
+
+
+

kmod_list_next ()

+
struct kmod_list *
+kmod_list_next (const struct kmod_list *list,
+                const struct kmod_list *curr);
+

Get the next node in list + relative to curr + as if list + was not a circular +list. I.e. calling this function in the last node of the list returns +NULL.. It can be used to iterate a list by checking for NULL return to know +when all elements were iterated.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

list

the head of the list

 

curr

the current node in the list

 
+
+
+

Returns

+

node next to curr +or NULL if either this node is the last of or +list is empty.

+
+

Since: 1

+
+
+
+

kmod_list_prev ()

+
struct kmod_list *
+kmod_list_prev (const struct kmod_list *list,
+                const struct kmod_list *curr);
+

Get the previous node in list + relative to curr + as if list + was not a +circular list. I.e.: the previous of the head is NULL. It can be used to +iterate a list by checking for NULL return to know when all elements were +iterated.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

list

the head of the list

 

curr

the current node in the list

 
+
+
+

Returns

+

node previous to curr +or NULL if either this node is the head of +the list or the list is empty.

+
+

Since: 1

+
+
+
+

Types and Values

+
+

struct kmod_list

+
struct kmod_list;
+

Opaque object for a circular (doubly linked) list.

+
+
+
+ + + \ No newline at end of file diff --git a/master/libkmod-libkmod-loaded.html b/master/libkmod-libkmod-loaded.html new file mode 100644 index 0000000..788cb67 --- /dev/null +++ b/master/libkmod-libkmod-loaded.html @@ -0,0 +1,367 @@ + + + + +libkmod-loaded: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-loaded

+

libkmod-loaded — currently loaded modules

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+int + +kmod_module_new_from_loaded () +
+int + +kmod_module_get_initstate () +
const char * + +kmod_module_initstate_str () +
+long + +kmod_module_get_size () +
+int + +kmod_module_get_refcnt () +
struct kmod_list * + +kmod_module_get_holders () +
+
+
+

Types and Values

+
++++ + + + + +
enumkmod_module_initstate
+
+
+

Description

+

Information about currently loaded modules, as reported by the kernel. +These information are not cached by libkmod and are always read from /sys +and /proc/modules.

+
+
+

Functions

+
+

kmod_module_new_from_loaded ()

+
int
+kmod_module_new_from_loaded (struct kmod_ctx *ctx,
+                             struct kmod_list **list);
+

Create a new list of kmod modules with all modules currently loaded in +kernel. It uses /proc/modules to get the names of loaded modules and to +create kmod modules by calling kmod_module_new_from_name() in each of them. +They are put in list + in no particular order.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. The returned list + must be released by +calling kmod_module_unref_list(). Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned list are +completed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

ctx

kmod library context

 

list

where to save the list of loaded modules

 
+
+
+

Returns

+

0 on success or < 0 on error.

+
+

Since: 1

+
+
+
+

kmod_module_get_initstate ()

+
int
+kmod_module_get_initstate (const struct kmod_module *mod);
+

Get the initstate of this mod +, as returned by the kernel, by reading +/sys filesystem.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

< 0 on error or module state if module is found in the kernel, valid +states are kmod_module_initstate.

+
+

Since: 1

+
+
+
+

kmod_module_initstate_str ()

+
const char *
+kmod_module_initstate_str (enum kmod_module_initstate state);
+

Translate a initstate to a string.

+
+

Parameters

+
+++++ + + + + + +

state

the state as returned by kmod_module_get_initstate()

 
+
+
+

Returns

+

the string associated to the state +. This string is statically +allocated, do not free it.

+
+

Since: 1

+
+
+
+

kmod_module_get_size ()

+
long
+kmod_module_get_size (const struct kmod_module *mod);
+

Get the size of this kmod module as returned by the kernel. If supported, +the size is read from the coresize attribute in /sys/module. For older +kernels, this falls back on /proc/modules and searches for the specified +module to get its size.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the size of this kmod module.

+
+

Since: 1

+
+
+
+

kmod_module_get_refcnt ()

+
int
+kmod_module_get_refcnt (const struct kmod_module *mod);
+

Get the ref count of this mod +, as returned by the kernel, by reading +/sys filesystem.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the reference count on success or < 0 on failure.

+
+

Since: 1

+
+
+
+

kmod_module_get_holders ()

+
struct kmod_list *
+kmod_module_get_holders (const struct kmod_module *mod);
+

Get a list of kmod modules that are holding this mod +, as returned by Linux +Kernel. After use, free the list + by calling kmod_module_unref_list().

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a new list of kmod modules on success or NULL on failure.

+
+

Since: 1

+
+
+
+

Types and Values

+
+

enum kmod_module_initstate

+

The module "live information" as reported by the kernel, see +kmod_module_get_initstate().

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

KMOD_MODULE_BUILTIN

+

module is builtin

+
 

KMOD_MODULE_LIVE

+

module is live in the kernel

+
 

KMOD_MODULE_COMING

+

module is being loaded

+
 

KMOD_MODULE_GOING

+

module is being unloaded

+
 

_KMOD_MODULE_PAD

+

DO NOT USE; padding to make sure enum is not mapped to char

+
 
+
+
+
+
+ + + \ No newline at end of file diff --git a/master/libkmod-libkmod-module.html b/master/libkmod-libkmod-module.html new file mode 100644 index 0000000..0ac1b32 --- /dev/null +++ b/master/libkmod-libkmod-module.html @@ -0,0 +1,2179 @@ + + + + +libkmod-module: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod-module

+

libkmod-module — operate on kernel modules

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+int + +kmod_module_new_from_lookup () +
+int + +kmod_module_new_from_name_lookup () +
+int + +kmod_module_new_from_name () +
+int + +kmod_module_new_from_path () +
struct kmod_module * + +kmod_module_ref () +
struct kmod_module * + +kmod_module_unref () +
+int + +kmod_module_unref_list () +
+int + +kmod_module_insert_module () +
+int + +kmod_module_probe_insert_module () +
+int + +kmod_module_remove_module () +
struct kmod_module * + +kmod_module_get_module () +
struct kmod_list * + +kmod_module_get_dependencies () +
+int + +kmod_module_get_softdeps () +
+int + +kmod_module_get_weakdeps () +
+int + +kmod_module_apply_filter () +
+int + +kmod_module_get_filtered_blacklist () +
const char * + +kmod_module_get_install_commands () +
const char * + +kmod_module_get_remove_commands () +
const char * + +kmod_module_get_name () +
const char * + +kmod_module_get_options () +
const char * + +kmod_module_get_path () +
+int + +kmod_module_get_dependency_symbols () +
+int + +kmod_module_dependency_symbol_get_bind () +
+uint64_t + +kmod_module_dependency_symbol_get_crc () +
const char * + +kmod_module_dependency_symbol_get_symbol () +
+void + +kmod_module_dependency_symbols_free_list () +
struct kmod_list * + +kmod_module_get_sections () +
unsigned long + +kmod_module_section_get_address () +
const char * + +kmod_module_section_get_name () +
+void + +kmod_module_section_free_list () +
+int + +kmod_module_get_symbols () +
+uint64_t + +kmod_module_symbol_get_crc () +
const char * + +kmod_module_symbol_get_symbol () +
+void + +kmod_module_symbols_free_list () +
+int + +kmod_module_get_versions () +
+uint64_t + +kmod_module_version_get_crc () +
const char * + +kmod_module_version_get_symbol () +
+void + +kmod_module_versions_free_list () +
+int + +kmod_module_get_info () +
const char * + +kmod_module_info_get_key () +
const char * + +kmod_module_info_get_value () +
+void + +kmod_module_info_free_list () +
+
+
+

Types and Values

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + +
structkmod_module
enumkmod_insert
enumkmod_probe
enumkmod_remove
enumkmod_filter
enumkmod_symbol_bind
+
+
+

Description

+

Wide range of function to operate on kernel modules - loading, unloading, +reference counting, retrieving a list of module dependencies and more.

+
+
+

Functions

+
+

kmod_module_new_from_lookup ()

+
int
+kmod_module_new_from_lookup (struct kmod_ctx *ctx,
+                             const char *given_alias,
+                             struct kmod_list **list);
+

Create a new list of kmod modules using an alias or module name and lookup +libkmod's configuration files and indexes in order to find the module. +Once it's found in one of the places, it stops searching and create the +list of modules that is saved in list +.

+

The search order is: 1. aliases in configuration file; 2. module names in +modules.dep index; 3. symbol aliases in modules.symbols index; 4. aliases +from install commands; 5. builtin indexes from kernel.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. The returned list + must be released by +calling kmod_module_unref_list(). Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned list are +completed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

given_alias

alias to look for

 

list

an empty list where to save the list of modules matching +given_alias +

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if any of the lookup +methods failed, which is basically due to memory allocation fail. If module +is not found, it still returns 0, but list +is an empty list.

+
+

Since: 1

+
+
+
+

kmod_module_new_from_name_lookup ()

+
int
+kmod_module_new_from_name_lookup (struct kmod_ctx *ctx,
+                                  const char *modname,
+                                  struct kmod_module **mod);
+

Lookup by module name, without considering possible aliases. This is similar +to kmod_module_new_from_lookup(), but don't consider as source indexes and +configurations that work with aliases. When successful, this always resolves +to one and only one module.

+

The search order is: 1. module names in modules.dep index;

+
  1. builtin indexes from kernel.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned list are +completed.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

modname

module name to look for

 

mod

returned module on success

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if any of the lookup +methods failed, which is basically due to memory allocation failure. If +module is not found, it still returns 0, but mod +is left untouched.

+
+

Since: 30

+
+
+
+

kmod_module_new_from_name ()

+
int
+kmod_module_new_from_name (struct kmod_ctx *ctx,
+                           const char *name,
+                           struct kmod_module **mod);
+

Create a new struct kmod_module using the module name. name + can not be an +alias, file name or anything else; it must be a module name. There's no +check if the module exists in the system.

+

This function is also used internally by many others that return a new +struct kmod_module or a new list of modules.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned +kmod_module are done.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

name

name of the module

 

mod

where to save the created struct kmod_module

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if name is not a valid +module name or if memory allocation failed.

+
+

Since: 1

+
+
+
+

kmod_module_new_from_path ()

+
int
+kmod_module_new_from_path (struct kmod_ctx *ctx,
+                           const char *path,
+                           struct kmod_module **mod);
+

Create a new struct kmod_module using the module path. path + must be an +existent file within the filesystem and must be accessible to libkmod.

+

The initial refcount is 1, and needs to be decremented to release the +resources of the kmod_module. Since libkmod keeps track of all +kmod_modules created, they are all released upon ctx + destruction too. Do +not unref ctx + before all the desired operations with the returned +kmod_module are done.

+

If path + is relative, it's treated as relative to the current working +directory. Otherwise, give an absolute path.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

path

path where to find the given module

 

mod

where to save the created struct kmod_module

 
+
+
+

Returns

+

0 on success or < 0 otherwise. It fails if file does not exist, if +it's not a valid file for a kmod_module or if memory allocation failed.

+
+

Since: 1

+
+
+
+

kmod_module_ref ()

+
struct kmod_module *
+kmod_module_ref (struct kmod_module *mod);
+

Take a reference of the kmod module, incrementing its refcount.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the passed module +with its refcount incremented.

+
+

Since: 1

+
+
+
+

kmod_module_unref ()

+
struct kmod_module *
+kmod_module_unref (struct kmod_module *mod);
+

Drop a reference of the kmod module. If the refcount reaches zero, its +resources are released.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

NULL if mod +is NULL or if the module was released. Otherwise it +returns the passed mod +with its refcount decremented.

+
+

Since: 1

+
+
+
+

kmod_module_unref_list ()

+
int
+kmod_module_unref_list (struct kmod_list *list);
+

Drop a reference of each kmod module in list + and releases the resources +taken by the list itself.

+
+

Parameters

+
+++++ + + + + + +

list

list of kmod modules

 
+
+
+

Returns

+

0

+
+

Since: 1

+
+
+
+

kmod_module_insert_module ()

+
int
+kmod_module_insert_module (struct kmod_module *mod,
+                           unsigned int flags,
+                           const char *options);
+

Insert a module in the kernel. It opens the file pointed by mod +, +mmap'ing it and passing to kernel.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

mod

kmod module

 

flags

flags are not passed to the kernel, but instead they dictate the +behavior of this function, valid flags kmod_insert

 

options

module's options to pass to the kernel.

 
+
+
+

Returns

+

0 on success or < 0 on failure. If module is already loaded it +returns -EEXIST.

+
+

Since: 1

+
+
+
+

kmod_module_probe_insert_module ()

+
int
+kmod_module_probe_insert_module (struct kmod_module *mod,
+                                 unsigned int flags,
+                                 const char *extra_options,
+                                 int (*run_install) (struct kmod_module *m, const char *cmdline, void *data),
+                                 const void *data,
+                                 void (*print_action) (struct kmod_module *m, bool install, const char *options));
+

Insert a module in the kernel resolving dependencies, soft dependencies, +install commands and applying blacklist.

+

If run_install + is NULL, this function will fork and exec by calling +system(3). Don't pass a NULL argument in run_install + if your binary is +setuid/setgid (see warning in system(3)). If you need control over the +execution of an install command, give a callback function instead.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

mod

kmod module

 

flags

flags are not passed to the kernel, but instead they dictate the +behavior of this function, valid flags are kmod_probe

 

extra_options

module's options to pass to the kernel. It applies only +to mod +, not to its dependencies.

 

run_install

function to run when mod +is backed by an install command.

 

data

data to give back to run_install +callback

 

print_action

function to call with the action being taken (install or +insmod). It's useful for tools like modprobe when running with verbose +output or in dry-run mode.

 
+
+
+

Returns

+

0 on success, > 0 if stopped by a reason given in flags +or < 0 on +failure.

+
+

Since: 3

+
+
+
+

kmod_module_remove_module ()

+
int
+kmod_module_remove_module (struct kmod_module *mod,
+                           unsigned int flags);
+

Remove a module from the kernel.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

flags

flags used when removing the module, valid flags are kmod_remove

 
+
+
+

Returns

+

0 on success or < 0 on failure.

+
+

Since: 1

+
+
+
+

kmod_module_get_module ()

+
struct kmod_module *
+kmod_module_get_module (const struct kmod_list *entry);
+

Get the kmod module of this entry + in the list, increasing its refcount. +After it's used, unref it. Since the refcount is incremented upon return, +you still have to call kmod_module_unref_list() to release the list of kmod +modules.

+
+

Parameters

+
+++++ + + + + + +

entry

an entry in a list of kmod modules.

 
+
+
+

Returns

+

NULL on failure or the kmod_module contained in this list entry +with its refcount incremented.

+
+

Since: 1

+
+
+
+

kmod_module_get_dependencies ()

+
struct kmod_list *
+kmod_module_get_dependencies (const struct kmod_module *mod);
+

Search the modules.dep index to find the dependencies of the given mod +. +The result is cached in mod +, so subsequent calls to this function will +return the already searched list of modules.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

NULL on failure. Otherwise it returns a list of kmod modules +that can be released by calling kmod_module_unref_list().

+
+

Since: 1

+
+
+
+

kmod_module_get_softdeps ()

+
int
+kmod_module_get_softdeps (const struct kmod_module *mod,
+                          struct kmod_list **pre,
+                          struct kmod_list **post);
+

Get soft dependencies for this kmod module. Soft dependencies come +from configuration file and are not cached in mod + because it may include +dependency cycles that would make we leak kmod_module. Any call +to this function will search for this module in configuration, allocate a +list and return the result.

+

Both pre + and post + are newly created list of kmod_module and +should be unreferenced with kmod_module_unref_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

mod

kmod module

 

pre

where to save the list of preceding soft dependencies.

 

post

where to save the list of post soft dependencies.

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 2

+
+
+
+

kmod_module_get_weakdeps ()

+
int
+kmod_module_get_weakdeps (const struct kmod_module *mod,
+                          struct kmod_list **weak);
+

Get weak dependencies for this kmod module. Weak dependencies come +from configuration file and are not cached in mod + because it may include +dependency cycles that would make we leak kmod_module. Any call +to this function will search for this module in configuration, allocate a +list and return the result.

+

weak + is newly created list of kmod_module and +should be unreferenced with kmod_module_unref_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

weak

where to save the list of weak dependencies.

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 33

+
+
+
+

kmod_module_apply_filter ()

+
int
+kmod_module_apply_filter (const struct kmod_ctx *ctx,
+                          enum kmod_filter filter_type,
+                          const struct kmod_list *input,
+                          struct kmod_list **output);
+

Given a list input +, this function filter it out by the filter mask +and save it in output +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

filter_type

bitmask to filter modules out, valid types are kmod_filter

 

input

list of kmod_module to be filtered

 

output

where to save the new list

 
+
+
+

Returns

+

0 on success or < 0 otherwise. output +is saved with the updated +list.

+
+

Since: 6

+
+
+
+

kmod_module_get_filtered_blacklist ()

+
int
+kmod_module_get_filtered_blacklist (const struct kmod_ctx *ctx,
+                                    const struct kmod_list *input,
+                                    struct kmod_list **output);
+
+

kmod_module_get_filtered_blacklist has been deprecated since version 6 and should not be used in newly-written code.

+

Use kmod_module_apply_filter instead.

+
+

This function should not be used. Use kmod_module_apply_filter instead.

+

Given a list input +, this function filter it out with config's blacklist +and save it in output +.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

input

list of kmod_module to be filtered with blacklist

 

output

where to save the new list

 
+
+
+

Returns

+

0 on success or < 0 otherwise. output +is saved with the updated +list.

+
+

Since: 1

+
+
+
+

kmod_module_get_install_commands ()

+
const char *
+kmod_module_get_install_commands (const struct kmod_module *mod);
+

Get install commands for this kmod module. Install commands come from the +configuration file and are cached in mod +. The first call to this function +will search for this module in configuration and subsequent calls return +the cached string. The install commands are returned as they were in the +configuration, concatenated by ';'. No other processing is made in this +string.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a string with all install commands separated by semicolons. This +string is owned by mod +, do not free it.

+
+

Since: 1

+
+
+
+

kmod_module_get_remove_commands ()

+
const char *
+kmod_module_get_remove_commands (const struct kmod_module *mod);
+

Get remove commands for this kmod module. Remove commands come from the +configuration file and are cached in mod +. The first call to this function +will search for this module in configuration and subsequent calls return +the cached string. The remove commands are returned as they were in the +configuration, concatenated by ';'. No other processing is made in this +string.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a string with all remove commands separated by semicolons. This +string is owned by mod +, do not free it.

+
+

Since: 1

+
+
+
+

kmod_module_get_name ()

+
const char *
+kmod_module_get_name (const struct kmod_module *mod);
+

Get the name of this kmod module. Name is always available, independently +if it was created by kmod_module_new_from_name() or another function and +it's always normalized (dashes are replaced with underscores).

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the name of this kmod module.

+
+

Since: 1

+
+
+
+

kmod_module_get_options ()

+
const char *
+kmod_module_get_options (const struct kmod_module *mod);
+

Get options of this kmod module. Options come from the configuration file +and are cached in mod +. The first call to this function will search for +this module in configuration and subsequent calls return the cached string.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a string with all the options separated by spaces. This string is +owned by mod +, do not free it.

+
+

Since: 1

+
+
+
+

kmod_module_get_path ()

+
const char *
+kmod_module_get_path (const struct kmod_module *mod);
+

Get the path of this kmod module. If this kmod module was not created by +path, it can search the modules.dep index in order to find out the module +under context's dirname.

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

the path of this kmod module or NULL if such information is not +available.

+
+

Since: 1

+
+
+
+

kmod_module_get_dependency_symbols ()

+
int
+kmod_module_get_dependency_symbols (const struct kmod_module *mod,
+                                    struct kmod_list **list);
+

Get a list of entries in ELF section ".symtab" or "__ksymtab_strings".

+

The structure contained in this list is internal to libkmod and its fields +can be obtainsed by calling kmod_module_dependency_symbol_get_crc() and +kmod_module_dependency_symbol_get_symbol().

+

After use, free the list + by calling +kmod_module_dependency_symbols_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module dependency_symbols

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 3

+
+
+
+

kmod_module_dependency_symbol_get_bind ()

+
int
+kmod_module_dependency_symbol_get_bind
+                               (const struct kmod_list *entry);
+

Get the bind type of a kmod module dependency_symbol.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module dependency_symbol

 
+
+
+

Returns

+

the bind of this kmod module dependency_symbol on success, +or < 0 on failure. Valid bind types are kmod_symbol_bind.

+
+

Since: 3

+
+
+
+

kmod_module_dependency_symbol_get_crc ()

+
uint64_t
+kmod_module_dependency_symbol_get_crc (const struct kmod_list *entry);
+

Get the crc of a kmod module dependency_symbol.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module dependency_symbol

 
+
+
+

Returns

+

the crc of this kmod module dependency_symbol if available, otherwise default to 0.

+
+

Since: 3

+
+
+
+

kmod_module_dependency_symbol_get_symbol ()

+
const char *
+kmod_module_dependency_symbol_get_symbol
+                               (const struct kmod_list *entry);
+

Get the dependency symbol of a kmod module

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module dependency_symbols

 
+
+
+

Returns

+

the symbol of this kmod module dependency_symbols on success or NULL +on failure. The string is owned by the dependency_symbols, do not free it.

+
+

Since: 3

+
+
+
+

kmod_module_dependency_symbols_free_list ()

+
void
+kmod_module_dependency_symbols_free_list
+                               (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module dependency_symbols list

 
+
+

Since: 3

+
+
+
+

kmod_module_get_sections ()

+
struct kmod_list *
+kmod_module_get_sections (const struct kmod_module *mod);
+

Get a list of kmod sections of this mod +, as returned by the kernel.

+

The structure contained in this list is internal to libkmod and its fields +can be obtained by calling kmod_module_section_get_name() and +kmod_module_section_get_address().

+

After use, free the list + by calling kmod_module_section_free_list().

+
+

Parameters

+
+++++ + + + + + +

mod

kmod module

 
+
+
+

Returns

+

a new list of kmod module sections on success or NULL on failure.

+
+

Since: 1

+
+
+
+

kmod_module_section_get_address ()

+
unsigned long
+kmod_module_section_get_address (const struct kmod_list *entry);
+

Get the address of a kmod module section.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module section

 
+
+
+

Returns

+

the address of this kmod module section on success or ULONG_MAX +on failure.

+
+

Since: 1

+
+
+
+

kmod_module_section_get_name ()

+
const char *
+kmod_module_section_get_name (const struct kmod_list *entry);
+

Get the name of a kmod module section.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module section

 
+
+
+

Returns

+

the name of this kmod module section on success or NULL on +failure. The string is owned by the section, do not free it.

+
+

Since: 1

+
+
+
+

kmod_module_section_free_list ()

+
void
+kmod_module_section_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module section list

 
+
+

Since: 1

+
+
+
+

kmod_module_get_symbols ()

+
int
+kmod_module_get_symbols (const struct kmod_module *mod,
+                         struct kmod_list **list);
+

Get a list of entries in ELF section ".symtab" or "__ksymtab_strings".

+

The structure contained in this list is internal to libkmod and its fields +can be obtainsed by calling kmod_module_symbol_get_crc() and +kmod_module_symbol_get_symbol().

+

After use, free the list + by calling kmod_module_symbols_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module symbols

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 3

+
+
+
+

kmod_module_symbol_get_crc ()

+
uint64_t
+kmod_module_symbol_get_crc (const struct kmod_list *entry);
+

Get the crc of a kmod module symbol.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module symbol

 
+
+
+

Returns

+

the crc of this kmod module symbol if available, otherwise default to 0.

+
+

Since: 3

+
+
+
+

kmod_module_symbol_get_symbol ()

+
const char *
+kmod_module_symbol_get_symbol (const struct kmod_list *entry);
+

Get the symbol of a kmod module symbols.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module symbols

 
+
+
+

Returns

+

the symbol of this kmod module symbols on success or NULL +on failure. The string is owned by the symbols, do not free it.

+
+

Since: 3

+
+
+
+

kmod_module_symbols_free_list ()

+
void
+kmod_module_symbols_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module symbols list

 
+
+

Since: 3

+
+
+
+

kmod_module_get_versions ()

+
int
+kmod_module_get_versions (const struct kmod_module *mod,
+                          struct kmod_list **list);
+

Get a list of entries in ELF section "__versions".

+

The structure contained in this list is internal to libkmod and its fields +can be obtainsed by calling kmod_module_version_get_crc() and +kmod_module_version_get_symbol().

+

After use, free the list + by calling kmod_module_versions_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module versions

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 2

+
+
+
+

kmod_module_version_get_crc ()

+
uint64_t
+kmod_module_version_get_crc (const struct kmod_list *entry);
+

Get the crc of a kmod module version.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module version

 
+
+
+

Returns

+

the crc of this kmod module version if available, otherwise default to 0.

+
+

Since: 2

+
+
+
+

kmod_module_version_get_symbol ()

+
const char *
+kmod_module_version_get_symbol (const struct kmod_list *entry);
+

Get the symbol of a kmod module versions.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module versions

 
+
+
+

Returns

+

the symbol of this kmod module versions on success or NULL +on failure. The string is owned by the versions, do not free it.

+
+

Since: 2

+
+
+
+

kmod_module_versions_free_list ()

+
void
+kmod_module_versions_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module versions list

 
+
+

Since: 2

+
+
+
+

kmod_module_get_info ()

+
int
+kmod_module_get_info (const struct kmod_module *mod,
+                      struct kmod_list **list);
+

Get a list of entries in ELF section ".modinfo", these contain +alias, license, depends, vermagic and other keys with respective +values. If the module is signed (CONFIG_MODULE_SIG), information +about the module signature is included as well: signer, +sig_key and sig_hashalgo.

+

The structure contained in this list is internal to libkmod and its fields +can be obtainsed by calling kmod_module_info_get_key() and +kmod_module_info_get_value().

+

After use, free the list + by calling kmod_module_info_free_list().

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

mod

kmod module

 

list

where to return list of module information

 
+
+
+

Returns

+

number of entries in list +on success or < 0 otherwise.

+
+

Since: 2

+
+
+
+

kmod_module_info_get_key ()

+
const char *
+kmod_module_info_get_key (const struct kmod_list *entry);
+

Get the key of a kmod module info.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module info

 
+
+
+

Returns

+

the key of this kmod module info on success or NULL on +failure. The string is owned by the info, do not free it.

+
+

Since: 2

+
+
+
+

kmod_module_info_get_value ()

+
const char *
+kmod_module_info_get_value (const struct kmod_list *entry);
+

Get the value of a kmod module info.

+
+

Parameters

+
+++++ + + + + + +

entry

a list entry representing a kmod module info

 
+
+
+

Returns

+

the value of this kmod module info on success or NULL on +failure. The string is owned by the info, do not free it.

+
+

Since: 2

+
+
+
+

kmod_module_info_free_list ()

+
void
+kmod_module_info_free_list (struct kmod_list *list);
+

Release the resources taken by list +

+
+

Parameters

+
+++++ + + + + + +

list

kmod module info list

 
+
+

Since: 2

+
+
+
+

Types and Values

+
+

struct kmod_module

+
struct kmod_module;
+

Opaque object representing a module.

+
+
+
+

enum kmod_insert

+

Insertion flags, used by kmod_module_insert_module().

+
+

Members

+
+++++ + + + + + + + + + + + + +

KMOD_INSERT_FORCE_VERMAGIC

+

ignore kernel version magic

+
 

KMOD_INSERT_FORCE_MODVERSION

+

ignore symbol version hashes

+
 
+
+
+
+
+

enum kmod_probe

+

Bitmask which defines the behaviour of kmod_module_probe_insert_module().

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

KMOD_PROBE_FORCE_VERMAGIC

+

ignore kernel version magic

+
 

KMOD_PROBE_FORCE_MODVERSION

+

ignore symbol version hashes

+
 

KMOD_PROBE_IGNORE_COMMAND

+

ignore install commands and softdeps configured +in the system

+
 

KMOD_PROBE_IGNORE_LOADED

+

do not check whether the module is already +live in the kernel or not

+
 

KMOD_PROBE_DRY_RUN

+

dry run, do not insert module, just call the +associated callback function

+
 

KMOD_PROBE_FAIL_ON_LOADED

+

probe will fail if KMOD_PROBE_IGNORE_LOADED is +not specified and the module is already live in the kernel

+
 

KMOD_PROBE_APPLY_BLACKLIST_ALL

+

prior to probe, apply KMOD_FILTER_BLACKLIST +filter to this module and its dependencies. If any of them are blacklisted +and the blacklisted module is not live in the kernel, the function returns +early with thus enum

+
 

KMOD_PROBE_APPLY_BLACKLIST

+

probe will return early with this enum, if the +module is blacklisted

+
 

KMOD_PROBE_APPLY_BLACKLIST_ALIAS_ONLY

+

probe will return early with this +enum, if the module is an alias and is blacklisted

+
 
+
+
+
+
+

enum kmod_remove

+

Removal flags, used by kmod_module_remove_module().

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + +

KMOD_REMOVE_FORCE

+

force remove module regardless if it's still in +use by a kernel subsystem or other process; passed directly to the kernel

+
 

KMOD_REMOVE_NOWAIT

+

always set, pass O_NONBLOCK to delete_module(2); +passed directly to the kernel

+
 

KMOD_REMOVE_NOLOG

+

when module removal fails, do not log anything; not +passed to the kernel

+
 
+
+
+
+
+

enum kmod_filter

+

Bitmask defining what gets filtered out, used by kmod_module_apply_filter().

+
+

Members

+
+++++ + + + + + + + + + + + + +

KMOD_FILTER_BLACKLIST

+

filter modules in blacklist out

+
 

KMOD_FILTER_BUILTIN

+

filter builtin modules out

+
 
+
+
+
+
+

enum kmod_symbol_bind

+

The symbol bind type, see kmod_module_dependency_symbol_get_bind().

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

KMOD_SYMBOL_NONE

+

no or unknown symbol type

+
 

KMOD_SYMBOL_LOCAL

+

local symbol, accessible only within the module

+
 

KMOD_SYMBOL_GLOBAL

+

global symbol, accessible by all modules

+
 

KMOD_SYMBOL_WEAK

+

weak symbol, a lower precedence global symbols

+
 

KMOD_SYMBOL_UNDEF

+

undefined or not yet resolved symbol

+
 
+
+
+
+
+ + + \ No newline at end of file diff --git a/master/libkmod-libkmod.html b/master/libkmod-libkmod.html new file mode 100644 index 0000000..56b505d --- /dev/null +++ b/master/libkmod-libkmod.html @@ -0,0 +1,711 @@ + + + + +libkmod: libkmod Reference Manual + + + + + + + + + + + + + + + + +
+
+
+ + +
+

libkmod

+

libkmod — libkmod context

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
struct kmod_ctx * + +kmod_new () +
struct kmod_ctx * + +kmod_ref () +
struct kmod_ctx * + +kmod_unref () +
+int + +kmod_load_resources () +
+void + +kmod_unload_resources () +
+int + +kmod_validate_resources () +
+int + +kmod_dump_index () +
+void + +kmod_set_log_priority () +
+int + +kmod_get_log_priority () +
+void + +kmod_set_log_fn () +
+void * + +kmod_get_userdata () +
+void + +kmod_set_userdata () +
const char * + +kmod_get_dirname () +
+
+
+

Types and Values

+
++++ + + + + + + + + + + + + + + +
structkmod_ctx
enumkmod_resources
enumkmod_index
+
+
+

Description

+

The context contains the default values for the library user, +and is passed to all library operations.

+
+
+

Functions

+
+

kmod_new ()

+
struct kmod_ctx *
+kmod_new (const char *dirname,
+          const char *const *config_paths);
+

Create kmod library context. This reads the kmod configuration +and fills in the default values.

+

The initial refcount is 1, and needs to be decremented to +release the resources of the kmod library context.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

dirname

what to consider as linux module's directory, if NULL +defaults to $MODULE_DIRECTORY/uname -r. If it's relative, +it's treated as relative to the current working directory. +Otherwise, give an absolute dirname.

 

config_paths

ordered array of paths (directories or files) where +to load from user-defined configuration parameters such as +alias, blacklists, commands (install, remove). If NULL +defaults to /etc/modprobe.d, /run/modprobe.d, +/usr/local/lib/modprobe.d, DISTCONFDIR/modprobe.d, and +/lib/modprobe.d. Give an empty vector if configuration should +not be read. This array must be null terminated.

 
+
+
+

Returns

+

a new kmod library context

+
+

Since: 1

+
+
+
+

kmod_ref ()

+
struct kmod_ctx *
+kmod_ref (struct kmod_ctx *ctx);
+

Take a reference of the kmod library context.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the passed kmod library context

+
+

Since: 1

+
+
+
+

kmod_unref ()

+
struct kmod_ctx *
+kmod_unref (struct kmod_ctx *ctx);
+

Drop a reference of the kmod library context. If the refcount +reaches zero, the resources of the context will be released.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the passed kmod library context or NULL if it's freed

+
+

Since: 1

+
+
+
+

kmod_load_resources ()

+
int
+kmod_load_resources (struct kmod_ctx *ctx);
+

Load indexes and keep them open in ctx +. This way it's faster to lookup +information within the indexes. If this function is not called before a +search, the necessary index is always opened and closed.

+

If user will do more than one or two lookups, insertions, deletions, most +likely it's good to call this function first. Particularly in a daemon like +udev that on boot issues hundreds of calls to lookup the index, calling +this function will speedup the searches.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 1

+
+
+
+

kmod_unload_resources ()

+
void
+kmod_unload_resources (struct kmod_ctx *ctx);
+

Unload all the indexes. This will free the resources to maintain the index +open and all subsequent searches will need to open and close the index.

+

User is free to call kmod_load_resources() and kmod_unload_resources() as +many times as wanted during the lifecycle of ctx +. For example, if a daemon +knows that when starting up it will lookup a lot of modules, it could call +kmod_load_resources() and after the first burst of searches is gone, it +could free the resources by calling kmod_unload_resources().

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 1

+
+
+
+

kmod_validate_resources ()

+
int
+kmod_validate_resources (struct kmod_ctx *ctx);
+

Check if indexes and configuration files changed on disk and the current +context is not valid anymore.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the resources state, valid states are kmod_resources.

+
+

Since: 3

+
+
+
+

kmod_dump_index ()

+
int
+kmod_dump_index (struct kmod_ctx *ctx,
+                 enum kmod_index type,
+                 int fd);
+

Dump index to file descriptor. Note that this function doesn't use stdio.h +so call fflush() before calling this function to be sure data is written in +order.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

type

index to dump, valid indexes are kmod_index

 

fd

file descriptor to dump index to

 
+
+
+

Returns

+

0 on success or < 0 otherwise.

+
+

Since: 4

+
+
+
+

kmod_set_log_priority ()

+
void
+kmod_set_log_priority (struct kmod_ctx *ctx,
+                       int priority);
+

Set the current logging priority, as defined in syslog.h(0P). The value +controls which messages are logged.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

ctx

kmod library context

 

priority

the new logging priority

 
+
+

Since: 1

+
+
+
+

kmod_get_log_priority ()

+
int
+kmod_get_log_priority (const struct kmod_ctx *ctx);
+

Get the current logging priority, as defined in syslog.h(0P).

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

the current logging priority

+
+

Since: 1

+
+
+
+

kmod_set_log_fn ()

+
void
+kmod_set_log_fn (struct kmod_ctx *ctx,
+                 void (*log_fn) (void *log_data, int priority, const char *file, int line, const char *fn, const char *format, va_list args),
+                 const void *data);
+

The built-in logging writes to stderr. It can be +overridden by a custom function, to plug log messages +into the user's logging functionality.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

ctx

kmod library context

 

log_fn

function to be called for logging messages

 

data

data to pass to log function

 
+
+

Since: 1

+
+
+
+

kmod_get_userdata ()

+
void *
+kmod_get_userdata (const struct kmod_ctx *ctx);
+

Retrieve stored data pointer from library context. This might be useful +to access from callbacks.

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+
+

Returns

+

stored userdata

+
+

Since: 1

+
+
+
+

kmod_set_userdata ()

+
void
+kmod_set_userdata (struct kmod_ctx *ctx,
+                   const void *userdata);
+

Store custom userdata + in the library context.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

ctx

kmod library context

 

userdata

data pointer

 
+
+

Since: 1

+
+
+
+

kmod_get_dirname ()

+
const char *
+kmod_get_dirname (const struct kmod_ctx *ctx);
+

Retrieve the absolute path used for linux modules in this context. The path +is computed from the arguments to kmod_new().

+
+

Parameters

+
+++++ + + + + + +

ctx

kmod library context

 
+
+

Since: 22

+
+
+
+

Types and Values

+
+

struct kmod_ctx

+
struct kmod_ctx;
+

Opaque object representing the library context.

+
+
+
+

enum kmod_resources

+

The validity state of the current libkmod resources, returned by +kmod_validate_resources().

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + +

KMOD_RESOURCES_OK

+

resources are valid

+
 

KMOD_RESOURCES_MUST_RELOAD

+

resources are not valid; to resolve call +kmod_unload_resources() and kmod_load_resources()

+
 

KMOD_RESOURCES_MUST_RECREATE

+

resources are not valid; to resolve ctx + must +be re-created.

+
 
+
+
+
+
+

enum kmod_index

+

The (module) index type, used by kmod_dump_index().

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

KMOD_INDEX_MODULES_DEP

+

index of module dependencies

+
 

KMOD_INDEX_MODULES_ALIAS

+

index of module aliases

+
 

KMOD_INDEX_MODULES_SYMBOL

+

index of symbol aliases

+
 

KMOD_INDEX_MODULES_BUILTIN_ALIAS

+

index of builtin module aliases

+
 

KMOD_INDEX_MODULES_BUILTIN

+

index of builtin module

+
 

_KMOD_INDEX_PAD

+

DO NOT USE; padding to make sure enum is not mapped to char

+
 
+
+
+
+
+ + + \ No newline at end of file diff --git a/master/right-insensitive.png b/master/right-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..a3696bf9999998d124ad602a1971bf828a673ce4 GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`8$4YcLn>}1OVlLX-&gy;@yCaI zd#jh8G-6osQR>PB_TS&%Ust%mdKI;Vst06>gghyVZp literal 0 HcmV?d00001 diff --git a/master/right.png b/master/right.png new file mode 100644 index 0000000000000000000000000000000000000000..73d25da4c7a8a995fc6740b1ec0f9ccc733a72a5 GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`^`0({Ar-f-o>Am+EEGAKC_USE zi{~l@?MZPaks&XA*DsPY*}KnWzCve{@1~iR>(+1o?f+++{=CaSPBwMfxz6R# dt +{ + padding-top: 0.25em; + padding-bottom: 0.25em; + font-weight: bold; +} + +dl.toc > dl +{ + padding-bottom: 0.5em; +} + +.parameter +{ + font-style: normal; +} + +.footer +{ + padding-top: 3.5em; + /* tango:aluminium 3 */ + color: #babdb6; + text-align: center; + font-size: 80%; +} + +.informalfigure, +.figure +{ + margin: 1em; +} + +.informalexample, +.example +{ + margin-top: 1em; + margin-bottom: 1em; +} + +.warning +{ + /* tango:orange 0/1 */ + background: #ffeed9; + background: rgba(252, 175, 62, 0.1); + border-color: #ffb04f; + border-color: rgba(252, 175, 62, 0.2); +} +.note +{ + /* tango:chameleon 0/0.5 */ + background: #d8ffb2; + background: rgba(138, 226, 52, 0.1); + border-color: #abf562; + border-color: rgba(138, 226, 52, 0.2); +} +div.blockquote +{ + border-color: #eeeeec; +} +.note, .warning, div.blockquote +{ + padding: 0.5em; + border-width: 1px; + border-style: solid; + margin: 2em; +} +.note p, .warning p +{ + margin: 0; +} + +div.warning h3.title, +div.note h3.title +{ + display: none; +} + +p + div.section +{ + margin-top: 1em; +} + +div.refnamediv, +div.refsynopsisdiv, +div.refsect1, +div.refsect2, +div.toc, +div.section +{ + margin-bottom: 1em; +} + +/* blob links */ +h2 .extralinks, h3 .extralinks +{ + float: right; + /* tango:aluminium 3 */ + color: #babdb6; + font-size: 80%; + font-weight: normal; +} + +.lineart +{ + color: #d3d7cf; + font-weight: normal; +} + +.annotation +{ + /* tango:aluminium 5 */ + color: #555753; + font-weight: normal; +} + +.structfield +{ + font-style: normal; + font-weight: normal; +} + +acronym,abbr +{ + border-bottom: 1px dotted gray; +} + +.listing_frame { + /* tango:sky blue 1 */ + border: solid 1px #729fcf; + border: solid 1px rgba(114, 159, 207, 0.2); + padding: 0px; +} + +.listing_lines, .listing_code { + margin-top: 0px; + margin-bottom: 0px; + padding: 0.5em; +} +.listing_lines { + /* tango:sky blue 0.5 */ + background: #a6c5e3; + background: rgba(114, 159, 207, 0.2); + /* tango:aluminium 6 */ + color: #2e3436; +} +.listing_code { + /* tango:sky blue 0 */ + background: #e6f3ff; + background: rgba(114, 159, 207, 0.1); +} +.listing_code .programlisting { + /* override from previous */ + border: none 0px; + padding: 0px; + background: none; +} +.listing_lines pre, .listing_code pre { + margin: 0px; +} + +@media screen { + /* these have a as a first child, but since there are no parent selectors + * we can't use that. */ + a.footnote + { + position: relative; + top: 0em ! important; + } + /* this is needed so that the local anchors are displayed below the naviagtion */ + div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] + { + display: inline-block; + position: relative; + top:-5em; + } + /* this seems to be a bug in the xsl style sheets when generating indexes */ + div.index div.index + { + top: 0em; + } + /* make space for the fixed navigation bar and add space at the bottom so that + * link targets appear somewhat close to top + */ + body + { + padding-top: 2.5em; + padding-bottom: 500px; + max-width: 60em; + } + p + { + max-width: 60em; + } + /* style and size the navigation bar */ + table.navigation#top + { + position: fixed; + background: #e2e2e2; + border-bottom: solid 1px #babdb6; + border-spacing: 5px; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + z-index: 10; + } + table.navigation#top td + { + padding-left: 6px; + padding-right: 6px; + } + .navigation a, .navigation a:visited + { + /* tango:sky blue 3 */ + color: #204a87; + } + .navigation a:hover + { + /* tango:sky blue 2 */ + color: #3465a4; + } + td.shortcuts + { + /* tango:sky blue 2 */ + color: #3465a4; + font-size: 80%; + white-space: nowrap; + } + td.shortcuts .dim + { + color: #babdb6; + } + .navigation .title + { + font-size: 80%; + max-width: none; + margin: 0px; + font-weight: normal; + } +} +@media screen and (min-width: 60em) { + /* screen larger than 60em */ + body { margin: auto; } +} +@media screen and (max-width: 60em) { + /* screen less than 60em */ + #nav_hierarchy { display: none; } + #nav_interfaces { display: none; } + #nav_prerequisites { display: none; } + #nav_derived_interfaces { display: none; } + #nav_implementations { display: none; } + #nav_child_properties { display: none; } + #nav_style_properties { display: none; } + #nav_index { display: none; } + #nav_glossary { display: none; } + .gallery_image { display: none; } + .property_flags { display: none; } + .signal_flags { display: none; } + .parameter_annotations { display: none; } + .enum_member_annotations { display: none; } + .struct_member_annotations { display: none; } + .union_member_annotations { display: none; } + /* now that a column is hidden, optimize space */ + col.parameters_name { width: auto; } + col.parameters_description { width: auto; } + col.struct_members_name { width: auto; } + col.struct_members_description { width: auto; } + col.enum_members_name { width: auto; } + col.enum_members_description { width: auto; } + col.union_members_name { width: auto; } + col.union_members_description { width: auto; } + .listing_lines { display: none; } +} +@media print { + table.navigation { + visibility: collapse; + display: none; + } + div.titlepage table.navigation { + visibility: visible; + display: table; + background: #e2e2e2; + border: solid 1px #babdb6; + margin-top: 0; + margin-bottom: 0; + top: 0; + left: 0; + height: 3em; + } +} + +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.hll { background-color: #ffffcc } +.c { color: #3D7B7B; font-style: italic } /* Comment */ +.err { border: 1px solid #FF0000 } /* Error */ +.k { color: #008000; font-weight: bold } /* Keyword */ +.o { color: #666666 } /* Operator */ +.ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.cp { color: #9C6500 } /* Comment.Preproc */ +.cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ +.gd { color: #A00000 } /* Generic.Deleted */ +.ge { font-style: italic } /* Generic.Emph */ +.ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.gr { color: #E40000 } /* Generic.Error */ +.gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.gi { color: #008400 } /* Generic.Inserted */ +.go { color: #717171 } /* Generic.Output */ +.gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.gs { font-weight: bold } /* Generic.Strong */ +.gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.gt { color: #0044DD } /* Generic.Traceback */ +.kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.kp { color: #008000 } /* Keyword.Pseudo */ +.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.kt { color: #B00040 } /* Keyword.Type */ +.m { color: #666666 } /* Literal.Number */ +.s { color: #BA2121 } /* Literal.String */ +.na { color: #687822 } /* Name.Attribute */ +.nb { color: #008000 } /* Name.Builtin */ +.nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.no { color: #880000 } /* Name.Constant */ +.nd { color: #AA22FF } /* Name.Decorator */ +.ni { color: #717171; font-weight: bold } /* Name.Entity */ +.ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ +.nf { color: #0000FF } /* Name.Function */ +.nl { color: #767600 } /* Name.Label */ +.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.nt { color: #008000; font-weight: bold } /* Name.Tag */ +.nv { color: #19177C } /* Name.Variable */ +.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.w { color: #bbbbbb } /* Text.Whitespace */ +.mb { color: #666666 } /* Literal.Number.Bin */ +.mf { color: #666666 } /* Literal.Number.Float */ +.mh { color: #666666 } /* Literal.Number.Hex */ +.mi { color: #666666 } /* Literal.Number.Integer */ +.mo { color: #666666 } /* Literal.Number.Oct */ +.sa { color: #BA2121 } /* Literal.String.Affix */ +.sb { color: #BA2121 } /* Literal.String.Backtick */ +.sc { color: #BA2121 } /* Literal.String.Char */ +.dl { color: #BA2121 } /* Literal.String.Delimiter */ +.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.s2 { color: #BA2121 } /* Literal.String.Double */ +.se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ +.sh { color: #BA2121 } /* Literal.String.Heredoc */ +.si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ +.sx { color: #008000 } /* Literal.String.Other */ +.sr { color: #A45A77 } /* Literal.String.Regex */ +.s1 { color: #BA2121 } /* Literal.String.Single */ +.ss { color: #19177C } /* Literal.String.Symbol */ +.bp { color: #008000 } /* Name.Builtin.Pseudo */ +.fm { color: #0000FF } /* Name.Function.Magic */ +.vc { color: #19177C } /* Name.Variable.Class */ +.vg { color: #19177C } /* Name.Variable.Global */ +.vi { color: #19177C } /* Name.Variable.Instance */ +.vm { color: #19177C } /* Name.Variable.Magic */ +.il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/master/up-insensitive.png b/master/up-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..674be9c5b92e44f8224634b50cd8ef04e2b47965 GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}LV!<*E0F&G|Npja+xG9@fB5iW zAbAiB_UzfS7Yz38+XoaxBY|9q2wV!N79xm7MyD@P1KJ^9666=mz{t)asGw-*>YJID z-_+dIy3{)E6>EaktaciyDWkwf6fjbiE$1m4UUH<&P zj{B93eeJsUnRlC(Z{7MzERTDS`$l1NN%cj>n&QYTlpA`rG>i%w8-!bzAJv!TDix kH##3#t@Lf*+omYmdKI;Vst0316<&;S4c literal 0 HcmV?d00001 From 9dbc0c4914254adfed854605fe84d14abee2ffde Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 10 Mar 2025 12:50:59 -0500 Subject: [PATCH 7/9] Manual front page update Signed-off-by: Lucas De Marchi --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d8aa4c2..72cee02 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ -Documentation website for kmod +# kmod API Document + +- [](/index.html) +- [v33](v33/index.html) +- [v32](v32/index.html) From 4dc91f49f838fccef1781739f5f2a209b7cc4fda Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 10 Mar 2025 12:52:28 -0500 Subject: [PATCH 8/9] Do not show downloads Signed-off-by: Lucas De Marchi --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 039ff60..ce90419 100644 --- a/_config.yml +++ b/_config.yml @@ -1,5 +1,5 @@ title: kmod description: kmod - Linux kernel module handling -show_downloads: true +show_downloads: false google_analytics: theme: jekyll-theme-hacker # For Open-Source Hackthon :) From abe48450ee4e3f41880720ef867014330fddf4e4 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Mon, 10 Mar 2025 13:05:44 -0500 Subject: [PATCH 9/9] Point master to the right index Signed-off-by: Lucas De Marchi --- .github/workflows/doc.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 7092a44..24061aa 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -27,7 +27,7 @@ jobs: run: | echo "# kmod API Document" > README.md echo >> README.md - ls -lr | awk '{print $1, $9}' | awk '/^d.* master/ {print "- ["$9"]("$9"/index.html)"}' >> README.md + echo "- [master (development)](master/index.html)" >> README.md ls -lr | awk '{print $1, $9}' | awk '/^d.* v/ {print "- ["$2"]("$2"/index.html)"}' >> README.md - name: Commit and push diff --git a/README.md b/README.md index 72cee02..44b9d9f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # kmod API Document -- [](/index.html) +- [master (development)](master/index.html) - [v33](v33/index.html) - [v32](v32/index.html)