Skip navigation.

Linux Kernel Programming: Simple UDP Server

Note: Develop and Test using UML

1.Get the code from KernelNewbies

2.Makefile
obj-m       := ksocket.o
KDIR        := /home/work/uml/linux-2.6.18
PWD         := $(shell pwd)
default:
        $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules ARCH=um
clean:
        rm -f *.o *.ko *.mod.c


3.Deployment (in UML virtual machine)
ubuntu# cp /mnt/path-to-code/ksocket.so 
             /lib/modules/2.6.18/bob/


4.Test (in UML virtual machine)
ubuntu# modprobe ksocket
ubuntu# dmesg



UML (User-Mode-Linux) configurationLinux Kernel Programming: Device Drivers

Comments

Jzarecta 30. April 2007, 01:22

nice we need more info on hacking the kernel that dont require a rocket sciense degree.

subjam 30. April 2007, 02:42

Yes. I am collecting some simple tutorials while struggling with books such as "Linux Device Drivers" and "Understanding the Linux Kernel".

Anonymous 11. December 2007, 05:53

Anonymous writes:

i need some UDP Server program in linux in C implemented using Call Back

Anonymous 30. August 2009, 04:35

Anonymous writes:

do you have any code for udp client?
so i can test the program above..

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies