Networking Forums

Networking Forums > Computer Networking > Linux Networking > UDP server as a kernel module

Reply
Thread Tools Display Modes

UDP server as a kernel module

 
 
alex
Guest
Posts: n/a

 
      09-04-2006, 08:00 AM
hi ... i am trying to write an UDP server as a kernel module.
i want to use sys_select(). is it possible to use sys_select in kernel
level.plz help me ......

the actual prblm is

i want to write a server to serve more than 1000 clients
each bound with different port. i created sockets using 'socket'
structure (socket *KSocket ) and bound using KSocket-> ops -> bind ()
(port is different), i want to use sys_select (if possible) function on
these sockets . I heard that creating threads in kernel is not good
idea as using sys_select, so i want to create 4 or 5 threads to serve
all the clients (sockets). can u plz help me to write this.

thanks in advance.

dayakar.

 
Reply With Quote
 
 
 
 
Giovanni
Guest
Posts: n/a

 
      09-04-2006, 08:46 AM
alex wrote:
> hi ... i am trying to write an UDP server as a kernel module.
> i want to use sys_select(). is it possible to use sys_select in kernel
> level.plz help me ......
>
> the actual prblm is
>
> i want to write a server to serve more than 1000 clients
> each bound with different port. i created sockets using 'socket'
> structure (socket *KSocket ) and bound using KSocket-> ops -> bind ()
> (port is different), i want to use sys_select (if possible) function on
> these sockets . I heard that creating threads in kernel is not good
> idea as using sys_select, so i want to create 4 or 5 threads to serve
> all the clients (sockets). can u plz help me to write this.
>
> thanks in advance.


What you need is to create a daemon that can be started at boot. You
can find lots of examples in unix world.

Ciao
Giovanni
--
A computer is like an air conditioner,
it stops working when you open Windows.
Registered Linux user #337974 < http://giovanni.homelinux.net/ >
 
Reply With Quote
 
alex
Guest
Posts: n/a

 
      09-04-2006, 09:48 AM

Giovanni wrote:

> alex wrote:
> > hi ... i am trying to write an UDP server as a kernel module.
> > i want to use sys_select(). is it possible to use sys_select in kernel
> > level.plz help me ......
> >
> > the actual prblm is
> >
> > i want to write a server to serve more than 1000 clients
> > each bound with different port. i created sockets using 'socket'
> > structure (socket *KSocket ) and bound using KSocket-> ops -> bind ()
> > (port is different), i want to use sys_select (if possible) function on
> > these sockets . I heard that creating threads in kernel is not good
> > idea as using sys_select, so i want to create 4 or 5 threads to serve
> > all the clients (sockets). can u plz help me to write this.
> >
> > thanks in advance.

>
> What you need is to create a daemon that can be started at boot. You
> can find lots of examples in unix world.
>
> Ciao
> Giovanni
> --
> A computer is like an air conditioner,
> it stops working when you open Windows.
> Registered Linux user #337974 < http://giovanni.homelinux.net/ >




ok .. thank you for ur suggestion ..but the actual prblm is how to
write sys_select for udp.
here all are different socket variables bound with different ports. can
u plz giv me example...

thank you.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get data in kernel SEND buffer for a TCP socket from a netfilter based kernel module Rohit Linux Networking 0 05-10-2007 11:27 AM
Kernel module W.P. Linux Networking 9 04-04-2007 06:36 PM
killing a kernel thread ....... UDP server (kernel module)......... alex Linux Networking 0 09-20-2006 11:26 AM
Placing ioctl in a kernel module ? vivekaseeja@gmail.com Linux Networking 5 05-15-2006 04:06 AM
Help for socket programming as kernel module sank Linux Networking 1 02-05-2004 04:32 PM



1 2 3 4 5 6 7 8 9 10 11