kfree_skb gives oops

2005-04-16 Thread linux lover
hello, I am checking some conditions in packet after IP header is removed and based on that want network stack to discard skbuff so i add it in ip_input.c . But it gives oops message that Warning: kfree_skb passed an skb still on a list and then prints oops Please help how to

How to read file in kernel module?

2005-02-06 Thread linux lover
Hello, I have written one /proc file creation kernel module. This module creates /proc/file and defied operations on it. Also i have written user program that will read write to /proc files from user space. Now what i want is to use same bufproc_read bufproc_write functions defined in

Kernel modules query

2005-02-18 Thread linux lover
Hello, I want to know can a variable be exported by a linux kernel modules? How can i make a variable getting assigned in kernel module available to other kernel modules? regards, linux.lover. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

Accessing data structure from kernel space

2005-03-23 Thread linux lover
Hello all, I have one linked list data structure added to a file in kernel source code which has some kernel info. I want to acess that linked list structure from user space. Is that possible?? Also how to add own system call usable at user level from kernel module?? regards,

Re: Accessing data structure from kernel space

2005-03-23 Thread linux lover
Hello linux-os, --- linux-os [EMAIL PROTECTED] wrote: On Wed, 23 Mar 2005, linux lover wrote: Hello all, I have one linked list data structure added to a file in kernel source code which has some kernel info. I want to acess that linked list structure from user space

Re: Accessing data structure from kernel space

2005-03-23 Thread linux lover
Hello sir, --- Jan Engelhardt [EMAIL PROTECTED] wrote: Hello all, I have one linked list data structure added to a file in kernel source code which has some kernel info. I want to acess that linked list structure from user space. Is that possible?? Yes!! So that mean

source file unable to export function to kernel

2005-03-27 Thread linux lover
Hi, I have included this as myfile.c in /usr/src/linux-2.4.24/kernel. I included its entry in Makefile in export-objs. //sourcefile #define EXPORT_SYMTAB #include linux/kernel.h #include linux/string.h #include linux/myhf1.h //contains prototypes for fun1 and fun2 #include

Re: Accessing data structure from kernel space

2005-03-29 Thread linux lover
Hello sir, I successfully added linked list data structure in kernel in header file. Write a C source file and add it to kernel directory. then write 2 system calls that read and write to linked list from user space through that syscalls. recompile kernel. Now able to

Which types of functions are exported by kernel source?

2005-02-21 Thread linux lover
Hello, While browsing linux source code what i found that if function is defined as asmlinkage long sys_open(const char * filename, int flags, int mode) then its not exported to kenrel and thus not seen in /proc/ksyms. But if function in kernel source is not defined with asmlinkage then it

some /proc understandings

2005-03-01 Thread linux lover
Hello, 1) I want to know how much can i write to /proc entry file?? Is there any limitation on file size??? 2)Also how can i call /proc entry files proc_read_myfile function on that file by another kernel module call? What parameters i require to pass and how? Say i have read

Some kernel source questions...

2005-01-26 Thread linux lover
Hello, I have some questions... 1)When data is copied to ICMP/UDP packets? when i trace kernel code in 2.4.26 kernel version is that in case of ICMP and UDP packets the packet gets its space allocated in ip_build_xmit function and then ip header is built. 2) What getfrag does? Does it

help me to know when ethernet header added to packet by eth_header function

2005-01-28 Thread linux lover
Hello, Can anybody explain me how ethernet header is added to every packet outgoing? I check eth.c file and found eth_header that is used for adding ethernet header on skbuff packet. But does each packet calls this function? I think not as theres a cache header function used that cache

Analysing UDP packet building code in 2.6.10 kernel

2005-01-16 Thread linux lover
Hello all, I am knowing all 2.4 kernel network stack packet buildup procedure. Now i am trying to analysing same in 2.6.10 kernel. What i found is many changes to 2.6 kernel compare to 2.4. Theres is no ip_build_xmit instead thers a new function that is ip_append_data. What i want to

source file unable to export function to kernel

2005-03-27 Thread linux lover
Hi, I have included this as myfile.c in /usr/src/linux-2.4.24/kernel. I included its entry in Makefile in export-objs. //sourcefile #define EXPORT_SYMTAB #include #include #include //contains prototypes for fun1 and fun2 #include char* fun1(char* str1) { } void fun2(char

Re: Accessing data structure from kernel space

2005-03-29 Thread linux lover
Hello sir, I successfully added linked list data structure in kernel in header file. Write a C source file and add it to kernel directory. then write 2 system calls that read and write to linked list from user space through that syscalls. recompile kernel. Now able to

Kernel modules query

2005-02-18 Thread linux lover
Hello, I want to know can a variable be exported by a linux kernel modules? How can i make a variable getting assigned in kernel module available to other kernel modules? regards, linux.lover. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Which types of functions are exported by kernel source?

2005-02-21 Thread linux lover
Hello, While browsing linux source code what i found that if function is defined as asmlinkage long sys_open(const char * filename, int flags, int mode) then its not exported to kenrel and thus not seen in /proc/ksyms. But if function in kernel source is not defined with asmlinkage then it

kfree_skb gives oops

2005-04-16 Thread linux lover
hello, I am checking some conditions in packet after IP header is removed and based on that want network stack to discard skbuff so i add it in ip_input.c . But it gives oops message that Warning: kfree_skb passed an skb still on a list and then prints oops Please help how to

Some kernel source questions...

2005-01-26 Thread linux lover
Hello, I have some questions... 1)When data is copied to ICMP/UDP packets? when i trace kernel code in 2.4.26 kernel version is that in case of ICMP and UDP packets the packet gets its space allocated in ip_build_xmit function and then ip header is built. 2) What getfrag does? Does it

help me to know when ethernet header added to packet by eth_header function

2005-01-28 Thread linux lover
Hello, Can anybody explain me how ethernet header is added to every packet outgoing? I check eth.c file and found eth_header that is used for adding ethernet header on skbuff packet. But does each packet calls this function? I think not as theres a cache header function used that cache

How to read file in kernel module?

2005-02-06 Thread linux lover
Hello, I have written one /proc file creation kernel module. This module creates /proc/file and defied operations on it. Also i have written user program that will read & write to /proc files from user space. Now what i want is to use same bufproc_read & bufproc_write functions defined in

some /proc understandings

2005-03-01 Thread linux lover
Hello, 1) I want to know how much can i write to /proc entry file?? Is there any limitation on file size??? 2)Also how can i call /proc entry files proc_read_myfile function on that file by another kernel module call? What parameters i require to pass and how? Say i have read

Accessing data structure from kernel space

2005-03-23 Thread linux lover
Hello all, I have one linked list data structure added to a file in kernel source code which has some kernel info. I want to acess that linked list structure from user space. Is that possible?? Also how to add own system call usable at user level from kernel module?? regards,

Re: Accessing data structure from kernel space

2005-03-23 Thread linux lover
Hello linux-os, --- linux-os <[EMAIL PROTECTED]> wrote: > On Wed, 23 Mar 2005, linux lover wrote: > > > Hello all, > >I have one linked list data structure added > to > > a file in kernel source code which has some kernel > > info. I want to

Re: Accessing data structure from kernel space

2005-03-23 Thread linux lover
Hello sir, --- Jan Engelhardt <[EMAIL PROTECTED]> wrote: > >> Hello all, > >> I have one linked list data structure added > to > >> a file in kernel source code which has some > kernel > >> info. I want to acess that linked list structure > from > >> user space. Is that possible?? > > Yes!!

Analysing UDP packet building code in 2.6.10 kernel

2005-01-16 Thread linux lover
Hello all, I am knowing all 2.4 kernel network stack packet buildup procedure. Now i am trying to analysing same in 2.6.10 kernel. What i found is many changes to 2.6 kernel compare to 2.4. Theres is no ip_build_xmit instead thers a new function that is ip_append_data. What i want to