东山再起是什么意思| 花团锦簇什么意思| 做梦梦见狗咬我什么意思啊| 为什么说成也萧何败也萧何| 眼睛凹陷是什么原因| 用什么刷牙能使牙齿变白| 分娩是什么意思啊| 宝宝乳糖不耐受喝什么奶粉比较好| 什么网站可以看黄片| 社保基数什么时候调整| 什么时间泡脚最好| 拍身份证穿什么颜色衣服| 农历五月二十四是什么日子| 三个金念什么| 煮玉米为什么要放盐| 肱骨头小囊变什么意思| 身上经常出汗是什么原因| 多米诺骨牌是什么意思| 起眼屎是什么原因| 身先士卒是什么意思| 脚发热是什么病| 00属什么生肖| 令郎是什么意思| 葡萄糖高是什么原因| 菠萝蜜的核有什么功效| 今年42岁属什么生肖| 全身出虚汗多是什么原因造成的| 副市长是什么级别| 提篮子是什么意思| 为什么会湿疹| 为什么长斑| 店长的工作职责是什么| 空气过敏是什么症状| 吃生蚝有什么好处| 端庄的意思是什么| 不能吃辣是什么原因| 什么野菜降血糖| 飚是什么意思| 核磁共振是检查什么的| 睡觉为什么会磨牙| 甘油三酯高会引起什么病| 焦虑症吃什么药好| 帕金森是什么引起的| 肚脐连着什么器官| 一年半载是什么意思| 不苟言笑的苟是什么意思| 风湿看什么科室| 金字旁乐读什么| 什么叫骨折| 子欲养而亲不待是什么意思| 豚的右边念什么| 星星是什么的眼睛| 什么东西人们都不喜欢吃| 肾活检是什么意思| 什么人不能喝石斛| 天经地义的意思是什么| 袁崇焕为什么杀毛文龙| 半夜胃反酸水是什么原因| 禅宗是什么意思| 典型是什么意思| 恋爱是什么| 梦见自己把头发剪短了是什么意思| 荨麻疹可以涂什么药膏| 乙肝病毒表面抗体高是什么意思| 阴道口有点痒用什么药| 憩室炎吃什么药| 漏斗胸是什么原因造成的| 腔隙性脑梗吃什么药| 白细胞低吃什么食物好| 什么的风儿| 喉咙挂什么科室| 心脏不好喝什么茶比较好| 遗精是什么症状| 肠系膜淋巴结肿大吃什么药| 枇杷什么味道| 情缘是什么意思| 硫磺是什么东西| 前列腺炎吃什么药| 头伏饺子二伏面三伏吃什么| 鼠标cpi是什么意思| 壁虎在家里是什么征兆| 不胜什么| 鼓上蚤是什么意思| 水猴子是什么| 鼻窦炎挂什么科| 晚上11点多是什么时辰| 程字五行属什么| 鸡和什么相冲| 青鱼吃什么| 天时地利人和是什么意思| 吊销驾驶证是什么意思| 子宫肌瘤什么不能吃| 天之骄子是什么意思| 沉香木是什么树| 臭屁多是什么原因| 缺钾吃什么药| 嘴唇上长疱疹用什么药| 多动症是什么引起的| 头发长的慢是什么原因| 胆码是什么意思| 有头皮屑用什么洗发水| 澄字五行属什么| 检查视力挂什么科| 上海元宵节吃什么| 总蛋白偏低是什么意思| 挪威用什么货币| 男士内裤什么材质的好| 心肌病是什么症状| 1932年属什么| 四月初五是什么星座| 热敷眼睛有什么好处| 吃益生菌有什么好处| 不领情是什么意思| tap是什么意思| 扁桃体发炎了吃什么药| 饿了胃疼是什么原因| 虎毒不食子是什么意思| 嘴辰发紫是什么病| 做梦梦见蛇是什么意思| 吃什么补气血效果最好| 小孩什么时候会说话| 吃什么食物能长高| 粘纤是什么材质| 腿肿是什么原因引起的怎么办| 月经量多吃什么药| 螳螂吃什么食物| 什么是个体工商户| 薏米长什么样子的图片| 地龙是什么动物| 孤辰是什么意思| 朵的第二笔是什么| icp是什么| 沃尔玛是干什么的| 套餐是什么意思| 人格什么意思| 心塞是什么意思| 脑梗吃什么水果好| 少一个睾丸有什么影响| pco2是什么意思| 白羊座的幸运色是什么| 围棋九段是什么水平| 脑膜炎是什么病严重吗| 手上有红点是什么原因| 唐僧成了什么佛| pa是什么材料| skap是什么牌子| 眼睛一直眨是什么原因| unny是什么牌子| 反应蛋白高是什么原因| 什么驴技穷成语| 丹桂飘香是什么季节| 二十年是什么婚| 前列腺增生吃什么药效果最好| 硫酸是什么| cr5是什么意思| 鸡肠炎用什么药效果好| 什么是混合磨玻璃结节| 孕妇忌吃什么| 奇花初胎矞矞皇皇是什么意思| 八仙过海是什么意思| 八拜之交是什么生肖| 蝙蝠是什么变的| 义父什么意思| 上海虹桥医院属于什么医院| 足字旁的字与什么有关| 脾氨肽是什么| 慎什么意思| 摆渡是什么意思| 肺看什么科室| 宝宝不吃奶是什么原因| 彩礼是什么意思| 脆皮是什么意思| 什么姿势舒服| 市值是什么意思| 猪冲什么生肖| 1938年属什么生肖属相| 阴道炎要用什么药| 发烧可以吃什么水果| 外耳道耵聍什么意思| 猿人头是什么牌子| 词牌名是什么意思| 出脚汗是什么原因| 血管检查什么方法最好| few是什么意思| 心脏跳的快什么原因| 脖子疼是什么原因引起的| 梦见很多蜘蛛是什么意思| 西洋参和花旗参有什么区别| 腹部胀气是什么原因| 开门见什么最吉利| 赤子之心什么意思| 睡觉为什么会磨牙| 头痛应该挂什么科| 九二年属猴的是什么命| 抖m是什么| 稷是什么农作物| 晚上尿床是什么原因| 类风湿关节炎吃什么好| 原始鳞状上皮成熟是什么意思| 筷子掉地上是什么征兆| 萝卜喝醉了会变成什么| 尿道感染挂什么科| 什么辉煌四字词语| sassy是什么意思| 红茶什么季节喝最好| 脸小适合什么发型| 伪骨科是什么意思| 6月18日是什么星座| 百合什么时候种植| 脚水肿是什么原因引起的| 蔓越莓有什么功效和作用| 治前列腺炎吃什么药效果最好| 大米里放什么不生虫子| 醉是什么生肖| 步兵是什么意思| 6月12号是什么星座| 黄芪不适合什么人吃| 三十周年结婚是什么婚| 城字五行属什么| 女人脚浮肿是什么原因| 头发粗硬是什么原因| eb病毒感染是什么病| 散人是什么意思| 吃猪肝补什么| v是什么化学元素| 肝功能检查什么| 水命是什么意思| 心宽是什么意思| 扁桃体发炎引起的发烧吃什么药| 336是什么意思| 田七蒸瘦肉有什么功效| 睡鼠吃什么| 七情六欲是什么意思| 为什么早上起来恶心想吐| 洲际导弹是什么意思| 男人送女人项链代表什么| 吃甲钴胺有什么副作用| 来例假肚子疼是什么原因| 花开花落不见你回头是什么歌| 开黑是什么意思| 蓝色和红色混合是什么颜色| 小孩咳嗽有痰吃什么药| 全脂奶粉是什么意思| 淋巴细胞绝对值偏高是什么原因| 小便白细胞高是什么原因| 盲约大结局是什么| 尿频繁是什么原因| 古怪是什么意思| 3月20号是什么星座| 庚寅五行属什么| 不尽人意是什么意思| 松花蛋是什么蛋| 一什么正什么| 梦见火灾预示什么| 常委是什么级别| 工作效率是什么意思| 鱼休子是什么| 医生为什么看瞳孔知道没救了| 5.20是什么星座| 吃牛肉对身体有什么好处| 咳嗽发烧吃什么药| 玉皇大帝和王母娘娘是什么关系| 血糖高喝什么好| 黄大仙是保佑什么的| 百度

省公路管理局借助高德发布高速公路通行信息初见成效

百度 而所有408型签证申请者都要接受安全审查。
SYSCTL(9)              NetBSD Kernel Developer's Manual              SYSCTL(9)


NAME
sysctl - system variable control interfaces
SYNOPSIS
#include <sys/param.h> #include <sys/sysctl.h> Primary external interfaces: void sysctl_init(void); int sysctl_lock(struct lwp *l, void *oldp, size_t savelen); int sysctl_dispatch(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen, const int *oname, struct lwp *l, const struct sysctlnode *rnode); void sysctl_unlock(struct lwp *l); int sysctl_createv(struct sysctllog **log, int cflags, struct sysctlnode **rnode, struct sysctlnode **cnode, int flags, int type, const char *namep, const char *desc, sysctlfn func, u_quad_t qv, void *newp, size_t newlen, ...); int sysctl_destroyv(struct sysctlnode *rnode, ...); void sysctl_free(struct sysctlnode *rnode); void sysctl_teardown(struct sysctllog **); int old_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, size_t newlen, struct lwp *l); Core internal functions: int sysctl_locate(struct lwp *l, const int *name, u_int namelen, struct sysctlnode **rnode, int *nip); int sysctl_lookup(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen, const int *oname, struct lwp *l, struct sysctlnode *rnode); int sysctl_create(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen, const int *oname, struct lwp *l, struct sysctlnode *rnode); int sysctl_destroy(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen, const int *oname, struct lwp *l, struct sysctlnode *rnode); int sysctl_query(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen, const int *oname, struct lwp *l, const struct sysctlnode *rnode); Simple ``helper'' functions: int sysctl_needfunc(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen, const int *oname, struct lwp *l, const struct sysctlnode *rnode); int sysctl_notavail(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen, const int *oname, struct lwp *l, const struct sysctlnode *rnode); int sysctl_null(const int *name, u_int namelen, void *oldp, size_t *oldlenp, const void *newp, size_t newlen, const int *oname, struct lwp *l, const struct sysctlnode *rnode");
DESCRIPTION
The SYSCTL subsystem instruments a number of kernel tunables and other data structures via a simple MIB-like interface, primarily for consump- tion by userland programs, but also for use internally by the kernel.
LOCKING
All operations on the SYSCTL tree must be protected by acquiring the main SYSCTL lock. The only functions that can be called when the lock is not held are sysctl_lock(), sysctl_createv(), sysctl_destroyv(), and old_sysctl(). All other functions require the tree to be locked. This is to prevent other users of the tree from moving nodes around during an add operation, or from destroying nodes or subtrees that are actively being used. The lock is acquired by calling sysctl_lock() with a pointer to the process's lwp l (NULL may be passed to all functions as the lwp pointer if no lwp is appropriate, though any changes made via sysctl_create(), sysctl_destroy(), sysctl_lookup(), or by any helper function will be done with effective superuser privileges). The oldp and savelen arguments are a pointer to and the size of the memory region the caller will be using to collect data from SYSCTL. These may also be NULL and 0, respectively. The memory region will be locked via uvm_vslock() if it is a region in userspace. The address and size of the region are recorded so that when the SYSCTL lock is to be released via sysctl_unlock(), only the lwp pointer l is required.
LOOKUPS
Once the lock has been acquired, it is typical to call sysctl_dispatch() to handle the request. sysctl_dispatch() will examine the contents of name, an array of integers at least namelen long, which is to be located in kernel space, in order to determine which function to call to handle the specific request. sysctl_dispatch() uses the following algorithm to determine the function to call: ?/b> Scan the tree using sysctl_locate() ?/b> If the node returned has a ``helper'' function, call it ?/b> If the requested node was found but has no function, call sysctl_lookup() ?/b> If the node was not found and name specifies one of sysctl_query(), sysctl_create(), or sysctl_destroy(), call the appropriate function ?/b> If none of these options applies and no other error was yet recorded, return EOPNOTSUPP The oldp and oldlenp arguments to sysctl_dispatch(), as with all the other core functions, describe an area into which the current or requested value may be copied. oldp may or may not be a pointer into userspace (as dictated by whether l is NULL or not). oldlenp is a non-NULL pointer to a size_t. newp and newlen describe an area where the new value for the request may be found; newp may also be a pointer into userspace. The oname argument is a non-NULL pointer to the base of the request currently being processed. By simple arithmetic on name, namelen, and oname, one can easily determine the entire original request and namelen values, if needed. The rnode value, as passed to sysctl_dispatch() represents the root of the tree into which the current request is to be dispatched. If NULL, the main tree will be used. sysctl_locate() scans a tree for the node most specific to a request. If the pointer referenced by rnode is not NULL, the tree indicated is searched, otherwise the main tree will be used. The address of the most relevant node will be returned via rnode and the number of MIB entries consumed will be returned via nip, if it is not NULL. The sysctl_lookup() function takes the same arguments as sysctl_dispatch() with the caveat that the value for namelen must be zero in order to indicate that the node referenced by the rnode argument is the one to which the lookup is being applied.
CREATION AND DESTRUCTION OF NODES
New nodes are created and destroyed by the sysctl_create() and sysctl_destroy() functions. These functions take the same arguments as sysctl_dispatch() with the additional requirement that the namelen argu- ment must be 1 and the name argument must point to an integer valued either CTL_CREATE or CTL_CREATESYM when creating a new node, or CTL_DESTROY when destroying a node. The newp and newlen arguments should point to a copy of the node to be created or destroyed. If the create or destroy operation was successful, a copy of the node created or destroyed will be placed in the space indicated by oldp and oldlenp. If the create operation fails because of a conflict with an existing node, a copy of that node will be returned instead. In order to facilitate the creation and destruction of nodes from a given tree by kernel subsystems, the functions sysctl_createv() and sysctl_destroyv() are provided. These functions take care of the over- head of filling in the contents of the create or destroy request, dealing with locking, locating the appropriate parent node, etc. The arguments to sysctl_createv() are used to construct the new node. If the log argument is not NULL, a sysctllog structure will be allocated and the pointer referenced will be changed to address it. The same log may be used for any number of nodes, provided they are all inserted into the same tree. This allows for a series of nodes to be created and later removed from the tree in a single transaction (via sysctl_teardown()) without the need for any record keeping on the caller's part. The cflags argument is currently unused and must be zero. The rnode argument must either be NULL or a valid pointer to a reference to the root of the tree into which the new node must be placed. If it is NULL, the main tree will be used. It is illegal for rnode to refer to a NULL pointer. If the cnode argument is not NULL, on return it will be adjusted to point to the address of the new node. The flags and type arguments are combined into the sysctl_flags field, and the current value for SYSCTL_VERSION is added in. Note: the CTLFLAG_PERMANENT flag can only be set from SYSCTL setup routines (see SETUP FUNCTIONS) as called by sysctl_init(). The namep argument is copied into the sysctl_name field and must be less than SYSCTL_NAMELEN characters in length. The string indicated by desc will be copied if the CTLFLAG_OWNDESC flag is set, and will be used as the node's description. Note: if sysctl_destroyv() attempts to delete a node that does not own its own description (and is not marked as permanent), but the deletion fails, the description will be copied and sysctl_destroyv() will set the CTLFLAG_OWNDESC flag. The func argument is the name of a ``helper'' function (see HELPER FUNCTIONS AND MACROS). If the CTLFLAG_IMMEDIATE flag is set, the qv argument will be interpreted as the initial value for the new ``int'' or ``quad'' node. This flag does not apply to any other type of node. The newp and newlen arguments describe the data external to SYSCTL that is to be instrumented. One of func, qv and the CTLFLAG_IMMEDIATE flag, or newp and newlen must be given for nodes that instrument data, otherwise an error is returned. The remaining arguments are a list of integers specifying the path through the MIB to the node being created. The list must be terminated by the CTL_EOL value. The penultimate value in the list may be CTL_CREATE if a dynamic MIB entry is to be made for this node. sysctl_createv() specifically does not support CTL_CREATESYM, since setup routines are expected to be able to use the in-kernel ksyms(4) interface to discover the location of the data to be instrumented. If the node to be created matches a node that already exists, a return code of 0 is given, indicating success. When using sysctl_destroyv() to destroy a given node, the rnode argument, if not NULL, is taken to be the root of the tree from which the node is to be destroyed, otherwise the main tree is used. The rest of the argu- ments are a list of integers specifying the path through the MIB to the node being destroyed. If the node being destroyed does not exist, a suc- cessful return code is given. Nodes marked with the CTLFLAG_PERMANENT flag cannot be destroyed.
HELPER FUNCTIONS AND MACROS
Helper functions are invoked with the same common argument set as sysctl_dispatch() except that the rnode argument will never be NULL. It will be set to point to the node that corresponds most closely to the current request. Helpers are forbidden from modifying the node they are passed; they should instead copy the structure if changes are required in order to effect access control or other checks. The ``helper'' prototype and function that needs to ensure that a newly assigned value is within a certain range (presuming external data) would look like the following: static int sysctl_helper(SYSCTLFN_PROTO); static int sysctl_helper(SYSCTLFN_ARGS) { struct sysctlnode node; int t, error; node = *rnode; node.sysctl_data = &t; error = sysctl_lookup(SYSCTLFN_CALL(&node)); if (error || newp == NULL) return (error); if (t < 0 || t > 20) return (EINVAL); *(int*)rnode->sysctl_data = t; return (0); } The use of the SYSCTLFN_PROTO, SYSCTLFN_ARGS, and SYSCTLFN_CALL macros ensure that all arguments are passed properly. The SYSCTLFN_RWPROTO and SYSCTLFN_RWARGS macros are only used internally by those core SYSCTL routines that may have cause to modify the data in the given SYSCTL tree. The single argument to the SYSCTLFN_CALL macro is the pointer to the node being examined. Three basic helper functions are available for use. sysctl_needfunc() will emit a warning to the system console whenever it is invoked and pro- vides a simplistic read-only interface to the given node. sysctl_notavail() will forward ``queries'' to sysctl_query() so that sub- trees can be discovered, but will return EOPNOTSUPP for any other condi- tion. sysctl_null() specifically ignores any arguments given, sets the value indicated by oldlenp to zero, and returns success.
SETUP FUNCTIONS
Though nodes can be added to the SYSCTL tree at any time, in order to add nodes during the kernel bootstrap phase, a proper ``setup'' function must be used. Setup functions are declared using the SYSCTL_SETUP macro, which takes the name of the function and a short string description of the function as arguments. The address of the function is added to a list of functions that sysctl_init() traverses during initialization. Setup functions to not have to add nodes to the main tree, but can set up their own trees for emulation or other purposes. Emulations that require use of a main tree but with some nodes changed to suit their own purposes can arrange to overlay a sparse private tree onto their main tree by mak- ing the e_sysctlovly member of their struct emul definition point to the overlaid tree. Setup functions should take care to create all nodes from the root down to the subtree they are creating, since the order in which setup func- tions are called is arbitrary (the order in which setup functions are called is only determined by the ordering of the object files as passed to the linker when the kernel is built).
MISCELLANEOUS FUNCTIONS
sysctl_init() is called early in the kernel bootstrap process. It ini- tializes the SYSCTL lock, calls all the registered setup functions, and marks the tree as permanent. sysctl_free() will unconditionally delete any and all nodes below the given node. Its intended use is for the deletion of entire trees, not subtrees. If a subtree is to be removed, sysctl_destroy() or sysctl_destroyv() should be used to ensure that nodes not owned by the sub-system being deactivated are not mistakenly destroyed. The SYSCTL lock must be held when calling this function. sysctl_teardown() unwinds a sysctllog and deletes the nodes in the oppo- site order in which they were created. old_sysctl() provides an interface similar to the old SYSCTL implementa- tion, with the exception that access checks on a per-node basis are per- formed if the l argument is non-NULL. If called with a NULL argument, the values for newp and oldp are interpreted as kernel addresses, and access is performed as for the superuser.
NOTES
It is expected that nodes will be added to (or removed from) the tree during the following stages of a machine's lifetime: ?/b> initialization -- when the kernel is booting ?/b> autoconfiguration -- when devices are being probed at boot time ?/b> ``plug and play'' device attachment -- when a PC-Card, USB, or other device is plugged in or attached ?/b> LKM initialization -- when an LKM is being loaded ?/b> ``run-time'' -- when a process creates a node via the sysctl(3) interface Nodes marked with CTLFLAG_PERMANENT can only be added to a tree during the first or initialization phase, and can never be removed. The ini- tialization phase terminates when the main tree's root is marked with the CTLFLAG_PERMANENT flag. Once the main tree is marked in this manner, no nodes can be added to any tree that is marked with CTLFLAG_READONLY at its root, and no nodes can be added at all if the main tree's root is so marked. Nodes added by device drivers, LKMs, and at device insertion time can be added to (and removed from) ``read-only'' parent nodes. Nodes created by processes can only be added to ``writable'' parent nodes. See sysctl(3) for a description of the flags that are allowed to be used by when creating nodes.
SEE ALSO
sysctl(3)
HISTORY
The dynamic SYSCTL implementation first appeared in NetBSD 2.0.
AUTHORS
Andrew Brown <atatat@NetBSD.org> designed and implemented the dynamic SYSCTL implementation. NetBSD 2.0 March 24, 2004 NetBSD 2.0

Powered by man-cgi (2025-08-05). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.

什么都有 疱疹是什么病啊 什么是疣体 紧锣密鼓是什么意思 ot是什么
大小脸挂什么科 9.3是什么日子 双肺纹理增多什么意思 乙肝属于什么科 辟谷是什么
颜值控是什么意思 什么叫换手率 花胶是什么东西 梦见抬死人是什么意思 大阪烧是什么
乔治阿玛尼和阿玛尼有什么区别 hp是什么单位 体育总局局长什么级别 脸上涂什么可以美白 为什么想到一个人会心痛
易岗易薪是什么意思hcv7jop5ns6r.cn 婴儿肥是什么意思mmeoe.com 李子和什么不能一起吃hcv8jop9ns1r.cn 宴字五行属什么hcv8jop7ns1r.cn 喜用神是什么hcv8jop4ns5r.cn
自主能力是什么意思hcv9jop5ns6r.cn 肺气不足吃什么药hcv9jop4ns5r.cn 口苦是什么病hcv9jop5ns2r.cn 慰劳是什么意思hcv9jop6ns8r.cn 糊精是什么东西hcv9jop7ns5r.cn
近水楼台是什么意思hcv9jop3ns9r.cn 孩子记忆力差是什么原因hcv8jop7ns2r.cn cd代表什么意思hcv8jop3ns1r.cn 五心烦热是什么意思hcv9jop3ns1r.cn 三险一金是什么hcv9jop4ns5r.cn
毒灵芝长什么样hcv9jop6ns7r.cn 霜降是什么时候weuuu.com 吃什么补红细胞最快cl108k.com 白带发黄什么原因hcv7jop6ns4r.cn asmr是什么意思hcv8jop6ns6r.cn
百度