how to read gateways ips from routing table in module?

2005-03-15 Thread cranium2003
Hello, I require a kernel module that will print gateway IP addresses in routing table as well as it should not print Gateways that appear to be the same interface ip addresses of that linux machine. e.g. If my eth1 is 172.16.x.x and if same appear in routing table for any entry

which file functions can be used on /proc file?

2005-03-04 Thread cranium2003
hello, i found that in struct proc_dir_entry struct file_operations * proc_fops; is defined. and struct file_operations has defined read, write, poll,llseek,ioctl,flush,release,lock etc functions. so can all these functions be used on any /proc entry in usermode as well as in kenrel mode?

strace on cat /proc/my_file gives results by calling read twice why?

2005-03-04 Thread cranium2003
hello, I have a /proc file kernel module with its proc read function as static char mybuf[1024]; ssize_t my_file_read(struct file *filp, char *buf, size_t count, loff_t *ppos) { printk(Reading a from a /proc file\n); static int b_read = 0; int len = strlen(mybuf); if

which file functions can be used on /proc file?

2005-03-07 Thread cranium2003
hello, i found that in struct proc_dir_entry struct file_operations *proc_fops; is defined. and struct file_operations has defined read, write, poll,llseek,ioctl,flush,release,lock etc functions. so can all these functions be used on any /proc entry in usermode as well as in kenrel mode?

dmesg command output

2005-01-26 Thread cranium2003
Hello, How to get max output from dmesg command.I have inserted a lot debug messages to check kernel trace and now want to get nearly all output from dmesg since linux startup.Is that possible? or at least can anybody help to have dmesg give max output. On my RH9 i386 arch i got 16kb output

which file functions can be used on /proc file?

2005-03-04 Thread cranium2003
hello, i found that in struct proc_dir_entry struct file_operations * proc_fops; is defined. and struct file_operations has defined read, write, poll,llseek,ioctl,flush,release,lock etc functions. so can all these functions be used on any /proc entry in usermode as well as in kenrel mode?

strace on cat /proc/my_file gives results by calling read twice why?

2005-03-04 Thread cranium2003
hello, I have a /proc file kernel module with its proc read function as static char mybuf[1024]; ssize_t my_file_read(struct file *filp, char *buf, size_t count, loff_t *ppos) { printk("Reading a from a /proc file\n"); static int b_read = 0; int len = strlen(mybuf); if

which file functions can be used on /proc file?

2005-03-07 Thread cranium2003
hello, i found that in struct proc_dir_entry struct file_operations *proc_fops; is defined. and struct file_operations has defined read, write, poll,llseek,ioctl,flush,release,lock etc functions. so can all these functions be used on any /proc entry in usermode as well as in kenrel mode?

dmesg command output

2005-01-26 Thread cranium2003
Hello, How to get max output from dmesg command.I have inserted a lot debug messages to check kernel trace and now want to get nearly all output from dmesg since linux startup.Is that possible? or at least can anybody help to have dmesg give max output. On my RH9 i386 arch i got 16kb output

how to read gateways ips from routing table in module?

2005-03-15 Thread cranium2003
Hello, I require a kernel module that will print gateway IP addresses in routing table as well as it should not print Gateways that appear to be the same interface ip addresses of that linux machine. e.g. If my eth1 is 172.16.x.x and if same appear in routing table for any entry