EmbLogic's Blog

Segment for command line arguments.??

In which segment does a command line argument goes…??

Posted in Data Structures with C | 1 Comment

shared memory

project complete…..

Posted in Uncategorized | Leave a comment

project status to siddarath sir.

sir i have implement client  server model using message queue

Posted in Uncategorized | Comments Off

Size of Dynamic array

How to find the size of Dynamic  array.

Posted in Uncategorized | Leave a comment

ISO C90 forbids mixed declarations and code

make -C /lib/modules/2.6.36.4/build M=/home/zaffer/linux modules
make[1]: Entering directory `/usr/src/linux-2.6.36.4′
CC [M] /home/zaffer/linux/lko.o
/home/zaffer/linux/lko.c: In function ‘start’:
/home/zaffer/linux/lko.c:36:10: warning: ISO C90 forbids mixed declarations and code// WAT IS THE ABOVE LINE?……….//…………#######
Building modules, stage 2.
MODPOST 1 modules
WARNING: “scull_open” [/home/zaffer/linux/lko.ko] undefined!
CC /home/zaffer/linux/lko.mod.o
LD [M] /home/zaffer/linux/lko.ko
make[1]: Leaving directory `/usr/src/linux-2.6.36.4′

HEADER FILE
#include
#include
#include
#include
#include
#include
#include

#define SCULL_MAJOR 0

#define SCULL_MINOR 0

#define device_name “ZAFFER”

#define device_no 1

#define NO_OF_DEVICES 1

#ifndef DEBUG
#define DEBUG
#endif

//………………defining file_operations……………

int scull_open(struct inode*,struct file*);
//int scullrelease(struct inode*, struct file* );

//……………….end of functions…………………..

//…………………….major mainor…………………

static int scull_major = SCULL_MAJOR;
static int scull_minor = SCULL_MINOR;
//………….. ……………………….
//……………….structs and declerations…………..
const struct file_operations fops={
.open = scull_open,
// release: scullrelease
};
struct Scull_dev{

struct cdev cdev;

};
struct Scull_dev *sculldev;

//………………………end of declerations………….
MODULE_AUTHOR(“Zaffer”);
MODULE_LICENSE(“GPL”);
//…………………………………………………..
55,1

LKO.C
int reg;
printk(KERN_INFO “Begin : %s\n”,__func__);
printk(KERN_INFO” HELLO KERNEL”);
printk(KERN_INFO “GREAT”);
if(scull_major)
{
dev=MKDEV(scull_major,scull_minor);
reg=register_chrdev_region(dev,scull_major,device_name);
}
else
{

reg=alloc_chrdev_region(&dev,scull_major,device_no,device_name);
scull_major=MAJOR(dev);
}
if(regcdev.owner=THIS_MODULE;
sculldev->cdev.ops=&fops;
cdev_init(&(sculldev->cdev),&fops );
int scull_open(struct inode *inode, struct file *filp)
{
// #ifdef DEBUG
// printk(KERN_INFO “open function performed sucessfully\n”);
- // #endif
return 0;
}
cdev_add(&(sculldev->cdev),dev,1);
return 0;
}
void __exit release(void)
{
#ifdef DEBUG
printk(KERN_INFO “exit : %s\n”,__func__);
#endif

printk(KERN_INFO “BYE KERNEL”);
unregister_chrdev_region(dev,device_no);
kfree(sculldev);
cdev_del(&(sculldev->cdev));

}

Posted in Uncategorized | Tagged | 2 Comments

Message Queues

Message queues with multiple client server implemented

Posted in Data Structures with C | Leave a comment

client server using threads

i have completed the client server project using threads…

Posted in Uncategorized | Leave a comment

driver status

done with open function

Posted in Uncategorized | Leave a comment

character driver status

I have implemented open & release in my character driver.

Posted in Uncategorized | Leave a comment

sockets

socket implemented with UNIX

Posted in Uncategorized | Leave a comment

sockets

implemented sockets using unix…… faced some problems…. but nw everything sorted out..

Posted in Uncategorized | Leave a comment

Internet not working..

My internet is not working.I tried re installing with relevant server packages but it still does not work.

internet connection: Airtel broadband

error: device not found

Posted in Uncategorized | Tagged , , | Leave a comment

Implementation of sockets

Done chat via sockets

Implemented client- server project using sockets

Posted in Uncategorized | Leave a comment

client server project implemented with sockets

implemented with sockets ..within same OS

chat program with sockets done!!

Posted in Uncategorized | Leave a comment

socket chat implemented

chat through socket is implemented ….working on client server project…..

Posted in Uncategorized | Leave a comment