EmbLogic's Blog

Author Archives: poonam.rai664

client server programme using socket

#include #include //#include #include #include int main() { int sockfd,true,aret,bret; char ch[5]; struct sockaddr_in server_add,client_add; socklen_t len; server_add.sin_family = AF_INET; server_add.sin_port=htons(7770); server_add.sin_addr.s_addr = inet_addr(“127.0.0.1″); if(setsockopt(sockfd,SOL_SOCKET,SO_REUSEADDR,&true,sizeof(int))==-1) { sockfd = socket(AF_INET,SOCK_STREAM,0); if(sockfd==-1) { printf(“fail in openning socket”); } } printf(“sockfd =%d\n”,sockfd); bret … Continue reading

Posted in Uncategorized | Leave a comment

registering character driver

head 1.15; access; symbols; locks root:1.15; strict; comment @ * @; 1.15 date 2014.05.11.08.48.49; author root; state Exp; branches; next 1.14; 1.14 date 2014.05.10.07.23.56; author root; state Exp; branches; next 1.13; 1.13 date 2014.05.10.07.17.59; author root; state Exp; branches; next … Continue reading

Posted in Uncategorized | Leave a comment

character driver registration

Posted in Uncategorized | Leave a comment

algorithm to write initialization function for character deriver

follow these simple steps to initialize your character driver…. 1. use module __init(initialization_function_name) this is a micro which takes function name as argument. 2. static int initialization_function_name(void) this is the defination of micro… in this defination follow following steps.. a. … Continue reading

Posted in Uncategorized | Leave a comment

information about kernel symbol table

We’ve seen how insmod resolves undefined symbols against the table of public kernel symbols. The table contains the addresses of global kernel items—functions and variables—that are needed to implement modularized drivers. When a module is loaded, any symbol exported by … Continue reading

Posted in Uncategorized | Leave a comment

register your charcter deriver

Posted in Uncategorized | Leave a comment

register of character deriver

Posted in Uncategorized | Leave a comment

fibonnacci series using pointers

#include 2 #include 3 #include 4 int main() 5 6 { 7 int a,b,c,n,t,i; 8 int *ptr; 9 10 i =2; 11 /* a=0; 12 b=1;*/ 13 printf(“enter the max range for fibonacci”); 14 scanf(“%d”,&n); ptr = (int *)malloc(sizeof(n)); 17 … Continue reading

Posted in Uncategorized | Leave a comment

writing in character driver with multiple quantum

#include”header.h” #include”declration.c” struct ScullQset *create_scullqset(int nosqset) { struct ScullQset *lscullqset,*temp,*new; int i,flag=1; lscullqset=NULL; //int i; printk(KERN_INFO”begin=%s\n”,__func__); for(i=0;inext=NULL; lscullqset->data=NULL; } else { new = (struct ScullQset *)kmalloc(sizeof(struct ScullQset),GFP_KERNEL); new->next=NULL; new->data=NULL; temp->next=new; temp=temp->next; } #include”header.h” #include”declration.c” struct ScullQset *create_scullqset(int nosqset) { struct … Continue reading

Posted in Character Driver | Leave a comment

about RCS

RCS (revision control system) is a project management tool. RCS uses a number of commands to manage source file. It works by tracking source file as its changed by maintaining a single file with list of changes in sufficient detail … Continue reading

Posted in Uncategorized | Leave a comment

ipc server using pipe

head 1.2; access; symbols; locks poonam:1.2; strict; comment @ * @; 1.2 date 2014.03.25.05.06.08; author poonam; state Exp; branches; next 1.1; 1.1 date 2014.03.25.02.12.49; author poonam; state Exp; branches; next ; desc @implemented server with three requesting client and three … Continue reading

Posted in Uncategorized | Leave a comment

implemented fifo using single client

created FIFO between two process. In this one process is writing and another process is reading using named pipes that is FIFO.

Posted in Uncategorized | Leave a comment

implemented interprocess communication using pipe

created a communication medium between server and single client. client  sends request to the server to perform an operation.server after performing operations send the result back to the client .this result is again read by the client by using pipe.

Posted in Uncategorized | Leave a comment

implemented interprocess communication without pipe

simply opened file in server side and write the file.this file (file descriptor) is passed as argument through execl to the another program called client which than read the file using sscanf(and then lseek().

Posted in Uncategorized | Leave a comment

how c convert program into executable

After writing the programme it is saved with .c name. During its execution code file gets converted into executable in four different steps.Firstly c code is preprocessed and get converted into .i file. Then .i file is compiled and get … Continue reading

Posted in Uncategorized | Leave a comment