PDA

View Full Version : i m unable to debug it. help me.


alokdotnet
08-31-2004, 06:42 PM
Hi all geeks,
it a prob that i m anable to debug these programe. one is for serve and other one is of client.
when binary of them are running in diffrent terminal, they should communicate.
But I M UNABLE TO DEBUG IT.
i m giving source code of both progm

CLIENT CODE HERE:

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <netdb.h>
#include <stdlib.h>
void send_data();
main(int argc,char *argv[])
{
switch(argc){
case 1:
printf("client\n");
printf("USAGE: Client \"your message\"\n");
break;


case 2:
send_data();
break;
}
}


void send_data(){

struct sockaddr_in sin;
/*THESE comments only tell u what is that, which u are using.......
() what is struct sockaddr_in?
struct sockaddr_in{
short sin_family;
unsigned short sin_port;
struct in_addr sin_addr;
char sin_zero[8];
};
ANOTHER Structue
struct in_addr {
unsigned long s_addr;
};

*/

int sock=socket(AF_INET,SOCK_DGRAM,0);
printf("Socket is created with No. %d\n",sock);
//In short, this function creates "an end point for communication". The return value from this function is a handle to a socket. This number is passed as a parameter to almost all of the other library calls.//
sin.sin_family = AF_INET;
sin.sin_port = htons(29999);
sin.sin_addr.s_addr = inet_addr("127.0.0.1");
char *msg="Hello Linux";
int bind_err=bind(sock,(struct sockaddr *)&sin,sizeof(sin));
if(bind_err==-1)
printf("Error in Socket Binding...!\n");
else
{
printf("No error in Binding.\n");

/*SYNTEX OF SENDTO FUNCTION*/
//int sendto(int socket, char *buffer, int length, int flags, struct sockaddr *destination_address, int address_size);
int sock_fb=sendto(sock,msg,strlen(msg)+1,0,(struct sockaddr *)&sin,sizeof(sin));
printf("%d Byte(s) has been Sent.....\n",sock_fb);
}
}

//CLIENT CODE ENDS HERE


//SERVER CODE BEGINS HERE

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <netdb.h>
#include <stdlib.h>
void listen_data();
main(int argc,char *argv[])
{
switch(argc){
/*case 1:
printf("server\n");
// printf("USAGE: Client \"your message\"\n");
break;
*/

case 1:
listen_data();
break;
}


void listen_data(){

struct sockaddr_in sin;
/*THESE comments only tell u what is that, which u are using.......
() what is struct sockaddr_in?
struct sockaddr_in{
short sin_family;
unsigned short sin_port;
struct in_addr sin_addr;
char sin_zero[8];
};
ANOTHER Structue
struct in_addr {
unsigned long s_addr;
};

*/

int sock=socket(AF_INET,SOCK_DGRAM,0);
printf("Socket is created with No. %d\n",sock);
//In short, this function creates "an end point for communication". The return value from this function is a handle to a socket. This number is passed as a parameter to almost all of the other library calls.//
sin.sin_family = AF_INET;
sin.sin_port = htons(25555);
sin.sin_addr.s_addr = inet_addr("127.0.0.1");
char *msg;
int sin_length;
int bind_err=bind(sock,(struct sockaddr *)&sin,sizeof(sin));
if(bind_err==-1)
printf("Error in Socket Binding...!");
else
printf("No error in Binding.\n");
printf("Server is listening on port %d.\n",sin.sin_port);
sin_length=sizeof(sin);
/*SYNTEX OF SENTO FUNCTION*/
//int recvfrom(int socket, char *buffer, int length, int flags, struct sockaddr *sender_address, int *address_size);
int sock_fb=recvfrom(sock,msg,strlen(msg)+1,0,(struct sockaddr *)&sin,&sin_length);
printf("%d Byte(s) has been Received.....\n",sock_fb);
}

//SERVER CODE ENDS HERE

[Edited to add code tags...]

RobSeace
08-31-2004, 09:53 PM
Please, use the ... tags in the future when posting
code! It's utterly unreadable without them... I added them to the
above...

Your main problem is that the client sendto()'s the same address
that it's bound to... Ie: it's talking to itself... You need to use a
different sockaddr_in, or at least fill the current one you use with
different data after the bind(), so you can reach the correct location
of the server...

alokdotnet
09-01-2004, 06:30 AM
thankx admin
but i m using standalone system for this prog and Doglus E. Comer have written that if u want to use stand alone system u can use loop feedback address. that is 127.0.0.1.
and i think i , using it.
plz check the code and make it working for stand alone system and tell me where i m mistaken
thankx again

RobSeace
09-01-2004, 02:08 PM
There's nothing wrong with both sender and receiver being on the
same IP address... But, they simply can't be on the same port
number... That's the problem...

Your client code bind()'s to port# 29999, and then tries to sendto()
that same exact port#... While, your server code binds to port#
25555, and waits for the message to arrive there...

You must change the client to sendto() port# 25555, if you want
that server to ever see the message...

alokdotnet
09-01-2004, 02:28 PM
Hi RobSeace,
i think i have found prob with ur help.
thankx a lot, i will be again here with new prob.

alokdotnet
09-02-2004, 08:47 AM
hi
but how can i pass argument in sendto function.
the very first argument is int socket..
what socket no should i pass. tell me plz

alokdotnet
09-02-2004, 08:59 AM
here is SENDER Or CLIENT code

#include<sys/types.h>
#include<sys/socket.h>
#include<netdb.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include<stdio.h>
void send_udp();
main(int argc,char *argv)
{
if(argc==1)
{
printf("Too few parameters\n");
printf("Usage : udp_send \"your message\"\n");
}
else
{
if(argc==2)

// send function goes here//
send_udp();
else
printf("Too many parameters\n");

}
}

void send_udp()
{
int socket_ret;
char *msg;
//syntex of socket function
//--- int socket(int domain,int type,int protocol);
socket_ret=socket(AF_INET,SOCK_DGRAM,0);
printf("socket function has returned %d\n",socket_ret);
struct sockaddr_in sin;
sin.sin_family=AF_INET;
sin.sin_port=htons(29999);
sin.sin_addr.s_addr=inet_addr("10.0.0.1");
//SYNTEX OF BIND FUNCTION
// bind(int socket,struct sockaddr *address,int address_length);
int bind_ret=bind(socket_ret,(struct sockaddr *)&sin,sizeof(sin));
printf("Bind function has returned %d \n ",bind_ret);
// SENDTO FUNCTION GOES HERE
//SYNTEX SENDTO function
// int sendto(int socket,char *buffer,int length,int flags,
// struct sockaddr *destination_address,int address_size);
int dest_socket=htons(29998);
int sin_length=sizeof(sin);
int sendto_ret=sendto(dest_socket,msg,strlen(msg)+1,0, (struct sockaddr
*)&sin,sin_length);
if(sendto_ret!=-1)
printf("%d Byte(s) have sent....\n",sendto_ret);
else
printf("Error in sending Data....from socket %d to socket %d\n",sin
.sin_port,dest_socket);

}



HERE IS SERVER OR RECEIVER CODE

#include<sys/types.h>
#include<sys/socket.h>
#include<netdb.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include<stdio.h>
void recv_udp();

main(int argc,char *argv)
{
recv_udp();
}

void recv_udp()
{
int socket_ret,recvfrom_ret;
char *msg;
system("clear");
//syntex of socket function
//--- int socket(int domain,int type,int protocol);
socket_ret=socket(AF_INET,SOCK_DGRAM,0);
printf("socket function has returned %d\n",socket_ret);
struct sockaddr_in sin;
sin.sin_family=AF_INET;
sin.sin_port=htons(29998);
sin.sin_addr.s_addr=inet_addr("10.0.0.1");
//SYNTEX OF BIND FUNCTION
// bind(int socket,struct sockaddr *address,int address_length);
int bind_ret=bind(socket_ret,(struct sockaddr *)&sin,sizeof(sin));
printf("Bind function has returned %d \n ",bind_ret);
// RECVFROM FUNCTION GOES HERE
//SYNTEX SENDTO function
// int recvfrom(int socket,char *buffer,int length,int flags,
// struct sockaddr *sender_address,int address_size);


printf("server[10.0.0.1] is listening on port %d\n",sin.sin_port);

int sin_length=sizeof(sin);
recvfrom_ret=recvfrom(socket_ret,msg,strlen(msg)+1 ,0,(struct sockaddr*)
&sin,&sin_length);
printf("Function recvfrom has returned %d\n",recvfrom_ret);
}

RobSeace
09-02-2004, 01:21 PM
Um, you seem to not understand how sockets work... I would
suggest perusing some sample (http://www.developerweb.net/sock-faq/examples.tar.gz) code (http://www.kohala.com/start/unpv12e/unpv12e.tar.gz), and reading the FAQ forum (http://www.developerweb.net/forum/viewforum.php?f=53) here...

The value you should pass as the first arg to sendto() is "socket_ret"
in your code... The value you have to change to reflect the correct
target port# is "sin.sin_port"... (Change it AFTER you bind() with
that sockaddr, but BEFORE you pass it to sendto() as the 5th arg...)
Ie: change this one line:


int dest_socket=htons(29998);


to instead be:


sin.sin_port = htons (29998);


And, then change the first arg of sendto() to be "socket_ret", and
it should work...

alokdotnet
09-10-2004, 08:00 PM
But how can i pass sin.sin_port=htons(2998);
bz first argument is int then how can i give it the sin.sin_port there.

alokdotnet
09-10-2004, 08:07 PM
i have again code from new end this my code

#include<sys/types.h>
#include<sys/socket.h>
#include<netdb.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include<stdio.h>
void send_udp();
main(int argc,char *argv)
{
if(argc==1)
{
printf("Too few parameters\n");
printf("Usage : udp_send \"your message\"\n");
}
else
{
if(argc==2)

// send function goes here//
send_udp();
else
printf("Too many parameters\n");

}
}

void send_udp()
{
int socket_ret;
char *msg;
struct sockaddr_in client,server;

socket_ret=socket(AF_INET,SOCK_DGRAM,0);

printf("socket function has returned %d\n",socket_ret);

client.sin_family=AF_INET;

client.sin_port=htons(2999);

client.sin_addr.s_addr=inet_addr("12.0.0.1");

int bind_ret=bind(socket_ret,(struct sockaddr *)&client,sizeof(client));
printf("Bind function has returned %d \n ",bind_ret);
//server config
server.sin_family=AF_INET;

server.sin_port=htons(5000);
server.sin_addr.s_addr=inet_addr("12.0.0.1");
int sin_length=sigeof(server);

int sendto_ret=sendto(server.sin_port,msg,strlen(msg)+ 1,0,(struct sockaddr_in *)&server,sin_length);
if(sendto_ret!=-1)
printf("%d Byte(s) have sent....\n",sendto_ret);
else
printf("Error in sending Data....from socket %d to socket %d\n",client.sin_port,server.sin_port);

}
////end of file





AND following error is coming...
[i was working in windows, thats why i was using cygwin distro]

1.c: In function `send_udp':
1.c:52: warning: passing arg 5 of `sendto' from incompatible pointer type
/cygdrive/d/DOCUME~1/alok/LOCALS~1/Temp/ccp74iGw.o(.text+0x127):1.c: undefined reference to `_sigeof'
collect2: ld returned 1 exit status

RobSeace
09-11-2004, 07:39 PM
Um... Are you reading what I'm writing here?? Let me quote myself:


The value you should pass as the first arg to sendto() is "socket_ret"
in your code...

...

And, then change the first arg of sendto() to be "socket_ret", and
it should work...


You don't pass a port# to sendto()! That doesn't make any sense!

You fill in the port# within the sockaddr_in struct, and then pass a
pointer to that structure to sendto() (as the FIFTH argument, NOT
as the FIRST!!!!)... The value passed as the FIRST argument
must be an actual socket, as returned from socket()!! I don't know
how I can make this any clearer...

alokdotnet
09-12-2004, 07:49 AM
then what shoud i pass as the first argument of send,
another proplem is that i have used sockaddr_in and when i m using this struct in bind function it is giving the error
"incompatible pointer type "

RobSeace
09-12-2004, 07:41 PM
What?? Did you just ask me what you should pass as the first
argument to send()?? (I assume you mean sendto(), since that's
what you're using...) When I've repeated and explicitly answered
that very question countless times already?!? OY! Can someone
else take a shot at answering this person?? I obviously am not
getting through...

And, the "incompatible pointer type" message is occurring because
you cast &server to (struct sockaddr_in *), which it already IS in
reality, rather than casting it to (struct sockaddr *), which you are
supposed to...

To try to be clearer (though, I'm rapidly losing hope of being clear
enough), here is what your sendto() in the above code should look
like:


int sendto_ret=sendto(socket_ret, msg, strlen(msg)+1, 0, (struct sockaddr *)&server, sin_length);


However, another problem in the last batch of code is that you
don't initialize "msg" to any value, so that code is going to probably
seg-fault...

alokdotnet
09-12-2004, 08:41 PM
But when i m declaring the structure like this

struct sockaddr_in client,server;

then i should pass sockaddr_in instead of sockaddr bz both have diffrent members then we cant interchange it.
And I want to make it clear i m using UDP socket that's why i m talking bout only sendto function, but right now i m too much confuse what to pass and what not to pass.

Respected Rob if u have enough time,u can do it for me then plz
make this C code complete running and comment where u have change the programe and again post it here.
It will very helpful to me to catch my mistake in coding....

i3839
09-12-2004, 09:08 PM
Read this: http://www.ecst.csuchico.edu/~beej/guide/net/html/structs.html

As Rob said, 'msg' isn't initialized, so the program will most likely segfault.

You also use 12.0.0.1, I think you wanted the local address, thus 127.0.0.1. Just a guess.

alokdotnet
09-17-2004, 09:48 AM
I m really thankful to u guys, u r helping me a lot. Thankx for ur this co-oprtation

i have filtered out my code
now plz see and tell where is the problem..

#include<sys/types.h>
#include<sys/socket.h>
#include<netdb.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include<stdio.h>
void send_udp();//char*);
int main(int argc,char *argv)
{
char *pass;
if(argc==1)
{
printf("Too few parameters\n");
printf("Usage : udp_send \"your message\"\n");
}
else
{
if(argc==2)
{
// send function goes here//

pass=argv;

send_udp();
}
else
printf("Too many parameters\n");

}
}

void send_udp()//char *send_msg)
{
int socket_ret;
char *msg="Hi linux, send this data....Recevive it are u lisytening me
"; struct sockaddr_in client,server;
//syntex of socket function
//--- int socket(int domain,int type,int protocol);
socket_ret=socket(AF_INET,SOCK_DGRAM,0);
printf("socket index = %d\n",socket_ret);
//printf("%s",msg);

client.sin_family=AF_INET;
client.sin_port=htons(29998);
client.sin_addr.s_addr=inet_addr("127.0.0.1");
//SYNTEX OF BIND FUNCTION

// bind(int socket,struct sockaddr *address,int address_length);
int bind_ret=bind(socket_ret,(struct sockaddr *)&client,sizeof(client));
printf("Bind function has returned %d \n ",bind_ret);
// SENDTO FUNCTION GOES HERE
//SYNTEX SENDTO function
// int sendto(int socket,char *buffer,int length,int flags,
// struct sockaddr *destination_address,int address_size);
server.sin_family=AF_INET;
server.sin_port=htons(29997);
server.sin_addr.s_addr=inet_addr("127.0.0.1");

int sendto_ret=sendto(server.sin_port,msg,strlen(msg)+ 1,0,(struct sockaddr_in *)&server,sin_length);
if(sendto_ret!=-1)
printf("%d Byte(s) have sent....\n",sendto_ret);
else
printf("Error in sending Data....from socket %d to socket %d\n",ser
ver.sin_port,socket);






EROOR WHICH ARE COMMING.....

udp_send.c: In function `send_udp':
udp_send.c:59: warning: passing arg 5 of `sendto' from incompatible pointer type
udp_send.c:66: parse error at end of input

RobSeace
09-17-2004, 01:36 PM
ARGH! Go back and read my last response! I told you what was
wrong: your sendto() line is wrong!!!! I even posted exactly what
it needed to be, and it's still the case:


int sendto_ret=sendto(socket_ret, msg, strlen(msg)+1, 0, (struct sockaddr *)&server, sin_length);


What you have there doesn't make any sense, because you're
using a port# as a socket, and you're casting incorrectly (to a type
that it already is, and hence the cast accomplishes nothing)...
Also, I don't see the declaration of "sin_length" here... And, it
appears you're missing a closing "}" brace at the end of your
function, too...

alokdotnet
10-08-2004, 08:43 PM
hey i have come over all the problems but bew problem has arised.....
when server is listining, and client sends the data, but as soon as send the data but server side it not listening when we went deep, and we found that perror returns "BAD ADDRESS"
how to over come this problem.........

alokdotnet
10-08-2004, 08:52 PM
i do need this answer, why its not taking loop feedback address[127.0.0.1]

RobSeace
10-08-2004, 10:11 PM
I really can't understand what you're asking...

But, a "Bad address" error likely means you're passing in a bad
pointer, or an incorrect length, or something like that... You would
need to post your buggy code in order for any of us to correct the
bug, though...

alokdotnet
10-09-2004, 02:26 AM
client is working well
and its sending packets.
in udp listener part every function is returnning there expected non error value like bind returns 0, socket returns 3 and etc...
and its listening but as soon as we start client or sender in another terminal the recevfrom returns -1 and peoor shows bad address.....

RobSeace
10-09-2004, 07:15 PM
Then, your recvfrom() call is wrong... It's hard to guess without
seeing the code, but I'd guess probably the most likely culprit
is the sockaddr pointer your passing and/or the pointer to its
length... A common mistake is to fail to initialize the length before
passing in a pointer to it... The other possible suspect would be
your data buffer and/or its size... Maybe you haven't allocated
as much space for it as you are claiming to want to receive into
it... *shrug* Like I say, it's hard to guess without seeing your
source code...

alokdotnet
10-09-2004, 08:09 PM
#include<stdio.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<netdb.h>
#include<arpa/inet.h>
#include<errno.h>
#include<netinet/in.h>
main(){
int sockfd,bind_ret,length;
char *msg;
struct sockaddr_in server,client;
server.sin_family=AF_INET;
server.sin_port=htons(29999);
server.sin_addr.s_addr=inet_addr("127.0.0.1");
client.sin_family=AF_INET;
client.sin_port=htons(29998);
client.sin_addr.s_addr=inet_addr("127.0.0.1");
sockfd=socket(AF_INET,SOCK_DGRAM,0);
perror("socket");
bind_ret=bind(sockfd,(struct sockaddr *)&client,sizeof(client));
perror("bind");
length=sizeof(server);
recvfrom(sockfd,msg,10000,0,(struct sockaddr *)&client,length);
perror("recvfrom");

}


here ia code you know cod eof sender

RobSeace
10-10-2004, 06:28 PM
You never allocate any memory for "msg"... So, it's just a garbage
pointer, pointing nowhere...

alokdotnet
10-10-2004, 07:24 PM
but i have declare the pointer to char means char string for receiving message

RobSeace
10-11-2004, 07:55 PM
What? I can't parse that sentence...

But, the simple fact is that you only declare "msg" as a pointer,
and don't point it at anything... You never allocate any space for
it to hold the 10000 bytes you try to recvfrom() into it... Memory
isn't just magically allocated for you, you know?? You have to
do it yourself... This is C, not some hand-holding language like
Java or something...

alokdotnet
10-14-2004, 06:26 AM
Hi geeks,
its my newest and latest code now tell me where is problem....
we have found BAD ADDRESS problem when we send data from udp_client ..

#include<sys/types.h>
#include<sys/socket.h>
#include<netdb.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include<stdio.h>
#include<errno.h>
void recv_udp(char *argv[]);

main(int argc,char *argv[])
{ if(argc<2 || argc>2)
{

printf("\nBad number of parameters\nUsage:server ip_address\n");
}
else
{
recv_udp(argv);
}

}

void recv_udp(char *argv[])
{
int socket_ret,recvfrom_ret;
char *msg,*addr=argv[1];
struct sockaddr_in server,client;
system("clear");
//syntex of socket function
//--- int socket(int domain,int type,int protocol);
socket_ret=socket(AF_INET,SOCK_DGRAM,0);
perror("socket");
//printf("socket function has returned %d\n",socket_ret);
struct sockaddr_in sin;
server.sin_family=AF_INET;
server.sin_port=htons(29998);
server.sin_addr.s_addr=inet_addr(addr);
//SYNTEX OF BIND FUNCTION
// bind(int socket,struct sockaddr *address,int address_length);
int bind_ret=bind(socket_ret,(struct sockaddr *)&server,sizeof(server)
);
perror("bind_ret");
printf("Bind function has returned %d \n ",bind_ret);
// RECVFROM FUNCTION GOES HERE
//SYNTEX SENDTO function
// int recvfrom(int socket,char *buffer,int length,int flags,
// struct sockaddr *sender_address,int address_size);
client.sin_family=AF_INET;
client.sin_port=htons(29999);
client.sin_addr.s_addr=inet_addr("127.0.0.1");
//client.sin_addr.s_addr=inet_addr("192.168.2.2");

perror("inet_addr");

printf("%s is listening on port %d\n",argv[1],server.sin_port);

int sin_length=sizeof(client);
recvfrom_ret=recvfrom(socket_ret,msg,10000,0,(stru ct sockaddr*)&client,
&sin_length);
perror("recvfrom");
//printf("Function recvfrom has returned %d\n",recvfrom_ret);
}






#include<sys/types.h>
#include<sys/socket.h>
#include<netdb.h>
#include<netinet/in.h>
#include<arpa/inet.h>
#include<stdio.h>
void send_udp(char *argv[]);//char*);
int main(int argc,char *argv[])
{
char *pass;
if(argc<3 || argc>3)
{
printf("Bad number of parameters\n");
printf("Usage : udp_send \"your message\" ip_address\n");
}
else
{
// send function goes here//
//pass=argv;
send_udp(argv);
}
}

void send_udp(char *argv[])//char *send_msg)
{
int socket_ret,sendto_ret;
char *udp_msg,*passed;//,*msg="Hi linux, send this data....Recevive it
are u listening me ";
char *msg=argv[1];


struct sockaddr_in client,server;
//syntex of socket function
//--- int socket(int domain,int type,int protocol);
socket_ret=socket(AF_INET,SOCK_DGRAM,0);
printf("socket index = %d\n",socket_ret);
//printf("%s",msg);

client.sin_family=AF_INET;
client.sin_port=htons(29999);
client.sin_addr.s_addr=inet_addr("127.0.0.1");
//SYNTEX OF BIND FUNCTION
// bind(int socket,struct sockaddr *address,int address_length);
int bind_ret=bind(socket_ret,(struct sockaddr *)&client,sizeof(client)
);
printf("Bind function has returned %d \n ",bind_ret);
// SENDTO FUNCTION GOES HERE
//SYNTEX SENDTO function
// int sendto(int socket,char *buffer,int length,int flags,
// struct sockaddr *destination_address,int address_size);
server.sin_family=AF_INET;
server.sin_port=htons(29998);
server.sin_addr.s_addr=inet_addr(argv[2]);

int sin_length=sizeof(server);

sendto_ret=sendto(socket_ret,msg,strlen(msg)+1,0,( struct sockaddr *)&ser
ver,sin_length);
// printf("%d",server.sin_port);
//printf("%s",msmsgg);
if(sendto_ret!=-1)


printf("%d Byte(s) have sent....\n",sendto_ret);

else

printf("Error in sending Data....from socket %d to socket %d\n",cli
ent.sin_port,server.sin_port);
}

RobSeace
10-14-2004, 01:09 PM
Um, I already answered you: your problem is that you fail to
allocate any space for the "msg" buffer that you try to recvfrom()
into!! Right now, it has no allocated memory, and points to a
random bogus address!! I don't know how much clearer I can
be about this... Look, you want to either add this:


msg = malloc (10000);


somewhere before your recvfrom() call, or change the initial
definition from a char* into:


char msg[10000];


But, as you have it now, it's just a pointer, which points nowhere,
as you never initialize to any value, and you certainly don't give it
10000 bytes of free memory to point to...

alokdotnet
10-14-2004, 07:20 PM
thankx now i got your point, about msg but what bout BAD address problem......
it is presisting this side..

RobSeace
10-14-2004, 10:52 PM
Um, that IS the cause of the "Bad address" (aka EFAULT) error!
At least, I would be amazed if it's NOT... That's precisely the sort
of thing which should cause an EFAULT error...

Are you saying that even if you allocate memory for "msg", you
still get EFAULT??

alokdotnet
10-26-2004, 07:53 PM
I HAVE DONE IT.....
with your mighty support.....
:lol: :lol: :lol: :P :o :o :o :o :wink: :wink: :wink:
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................A LOT to This Great Forum. Which help me a lot........
I m really greetful to this forum, it is the ONLY
GURU of my networking studies.....
I hope like this time. this forum will help me out.....
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................
Thankx .................