Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Saifuddin <saif@odysseytec.com>
To: netfilter@lists.netfilter.org
Subject: how to export a symbol from kernel to be accessible in module.
Date: Mon, 26 Apr 2004 12:53:13 +0530	[thread overview]
Message-ID: <20040426125313.3e52dfd9.saif@odysseytec.com> (raw)


Hello everyone,
	
Linux kernel version 2.4.24

	ipc/shm.c
		
	static struct ipc_ids shm_ids; 

		I want to access this variable in other kernel modules.
	for this a macro is defined in ipc/shm.c

	#define shm_get(id)     ((struct shmid_kernel *)ipc_get(&shm_ids,id));

	
	for this I have written a function in ipc/shm.c as below: -

	void *sys_getshmhandler(int id){
 	       return (void *)shm_get(id);
	}

	EXPORT_SYMBOL(sys_getshmhandler);

	ipc/Makefile

	export-objs := shm.o.

	The kernel compiles successfully, but when I boot the fresh kernel, I do not get the exported symbol in /proc/ksysm.

	What am I missing?
	Can anybody figure out?

	Thanks in advance.

-- 
Regards,
Saifuddin,
saif@odysseytec.com.
saifuddin_it@yahoo.co.in.


                 reply	other threads:[~2004-04-26  7:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040426125313.3e52dfd9.saif@odysseytec.com \
    --to=saif@odysseytec.com \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox