EmbLogic's Blog

Add the 20 devices and initialise the user defined structure dev in b/w cdev_init and cdev_add


RCS file: header.h,v
Working file: header.h
head: 1.6
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;	selected revisions: 6
description:
----------------------------
revision 1.6
date: 2015/04/28 15:54:10;  author: root; 
state: Exp;  lines: +16 -0
define the macro of user defined parameter such
as QUANTUM_SIZE, DATA_SIZE, QSET_SIZE, DEVICE_SIZE.set the default
values.
----------------------------
revision 1.5
date: 2015/04/26 15:51:54;  author: root; 
state: Exp;  lines: +1 -0
removed the struct of cdev.
----------------------------
revision 1.4
date: 2015/04/26 14:41:40;  author: root; 
state: Exp;  lines: +1 -1
introduced the stucture for mapping
stuct Qset, struct dev where our devices node
information is stored.
in struct dev struct cdev is declared
internally.
also declared the extern struct dev *sdev
pointer for mapping
,
----------------------------
revision 1.3
date: 2015/04/26 13:28:55;  author: root; 
state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.2
date: 2015/04/26 13:18:47;  author: root; 
state: Exp;  lines: +3 -0
*** empty log message ***
----------------------------
revision 1.1
date: 2015/04/26 13:12:11;  author: root; 
state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.7
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 7;	selected revisions: 7
description:
----------------------------
revision 1.7
date: 2015/04/28 15:56:37;  author: root; 
state: Exp;  lines: +2 -6
declared the extern variable of Macros.
----------------------------
revision 1.6
date: 2015/04/28 12:55:36;  author: root; 
state: Exp;  lines: +1 -0
declared the extern ndev in this.
----------------------------
revision 1.5
date: 2015/04/26 17:35:00;  author: root; 
state: Exp;  lines: +1 -0
introduced extern file operations variable.
----------------------------
revision 1.4
date: 2015/04/26 15:52:20;  author: root; 
state: Exp;  lines: +2 -2
include the linux/cdev.h in header.h
----------------------------
revision 1.3
date: 2015/04/26 14:45:32;  author: root; 
state: Exp;  lines: +19 -0
*** empty log message ***
----------------------------
revision 1.2
date: 2015/04/26 13:18:47;  author: root; 
state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.1
date: 2015/04/26 13:12:11;  author: root; 
state: Exp;
Initial revision
=============================================================================

RCS file: new_initialization.c,v
Working file: new_initialization.c
head: 1.13
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 13;	selected revisions: 13
description:
----------------------------
revision 1.13
date: 2015/04/28 16:20:11;  author: root; 
state: Exp;  lines: +3 -1
same as previous version, just checking.
----------------------------
revision 1.12
date: 2015/04/28 15:33:55;  author: root; 
state: Exp;  lines: +37 -8
declared the init_dev_parameter() in which
initialise the MACRO quantum_size,qset_size,data_size,device_size.
after that, call first in initial_func() so that
it will be initalized again.
Now, access these parameters through struct dev
variable which should be initialised b/w cdev_init() and cdev_add().
----------------------------
revision 1.11
date: 2015/04/28 13:04:27;  author: root; 
state: Exp;  lines: +2 -1
add the macro MINOR(ndev) to retrive the minor
no.
----------------------------
revision 1.10
date: 2015/04/28 13:00:29;  author: root; 
state: Exp;  lines: +1 -1
change the arugment of MKDEV(). 2nd argument
will be loop index because we gave the minor no.
----------------------------
revision 1.9
date: 2015/04/28 12:51:10;  author: root; 
state: Exp;  lines: +26 -18
register the devices 20 in loop.
declared MKDEV in loop to conmbine the major and
minor value into single one.
change the cdev and add the 20 devices.
----------------------------
revision 1.8
date: 2015/04/26 17:23:35;  author: root; 
state: Exp;  lines: +16 -2
initialize cdev_init and pass the 1st arguement
which is address of cdev which is pointed by object of struct dev.
2nd arguement is address of file_operations.
after cdev_init also initialized owner field and
file_operations *ops field which is actually defined in cdev.h.
after initialization of cdev_init, we need to
make the connection by using cdev_add().
In cdev_add(),mentioned the address pointed by
dev to cdev, 2nd arguement is dev and 3rd one is no. of devices we
added which is nod.
successfully cdev_add() is done, the driver
initilization is complete.
----------------------------
revision 1.7
date: 2015/04/26 16:11:06;  author: root; 
state: Exp;  lines: +4 -3
add the if statement in kmalloc error checking.
----------------------------
revision 1.6
date: 2015/04/26 15:51:07;  author: root; 
state: Exp;  lines: +2 -1
correct the mistake done is kmalloc of FLAG.
----------------------------
revision 1.5
date: 2015/04/26 14:40:00;  author: root; 
state: Exp;  lines: +8 -0
declared kmalloc and provide space into the
kernel.
after that memset flushed the memory.
----------------------------
revision 1.4
date: 2015/04/26 13:30:58;  author: root; 
state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.3
date: 2015/04/26 13:28:53;  author: root; 
state: Exp;  lines: +3 -1
*** empty log message ***
----------------------------
revision 1.2
date: 2015/04/26 13:18:42;  author: root; 
state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.1
date: 2015/04/26 13:12:11;  author: root; 
state: Exp;
Initial revision
=============================================================================

RCS file: new_clean.c,v
Working file: new_clean.c
head: 1.7
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 7;	selected revisions: 7
description:
----------------------------
revision 1.7
date: 2015/04/28 12:54:55;  author: root; 
state: Exp;  lines: +5 -1
cdev_del is in loop to delete the connection.
Posted in Character Driver, Device Drivers | Tagged , | Leave a comment

Register a new device using register_chrdev_region, and intialize & add all devices

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this is basic header file
—————————-
revision 1.1
date: 2015/04/24 05:20:37; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
this is driver intialisation file
—————————-
revision 1.3
date: 2015/04/24 05:32:26; author: root; state: Exp; lines: +3 -3
register the driver
—————————-
revision 1.2
date: 2015/04/24 05:24:42; author: root; state: Exp; lines: +3 -3
intialize driver using __init func
—————————-
revision 1.1
date: 2015/04/24 05:20:49; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
this is driver cleanup file
—————————-
revision 1.3
date: 2015/04/24 05:33:04; author: root; state: Exp; lines: +1 -1
unregister the driver
—————————-
revision 1.2
date: 2015/04/24 05:25:51; author: root; state: Exp; lines: +1 -1
cleanup the driver using __exit func
—————————-
revision 1.1
date: 2015/04/24 05:21:08; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.7
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 7; selected revisions: 7
description:
this is basic header file
—————————-
revision 1.7
date: 2015/04/24 13:43:07; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.6
date: 2015/04/24 13:38:51; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/04/24 13:32:14; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.4
date: 2015/04/24 12:55:42; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.3
date: 2015/04/24 12:52:22; author: root; state: Exp; lines: +14 -0
declare struct Qset, struct Dev
—————————-
revision 1.2
date: 2015/04/24 11:42:31; author: root; state: Exp; lines: +20 -1
included moduleparan.h & slab.h
—————————-
revision 1.1
date: 2015/04/24 05:20:37; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8; selected revisions: 8
description:
this is driver intialisation file
—————————-
revision 1.8
date: 2015/04/24 13:40:59; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.7
date: 2015/04/24 13:32:16; author: root; state: Exp; lines: +6 -1
*** empty log message ***
—————————-
revision 1.6
date: 2015/04/24 12:52:59; author: root; state: Exp; lines: +11 -0
allocating memory using kmalloc()
—————————-
revision 1.5
date: 2015/04/24 11:58:00; author: root; state: Exp; lines: +1 -1
use module parameter using module_param()
—————————-
revision 1.4
date: 2015/04/24 11:43:06; author: root; state: Exp; lines: +14 -2
intialise driver using alloc_chrdev_region()
—————————-
revision 1.3
date: 2015/04/24 05:32:26; author: root; state: Exp; lines: +3 -3
register the driver
—————————-
revision 1.2
date: 2015/04/24 05:24:42; author: root; state: Exp; lines: +3 -3
intialize driver using __init func
—————————-
revision 1.1
date: 2015/04/24 05:20:49; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.6
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 6; selected revisions: 6
description:
this is driver cleanup file
—————————-
revision 1.6
date: 2015/04/24 13:32:17; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/04/24 12:53:37; author: root; state: Exp; lines: +1 -0
free memory using kfree()
—————————-
revision 1.4
date: 2015/04/24 11:44:00; author: root; state: Exp; lines: +1 -1
unregister the driver using unregister_chrdev_region()
—————————-
revision 1.3
date: 2015/04/24 05:33:04; author: root; state: Exp; lines: +1 -1
unregister the driver
—————————-
revision 1.2
date: 2015/04/24 05:25:51; author: root; state: Exp; lines: +1 -1
cleanup the driver using __exit func
—————————-
revision 1.1
date: 2015/04/24 05:21:08; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8; selected revisions: 8
description:
this is basic header file
—————————-
revision 1.8
date: 2015/04/27 10:24:14; author: root; state: Exp; lines: +21 -0
declare marcos for quantum size, qset size, data size, device size
also declare these variables in struct Dev
—————————-
revision 1.7
date: 2015/04/24 13:43:07; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.6
date: 2015/04/24 13:38:51; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/04/24 13:32:14; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.4
date: 2015/04/24 12:55:42; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.3
date: 2015/04/24 12:52:22; author: root; state: Exp; lines: +14 -0
declare struct Qset, struct Dev
—————————-
revision 1.2
date: 2015/04/24 11:42:31; author: root; state: Exp; lines: +20 -1
included moduleparan.h & slab.h
—————————-
revision 1.1
date: 2015/04/24 05:20:37; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.11
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 11; selected revisions: 11
description:
this is driver intialisation file
—————————-
revision 1.11
date: 2015/04/27 10:36:47; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.10
date: 2015/04/27 10:34:46; author: root; state: Exp; lines: +2 -1
*** empty log message ***
—————————-
revision 1.9
date: 2015/04/27 10:25:49; author: root; state: Exp; lines: +46 -17
for new device use register_chrdev_region()
intialize all device i.e. nod=20
add all device
—————————-
revision 1.8
date: 2015/04/24 13:40:59; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.7
date: 2015/04/24 13:32:16; author: root; state: Exp; lines: +6 -1
*** empty log message ***
—————————-
revision 1.6
date: 2015/04/24 12:52:59; author: root; state: Exp; lines: +11 -0
allocating memory using kmalloc()
—————————-
revision 1.5
date: 2015/04/24 11:58:00; author: root; state: Exp; lines: +1 -1
use module parameter using module_param()
—————————-
revision 1.4
date: 2015/04/24 11:43:06; author: root; state: Exp; lines: +14 -2
intialise driver using alloc_chrdev_region()
—————————-
revision 1.3
date: 2015/04/24 05:32:26; author: root; state: Exp; lines: +3 -3
register the driver
—————————-
revision 1.2
date: 2015/04/24 05:24:42; author: root; state: Exp; lines: +3 -3
intialize driver using __init func
—————————-
revision 1.1
date: 2015/04/24 05:20:49; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.7
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 7; selected revisions: 7
description:
this is driver cleanup file
—————————-
revision 1.7
date: 2015/04/27 10:27:17; author: root; state: Exp; lines: +8 -2
clean all devices
—————————-
revision 1.6
date: 2015/04/24 13:32:17; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/04/24 12:53:37; author: root; state: Exp; lines: +1 -0
free memory using kfree()
—————————-
revision 1.4
date: 2015/04/24 11:44:00; author: root; state: Exp; lines: +1 -1
unregister the driver using unregister_chrdev_region()
—————————-
revision 1.3
date: 2015/04/24 05:33:04; author: root; state: Exp; lines: +1 -1
unregister the driver
—————————-
revision 1.2
date: 2015/04/24 05:25:51; author: root; state: Exp; lines: +1 -1
cleanup the driver using __exit func
—————————-
revision 1.1
date: 2015/04/24 05:21:08; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Character Driver, Device Drivers | Leave a comment

Successfully done quick_sort

RCS file: ./quick_sort.c,v
Working file: ./quick_sort.c
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
include the header file
then define fxn prototype named qsor fxn
start the main fxn and decare the integer varible and a arr[20],i,and size
printf the size of artay element
then give the array element using for loop
—————————-
revision 1.4 locked by: root;
date: 2015/04/26 13:41:24; author: root; state: Exp; lines: +2 -2
after sortinthe index the value assign the value to arr[pivot] to temp
and then arr[j]to arr[pivot]
and after this give the fxn to the main()
and print the value of sorted array
—————————-
revision 1.3
date: 2015/04/26 13:35:14; author: root; state: Exp; lines: +3 -3
compare the arr[i]arr[pivot] using another while loop
and decrease the value of j by 1;
then comapre if(i<j)and swap the aaray index using temp varible
—————————-
revision 1.2
date: 2015/04/26 13:31:47; author: root; state: Exp; lines: +4 -4
give the defination of qsort fxn and pass the arrgument throw the fxn
int fst ,last and mid,declare these varible
and also i,j for index and a pivot varible for sorting
assign the pivot value mid to it
then comapre the if(i<j)
—————————-
revision 1.1
date: 2015/04/26 13:29:54; author: root; state: Exp;
Initial revision

Posted in Uncategorized | Leave a comment

Initialization, registeration of device driver by using cdev_add() and remove the connection successfully

RCS file: header.h,v
Working file: header.h
head: 1.5
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;	selected revisions: 5
description:
----------------------------
revision 1.5
date: 2015/04/26 15:51:54;  author: root; 
state: Exp;  lines: +1 -0
removed the struct of cdev.
----------------------------
revision 1.4
date: 2015/04/26 14:41:40;  author: root; 
state: Exp;  lines: +1 -1
introduced the stucture for mapping
stuct Qset, struct dev where our devices node
information is stored.
in struct dev struct cdev is declared
internally.
also declared the extern struct dev *sdev
pointer for mapping
,
----------------------------
revision 1.3
date: 2015/04/26 13:28:55;  author: root; 
state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.2
date: 2015/04/26 13:18:47;  author: root; 
state: Exp;  lines: +3 -0
*** empty log message ***
----------------------------
revision 1.1
date: 2015/04/26 13:12:11;  author: root; 
state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.5
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;	selected revisions: 5
description:
----------------------------
revision 1.5
date: 2015/04/26 17:35:00;  author: root; 
state: Exp;  lines: +1 -0
introduced extern file operations variable.
----------------------------
revision 1.4
date: 2015/04/26 15:52:20;  author: root; 
state: Exp;  lines: +2 -2
include the linux/cdev.h in header.h
----------------------------
revision 1.3
date: 2015/04/26 14:45:32;  author: root; 
state: Exp;  lines: +19 -0
*** empty log message ***
----------------------------
revision 1.2
date: 2015/04/26 13:18:47;  author: root; 
state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.1
date: 2015/04/26 13:12:11;  author: root; 
state: Exp;
Initial revision
=============================================================================

RCS file: new_initialization.c,v
Working file: new_initialization.c
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8;	selected revisions: 8
description:
----------------------------
revision 1.8
date: 2015/04/26 17:23:35;  author: root; 
state: Exp;  lines: +16 -2
initialize cdev_init and pass the 1st arguement
which is address of cdev which is pointed by object of struct dev.
2nd arguement is address of file_operations.
after cdev_init also initialized owner field and
file_operations *ops field which is actually defined in cdev.h.
after initialization of cdev_init, we need to
make the connection by using cdev_add().
In cdev_add(),mentioned the address pointed by
dev to cdev, 2nd arguement is dev and 3rd one is no. of devices we
added which is nod.
successfully cdev_add() is done, the driver
initilization is complete.
----------------------------
revision 1.7
date: 2015/04/26 16:11:06;  author: root; 
state: Exp;  lines: +4 -3
add the if statement in kmalloc error checking.
----------------------------
revision 1.6
date: 2015/04/26 15:51:07;  author: root; 
state: Exp;  lines: +2 -1
correct the mistake done is kmalloc of FLAG.
----------------------------
revision 1.5
date: 2015/04/26 14:40:00;  author: root; 
state: Exp;  lines: +8 -0
declared kmalloc and provide space into the
kernel.
after that memset flushed the memory.
----------------------------
revision 1.4
date: 2015/04/26 13:30:58;  author: root; 
state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.3
date: 2015/04/26 13:28:53;  author: root; 
state: Exp;  lines: +3 -1
*** empty log message ***
----------------------------
revision 1.2
date: 2015/04/26 13:18:42;  author: root; 
state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.1
date: 2015/04/26 13:12:11;  author: root; 
state: Exp;
Initial revision
=============================================================================

RCS file: new_clean.c,v
Working file: new_clean.c
head: 1.6
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;	selected revisions: 6
description:
----------------------------
revision 1.6
date: 2015/04/26 17:33:01;  author: root; 
state: Exp;  lines: +1 -1
The device represented stucture cdev must be
removed from the device table by using cdev_del by giving the
arguement which is address pointed dev to cdev.
----------------------------
revision 1.5
date: 2015/04/26 15:37:52;  author: root; 
state: Exp;  lines: +1 -1
change the kfree arguement i.e address of struct
dev.
----------------------------
revision 1.4
date: 2015/04/26 14:41:00;  author: root; 
state: Exp;  lines: +1 -0
kfree() is used before unregistered the driver.
----------------------------
revision 1.3
date: 2015/04/26 13:28:55;  author: root; 
state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.2
date: 2015/04/26 13:18:44;  author: root; 
state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.1
date: 2015/04/26 13:12:11;  author: root; 
state: Exp;
Initial revision
=============================================================================
Posted in Character Driver, Device Drivers | Tagged , , , | Leave a comment

Inter process communication using threads and message queues for 3 clients successfully done.

RCS file: server.c,v
Working file: server.c
head: 1.5
branch:
locks: strict
root: 1.5
access list:
symbolic names:
keyword substitution: kv
total revisions: 5; selected revisions: 5
description:
This is the base file for server.
Created message queue to receive request.
applied check on data according to the request.
—————————-
revision 1.5 locked by: root;
date: 2015/04/25 12:32:44; author: root; state: Exp; lines: +1 -0
Sent result to requesting clients back.
—————————-
revision 1.4
date: 2015/04/25 12:31:19; author: root; state: Exp; lines: +0 -1
Calculated result on processing threads.
created message queue to send result to the clients.
—————————-
revision 1.3
date: 2015/04/25 12:30:36; author: root; state: Exp; lines: +0 -1
Received request from requesting clients and accordingly created thread to process the request.
—————————-
revision 1.2
date: 2015/04/25 12:28:33; author: root; state: Exp; lines: +1 -0
Waiting for client to send request.
—————————-
revision 1.1
date: 2015/04/25 12:28:20; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: req_add.c,v
Working file: req_add.c
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
This is the base file for first requesting client.
created message queue to send data to server.
prepared request to be sent.
—————————-
revision 1.3 locked by: root;
date: 2015/04/25 12:36:23; author: root; state: Exp; lines: +0 -1
Successfully got result from the server.
—————————-
revision 1.2
date: 2015/04/25 12:33:38; author: root; state: Exp; lines: +1 -0
Sent request to server.
waiting for server to send the result back.
—————————-
revision 1.1
date: 2015/04/25 12:28:20; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: req_sub.c,v
Working file: req_sub.c
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
this is the base file for second requesting client.
created message queue and prepared request to be sent.
—————————-
revision 1.3 locked by: root;
date: 2015/04/25 12:36:47; author: root; state: Exp; lines: +0 -1
Successfully got result back from the server.
—————————-
revision 1.2
date: 2015/04/25 12:34:07; author: root; state: Exp; lines: +1 -0
Sent request to the server.
waiting for server to send back the result.
—————————-
revision 1.1
date: 2015/04/25 12:28:20; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: req_mul.c,v
Working file: req_mul.c
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
This is the base file for third requesting client.
prepared request to be sent.
—————————-
revision 1.3 locked by: root;
date: 2015/04/25 12:37:00; author: root; state: Exp; lines: +0 -1
Successfully got result back from the server.
—————————-
revision 1.2
date: 2015/04/25 12:34:34; author: root; state: Exp; lines: +1 -0
sent request to server.
waiting for server to send the result back
—————————-
revision 1.1
date: 2015/04/25 12:28:20; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment

Insert the driver into the kernel and remove the driver from kernel

RCS file: init.c,v
Working file: init.c
head: 1.6
branch:
locks: strict
emblogic: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6; selected revisions: 6
description:
Print a statement in the kernel
Register in the kernel.
—————————-
revision 1.6 locked by: emblogic;
date: 2015/04/25 11:05:53; author: emblogic; state: Exp; lines: +13 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/04/25 10:24:58; author: emblogic; state: Exp; lines: +12 -1
Memory is allocated in the kernel by using kmalloc.
cdev is initalize by using cdev_init.
after initialization its value is added.
—————————-
revision 1.4
date: 2015/04/25 07:45:30; author: emblogic; state: Exp; lines: +31 -7
Register the module in the kernel by using aloc_chardev_region.
Also input the value of the nod from the user.
—————————-
revision 1.3
date: 2015/04/24 12:33:08; author: emblogic; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.2
date: 2015/04/24 12:21:54; author: emblogic; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.1
date: 2015/04/24 11:40:51; author: emblogic; state: Exp;
Initial revision
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.4
branch:
locks: strict
emblogic: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
Include the file_operation structure.
—————————-
revision 1.4 locked by: emblogic;
date: 2015/04/25 11:05:56; author: emblogic; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.3
date: 2015/04/25 10:33:10; author: emblogic; state: Exp; lines: +3 -0
Cleaning process is reverse of the initalization.
first cdev struct is remove from the device table.
—————————-
revision 1.2
date: 2015/04/25 07:51:20; author: emblogic; state: Exp; lines: +12 -4
Unregister the module from the kernel.
—————————-
revision 1.1
date: 2015/04/24 11:41:38; author: emblogic; state: Exp;
Initial revision
=============================================================================

Posted in Character Driver | Leave a comment

successfully Registering and Initialization of driver…..

RCS file: ./init.c,v
Working file: ./init.c
head: 1.6
branch:
locks: strict
subhash: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6; selected revisions: 6
description:
decalre the header.h and declerations.h
and decalre the dev_t dev nad a struct file_operation fp
and three integer type varibles
—————————-
revision 1.6 locked by: subhash;
date: 2015/04/25 12:55:00; author: subhash; state: Exp; lines: +2 -2
then add operation is adding to the device
and extract the minor and major number from the dev
—————————-
revision 1.5
date: 2015/04/25 12:52:50; author: subhash; state: Exp; lines: +2 -2
then sdev->cdev.ops=&fp with the file operation
—————————-
revision 1.4
date: 2015/04/25 12:47:19; author: subhash; state: Exp; lines: +2 -2
give the memeset call for initializing the aloccting memory with null
after initialize the cdev_init fxn
give the cdev.owner their on address space by the THIS_MODULE
—————————-
revision 1.3
date: 2015/04/25 12:44:22; author: subhash; state: Exp; lines: +2 -2
initialze the varibles with their macros that is declare in the header.h
and give the kmalloc call to allocate the memory space int the kernel memory
check it whether the meomory is allocating or not
—————————-
revision 1.2
date: 2015/04/25 12:42:09; author: subhash; state: Exp; lines: +4 -4
give the initialization fxn call
in it give alloc_chrdev_region to register the device
—————————-
revision 1.1
date: 2015/04/25 12:41:06; author: subhash; state: Exp;
Initial revision
=============================================================================

RCS file: ./clean.c,v
Working file: ./clean.c
head: 1.4
branch:
locks: strict
subhash: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
declare the header.h and decleration.h
—————————-
revision 1.4 locked by: subhash;
date: 2015/04/25 12:37:37; author: subhash; state: Exp; lines: +1 -1
give the cdev_del call for delete the add fxn to the device
—————————-
revision 1.3
date: 2015/04/25 12:36:11; author: subhash; state: Exp; lines: +3 -3
after allocating the memory to the device then in exit fxn give free call to realise the memory
—————————-
revision 1.2
date: 2015/04/25 12:33:47; author: subhash; state: Exp; lines: +1 -1
give the exit function call
and after that give the unregister call to the for the register device
and at last give exit function defination .
—————————-
revision 1.1
date: 2015/04/25 12:32:13; author: subhash; state: Exp;
Initial revision
=============================================================================

RCS file: ./header.h,v
Working file: ./header.h
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
declare the

and
—————————-
revision 1.3 locked by: root;
date: 2015/04/25 12:19:24; author: root; state: Exp; lines: +2 -2
initialize the major no macro with 0
and minor number macro with 0
and device name and numner of devices
—————————-
revision 1.2
date: 2015/04/25 12:17:40; author: root; state: Exp; lines: +2 -2
give the module license ,module aurhor name and module description
—————————-
revision 1.1
date: 2015/04/25 12:17:02; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: ./declerations.h,v
Working file: ./declerations.h
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
declare a struct qset
int we have one qset pointer and a doublr data pointer
—————————-
revision 1.3 locked by: root;
date: 2015/04/25 12:27:06; author: root; state: Exp; lines: +2 -2
take three extern unsigned int varible
and one dev_t dev
and a extern struct Dev with poniter varible
—————————-
revision 1.2
date: 2015/04/25 12:25:16; author: root; state: Exp; lines: +2 -2
declare another struct DEv
and init we srtuct Qset pointer and a struct cdev c_dev varible
—————————-
revision 1.1
date: 2015/04/25 12:24:46; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

Initializing a driver using alloc_chrdev_region()

RCS file: header.h,v
Working file: header.h
head: 1.10
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 10; selected revisions: 10
description:
this is header file

here various header files are included such as module param.h init.h cdev.h slab.h and many others
—————————
revision 1.10
date: 2015/04/24 12:36:40; author: psingh; state: Exp; lines: +1

Here module author,module licence and module description is defined

 

—————————

RCS file: declaration.h,v
Working file: declaration.h
head: 1.6
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 6; selected revisions: 6
description:
—————————-
revision 1.6
date: 2015/04/25 00:38:02; author: psingh; state: Exp; lines: +6 -6
This is declaration.h…
here declaration of struct qset is defined
here declaration of struct Dev is also defined
and a structure variable of type Dev is also defined which contains the element *qset and predefined structure cdev as mentioned in cdev.h…

============================================================================

RCS file: fopr.h,v
Working file: fopr.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1
date: 2015/04/25 00:38:05; author: psingh; state: Exp;
Initial revision
Here file operation structure is taken and declared as extern…
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2

date: 2015/04/24 10:54:2; author: psingh; state: Exp; lines: +1 -1
Here initalization of module is done using alloc_chrdev_region
after that memory will be allocated by kernel using kmalloc()
—————————
revision 1.6
date: 2015/04/24 10:53:1; author: psingh; state: Exp; lines: +4 -5
cdev structure is initialized and its memory is made NULL by using memset
after that cdev owner and file operation is declared and the addition of device table is done using cdev_add()

————————
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.2
branch:p
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
this is cleanup function

revision 1.2
date: 2015/04/24 10:36:12; author: psingh; state: Exp; lines: +3 -1
first cdev_del will remove the device table from the driver module
after that kfree will free the memory allocated to the structure pointer as defined to the strcut Dev..
then unregisteration of the module will be carried by using unregister_chrdev_region

—————————-
revision 1.1
date: 2015/04/24 10:12:13; author: psingh; state: Exp;
Initial revision
=============================================================================

Posted in Character Driver, Device Drivers | Tagged | Leave a comment

Implimentation of module insertion in character driver is done

RCS file: header.h,v
Working file: header.h
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 2
description:
includimg all the headerfile which are required like init.h modue.h kernel.h
then give the author name and license
—————————-
revision 1.2
date: 2015/04/24 17:27:26;  author: emblogic;  state: Exp;  lines: +0 -1
now define macro for minor
again define macro for major and for nod
—————————-
revision 1.1
date: 2015/04/24 17:13:14;  author: emblogic;  state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;    selected revisions: 4
description:
define minor major nod with extern int
also define extern dev_
—————————-
revision 1.4
date: 2015/04/24 17:32:13;  author: emblogic;  state: Exp;  lines: +1 -0
*** empty log message ***
—————————-
revision 1.3
date: 2015/04/24 17:28:17;  author: emblogic;  state: Exp;  lines: +0 -1
*** empty log message ***
—————————-
revision 1.2
date: 2015/04/24 17:15:21;  author: emblogic;  state: Exp;  lines: +0 -1
now define a struct Qset
which having data tpues like another structure pointer Qset *next with the double pointer **data
—————————-
revision 1.1
date: 2015/04/24 17:13:14;  author: emblogic;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;    selected revisions: 4
description:
start with the registration by using alloc_
by using alloc_chrdev_region function
—————————-
revision 1.4
date: 2015/04/24 17:38:59;  author: emblogic;  state: Exp;  lines: +1 -1
now use c_add to add
—————————-
revision 1.3
date: 2015/04/24 17:33:07;  author: emblogic;  state: Exp;  lines: +1 -1
now use memset to cleean the memory with garbage
—————————-
revision 1.2
date: 2015/04/24 17:28:28;  author: emblogic;  state: Exp;  lines: +1 -1
after registeration then provide memory by using kmalloc fuction
—————————-
revision 1.1
date: 2015/04/24 17:13:14;  author: emblogic;  state: Exp;
Initial revision
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.5
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;    selected revisions: 5
description:
in this function we do reverse opration of init like unregister the function
—————————-
revision 1.5
date: 2015/04/24 17:42:02;  author: emblogic;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.4
date: 2015/04/24 17:36:13;  author: emblogic;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.3
date: 2015/04/24 17:29:52;  author: emblogic;  state: Exp;  lines: +1 -1
after using kmolloc we have free tha maemory
memory by using kfree()
—————————-
revision 1.2
date: 2015/04/24 17:18:10;  author: emblogic;  state: Exp;  lines: +1 -1
now we have to delete the c_add call by using del call
—————————-
revision 1.1
date: 2015/04/24 17:13:14;  author: emblogic;  state: Exp;
Initial revision
=============================================================================

Posted in Character Driver | Leave a comment

Successfully registerd the device,allocated memory and added the driver in the kernel space..

RCS file: header.h,v
Working file: header.h
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;    selected revisions: 3
description:
This include header files
Included init.h,module.h,fs.h
Gave MODULE_DESCRIPTION
—————————-
revision 1.3    locked by: root;
date: 2015/04/25 04:53:48;  author: root;  state: Exp;  lines: +1 -0
Included cdev.h
—————————-
revision 1.2
date: 2015/04/25 04:34:10;  author: root;  state: Exp;  lines: +1 -0
included slab.h
—————————-
revision 1.1
date: 2015/04/24 10:55:58;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;    selected revisions: 4
description:
This is declaration file.
—————————-
revision 1.4    locked by: root;
date: 2015/04/25 05:16:10;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.3
date: 2015/04/25 04:54:01;  author: root;  state: Exp;  lines: +3 -1
Declared the device representation structure inside struct Dev
—————————-
revision 1.2
date: 2015/04/25 04:34:29;  author: root;  state: Exp;  lines: +11 -0
included the structure for allocating memory for device.
—————————-
revision 1.1
date: 2015/04/24 11:38:23;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.9
branch:
locks: strict
root: 1.9
access list:
symbolic names:
keyword substitution: kv
total revisions: 9;    selected revisions: 9
description:
This is the initialisation file.
registered the device through alloc_chrdev_region()
Printing the major and minor no. through printk.
—————————-
revision 1.9    locked by: root;
date: 2015/04/25 05:16:13;  author: root;  state: Exp;  lines: +2 -0
*** empty log message ***
—————————-
revision 1.8
date: 2015/04/25 05:13:50;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.7
date: 2015/04/25 05:13:03;  author: root;  state: Exp;  lines: +2 -2
*** empty log message ***
—————————-
revision 1.6
date: 2015/04/25 04:57:05;  author: root;  state: Exp;  lines: +11 -1
Initialised the device representation structure using cdev_init().
Added the device to device table using cdev_add()
—————————-
revision 1.5
date: 2015/04/25 04:37:52;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.4
date: 2015/04/25 04:35:51;  author: root;  state: Exp;  lines: +8 -0
Allocated the memory to device using kmalloc()
Flusing the garbage using memset()
—————————-
revision 1.3
date: 2015/04/24 11:40:39;  author: root;  state: Exp;  lines: +1 -0
printing the value of nod
—————————-
revision 1.2
date: 2015/04/24 11:19:56;  author: root;  state: Exp;  lines: +2 -1
included module parameter module_param().
—————————-
revision 1.1
date: 2015/04/24 11:01:51;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;    selected revisions: 4
description:
This is the cleanup file .
Unregistering the device through unregister_chrdev_region().
—————————-
revision 1.4    locked by: root;
date: 2015/04/25 04:56:14;  author: root;  state: Exp;  lines: +1 -0
Removing the device representation structure using cdev_del().
—————————-
revision 1.3
date: 2015/04/25 04:35:00;  author: root;  state: Exp;  lines: +1 -0
Deallocated the memory for device using kfree().
—————————-
revision 1.2
date: 2015/04/24 11:44:57;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.1
date: 2015/04/24 11:03:39;  author: root;  state: Exp;
Initial revision
=============================================================================

Posted in Device Drivers | Leave a comment

Successfully Register the device, Allocated the memory and added the driver in the kernel space

RCS file: header.h,v
Working file: header.h
head: 1.4
branch:
locks: strict
	root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;	selected revisions: 4
description:
Decleared the header files that are linux/init.h , linux/modules.h ,linux/fs.h
also define MAJORNO, MINORNO and NOD
Gave the MODULE_LICENSE(),MODULE_AUTHOR,MODULE_DESCRIPTION()
Also define the device name
----------------------------
revision 1.4	locked by: root;
date: 2015/04/25 04:53:36;  author: root;  state: Exp;  lines: +1 -0
included cdev.h header file.
----------------------------
revision 1.3
date: 2015/04/25 04:16:22;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.2
date: 2015/04/24 11:19:28;  author: root;  state: Exp;  lines: +1 -0
Included the header file i.e linux/moduleparam.h
----------------------------
revision 1.1
date: 2015/04/24 10:56:53;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: Declearation.h,v
Working file: Declearation.h
head: 1.6
branch:
locks: strict
	root: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;	selected revisions: 6
description:
This is Declearation function.
----------------------------
revision 1.6	locked by: root;
date: 2015/04/25 05:16:18;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.5
date: 2015/04/25 04:54:02;  author: root;  state: Exp;  lines: +2 -1
Decleare the device representation structure inside struct dev.
----------------------------
revision 1.4
date: 2015/04/25 04:33:47;  author: root;  state: Exp;  lines: +11 -1
Included the structure for allocating memory to the device.
----------------------------
revision 1.3
date: 2015/04/25 04:20:48;  author: root;  state: Exp;  lines: +1 -2
*** empty log message ***
----------------------------
revision 1.2
date: 2015/04/25 04:16:24;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.1
date: 2015/04/24 10:59:36;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.9
branch:
locks: strict
	root: 1.9
access list:
symbolic names:
keyword substitution: kv
total revisions: 9;	selected revisions: 9
description:
This is initialization function . 
Initialization is done by using MACRO module_init().
Register the device through alloc_chrdev_region().
printed the major and minor no
----------------------------
revision 1.9	locked by: root;
date: 2015/04/25 05:16:20;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.8
date: 2015/04/25 04:56:08;  author: root;  state: Exp;  lines: +12 -3
The device representation structure is initialized .
structure is initialied using cdev_init()
And also added to the device entry in the device table by using cdev_add()
----------------------------
revision 1.7
date: 2015/04/25 04:36:55;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.6
date: 2015/04/25 04:34:54;  author: root;  state: Exp;  lines: +9 -2
Allocated memory for device by using kmalloc().
nd also use memset() to flush out the garbage.
----------------------------
revision 1.5
date: 2015/04/25 04:20:50;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
----------------------------
revision 1.4
date: 2015/04/24 11:41:17;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.3
date: 2015/04/24 11:38:37;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.2
date: 2015/04/24 11:20:38;  author: root;  state: Exp;  lines: +2 -2
Gave the module parameter through module_param().
----------------------------
revision 1.1
date: 2015/04/24 11:01:53;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.3
branch:
locks: strict
	root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
This is cleanup function or we can say that its a exit function.
this is done by using MACRO module_exit()..
Unregister the device through unregister_chrdev_region().
----------------------------
revision 1.3	locked by: root;
date: 2015/04/25 05:16:21;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.2
date: 2015/04/25 05:04:47;  author: root;  state: Exp;  lines: +2 -0
Deallocting the memory by using kfree()
Removed the device representing structure cdev by using cdev_del().
----------------------------
revision 1.1
date: 2015/04/24 11:04:05;  author: root;  state: Exp;
Initial revision
=============================================================================
Posted in Character Driver, Device Drivers | Leave a comment

Successfully Created kernel module and registered the device..

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
This includes the header file.
Included init.h,modules.h,fs.h.
defined a extern variable major.
gave a macro DEVICE_NAME.
—————————-
revision 1.1    locked by: root;
date: 2015/04/24 05:56:00;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
This is the declaration file
Gave structure variable for struct file_operations.
—————————-
revision 1.1    locked by: root;
date: 2015/04/24 05:58:06;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
This is the initialisation program to initialise the device.
Calling initialisation function through macro module_init().
Registered the device through register_chrdev()
—————————-
revision 1.1    locked by: root;
date: 2015/04/24 06:04:28;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
This is the cleanup program.
Calling clean function through module_exit().
unregistered the device through unregister_chrdev()
—————————-
revision 1.1    locked by: root;
date: 2015/04/24 06:09:40;  author: root;  state: Exp;
Initial revision
=============================================================================

Posted in Device Drivers | Leave a comment

Successfully Created Kernel Module and register the device.

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
	root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
Included the header files like linux/init.h and linux/module.h.
Gave the MODULE_LICENSE , MODULE_AUTHOR, MODULE_DESCRIPTION.
Decleared the device name.
also decleared the major no.
----------------------------
revision 1.1	locked by: root;
date: 2015/04/24 05:55:37;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: Declearation.h,v
Working file: Declearation.h
head: 1.1
branch:
locks: strict
	root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
This is declearation file .
decleared the structure variable for the struct file_operations.
----------------------------
revision 1.1	locked by: root;
date: 2015/04/24 05:57:55;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.1
branch:
locks: strict
	root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
In this we have call the initialization function by using the macro module_init().
Register the device through register_chrdev().
----------------------------
revision 1.1	locked by: root;
date: 2015/04/24 06:07:42;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.1
branch:
locks: strict
	root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
In this we have call the cleanup function or we can say that exit_function by using the macro module_exit().
Unregister the device through unregister_chrdev().
----------------------------
revision 1.1	locked by: root;
date: 2015/04/24 06:11:04;  author: root;  state: Exp;
Initial revision
=============================================================================
Posted in Uncategorized | Leave a comment

Successfully done driver for alloc, kmalloc, device Initialization

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this is basic header file
—————————-
revision 1.1
date: 2015/04/24 05:20:37; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
this is driver intialisation file
—————————-
revision 1.3
date: 2015/04/24 05:32:26; author: root; state: Exp; lines: +3 -3
register the driver
—————————-
revision 1.2
date: 2015/04/24 05:24:42; author: root; state: Exp; lines: +3 -3
intialize driver using __init func
—————————-
revision 1.1
date: 2015/04/24 05:20:49; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
this is driver cleanup file
—————————-
revision 1.3
date: 2015/04/24 05:33:04; author: root; state: Exp; lines: +1 -1
unregister the driver
—————————-
revision 1.2
date: 2015/04/24 05:25:51; author: root; state: Exp; lines: +1 -1
cleanup the driver using __exit func
—————————-
revision 1.1
date: 2015/04/24 05:21:08; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.7
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 7; selected revisions: 7
description:
this is basic header file
—————————-
revision 1.7
date: 2015/04/24 13:43:07; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.6
date: 2015/04/24 13:38:51; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/04/24 13:32:14; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.4
date: 2015/04/24 12:55:42; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.3
date: 2015/04/24 12:52:22; author: root; state: Exp; lines: +14 -0
declare struct Qset, struct Dev
—————————-
revision 1.2
date: 2015/04/24 11:42:31; author: root; state: Exp; lines: +20 -1
included moduleparan.h & slab.h
—————————-
revision 1.1
date: 2015/04/24 05:20:37; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: init.c,v
Working file: init.c
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8; selected revisions: 8
description:
this is driver intialisation file
—————————-
revision 1.8
date: 2015/04/24 13:40:59; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.7
date: 2015/04/24 13:32:16; author: root; state: Exp; lines: +6 -1
*** empty log message ***
—————————-
revision 1.6
date: 2015/04/24 12:52:59; author: root; state: Exp; lines: +11 -0
allocating memory using kmalloc()
—————————-
revision 1.5
date: 2015/04/24 11:58:00; author: root; state: Exp; lines: +1 -1
use module parameter using module_param()
—————————-
revision 1.4
date: 2015/04/24 11:43:06; author: root; state: Exp; lines: +14 -2
intialise driver using alloc_chrdev_region()
—————————-
revision 1.3
date: 2015/04/24 05:32:26; author: root; state: Exp; lines: +3 -3
register the driver
—————————-
revision 1.2
date: 2015/04/24 05:24:42; author: root; state: Exp; lines: +3 -3
intialize driver using __init func
—————————-
revision 1.1
date: 2015/04/24 05:20:49; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: clean.c,v
Working file: clean.c
head: 1.6
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 6; selected revisions: 6
description:
this is driver cleanup file
—————————-
revision 1.6
date: 2015/04/24 13:32:17; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/04/24 12:53:37; author: root; state: Exp; lines: +1 -0
free memory using kfree()
—————————-
revision 1.4
date: 2015/04/24 11:44:00; author: root; state: Exp; lines: +1 -1
unregister the driver using unregister_chrdev_region()
—————————-
revision 1.3
date: 2015/04/24 05:33:04; author: root; state: Exp; lines: +1 -1
unregister the driver
—————————-
revision 1.2
date: 2015/04/24 05:25:51; author: root; state: Exp; lines: +1 -1
cleanup the driver using __exit func
—————————-
revision 1.1
date: 2015/04/24 05:21:08; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Character Driver, Device Drivers | Leave a comment

Implemented IPC using FIFO for 3 clients

RCS file: header.h,v
Working file: header.h
head: 1.2
branch:
locks: strict
	root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
Decleared all the header files that are useful for the program.
Also decleared the structure of req_client which includes operator and operands.
Gave the prototypes for the invoke_process_client1().
Gave the prototype for invoke_process_client2().
Gave the prototype for invoke_process_client3().
----------------------------
revision 1.2	locked by: root;
date: 2015/04/15 11:15:39;  author: root;  state: Exp;  lines: +0 -1
Also decleared the union semun which includes a value.
Gave the prototype for wait operation i.e semaphore_p().
Gave the prototype for signal operation i.e semaphore_v().
Gave the prototype for destroying the semaphore i.e del_semvalue().
----------------------------
revision 1.1
date: 2015/04/15 11:14:54;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: req_add.c,v
Working file: req_add.c
head: 1.3
branch:
locks: strict
	root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
This is requesting client(req_client) requesting for add operation.
Created a FIFO between req_add and server.
We have created this FIFO in O_WRONLY mode .
Req_add wrote the request structure to the server.
Also used semaphore wait function i.e semaphore_p().
----------------------------
revision 1.3	locked by: root;
date: 2015/04/15 11:39:10;  author: root;  state: Exp;  lines: +1 -0
Created another FIFO in O_RDONLY mode .
Accepted the result through FIFO.
----------------------------
revision 1.2
date: 2015/04/15 11:32:54;  author: root;  state: Exp;  lines: +0 -1
Now we have used the semaphore signal function i.e semaphore_v().
----------------------------
revision 1.1
date: 2015/04/15 11:31:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: req_sub.c,v
Working file: req_sub.c
head: 1.3
branch:
locks: strict
	root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
This is requesting client requesting for subtract operation.
Created a FIFO between req_sub and server.
We have created this FIFO in O_WRONLY mode .
Req_sub wrote the request structure to the server.
Also use semaphore wait operation i.e semaphore_p().
----------------------------
revision 1.3	locked by: root;
date: 2015/04/15 11:50:28;  author: root;  state: Exp;  lines: +1 -0
Created another FIFO in O_WRONLY mode .
Accepting the result from the server.
----------------------------
revision 1.2
date: 2015/04/15 11:49:02;  author: root;  state: Exp;  lines: +37 -0
Also used semaphore signal operation i.e semaphore_v().
----------------------------
revision 1.1
date: 2015/04/15 11:47:51;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: req_mul.c,v
Working file: req_mul.c
head: 1.3
branch:
locks: strict
	root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
This is requesting client requesting for multiplication operation.
Created a FIFO between req_mul and server.
We have created the FIFO in O_WRONLY mode .
Also used semaphore wait operation i.e semaphore_p().
----------------------------
revision 1.3	locked by: root;
date: 2015/04/15 12:00:12;  author: root;  state: Exp;  lines: +1 -0
Created another FIFO in O_RDONLY mode .
Accepting the result from server through FIFO .
----------------------------
revision 1.2
date: 2015/04/15 11:56:25;  author: root;  state: Exp;  lines: +1 -0
Also use semaphore signal operation i.e semaphore_v().
----------------------------
revision 1.1
date: 2015/04/15 11:55:57;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: adder.c,v
Working file: adder.c
head: 1.2
branch:
locks: strict
	root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
This is processing client i.e adder.c
Accepting the request structure send by the server.
Performing the addition operation.
----------------------------
revision 1.2	locked by: root;
date: 2015/04/15 12:42:06;  author: root;  state: Exp;  lines: +1 -0
Performed the operation and computed the result.
Send back the result to the server through pipes.
also used kill()signal.
----------------------------
revision 1.1
date: 2015/04/15 12:41:16;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: subtractor.c,v
Working file: subtractor.c
head: 1.2
branch:
locks: strict
	root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
This is processing client performing subtraction operation.
Accepting the request structure from the server.
Performing the subtraction operation.
----------------------------
revision 1.2	locked by: root;
date: 2015/04/15 12:48:29;  author: root;  state: Exp;  lines: +1 -0
Performed the operation and computed the result.
send back the result to the server.
----------------------------
revision 1.1
date: 2015/04/15 12:47:26;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: multiplier.c,v
Working file: multiplier.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;	selected revisions: 2
description:
This is processing client performing multiplication operation.
Accepting the request structure from server.
Performing the multiplication operation.
----------------------------
revision 1.2
date: 2015/04/15 12:56:24;  author: root;  state: Exp;  lines: +1 -0
Performed the operation and computed the result.
send the result back to the server.
----------------------------
revision 1.1
date: 2015/04/15 12:55:40;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: server.c,v
Working file: server.c
head: 1.4
branch:
locks: strict
	root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;	selected revisions: 4
description:
Open the FIFO in O_RDONLY  mode .
And accepted the request structure from 3 clients.
Created fork().
invoke_process client1() and send the request structure to the respective pro_client i.e adder
invoke_process_client2() and send  the request structure to the respective pro_client i.e subtractor.
invoke_process_client3() and send the request structure to the respective pro_client i.e multiplier.#[A
Also we have used the signal handler and signal handler functions .
We have created a pipe between server and pro_clients.
----------------------------
revision 1.4	locked by: root;
date: 2015/04/15 12:30:06;  author: root;  state: Exp;  lines: +1 -0
Created another FIFO between server and req_clients in O_WRONLY mode .
Also send back the result to the req_clients through FIFO.
----------------------------
revision 1.3
date: 2015/04/15 12:24:55;  author: root;  state: Exp;  lines: +1 -0
Sending the request structure to the pro_clients through pipes.
Accepting the result send by the pro_clients through pipes.
----------------------------
revision 1.2
date: 2015/04/15 12:20:30;  author: root;  state: Exp;  lines: +1 -0
also used the semget() for creating sem_id .
and also used the semctl() for initialising the semaphore.
----------------------------
revision 1.1
date: 2015/04/15 12:19:32;  author: root;  state: Exp;
Initial revision
=============================================================================
Posted in Uncategorized | Leave a comment