with valgrind it does not work. I use seting debuging option (-d) at compilation
ache$i586-mingw32msvc-gcc -o adapter_listner_win32.exe adapter_listner.c -liphlpapi -lws2_32
and then set...
Type: Posts; User: wwwnuwan
with valgrind it does not work. I use seting debuging option (-d) at compilation
ache$i586-mingw32msvc-gcc -o adapter_listner_win32.exe adapter_listner.c -liphlpapi -lws2_32
and then set...
Hi,
I have developed a win32 program on linux in C. I used mingw to compile it and Wine to run it.
Now I have end up with some memory leak and I need to find where it comes from in the program. As...
Hi,
I have written a c program to retrieve all the network interfaces.
getifaddrs(&ifaddr)
But when I iterate through the ifaddr elements of the linklist it returns same interface many...
Hi,
I hv a programme which returns the local ip(ipv4) address.
I want to improve this as to check the ip is whether ipv4 or ipv6 and return.
here is what i hv written so for to get ipv4 address....
Hi, Is there any tools to create makemake file?
I hv set of source files (say mcast.c main.c) and a header file in my program. i need to create a make file for this.
I went through the google to...
Hi, Is there any tools to create makemake file.
I hv set of source files and a header file in my program. i need to create a make file for this.
I went through the google to find how to and im...
Hi,
In my program I hv two uuid_t type pointers.
I want to compare these two.
How can i do that?
eg code
int comuuid( uuid_t *uuid1 , uuid_t *uuid2 )
thanks a lot. I am new to C. it works now.
Hi, I tried to construct a simple program to generate an uuid.
#include <stdio.h>
#include <uuid/uuid.h>
int main()
{
get_uuid();
return 1;
}
sory its 127.0.1.1
I think this has no way to work out since my machine name (which I get by gethostname() method) is not in a DNS.
so I think it returns 127.0.0.1
any ideas about it?
Thanks.
Hi,
Finaly i found the fellowing programs to obtain the local ip .
but it returns 127.0.1.1
please advice what goes wrong with this?
struct hostent *he;
struct in_addr a;
could you please give a some code example for this?
now my programe is as follows.
char *hostname = malloc(MAXHOSTNAMELEN );
memset( hostname , 0 , MAXHOSTNAMELEN );
...
i tried with gethostname.
but it returns the hostname like "myLaptop".
I just need the ip like 192.168.10.10
my prev code was like as follows
memset( hostname , 0 , MAXHOSTNAMELEN );
...
Hi,
How can I get local IP adress within a C program?
I tried this with gethostname function but it can not be helped since i dnt know the host name of the machine.
Thanks
Thanks for the reply.
If I do it at application level could you give me some tips how to filter its own ip of a peer node.
I mean a easy way rather I try with it. actualy im in a touch schedule...
Hi All,
I im developing some p2p multicasting overlay layer using c.
basically what i want to implement is to multicast a string(or any query) from one node wait for a possible response. In the...
Hi,
I know how to use malloc function basically.
what i want to know is how to allocate the memory dynamically with scanf.
for example say im going to scan the string "Test" . Then i want to...
Hi,
Can anybody tell me how to allocate memory to a pointer which is to used in scanf.
char *varpointer;
scanf("%s" , varpointer); // read some chars here
when i used above code...
thank you very much for pointing out my mistake. it works now. thanks again.
Hi,
I declared the struct time value and import the header sys/time.h also.
but when compile the program it returns gives the error "/home/lsf/mesh_project/D5/src/lib/mcast.c|199|error: ‘timeval’...
Hi Gurus,
This is my first thread here.
I m developing p2p multicasting subtrate which is intended to multicast a query string and wait for a response from its groups nodes.
here i need to...