LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   IPTables code (https://www.linuxquestions.org/questions/linux-newbie-8/iptables-code-715486/)

priyadarshan 03-30-2009 08:33 AM

IPTables code
 
I am new to linux....... I am proficient now in C and I know how to play with IPTables too............. What I am interested is I want to view the IPTables code........ Is it possible? How?

fpmurphy 03-30-2009 08:48 AM

Go to the Netfilter project page (http://www.netfilter.org/) and download the source code.

priyadarshan 03-30-2009 08:54 AM

I have already downloaded it and installed it too....... I wanna see it in u know... C like program or so......... Is it possible?

reptiler 03-30-2009 09:06 AM

You want the source-code, right?
That's what you get on the site fpmurphy has referred you to.

priyadarshan 03-30-2009 09:16 AM

OK I have downloaded it but Can I know that in which file should I view?

reptiler 03-30-2009 09:18 AM

I thought you were proficient in C. Shouldn't you then be able to work with the code and find what you want to find?
Especially since we don't know what exactly you are looking for.

priyadarshan 03-30-2009 09:23 AM

Sir I just wanna know that In which file should I peep for C code.......

I mean $ pico <what should be here???>

Only then and then I can see the code in editor......

There are lot of files in package.....

reptiler 03-30-2009 09:29 AM

That's right, and many of those files (you may recognize the extensions .c and .h) actually belong to what will finally end up as IPTables and its modules.

The actual binary iptables will surely be created from iptables.c and/or iptables-standalone.c. But I am equally sure that to understand the code you will need to study the includes libraries libipq and libiptc.
Possibly, and quite probably, also other files are involved.


All times are GMT -5. The time now is 10:30 PM.