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
PMINST(1p)						User Contributed Perl Documentation						PMINST(1p)

NAME
pminst - find modules whose names match this pattern SYNOPSIS
pminst [-s] [-l] [pattern] DESCRIPTION
Without argumnets, show the names of all installed modules. Given a pattern, show all module names that match it. The -l flag will show the full pathname. The -s flag will separate the base directory from @INC from the module portion itself. EXAMPLES
$ pminst (lists all installed modules) $ pminst Carp CGI::Carp Carp $ pminst ^IO:: IO::Socket::INET IO::Socket::UNIX IO::Select IO::Socket IO::Poll IO::Handle IO::Pipe IO::Seekable IO::Dir IO::File $ pminst '(?i)io' IO::Socket::INET IO::Socket::UNIX IO::Select IO::Socket IO::Poll IO::Handle IO::Pipe IO::Seekable IO::Dir IO::File IO Pod::Functions The -s flag provides output with the directory separated by a space: $ pminst -s | sort +1 (lists all modules, sorted by name, but with where they came from) $ oldperl -S pminst -s IO /usr/lib/perl5/i386-linux/5.00404 IO::File /usr/lib/perl5/i386-linux/5.00404 IO::Handle /usr/lib/perl5/i386-linux/5.00404 IO::Pipe /usr/lib/perl5/i386-linux/5.00404 IO::Seekable /usr/lib/perl5/i386-linux/5.00404 IO::Select /usr/lib/perl5/i386-linux/5.00404 IO::Socket /usr/lib/perl5/i386-linux/5.00404 IO /usr/lib/perl5/site_perl LWP::IO /usr/lib/perl5/site_perl LWP::TkIO /usr/lib/perl5/site_perl Tk::HTML::IO /usr/lib/perl5/site_perl Tk::IO /usr/lib/perl5/site_perl IO::Stringy /usr/lib/perl5/site_perl IO::Wrap /usr/lib/perl5/site_perl IO::ScalarArray /usr/lib/perl5/site_perl IO::Scalar /usr/lib/perl5/site_perl IO::Lines /usr/lib/perl5/site_perl IO::WrapTie /usr/lib/perl5/site_perl IO::AtomicFile The -l flag gives full paths: $ filsperl -S pminst -l Thread /usr/local/filsperl/lib/5.00554/i686-linux-thread/Thread/Queue.pm /usr/local/filsperl/lib/5.00554/i686-linux-thread/Thread/Semaphore.pm /usr/local/filsperl/lib/5.00554/i686-linux-thread/Thread/Signal.pm /usr/local/filsperl/lib/5.00554/i686-linux-thread/Thread/Specific.pm /usr/local/filsperl/lib/5.00554/i686-linux-thread/Thread.pm AUTHORS and COPYRIGHTS Copyright (C) 1999 Tom Christiansen. Copyright (C) 2006-2008 Mark Leighton Fisher. This is free software; you can redistribute it and/or modify it under the terms of either: (a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or (b) the Perl "Artistic License". (This is the Perl 5 licensing scheme.) Please note this is a change from the original pmtools-1.00 (still available on CPAN), as pmtools-1.00 were licensed only under the Perl "Artistic License". perl v5.10.1 2010-02-22 PMINST(1p)