Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

config_intrhook(9) [debian man page]

CONFIG_INTRHOOK(9)					   BSD Kernel Developer's Manual					CONFIG_INTRHOOK(9)

NAME
config_intrhook -- schedule a function to be run after interrupts have been enabled, but before root is mounted SYNOPSIS
#include <sys/kernel.h> int config_intrhook_establish(struct intr_config_hook *hook); void config_intrhook_disestablish(struct intr_config_hook *hook); DESCRIPTION
The config_intrhook_establish() function schedules a function to be run after interrupts have been enabled, but before root is mounted. If the system has already passed this point in its initialization, the function is called immediately. The config_intrhook_disestablish() function removes the entry from the hook queue. Before root is mounted, all the previously established hooks are run. The boot process is then stalled until all handlers remove their hook from the hook queue with config_intrhook_disestablish(). The boot process then proceeds to attempt to mount the root file system. Any driver that can potentially provide devices they wish to be mounted as root must use either this hook, or probe all these devices in the ini- tial probe. Since interrupts are disabled during the probe process, many drivers need a method to probe for devices with interrupts enabled. The requests are made with the intr_config_hook structure. This structure is defined as follows: struct intr_config_hook { TAILQ_ENTRY(intr_config_hook) ich_links;/* Private */ void (*ich_func)(void *arg); /* function to call */ void *ich_arg; /* Argument to call */ }; Storage for the intr_config_hook structure must be provided by the driver. It must be stable from just before the hook is established until after the hook is disestablished. Specifically, hooks are run at SI_SUB_INT_CONFIG_HOOKS(), which is immediately after the scheduler is started, and just before the root file system device is discovered. RETURN VALUES
A zero return value means the hook was successfully added to the queue (with either deferred or immediate execution). A non-zero return value means the hook could not be added to the queue because it was already on the queue. SEE ALSO
DEVICE_ATTACH(9) HISTORY
These functions were introduced in FreeBSD 3.0 with the CAM subsystem, but are available for any driver to use. AUTHORS
The functions were written by Justin Gibbs <gibbs@FreeBSD.org>. This manual page was written by M. Warner Losh <imp@FreeBSD.org>. BSD
September 24, 2006 BSD

Check Out this Related Man Page

NG_VLAN(4)						   BSD Kernel Interfaces Manual 						NG_VLAN(4)

NAME
ng_vlan -- IEEE 802.1Q VLAN tagging netgraph node type SYNOPSIS
#include <sys/types.h> #include <netgraph.h> #include <netgraph/ng_vlan.h> DESCRIPTION
The vlan node type multiplexes frames tagged according to the IEEE 802.1Q standard between different hooks. Each node has two special hooks, downstream and nomatch, and an arbitrary number of ``vlan'' hooks, each associated with a particular VLAN tag. An ETHERTYPE_VLAN frame received on the downstream hook with a tag that the node has been configured to filter is sent out the corresponding ``vlan'' hook. If it does not match any of the configured tags, or is not of a type ETHERTYPE_VLAN, it is sent out the nomatch hook. If the nomatch hook is not connected, the packet is dropped. An Ethernet frame received on the nomatch hook is passed unmodified to the downstream hook. An Ethernet frame received on any of the ``vlan'' hooks is tagged accordingly and sent out the downstream hook. HOOKS
This node type supports the following hooks: downstream Typically this hook would be connected to a ng_ether(4) node, using the lower hook. nomatch Typically this hook would also be connected to an ng_ether(4) type node using the upper hook. <any valid name> Any other hook name will be accepted and should later be associated with a particular tag. Typically this hook would be attached to an ng_eiface(4) type node using the ether hook. CONTROL MESSAGES
This node type supports the generic control messages, plus the following: NGM_VLAN_ADD_FILTER (addfilter) Associates a hook with the tag. NGM_VLAN_DEL_FILTER (delfilter) Disassociates a hook from the tag. NGM_VLAN_GET_TABLE (gettable) Returns a table of all hook/tag associations. EXAMPLES
#!/bin/sh ETHER_IF=rl0 ngctl -f- <<EOF shutdown ${ETHER_IF}: mkpeer ${ETHER_IF}: vlan lower downstream name ${ETHER_IF}:lower vlan connect ${ETHER_IF}: vlan: upper nomatch EOF ngctl mkpeer vlan: eiface vlan123 ether ngctl msg vlan: addfilter '{ vlan=123 hook="vlan123" }' SHUTDOWN
This node shuts down upon receipt of a NGM_SHUTDOWN control message, or when all hooks have been disconnected. SEE ALSO
netgraph(4), ng_eiface(4), ng_ether(4), ngctl(8), nghook(8) HISTORY
The ng_vlan node type appeared in FreeBSD 4.10. AUTHORS
Ruslan Ermilov <ru@FreeBSD.org> BSD
March 1, 2004 BSD
Man Page

Featured Tech Videos