Linux netfilter源码分析(5)
五、 ipt_do_table()函数,数据包的过滤
5.1 ipt_entry 相关结构 ip_tables.h
ipt_entry结构前面有过了,再看一遍
struct ipt_entry
{
struct ipt_ip ip;
/* 所要匹配的报文的IP头信息 */
unsigned int nfcache;
/* 位向量,标示本规则关心报文的什么部分,暂未使用 */
u_int16_t target_offset;
/* target区的偏移,通常target区位于match区之后,而match区则在ipt_entry的末尾;
初始化为sizeof(struct ipt_entry),即假定没有match */
u_int16_t next_offset;
/* 下一条规则相对于本规则的偏移,也即本规则所用空间的总和,
初始化为sizeof(struct ipt_entry)+sizeof(struct ipt_target),即没有match */
unsigned int comefrom;
/* 位向量,标记调用本规则的HOOK号,可用于检查规则的有效性 */
struct ipt_counters counters;
/* 记录该规则处理过的报文数和报文总字节数 */
unsigned char elems[0];
/*target或者是match的起始位置 */
}
ipt_ip结构 ip_tables.h
struct ipt_ip {
struct in_addr src, dst; /* 来源/目的地址 */
struct in_addr smsk, dmsk; /* 来源/目的地址的掩码 */
char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; /*输入输出网络接口*/
unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ];
u_int16_t proto; /* 协议, 0 = ANY */
u_int8_t flags; /* 标志字段 */
u_int8_t invflags; /* 取反标志 */
};
5.2 ipt_do_table函数 ip_tables.c
unsigned int
ipt_do_table(struct sk_buff **pskb,
unsigned int hook,
const struct net_device *in,
&
相关文档:
例一:发送Signaling Packet:
Signaling Command是2个Bluetooth实体之间的L2CAP层命令传输。所以得Signaling Command使用CID 0x0001.
多个Command可以在一个C-frame(control frame)中发送。
如果要直接发送Signaling Command.需要建立SOCK_RAW类型的L2CAP连接Socket。这样才有机会自己填充Command Code,Identi ......
关于此文
本文档用于升级
ExtMail
,
ExtMan
版本,升级自
ExtMail 0.24(
含以下版本)到
1.0.5
稳定版
,
本文档只能适用于数据库是
mysql
的版本
,
假设安装邮局的域名
为
extmail
.org
,读者请根据自身实际情况予以修改。
升级步骤
1.
停止服务:
postifx,http,mysql,pop3
service httpd stop
......
由于工作有需要和第三方MQ通信,因为以前没有整过MQ,所以对于我来说很陌生。在网上也查看了一些经验,再加上个人的实践,小总结如下:
MQ的安装包是ISO,所以需要将ISO文件mount到Linux的一个目录下面,具体操作如下:
假如你选定的mount目 ......