Making Socket System Call From Linux Kernel Module?


 
Thread Tools Search this Thread
Operating Systems Linux Making Socket System Call From Linux Kernel Module?
# 1  
Old 04-06-2005
Data Making Socket System Call From Linux Kernel Module?

Hi Everyone!

How can we make a socket() system call from a linux module executing in kernel space?

If any one knows, kindly tell me. It will be great.

I want to use the socket interface in linux kernel space for sending raw packets over the network.


Hamayun
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Make cannot generate .ko linux kernel module

cannot generate .ko file on my linux, although it can generate module.symvers. But when I copy .c file and Makefile to another linux computer, there's no problem. The strange thing is: make is successfuly executed, and returned 0; make output: make -C /lib/modules/2.6.18-92.el5xen/build ... (4 Replies)
Discussion started by: vistastar
4 Replies

2. Programming

can a linux kernel module call libc functions?

can a linux kernel module call libc functions, such as printf(), strcpy(), etc...? (9 Replies)
Discussion started by: vistastar
9 Replies

3. IP Networking

help implementing an ip filter in linux/net/socket.c (kernel programming)

hi there so, i was given an assignment: implement a linux system call that blocks all packets that are sent to a given IP (i have to do it without using iptables) i'm really new to kernel programming btw (and i'm enjoying it a lot) so, my syscall is called ip_block() and receives a... (1 Reply)
Discussion started by: lgfaria
1 Replies

4. IP Networking

Configure a range of ports to "socket" system call

Hello ; This what i want to do : I know that in the system call #include <sys/socket.h> int bind(int socket, const struct sockaddr *address, socklen_t address_len); you can specify the local port for your socket, but im using a private library , and im sure that in that library... (0 Replies)
Discussion started by: trutoman
0 Replies

5. UNIX for Advanced & Expert Users

A question about kernel module and system power-shutdown

Dear all, I've just installed a Vanilla kernel (last stable version downloaded from www.kernel.org) as an exercice in order to better understand how to compile linux kernel. I loaded the .config file of the current kernel (Redhat kernel) in the menuconfig in order to restore all already... (0 Replies)
Discussion started by: dariyoosh
0 Replies

6. Programming

socket system call can not succedd right after application crash.

hello all, I have developed a server application in C for ulinux kernel 2.6.It works very fine; creating a socket, binding it to a port, listening for incoming sockets and accepting them ,all finish without any error. But there is a problem regarding application crash.After an intentionally... (1 Reply)
Discussion started by: Sedighzadeh
1 Replies

7. UNIX for Advanced & Expert Users

Passing socket struct between kernel threads - module programming

I write kernel module with kernel threads using linux/kthread.h on 2.6.* kernel I tried to passing data between two kernel threads with data argument of kthread_run( fun, data , NAME ); but this is not work I dont know why. I tried many possibility and nothing works. So I thought that... (0 Replies)
Discussion started by: marcintom
0 Replies

8. Linux

How to convert Linux Kernel built-in module into a loadable module

Hi all, I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/. I need to know if I can... (0 Replies)
Discussion started by: anitemp
0 Replies

9. UNIX for Dummies Questions & Answers

Linux kernel module parameters

Hi, Does anyone know if it is possible to know the current value of a kernel module parameters after the module is loaded. Are the values of the parameters advertised at some /proc or /sys location ? The only thing I know is modinfo, that actually looks a the module .ko and gives a... (3 Replies)
Discussion started by: macL
3 Replies

10. Programming

Making a system call

This is a total nooby question, but here goes... I am trying to do something in C for the very first time, and doing it in Solaris, for the very first time. It would otherwise be easy enough to test out and find out, but I wont be able to do so until the week after next for various reasons, so I... (5 Replies)
Discussion started by: hardwickj
5 Replies
Login or Register to Ask a Question
FSCK.CRAMFS(8)						       System Administration						    FSCK.CRAMFS(8)

NAME
fsck.cramfs - fsck compressed ROM file system SYNOPSIS
fsck.cramfs [options] file DESCRIPTION
fsck.cramfs is used to check the cramfs file system. OPTIONS
-v, --verbose Enable verbose messaging. -b, --blocksize blocksize Use this blocksize, defaults to page size. Must be equal to what was set at creation time. Only used for --extract. --extract[=directory] Test to uncompress the whole file system. Optionally extract contents of the file to directory. -a This option is silently ignored. -y This option is silently ignored. -V, --version Display version information and exit. -h, --help Display help text and exit. EXIT STATUS
0 success 4 file system was left uncorrected 8 operation error, such as unable to allocate memory 16 usage information was printed SEE ALSO
mount(8), mkfs.cramfs(8) AVAILABILITY
The example command is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils /util-linux/>. util-linux April 2013 FSCK.CRAMFS(8)