- 论坛徽章:
- 0
|
lz, 借你的宝地, 想问下一个非流程问题:
在iptable_filter中:
- static struct
- {
- struct ipt_replace repl;
- struct ipt_standard entries[3];
- struct ipt_error term;
- } initial_table __initdata = {
- .repl = {
- .name = "filter",
- .valid_hooks = FILTER_VALID_HOOKS,
- .num_entries = 4,
- .size = sizeof(struct ipt_standard) * 3 + sizeof(struct ipt_error),
- .hook_entry = {
- [NF_IP_LOCAL_IN] = 0,
- [NF_IP_FORWARD] = sizeof(struct ipt_standard),
- [NF_IP_LOCAL_OUT] = sizeof(struct ipt_standard) * 2,
- },
- .underflow = {
- [NF_IP_LOCAL_IN] = 0,
- [NF_IP_FORWARD] = sizeof(struct ipt_standard),
- [NF_IP_LOCAL_OUT] = sizeof(struct ipt_standard) * 2,
- },
- },
- .entries = {
- IPT_STANDARD_INIT(NF_ACCEPT), /* LOCAL_IN */
- IPT_STANDARD_INIT(NF_ACCEPT), /* FORWARD */
- IPT_STANDARD_INIT(NF_ACCEPT), /* LOCAL_OUT */
- },
- .term = IPT_ERROR_INIT, /* ERROR */
- };
复制代码
而在使用这个结构的时候, 只用了结构中的initial_table.repl:
- static int __init iptable_filter_init(void)
- {
- ...
- ret = ipt_register_table(&packet_filter, &initial_table.repl);
- ...
- }
复制代码
那么另外两个结构
ipt_standard entries[3];
struct ipt_error term;
哪个地方使用了呢? |
|