In which segment does a command line argument goes…??
In which segment does a command line argument goes…??
sir i have implement client server model using message queue
How to find the size of Dynamic array.
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));
}
Message queues with multiple client server implemented
i have completed the client server project using threads…
I have implemented open & release in my character driver.
implemented sockets using unix…… faced some problems…. but nw everything sorted out..
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
Done chat via sockets
Implemented client- server project using sockets
implemented with sockets ..within same OS
chat program with sockets done!!
chat through socket is implemented ….working on client server project…..