EmbLogic's Blog

rcs of driver initialization…….

head    1.19;
2 access;
3 symbols;
4 locks
5         root:1.19; strict;
6 comment @ * @;
7
8
9 1.19
10 date    2014.10.05.10.38.59;    author root;    state Exp;
11 branches;
12 next    1.18;
13
14 1.18
15 date    2014.10.05.10.38.24;    author root;    state Exp;
16 branches;
17 next    1.17;
18
19 1.17
20 date    2014.10.03.14.07.19;    author root;    state Exp;
21 branches;
22 next    1.16;
23
24 1.16
25 date    2014.10.03.10.29.04;    author root;    state Exp;
26 branches;
27 next    1.15;
28
29 1.15
30 date    2014.10.03.10.28.00;    author root;    state Exp;
31 branches;
32 next    1.14;
33
34 1.14
35 date    2014.10.03.10.17.44;    author root;    state Exp;
36 branches;
next    1.13;
38
39 1.13
40 date    2014.10.03.10.17.14;    author root;    state Exp;
41 branches;
42 next    1.12;
43
44 1.12
45 date    2014.10.03.10.16.34;    author root;    state Exp;
46 branches;
47 next    1.11;
48
49 1.11
50 date    2014.10.03.10.12.52;    author root;    state Exp;
51 branches;
52 next    1.10;
53
54 1.10
55 date    2014.10.03.10.11.46;    author root;    state Exp;
56 branches;
57 next    1.9;
58
59 1.9
60 date    2014.10.03.10.10.49;    author root;    state Exp;
61 branches;
62 next    1.8;
63
64 1.8
65 date    2014.10.03.10.09.50;    author root;    state Exp;
66 branches;
67 next    1.7;
68

1.7
70 date    2014.10.03.10.09.09;    author root;    state Exp;
71 branches;
72 next    1.6;
73
74 1.6
75 date    2014.10.03.09.58.22;    author root;    state Exp;
76 branches;
77 next    1.5;
78
79 1.5
80 date    2014.10.03.09.55.51;    author root;    state Exp;
81 branches;
82 next    1.4;
83
84 1.4
85 date    2014.10.01.17.22.31;    author root;    state Exp;
86 branches;
87 next    1.3;
88
89 1.3
90 date    2014.10.01.17.19.02;    author root;    state Exp;
91 branches;
92 next    1.2;
93
94 1.2
95 date    2014.10.01.17.03.37;    author root;    state Exp;
96 branches;
97 next    1.1;
98
99 1.1
100 date    2014.09.29.07.25.13;    author root;    state Exp;

Posted in Character Driver | Leave a comment

MULTI-THREADED FTP SERVER

Hi guys, I’ve tried to implement a multi-threaded FTP server that enables the clients to download files from the server. I will be posting the project on git-hub along with all its source code. You are most welcome to test the code, find bugs and report at the email as under :
email : abhishek.esse@gmail.com
Here’s the server’s log file.

1
2 RCS file: server.c,v
3 Working file: server.c
4 head: 1.5
5 branch:
6 locks: strict
7 root: 1.5
8 access list:
9 symbolic names:
10 keyword substitution: kv
11 total revisions: 5; selected revisions: 5
12 description:
13 Implementing ftp server under AF_INET family.
14 —————————-
15 revision 1.5 locked by: root;
16 date: 2014/09/29 20:33:26; author: root; state: Exp; lines: +0 -1
17 Removed the statement that printed the number of bytes written by the server.
18 —————————-
19 revision 1.4
20 date: 2014/09/29 20:23:53; author: root; state: Exp; lines: +143 -29
21 Successfully implemented the ftp server.
22 The server successfully responds to the client requests.
23 File sending successful.
24 No issues as of now w.r.t. to functionality of the server.
25 —————————-
26 revision 1.3
27 date: 2014/09/29 11:42:01; author: root; state: Exp; lines: +59 -28
28 The server threads for individual clients behave properly, i.e. even if a client quits the server continues execution.
29 —————————-
30 revision 1.2
31 date: 2014/09/29 10:25:56; author: root; state: Exp; lines: +30 -8
32 Implemented the following functionality.
“server_log_file” 42L, 1587C 25,1 Top

Posted in Project 04: FTP based Client Server using Threads and Sockets | Leave a comment

FIRST PROGRAM AT QT-CROSS PLATFORM OF .cpp FILE WIDGET APPLICATION FROM MY DESKTOP “Hello World”

Screenshot from 2014-09-28 15:04:34

Posted in Uncategorized | Leave a comment

Client,server and process communication project using signals

Welcome to the Project!!
n1=12, n2=23 Performing addition action
In Server:Sum=35
In CLIENT: Result=35
n1=20, n2=8 Performing Subtraction action
In Server:Sub=12
In CLIENT2: Result=12
n1=5, n2=8 Performing Multiplication action
In Server:Mul=40
In CLIENT3: Result=40

RCS file: RCS/server.c,v
Working file: server.c
head: 1.27
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 27;    selected revisions: 27
description:
program which act as a server to take the request of client
done:created one child process and a pipe
done:replace the child process with client1.c and send pfd[1] to the client as a command line argument
—————————-
revision 1.27
date: 2014/09/27 13:32:08;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.26
date: 2014/09/27 13:30:56;  author: root;  state: Exp;  lines: +1 -1
fix child exit normally
—————————-
revision 1.25
date: 2014/09/27 13:26:47;  author: root;  state: Exp;  lines: +5 -11
remove extra printf
—————————-
revision 1.24
date: 2014/09/27 13:20:47;  author: root;  state: Exp;  lines: +19 -6
create 3rd client and process to perform multiplication
—————————-
revision 1.23
date: 2014/09/27 13:07:11;  author: root;  state: Exp;  lines: +2 -2
include client 2 also
—————————-
revision 1.22
date: 2014/09/27 12:59:47;  author: root;  state: Exp;  lines: +1 -1
send signal to client after reading the result from process pipe and writing the same into client pipe
—————————-
revision 1.21
date: 2014/09/27 12:54:04;  author: root;  state: Exp;  lines: +4 -2
get the pid of child in parent process inorder to send the signal using kill
—————————-
revision 1.20
date: 2014/09/27 12:48:34;  author: root;  state: Exp;  lines: +7 -6
get the id of process child into pid1
—————————-
revision 1.19
date: 2014/09/27 05:37:45;  author: root;  state: Exp;  lines: +1 -0
check char variable in switch case
—————————-
revision 1.18
date: 2014/09/27 05:34:19;  author: root;  state: Exp;  lines: +1 -2
*** empty log message ***
—————————-
revision 1.17
date: 2014/09/27 05:27:32;  author: root;  state: Exp;  lines: +1 -1
change the position of signal handler
—————————-
revision 1.16
date: 2014/09/27 05:25:13;  author: root;  state: Exp;  lines: +1 -1
use pause to synchronise
—————————-
revision 1.15
date: 2014/09/27 05:18:07;  author: root;  state: Exp;  lines: +2 -2
change the lable1 in front of fork
—————————-
revision 1.14
date: 2014/09/27 05:12:04;  author: root;  state: Exp;  lines: +21 -3
create 1 client and 1 process for subtraction operation
—————————-
revision 1.13
date: 2014/09/26 19:00:34;  author: root;  state: Exp;  lines: +0 -1
*** empty log message ***
—————————-
revision 1.12
date: 2014/09/26 18:55:32;  author: root;  state: Exp;  lines: +2 -0
write the result into client pipe
—————————-
revision 1.11
date: 2014/09/26 18:51:04;  author: root;  state: Exp;  lines: +5 -1
define function to handle sigusr1
—————————-
revision 1.10
date: 2014/09/26 18:46:22;  author: root;  state: Exp;  lines: +2 -2
use pause()
—————————-
revision 1.9
date: 2014/09/26 17:57:33;  author: root;  state: Exp;  lines: +30 -86
remake the program without using any sleep instruction
use structure to read the data from client
write the num1 and num2 into process adder pipe
—————————-
revision 1.8
date: 2014/09/24 14:24:48;  author: root;  state: Exp;  lines: +0 -1
change the o/p appearence
—————————-
revision 1.7
date: 2014/09/24 14:12:17;  author: root;  state: Exp;  lines: +42 -10
read result from p1,p2,p3
—————————-
revision 1.6
date: 2014/09/24 13:08:55;  author: root;  state: Exp;  lines: +17 -3
create one more child process to call process1.c
—————————-
revision 1.5
date: 2014/09/24 09:47:40;  author: root;  state: Exp;  lines: +31 -3
read the data from all three client
do switch case to perform different operation
—————————-
revision 1.4
date: 2014/09/24 08:38:36;  author: root;  state: Exp;  lines: +6 -6
create 3 child of same parent to call diff-2 client
—————————-
revision 1.3
date: 2014/09/24 08:14:31;  author: root;  state: Exp;  lines: +18 -7
crate another pipe for communication between server and process
—————————-
revision 1.2
date: 2014/09/24 06:39:04;  author: root;  state: Exp;  lines: +3 -0
read the data through pipe sent by client1
—————————-
revision 1.1
date: 2014/09/24 06:22:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/client1.c,v
Working file: client1.c
head: 1.15
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 15;    selected revisions: 15
description:
client process which will replace the child process
done:create the structure for operand and operation, get the pipe write fd as a command line argument
—————————-
revision 1.15
date: 2014/09/27 13:21:15;  author: root;  state: Exp;  lines: +0 -2
remove unwanted printf
—————————-
revision 1.14
date: 2014/09/27 13:07:36;  author: root;  state: Exp;  lines: +1 -1
don’t work  by ignoring so get back on handling the SIGUSR1
—————————-
revision 1.13
date: 2014/09/27 13:03:41;  author: root;  state: Exp;  lines: +1 -2
test on signal ignore
—————————-
revision 1.12
date: 2014/09/27 13:00:28;  author: root;  state: Exp;  lines: +6 -1
define the signal handler and use pause till the client get the result after writing the data into pipe
—————————-
revision 1.11
date: 2014/09/27 12:54:35;  author: root;  state: Exp;  lines: +1 -0
get pid of itself
—————————-
revision 1.10
date: 2014/09/27 05:34:35;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
—————————-
revision 1.9
date: 2014/09/27 05:25:49;  author: root;  state: Exp;  lines: +1 -0
send signal to parent using kill
—————————-
revision 1.8
date: 2014/09/26 18:55:49;  author: root;  state: Exp;  lines: +2 -1
read the result from the server end
—————————-
revision 1.7
date: 2014/09/26 18:46:32;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.6
date: 2014/09/26 17:59:29;  author: root;  state: Exp;  lines: +15 -8
use structure to write the data into pipe
—————————-
revision 1.5
date: 2014/09/24 14:25:10;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.4
date: 2014/09/24 09:48:23;  author: root;  state: Exp;  lines: +6 -11
write operater and two operand into pipe
—————————-
revision 1.3
date: 2014/09/24 08:15:04;  author: root;  state: Exp;  lines: +3 -1
send the data to server and exit()
—————————-
revision 1.2
date: 2014/09/24 06:39:32;  author: root;  state: Exp;  lines: +5 -1
write the data into pipe so that server can read that
—————————-
revision 1.1
date: 2014/09/24 06:24:50;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/client2.c,v
Working file: client2.c
head: 1.10
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 10;    selected revisions: 10
description:
create client 2 to do the different mathematical operation
—————————-
revision 1.10
date: 2014/09/27 13:21:39;  author: root;  state: Exp;  lines: +1 -4
remove unwanted printf
—————————-
revision 1.9
date: 2014/09/27 13:10:11;  author: root;  state: Exp;  lines: +3 -1
remove syntex error
—————————-
revision 1.8
date: 2014/09/27 13:08:14;  author: root;  state: Exp;  lines: +3 -1
write the signal handler
—————————-
revision 1.7
date: 2014/09/27 12:49:18;  author: root;  state: Exp;  lines: +1 -0
use signal
—————————-
revision 1.6
date: 2014/09/27 05:34:37;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2014/09/27 05:26:00;  author: root;  state: Exp;  lines: +2 -1
send signal SIGUSR1 to server
—————————-
revision 1.4
date: 2014/09/27 05:12:30;  author: root;  state: Exp;  lines: +19 -8
client for subtraction
—————————-
revision 1.3
date: 2014/09/24 16:13:23;  author: root;  state: Exp;  lines: +0 -2
*** empty log message ***
—————————-
revision 1.2
date: 2014/09/24 09:48:57;  author: root;  state: Exp;  lines: +7 -15
write into pipe
—————————-
revision 1.1
date: 2014/09/24 08:39:12;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/client3.c,v
Working file: client3.c
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;    selected revisions: 4
description:
create client 3
—————————-
revision 1.4
date: 2014/09/27 13:21:49;  author: root;  state: Exp;  lines: +21 -7
create client for multiplication with signal handler after writing the data
—————————-
revision 1.3
date: 2014/09/24 14:25:40;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.2
date: 2014/09/24 09:49:23;  author: root;  state: Exp;  lines: +6 -13
whrite into pipe
—————————-
revision 1.1
date: 2014/09/24 08:39:54;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/process1.c,v
Working file: process1.c
head: 1.6
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;    selected revisions: 6
description:
this is process program which do the operation on data and return the result
—————————-
revision 1.6
date: 2014/09/27 13:26:59;  author: root;  state: Exp;  lines: +0 -1
remove extra printf
—————————-
revision 1.5
date: 2014/09/26 18:46:37;  author: root;  state: Exp;  lines: +2 -0
send signal using kill
—————————-
revision 1.4
date: 2014/09/26 17:59:53;  author: root;  state: Exp;  lines: +6 -16
get the num1 and num2 from server and perform the addition operation
wrirte back the sum into pipe
—————————-
revision 1.3
date: 2014/09/24 14:25:49;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.2
date: 2014/09/24 14:13:02;  author: root;  state: Exp;  lines: +8 -3
write the result into pipe in interger form
—————————-
revision 1.1
date: 2014/09/24 13:09:17;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/process2.c,v
Working file: process2.c
head: 1.5
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;    selected revisions: 5
description:
process to perform – operation and writing the result back into the pipe
—————————-
revision 1.5
date: 2014/09/27 13:27:12;  author: root;  state: Exp;  lines: +0 -1
remove extra printf
—————————-
revision 1.4
date: 2014/09/27 05:13:57;  author: root;  state: Exp;  lines: +1 -1
use sub instead of sum
—————————-
revision 1.3
date: 2014/09/27 05:12:41;  author: root;  state: Exp;  lines: +7 -15
processing end for subtraction
—————————-
revision 1.2
date: 2014/09/24 14:25:52;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.1
date: 2014/09/24 14:14:17;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/process3.c,v
Working file: process3.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;    selected revisions: 3
description:
process 3 to perform multiplication
—————————-
revision 1.3
date: 2014/09/27 13:22:13;  author: root;  state: Exp;  lines: +7 -16
process 3 for multiplication
—————————-
revision 1.2
date: 2014/09/24 14:25:55;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.1
date: 2014/09/24 14:14:52;  author: root;  state: Exp;
Initial revision
=============================================================================

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

Devoloped link list concept

RCS file: ll.c,v
Working file: ll.c
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
link list program
—————————-
revision 1.3 locked by: root;
date: 2014/09/26 05:52:07; author: root; state: Exp; lines: +13 -1
implement insert node function
implement delete node function
—————————-
revision 1.2
date: 2014/09/26 05:02:58; author: root; state: Exp; lines: +1 -1
devoloped the concept of linked list
enter enteries in node and print on terminal
—————————-
revision 1.1
date: 2014/09/26 05:01:09; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Data Structures with C | Leave a comment

client,server and process communication via pipes

RCS file: RCS/server.c,v
Working file: server.c
head: 1.8
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 8;    selected revisions: 8
description:
program which act as a server to take the request of client
done:created one child process and a pipe
done:replace the child process with client1.c and send pfd[1] to the client as a command line argument
—————————-
revision 1.8
date: 2014/09/24 14:24:48;  author: root;  state: Exp;  lines: +0 -1
change the o/p appearence
—————————-
revision 1.7
date: 2014/09/24 14:12:17;  author: root;  state: Exp;  lines: +42 -10
read result from p1,p2,p3
—————————-
revision 1.6
date: 2014/09/24 13:08:55;  author: root;  state: Exp;  lines: +17 -3
create one more child process to call process1.c
—————————-
revision 1.5
date: 2014/09/24 09:47:40;  author: root;  state: Exp;  lines: +31 -3
read the data from all three client
do switch case to perform different operation
—————————-
revision 1.4
date: 2014/09/24 08:38:36;  author: root;  state: Exp;  lines: +6 -6
create 3 child of same parent to call diff-2 client
—————————-
revision 1.3
date: 2014/09/24 08:14:31;  author: root;  state: Exp;  lines: +18 -7
crate another pipe for communication between server and process
—————————-
revision 1.2
date: 2014/09/24 06:39:04;  author: root;  state: Exp;  lines: +3 -0
read the data through pipe sent by client1
—————————-
revision 1.1
date: 2014/09/24 06:22:18;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/client1.c,v
Working file: client1.c
head: 1.5
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;    selected revisions: 5
description:
client process which will replace the child process
done:create the structure for operand and operation, get the pipe write fd as a command line argument
—————————-
revision 1.5
date: 2014/09/24 14:25:10;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.4
date: 2014/09/24 09:48:23;  author: root;  state: Exp;  lines: +6 -11
write operater and two operand into pipe
—————————-
revision 1.3
date: 2014/09/24 08:15:04;  author: root;  state: Exp;  lines: +3 -1
send the data to server and exit()
—————————-
revision 1.2
date: 2014/09/24 06:39:32;  author: root;  state: Exp;  lines: +5 -1
write the data into pipe so that server can read that
—————————-
revision 1.1
date: 2014/09/24 06:24:50;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/client2.c,v
Working file: client2.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 2
description:
create client 2 to do the different mathematical operation
—————————-
revision 1.2    locked by: root;
date: 2014/09/24 09:48:57;  author: root;  state: Exp;  lines: +7 -15
write into pipe
—————————-
revision 1.1
date: 2014/09/24 08:39:12;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/client3.c,v
Working file: client3.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;    selected revisions: 3
description:
create client 3
—————————-
revision 1.3
date: 2014/09/24 14:25:40;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.2
date: 2014/09/24 09:49:23;  author: root;  state: Exp;  lines: +6 -13
whrite into pipe
—————————-
revision 1.1
date: 2014/09/24 08:39:54;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/process1.c,v
Working file: process1.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;    selected revisions: 3
description:
this is process program which do the operation on data and return the result
—————————-
revision 1.3
date: 2014/09/24 14:25:49;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.2
date: 2014/09/24 14:13:02;  author: root;  state: Exp;  lines: +8 -3
write the result into pipe in interger form
—————————-
revision 1.1
date: 2014/09/24 13:09:17;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/process2.c,v
Working file: process2.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 2
description:
process to perform – operation and writing the result back into the pipe
—————————-
revision 1.2
date: 2014/09/24 14:25:52;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.1
date: 2014/09/24 14:14:17;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/process3.c,v
Working file: process3.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 2
description:
process 3 to perform multiplication
—————————-
revision 1.2
date: 2014/09/24 14:25:55;  author: root;  state: Exp;  lines: +0 -2
change the o/p appearance
—————————-
revision 1.1
date: 2014/09/24 14:14:52;  author: root;  state: Exp;
Initial revision
=============================================================================

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

MDC project output:

Final output of MDC project:

(In readd)
(In chkfile)
file read successfully as fd is 5
(In printfile)
the size of the file is:47
the content is in the file:
when the going gets tough the tough gets going
(In masterarray)
(In printma)
unique characters in master array are:
when tgoisu
(In mafile)
unique characters are written in mafile succesfully with a file descriptor: 11
the size of master array file is:11
(In codelength)
the code lenght is:4
(In compression)
the compress file is written successfully with a file discriptor:7
the size of the compression file is:24
the content is in compression file:
2T!d?cdRIujABujA&?d?c
(In decompression)
Decompress data has written on decompfile sucessfully with a file descrip
the size of decompression file is:50
the decompress data is:
when the going gets tough the tough gets going???w

RCS file: func.c,v
Working file: func.c
head: 1.205
branch:
locks: strict
root: 1.205
access list:
symbolic names:
keyword substitution: kv
total revisions: 205; selected revisions: 1
description:
—————————-
revision 1.205 locked by: root;
date: 2014/09/24 22:47:25; author: root; state: Exp; lines: +236 -210
*** empty log message ***
=============================================================================

RCS file: main.c,v
Working file: main.c
head: 1.6
branch:
locks: strict
root: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6; selected revisions: 1
description:
—————————-
revision 1.6 locked by: root;
date: 2014/09/24 18:57:00; author: root; state: Exp; lines: +1 -1
*** empty log message ***
=============================================================================

RCS file: ./header.h,v
Working file: ./header.h
head: 1.10
branch:
locks: strict
root: 1.10
access list:
symbolic names:
keyword substitution: kv
total revisions: 10; selected revisions: 1
description:
—————————-
revision 1.10 locked by: root;
date: 2014/09/24 18:54:42; author: root; state: Exp; lines: +1 -0
include printfile header file.
=============================================================================

Posted in Project 2: Multiple Data Compression and Encryption | Leave a comment

process replacement followed by inter process comm. using file

This is the output:

[root@localhost ipc]# ./p_comm
File Open Successfully
This is Parent with id=31340
This is child with id=31341
This is a new program which replaced the child
Write By Child:: Success
Read by Parent: Success
    Child Said:Hello Parent
Write by Parent: Success
Read By Child:: Success
    Parent said:Hi Child How are you?
Write By Child:: Success
Read by Parent: Success
    Child Said:I am Fine. U Tell?
Write by Parent: Success
Read By Child:: Success
    Parent said:We are also fine.Ok Bye
Child exit successfully and code is 0

Log File

RCS file: RCS/p_comm.c,v
Working file: p_comm.c
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;    selected revisions: 4
description:
program to communicate between two process through a file
done- opening a file in rdwr mode
convert int fd into string to make compatiple with execl argument
—————————-
revision 1.4
date: 2014/09/22 12:46:24;  author: root;  state: Exp;  lines: +13 -3
done:both read and write by parent in the same file
Note: Before executing this program make sure that “child_comm.c” file must be in the same directory
—————————-
revision 1.3
date: 2014/09/22 12:10:56;  author: root;  state: Exp;  lines: +9 -4
1st read by the parent and then reply back to child by writing into the same file
—————————-
revision 1.2
date: 2014/09/22 11:53:56;  author: root;  state: Exp;  lines: +10 -4
read the message written by child in a file
—————————-
revision 1.1
date: 2014/09/22 11:23:57;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: RCS/child_comm.c,v
Working file: child_comm.c
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;    selected revisions: 4
description:
program which will replace the child to do inter process comm through file
get fd through argv[0] and than convert into integer using atoi
—————————-
revision 1.4
date: 2014/09/22 12:48:25;  author: root;  state: Exp;  lines: +12 -2
done:child repalace itself with this file using execl and this program then communicate with parent
note:this program is linked with p_comm.c
—————————-
revision 1.3
date: 2014/09/22 12:11:48;  author: root;  state: Exp;  lines: +9 -2
1st write the msg for parent and then read the msg from parent using the same file
—————————-
revision 1.2
date: 2014/09/22 11:40:06;  author: root;  state: Exp;  lines: +4 -3
got message which is to be written in file through argv[1]
write the message into file
—————————-
revision 1.1
date: 2014/09/22 11:32:27;  author: root;  state: Exp;
Initial revision
=============================================================================

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

Process replacement using execl

RCS file: p_replace.c,v
Working file: p_replace.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 2
description:
program to replace the child process using execl()
—————————-
revision 1.2
date: 2014/09/22 10:22:30;  author: root;  state: Exp;  lines: +9 -1
use wait statement so that parent will wait till the child completed its execution
—————————-
revision 1.1
date: 2014/09/22 10:06:47;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: child.c,v
Working file: child.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
sample program which replace the child when call by child through execl()
—————————-
revision 1.1
date: 2014/09/22 10:06:07;  author: root;  state: Exp;
Initial revision
=============================================================================

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

Completed creating a new process using fork, how orphan process works, wait by parent till child exit

RCS file: fork.c,v
Working file: fork.c
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;    selected revisions: 4
description:
program to create a duplicate process using fork
—————————-
revision 1.4
date: 2014/09/18 17:37:44;  author: root;  state: Exp;  lines: +2 -0
print child and its parent id
check that orphan process have 1 as a parent id
use sleep command to make sure that child not become orphan
—————————-
revision 1.3
date: 2014/09/18 17:34:40;  author: root;  state: Exp;  lines: +2 -2
get pid of child
print pid of parent
—————————-
revision 1.2
date: 2014/09/18 17:30:58;  author: root;  state: Exp;  lines: +11 -1
create a child process using fork
define the body of child and parent using if and else
—————————-
revision 1.1
date: 2014/09/18 17:27:22;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: fork2.c,v
Working file: fork2.c
head: 1.3
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;    selected revisions: 3
description:
use multiple fork to create more child and parent process
—————————-
revision 1.3
date: 2014/09/19 12:49:25;  author: root;  state: Exp;  lines: +5 -0
*** empty log message ***
—————————-
revision 1.2
date: 2014/09/19 12:03:53;  author: root;  state: Exp;  lines: +2 -3
create more process using multiple fork statement
—————————-
revision 1.1
date: 2014/09/19 11:11:06;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: orphan.c,v
Working file: orphan.c
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;    selected revisions: 4
description:
program to make a process orphan
—————————-
revision 1.4
date: 2014/09/20 09:36:08;  author: root;  state: Exp;  lines: +4 -2
make child orphan and verify with output
—————————-
revision 1.3
date: 2014/09/19 13:54:25;  author: root;  state: Exp;  lines: +19 -10
use if else to notify when the child became orphan
—————————-
revision 1.2
date: 2014/09/19 13:42:45;  author: root;  state: Exp;  lines: +4 -3
get child id
print parent id
—————————-
revision 1.1
date: 2014/09/19 13:16:57;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: wait.c,v
Working file: wait.c
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
parent will wait till the child exit()
—————————-
revision 1.1
date: 2014/09/20 14:26:58;  author: root;  state: Exp;
Initial revision
=============================================================================

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

block device driver

RCS file: ./RCS/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:
Block device driver __init function (), in this function i initilize the important and required structures like struct gendisk, all the elements of that and struct sbulldev which is user defined data struture and then i initilize the struct request_queue and then inside that structure i initilize the struct request and inside that structure defined the struct bio and struct bio-vec and before that i create the sectors for my simulated dewhich is my sbulldev and then i use kmalloc for the sbulldev and the which data is defined inside the struct sbulldev, provide the memory with the help of vmalloc .
—————————-
revision 1.1    locked by: root;
date: 2014/09/20 18:43:10;  author: root;  state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

Multiple Data Compression & Encryption using Ittrative Techniques

RCS file: mdc.c,v

Working file: mdc.c

head: 1.20

branch:

locks: strict

root: 1.20

access list:

symbolic names:

keyword substitution: kv

total revisions: 20; selected revisions: 20

description:

Main function Of MDC

—————————-

revision 1.20 locked by: root;

date: 2014/09/19 19:43:44; author: root; state: Exp; lines: +16 -28

Created Master Array

—————————-

revision 1.19

date: 2002/01/02 05:05:42; author: root; state: Exp; lines: +2 -2

*** empty log message ***

—————————-

revision 1.18

date: 2002/01/02 05:04:37; author: root; state: Exp; lines: +2 -2

*** empty log message ***

—————————-

revision 1.17

date: 2002/01/02 05:01:22; author: root; state: Exp; lines: +1 -1

*** empty log message ***

—————————-

revision 1.16

date: 2002/01/02 05:00:09; author: root; state: Exp; lines: +1 -1

*** empty log message ***

—————————-

revision 1.15

date: 2002/01/02 04:56:36; author: root; state: Exp; lines: +1 -1

*** empty log message ***

—————————-

revision 1.14

date: 2002/01/02 04:55:09; author: root; state: Exp; lines: +1 -1

*** empty log message ***

—————————-

revision 1.13

date: 2002/01/02 04:54:19; author: root; state: Exp; lines: +3 -1

*** empty log message ***

—————————-

revision 1.12

date: 2002/01/02 04:35:24; author: root; state: Exp; lines: +2 -2

*** empty log message ***

—————————-

revision 1.11

date: 2002/01/02 04:33:03; author: root; state: Exp; lines: +5 -3

*** empty log message ***

—————————-

revision 1.10

date: 2002/01/02 04:27:49; author: root; state: Exp; lines: +3 -1

*** empty log message ***

—————————-

revision 1.9

date: 2002/01/02 04:25:30; author: root; state: Exp; lines: +2 -2

*** empty log message ***

—————————-

revision 1.8

date: 2002/01/02 04:24:19; author: root; state: Exp; lines: +2 -2

*** empty log message ***

—————————-

revision 1.7

date: 2002/01/02 04:20:52; author: root; state: Exp; lines: +23 -2

added function unique

it creates master arrary of unique characters

—————————-

revision 1.6

date: 2002/01/02 01:29:55; author: root; state: Exp; lines: +1 -1

*** empty log message ***

—————————-

revision 1.5

date: 2002/01/02 01:28:26; author: root; state: Exp; lines: +1 -1

*** empty log message ***

—————————-

revision 1.4

date: 2002/01/02 01:27:40; author: root; state: Exp; lines: +1 -0

*** empty log message ***

—————————-

revision 1.3

date: 2002/01/02 01:26:27; author: root; state: Exp; lines: +1 -1

added number before printing character

—————————-

revision 1.2

date: 2002/01/02 01:22:23; author: root; state: Exp; lines: +3 -1

added OUT

—————————-

revision 1.1

date: 2002/01/02 01:20:50; author: root; state: Exp;

Initial revision

RCS file: mdc.c,v
Working file: mdc.c
head: 1.6
branch:
locks: strict
root: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;    selected revisions: 6
description:
Main function Of MDC
—————————-
revision 1.6    locked by: root;
date: 2002/01/02 01:29:55;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.5
date: 2002/01/02 01:28:26;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.4
date: 2002/01/02 01:27:40;  author: root;  state: Exp;  lines: +1 -0
*** empty log message ***
—————————-
revision 1.3
date: 2002/01/02 01:26:27;  author: root;  state: Exp;  lines: +1 -1
printing character
—————————-
revision 1.2
date: 2002/01/02 01:22:23;  author: root;  state: Exp;  lines: +3 -1
added OUT for return -1
—————————-
revision 1.1
date: 2002/01/02 01:20:50;  author: root;  state: Exp;
Initial revision

Posted in Project 2: Multiple Data Compression and Encryption | Leave a comment

unichar function for MDCEUIT

RCS file: mdcmain.c,v
Working file: mdcmain.c
head: 1.8
branch:
locks: strict
root: 1.8
access list:
symbolic names:
keyword substitution: kv
total revisions: 8; selected revisions: 8
description:
main function for MDC project
—————————-
revision 1.8 locked by: root;
date: 2014/09/19 05:22:09; author: root; state: Exp; lines: +3 -4
get the master array successfully :-)))
—————————-
revision 1.7
date: 2014/09/19 05:09:58; author: root; state: Exp; lines: +44 -0
create unichar function
—————————-
revision 1.6
date: 2014/09/19 03:55:13; author: root; state: Exp; lines: +15 -2
read function completed
file readed on terminal
—————————-
revision 1.5
date: 2014/09/19 03:18:49; author: root; state: Exp; lines: +2 -1
print fd value
—————————-
revision 1.4
date: 2014/09/19 03:12:41; author: root; state: Exp; lines: +17 -1
creat open file function
—————————-
revision 1.3
date: 2014/09/19 02:06:19; author: root; state: Exp; lines: +1 -1
creat open function
—————————-
revision 1.2
date: 2014/09/19 01:58:09; author: root; state: Exp; lines: +2 -1
creat a open function to open the file
—————————-
revision 1.1
date: 2014/09/19 01:52:30; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Project 2: Multiple Data Compression and Encryption | Leave a comment

Call Stack

Programs written in the procedural style (as opposed to object-oriented style) are organized as a logical hierarchy of subroutine calls. In general, each subroutine call involves passing arguments from the caller to the callee. In addition, the callee may declare temporary local variables. Subroutine arguments and automatic local variables are accommodated at the top of virtual memory in an area known as the stack segment or simply as the stack. See Figure 5.

Figure 5Fig. 5 Memory map showing the stack segment.

The hierarchy of subroutine calls begins when the operating system invokes the program’s main() function in C or the MAIN program in Fortran. Under normal circumstances, it ends when “main” returns to the operating system. The entire sequence can be represented as a call graph like that in Figure 6.

Figure 6

  1. OS calls main
  2. main calls func1
  3. func1 calls func2
  4. func2 returns to func1
  5. func1 calls func3
  6. func3 returns to func1
  7. func1 returns to main
  8. main calls func4
  9. func4 returns to main
  10. main returns (exit status) to OS

Fig. 6 Typical subroutine call graph.

Before calling main, the operating system pushes the elements of the command line that was used to invoke the program on “top” of the initially empty stack. In C, the main() function has access to these arguments through the argc and argv parameters, while Fortran MAIN programs can use the IARGC and GETARG subroutines, which are non-standard extensions.

As execution commences, main pushes its automatic variables on top of the stack. This makes the stack “grow” towards lower addresses. Then, just prior to calling func1, main pushes the arguments to func1. Together, main’s automatic variables and the arguments to func1 constitute a stack frame. Stack frames accumulate on the stack as the program descends the call graph, and are dismantled as it ascends. The procedure is outlined in Figure 7 below.

Figure 7Fig. 7 Evolution of the stack segment corresponding to the call graph shown in Figure 6.

By convention, the currently active subroutine can only reference the arguments it was passed and its own local automatic and static variables (plus any globally accessible data). For example, while func2 is executing, it can not access func1′s local variables, unless of course func1 passes references to its local variables in the argument list to func2.

Posted in Data Structures with C | Leave a comment

functions file for MDC completed

RCS file: func.c,v
Working file: func.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
MDC functions
—————————-
revision 1.1 locked by: root;
date: 2014/09/17 03:02:24; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Project 2: Multiple Data Compression and Encryption | Leave a comment