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
CTRLALTDEL(8)						       System Administration						     CTRLALTDEL(8)

NAME
ctrlaltdel - set the function of the Ctrl-Alt-Del combination SYNOPSIS
ctrlaltdel hard|soft DESCRIPTION
Based on examination of the linux/kernel/sys.c code, it is clear that there are two supported functions that the Ctrl-Alt-Del sequence can perform: a hard reset, which immediately reboots the computer without calling sync(2) and without any other preparation; and a soft reset, which sends the SIGINT (interrupt) signal to the init process (this is always the process with PID 1). If this option is used, the init(8) program must support this feature. Since there are now several init(8) programs in the Linux community, please consult the documentation for the version that you are currently using. ctrlaltdel is usually used in the /etc/rc.local file. FILES
/etc/rc.local SEE ALSO
simpleinit(8), init(8) AUTHOR
Peter Orbaek (poe@daimi.aau.dk) AVAILABILITY
The ctrlaltdel command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. util-linux October 1993 CTRLALTDEL(8)