在linux kernel 编程中如何调到应用层的函数? 能调吗?如果能调怎么调用?? 多谢
by sprinklexu - C/C++ - 2004-10-22 17:23:10 阅读(1140) 回复(3)
我想在所有CPU上执行一个函数, 有这样的kernel api吗? 还是必须得自己产生IPI? :em02:
不管本地发送的还是转发的都将调用xfrm_lookup()。 xfrm_lookup() -> __xfrm_lookup() -> xfrm_sk_policy_lookup()查找策略,如果策略的action为XFRM_POLICY_ALLOW则 -> xfrm_find_bundle()查找是否存在bundle, 否则 -> xfrm_tmpl_resolve() -> xfrm_tmpl_resolve_one() -> xfrm_state_find() -> km_query() -> km->acquire()实际调用的是pfkey_send_acquire()通过PF_KEY2向应用层请求协商SA信息 xfrm_bundle_create() 经过处理后...
ip_input.c:ip_local_deliver_finish() -> ipprot->handler(skb)实际调用xfrm4_rcv()->xfrm4_rcv_spi()->xfrm4_rcv_encap()->xfrm_input() 为skb分配新的额secpath(sp) ->xfrm_parse_spi()获取spi和seq -> xfrm_state_lookup()查找sa信息 -> x->type->input(x,skb)实际上调用的是ah,esp,ipcomp的input回调函数,例如: esp_input()进行解密处理 -> inner_mode->input(x, skb)实际调研的是beet, transport, tunnel的input回调函数,...
1. 简介 一般来说,应用层程序的执行是依赖与内核提供的接口,比如内核系统调用来获得系统的时间片,从而获得执行。如下是在Solaris里面的进程模型,我想在linux里面应该也是差不多的。 但是,能否反其道而行之呢?也就是说,能不能从内核里面的模块直接调用应用层的函数,并且得到执行呢?我们都知道,在应用层编程有很多好处,比如,可以利用现成的代码,有好的调试工具,等等很多。如果可以把一部...
Anatomy of the linux kernel History and architectural decomposition Document options Print this page E-mail this page Document options requiring JavaScript are not displayed Watch these demos Integrate new tools and architectures into your environment - fast! --> Rate this page Help us improve this content Level: Intermediate M. Tim Jones ( [email=mtj@mtjones.com?subject=Anatomy ...
有个职位跟大家分享下... 北京(Bei Jing) Senior Software Developer(C/linux) 1 4年以上的linux相关的工作经验。 2 熟悉linux系统,精通linux下的c编程 3 对常用的应用代理协议(http,smtp,pop3,ftp)有较深入的了解,有应用代理协议的编程经验。 或者对linux kernel有深入的了解,有kernel相关的编程经验。 4 有良好的团队合作精神。能够承受较大的工作压力。 有兴趣请加:[email]zhangjing.easy@hotmail.com[/email]