Results 1 to 1 of 1
Hi,
I am trying to write a new linux net module where I am adding my own match extension. Although the code exists for implementing my idea, I am having ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-31-2009 #1Just Joined!
- Join Date
- Sep 2009
- Location
- Raleigh
- Posts
- 5
Having trouble understanding xt_register_matches in xt_*.c files
Hi,
I am trying to write a new linux net module where I am adding my own match extension. Although the code exists for implementing my idea, I am having difficulty in understanding the code in many places
1. In files such as xt_*.c, we have a call to
xt_register_matches(struct xt_match *match, unsigned int n) function in x_tables.c
Here
for (i = 0; i < n; i++) {
err = xt_register_match(&match[i]);
if (err)
goto err;
}
method is defined where inside xt_register_match(struct xt_match * match) function is called. In this function there is something done with the semaphore. Can you please explain what is going on in this register_module? I am not able to understand the code as I am looping around a particular function and I forget from where I started.
Thanks
Balaji


Reply With Quote
