LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-11-2006, 08:21 PM   #1
chitranjan
LQ Newbie
 
Registered: May 2006
Posts: 5

Rep: Reputation: 0
where to find "syms.c" file in fedora core 3 and what are its uses


Hi folks,i am trying to build a "packet dropper" n working on fedora core3's 2.6.9-1.667 kernel.
for that i got some help from net and it says to bring changes in few files in source code like "\net\core\dev.c" and "\net\netsyms.c" and to install a module , i have also installed appropriate ".src.rpm " file to get kernel source code.but i could not find "netsyms.c" file at the location specified in that help.changes done in this file are like




net/netsyms.c (after line 544)

...
extern int (*test_function)(struct sk_buff *); /* new */
EXPORT_SYMBOL_NOVERS(test_function); /* new */
EXPORT_SYMBOL(register_gifconf);...


HERE TEST FUNCTION IS USED IN /net/dev.c

So someone please tell me how to get this file or some alternate file to put these changes there.it's a bit urgent!

Last edited by chitranjan; 05-13-2006 at 10:03 AM.
 
Old 05-13-2006, 04:22 AM   #2
BSchindler
Member
 
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49

Rep: Reputation: 15
Just asking about syms.c is not enough information! Lots and lots of packages have such a file.

What is the package and where did you get it?
 
Old 05-13-2006, 10:22 AM   #3
chitranjan
LQ Newbie
 
Registered: May 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by BSchindler
Just asking about syms.c is not enough information! Lots and lots of packages have such a file.

What is the package and where did you get it?

hi BSchindler, thanks for showing ur intrest in my problem.the way u wrote i think u r acquainted with "netsym.c"(sorry i just wrote sym.c which is not correct),so can u tell me its use.as far as package is concerned i installed fedora core 3 kernel's version 2.6.9-1.667.src.rpm file from kernel.org site . i have installed it .now as specified by by the document which i got from net "netsym.c" file was supposed to be present at /usr/src/linux/net
location.it could be the case that person who wrote that document was using some different version or some other kernel. actually i am inserting a module in kernel and doing some changes in source code also and "netsym.c" file is needed to write the macro EXPORT_SYMBOL_NOVERS(x)in it to export kernel variables and user variables for modules to use them.

KINDLY RESPOND ME AS EARLY AS POSSIBLE I NEED TO SUBMIT THIS PROJECT AS A PART OF MY B.E degree's major project
 
Old 05-13-2006, 05:42 PM   #4
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
It looks like the netsyms.c file was removed sometime during the 2.5 development series and is not present in 2.6 kernels. I have a copy of 2.4.31 and it looks like all this file had were some EXPORT_SYMBOL directives to make public the network functions that were the interface to the rest of the kernel. Probably under 2.6 you should just put the EXPORT_SYMBOL directives into the source file containing the function or oine of the other sums files as appropriate. For a test function like you appear to have written, I would just put the EXPORT_SYMBOL into the C source file in which you wrote the function.

BTW marking your post as urgent isn't more likely to make people help you. If anythinbg, they're probably more likely to ignore you. The due date of your project is your problem.
 
Old 05-14-2006, 04:41 AM   #5
BSchindler
Member
 
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49

Rep: Reputation: 15
Thanx btmiller,
I help lots of students with their projects and most of the time, when I am asked, they have put off the work until critical...core dump LOL

However, I did guess that this was a research project (just helped a PHd candidate with a design for VOiP phone, hardware and software and had to deal with this issue (packed dropping)).

Chitranjin, look at http://www.kernelnewbies.org/KernelHacking
 
Old 05-14-2006, 05:49 AM   #6
chitranjan
LQ Newbie
 
Registered: May 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by BSchindler
Thanx btmiller,
I help lots of students with their projects and most of the time, when I am asked, they have put off the work until critical...core dump LOL

However, I did guess that this was a research project (just helped a PHd candidate with a design for VOiP phone, hardware and software and had to deal with this issue (packed dropping)).

Chitranjin, look at http://www.kernelnewbies.org/KernelHacking

thanka btmiller,
can u tell me what this EXPORT_NO_SYMBOLS macro
does ? as u told me to add EXPORT_SYMBOL_NOVERS(x) macro in c file in which test function is used .can i put it in the module where i am calling the test function and then install that module.
 
Old 05-14-2006, 04:11 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
I'm pretty sure that any EXPORT_SYMBOL macro must go somewhere in the main kernel source that has defined the symbol to be exported (i.e. something in the main kernel binary -- not a module -- must know about the symbol in order to export it). I'm about 90% sure of that, but I don't hack the kernel on a regular basis, so I'd advise checking out BSchindler's link for more details. You might also be interested in the 2nd edition of Robert Love's book Linux Kernel Development or the 3rd edition of Bovet and Cesati's Understanding the Linux Kernel. Both cover the 2.6 kernel and should have reasonable up-to-date information.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fedora Core 2: Screen Resolution can not change from "800X600" to "1024X 768" suhaimi_sj Fedora - Installation 18 12-17-2009 03:29 AM
Fedora Core 4# (Final) hanging on "Formatting/File System"... TippyToes Fedora - Installation 6 07-04-2005 11:06 PM
Can't find "/etc/module.conf" in Fedora Core 4 scweston Linux - Newbie 2 06-26-2005 12:51 PM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 02:32 PM
Cannot install fedora core 1 or core 2: Initial setup crashes: "Unable to mount root" ovelasco Linux - Newbie 10 07-15-2004 07:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration